/* ============ RESET & BASICS ============ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4a919e;
    --text-dark: #222;
    --text-light: #666;
    --bg-light: #f8f9fa;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--text-light);
    line-height: 1.6;
    background-color: #f0f0f0;
}

/* 1. Main Wrapper Styling */
.main-wrapper {
    max-width: 1100px;
    margin: 0 auto;
    background-color: #fff;
    box-shadow:
        -10px 0 20px -10px rgba(0,0,0,0.1),
        10px 0 20px -10px rgba(0,0,0,0.1);
}

h1, h2, h3, h4 {
    color: var(--text-dark);
    font-weight: 700;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }

a { text-decoration: none; transition: all 0.3s ease; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* Utility Classes */
.container {
    width: 100%;
    max-width: 1000px; /* Adjusted to fit neatly inside the 1100px wrapper */
    margin: 0 auto;
    padding: 0 20px;
}

.container-narrow {
    max-width: 800px;
}

.text-center { text-align: center; }
.section-padding { padding: 80px 0; }
.bg-light { background-color: var(--bg-light); }
.mb-12 { margin-bottom: 3rem; } /* Added for spacing consistency */

.sub-title {
    display: block;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 2px;
    margin-bottom: 10px;
    color: var(--primary-color);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
}
.btn-primary:hover { background-color: #367a85; }

.btn-small {
    padding: 8px 20px;
    font-size: 0.8rem;
    background-color: #fff;
    color: var(--primary-color);
}

/* ============ HEADER ============ */
/* ============ HEADER ============ */
header {
    padding: 20px 0;
    background: #fff;
    position: sticky; /* Makes the header stick */
    top: 0;           /* Position it at the very top */
    z-index: 1000;    /* Ensures it stays above all other content */
    box-shadow: 0 2px 10px rgba(0,0,0,0.1); /* Optional: adds a shadow so it stands out while scrolling */
}

.nav-container { display: flex; justify-content: space-between; align-items: center; }
.logo img { height: 130px; border-radius: 50%; }
nav ul { display: flex; }
nav ul li { margin-left: 30px; }
nav ul li a { color: var(--text-dark); font-weight: 500; font-size: 0.9rem; text-transform: uppercase; }

nav ul li a:hover,
nav ul li a.active {
    color: var(--primary-color);
}

/* ============ HERO SECTION ============ */
.hero {
    background: linear-gradient(rgba(255,255,255,0.1), rgba(255,255,255,0.4)),
                url('main-banner.png') no-repeat center center/cover;
    height: 500px;
    display: flex;
    align-items: center;
}

.hero-content { width: 100%; text-align: center; }
.hero-content h1 { font-size: 3rem; margin-bottom: 20px; }
.hero-content p { font-size: 1.2rem; margin-bottom: 40px; color: #000; font-weight: 500; }


/* ============ SUB-PAGE HERO STYLING ============ */
.sub-hero {
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('img/hero-bg.jpg') no-repeat center center/cover;
    height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-align: center;
}

.sub-hero h1 {
    color: #fff !important;
    font-size: 3rem;
    margin: 0;
}

/* Ensure the wrapper looks consistent on internal pages */
.page-content {
    padding: 80px 0;
}

/* ============ SERVICES SECTION ============ */
.services-grid { display: flex; justify-content: space-between; margin-top: 50px; gap: 30px; }
.service-item { flex: 1; background: #fff; box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
.service-item img { width: 100%; height: 400px; object-fit: cover; }
.service-label { background-color: var(--primary-color); color: #fff; padding: 15px; text-transform: uppercase; font-weight: 700; }

/* Add this to your CSS */
.service-label a {
    color: #ffffff;
    text-decoration: none; /* Removes the underline */
    display: block;        /* Makes the whole label area clickable */
}

.service-label a:visited {
    color: #f2f2f2;        /* Keeps it white after being clicked */
}

.service-label a:hover {
    color: #f8f8f8;
    text-decoration: underline; /* Optional: adds underline only on hover */
}

/* ============ PORTFOLIO SECTION ============ */
.portfolio-filters { margin: 30px 0 50px; }
.filter-btn {
    background: none;
    border: none;
    margin: 0 15px;
    color: var(--text-light);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    cursor: pointer;
    padding-bottom: 5px;
}
.filter-btn.active, .filter-btn:hover {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}
.portfolio-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; }
.portfolio-item { position: relative; overflow: hidden; }
.portfolio-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(74, 145, 158, 0.9);
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    opacity: 0; visibility: hidden; transition: all 0.3s ease;
    color: #fff;
}
.portfolio-overlay h3 {
    color: #ffffff;
    margin-bottom: 15px; /* Optional: adds space between text and button */
}
.portfolio-item:hover .portfolio-overlay { opacity: 1; visibility: visible; }

/* ============ CLIENTS SECTION ============ */
.clients-flex { display: flex; justify-content: space-around; align-items: center; flex-wrap: wrap; margin-top: 50px; }
.clients-flex img { margin: 20px; filter: grayscale(50%); opacity: 0.7; }

/* ============ PARTNER CTA SECTION ============ */

.partner-cta-section {
    position: relative;
    padding: 100px 0;
    /* The Background Image */
    background: url('partners.png') no-repeat center center/cover;
    overflow: hidden;
}

/* 65% Dark Overlay - Applies ONLY to the background area */
.partner-cta-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Black at 0.65 alpha/opacity */
    background-color: rgba(0, 0, 0, 0.45);
    z-index: 1;
}

/* Container for Content - Sits ABOVE the overlay */
.partner-flex {
    position: relative;
    z-index: 2; /* Ensures text and button are not affected by opacity */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

/* Typography & Color Overrides */
.partner-text {
    text-align: center;
}

.partner-text h2 {
    color: #ffffff !important; /* Forces white regardless of main.css defaults */
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.partner-text p {
    color: #f8f9fa !important; /* Light grey for subtext */
    font-size: 1.1rem;
    margin: 0;
}

/* Button Styling (Matching your Montserrat theme) */
.btn-inverted {
    background-color: #ffffff;
    color: var(--primary-color);
    padding: 14px 35px;
    border-radius: 30px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    display: inline-block;
    transition: all 0.3s ease;
    text-decoration: none;
    white-space: nowrap;
}

.btn-inverted:hover {
    background-color: var(--primary-color);
    color: #ffffff;
    transform: translateY(-3px);
}

/* ============ PARTNER MODAL STYLES ============ */
.modal-overlay {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #fff;
    width: 90%;
    max-width: 600px;
    padding: 40px;
    border-radius: 15px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 30px;
    font-weight: bold;
    color: var(--text-light);
    cursor: pointer;
}

.close-modal:hover { color: var(--primary-color); }

/* Form Elements matching main.css theme */
#partnership-form label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-dark);
}

#partnership-form input,
#partnership-form select,
#partnership-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    margin-bottom: 20px;
}

#partnership-form textarea { height: 100px; resize: vertical; }

.full-width { grid-column: span 2; }

@media (max-width: 600px) {
    .modal-content { padding: 25px; }
    .full-width { grid-column: span 1; }
}

/* ============ DESKTOP LAYOUT (768px+) ============ */
@media (min-width: 768px) {
    .partner-flex {
        flex-direction: row;
        text-align: left;
        align-items: center; /* Fixes vertical alignment */
    }

    .partner-text {
        text-align: left;
        max-width: 60%;
    }
}
/* ============ CONTACT FORM ============ */
#contact form {
    background-color: #ffffff;
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid #f3f4f6;
    max-width: 700px; /* Centered in container */
    margin: 0 auto;
}
#contact label { display: block; color: #374151; font-size: 0.875rem; font-weight: 700; margin-bottom: 0.5rem; }
#contact input, #contact select {
    width: 100%; padding: 0.75rem 1rem; background-color: #f9fafb;
    border: 1px solid #e5e7eb; border-radius: 0.5rem; margin-bottom: 1.5rem;
}

#contact textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    /* Increased height settings */
    height: 150px;       /* Sets the default height */
    min-height: 120px;   /* Ensures it doesn't get too small */
    resize: vertical;    /* Allows the user to drag and expand it vertically */
    font-family: inherit; /* Ensures the font matches the rest of the form */
}

#contact button[type="submit"] {
    width: 100%; background-color: #14b8a6; color: #fff;
    font-weight: 700; padding: 1rem; border-radius: 0.5rem; border: none; cursor: pointer;
}

/* Form Grid */
.form-grid { display: grid; gap: 1.5rem; }
@media (min-width: 768px) { .form-grid { grid-template-columns: 1fr 1fr; } }

/* The actual select element */
#contact select {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 1rem; /* Extra right padding for the arrow */
    background-color: #f9fafb; /* bg-gray-50 */
    border: 1px solid #e5e7eb; /* border-gray-200 */
    border-radius: 0.5rem; /* rounded-lg */
    color: #374151; /* text-gray-700 */
    appearance: none; /* appearance-none: removes default browser arrow */
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* The custom SVG arrow styling */
.select-arrow {
    pointer-events: none; /* Allows clicks to pass through to the select */
    position: absolute;
    inset-y: 0;
    right: 0;
    display: flex;
    align-items: center;
    padding-right: 0.5rem; /* px-2 */
    color: #374151; /* text-gray-700 */
}

.select-arrow svg {
    fill: currentColor;
    height: 1rem; /* h-4 */
    width: 1rem; /* w-4 */
}

/* Match focus ring of the select */
#contact select:focus {
    border-color: #14b8a6;
    box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.5);
    outline: none;
}

/* ============ FOOTER ============ */
footer {
    background-color: #111827;
    color: #9ca3af;
    padding: 40px 0 24px;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.footer-branding {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 16px;
    align-items: center;
}

.footer-logo {
    width: 90px;
    height: auto;
    align-self: flex-start;
}

.footer-branding h4,
.footer-branding p {
    margin: 0;
    line-height: 1.2;
}

.footer-branding h4 {
    color: #f9fafb;
}

.footer-socials {
    display: flex;
    gap: 20px;
}

.footer-socials a {
    color: #fff;
    font-size: 1.2rem;
}

.footer-bottom {
    border-top: 1px solid #1f2937;
    padding-top: 24px;
    text-align: center;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
    .nav-container { flex-direction: column; }
    nav ul { margin-top: 20px; }
    .services-grid { flex-direction: column; }
    .portfolio-grid { grid-template-columns: 1fr; }
    .footer-top { flex-direction: column; text-align: center; gap: 20px; }
}

/* ============ MOBILE NAV ============ */
.menu-toggle {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--text-dark);
}

@media (max-width: 768px) {
    .nav-container {
        flex-direction: row;
    }

    .menu-toggle {
        display: block;
    }

    nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #ffffff;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        display: none;
    }

    nav.active {
        display: block;
    }

    nav ul {
        flex-direction: column;
        padding: 20px 0;
    }

    nav ul li {
        margin: 15px 0;
        text-align: center;
    }

    nav ul li a {
        font-size: 1rem;
    }
}
