/* =========================================
   === BRANDING - COLOR PALETTE ===
   ========================================= */
:root {
    --primary-color: #000000;   /* NWI Black */
    --accent-color: #8C7342;    /* Aged Gold */
    
    --text-dark: #1a1a1a;       /* Main text color */
    --text-light: #ffffff;      /* Text on dark backgrounds */
    --bg-light: #ffffff;        /* Main page background */
    --bg-alt: #f9f9f9;          /* Subtle alternative background */
}

/* Base Styles & Mobile Overflow Lock */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { 
    max-width: 100vw; 
    overflow-x: hidden; /* Strictly prevents horizontal side-swiping */
}
body { 
    font-family: 'Lato', sans-serif; 
    color: var(--text-dark); 
    line-height: 1.6; 
    background-color: var(--bg-alt); 
}
h1, h2, h3 { font-family: 'Merriweather', serif; color: var(--primary-color); font-weight: 700; }

/* Header & Navigation */
header {
    background-color: var(--bg-light);
    padding: 10px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo-container { display: flex; align-items: center; text-decoration: none; }
.firm-logo { max-height: 60px; width: auto; display: block; }
nav { display: flex; align-items: center; }
nav a { text-decoration: none; color: #475569; margin-left: 25px; font-weight: 700; transition: color 0.3s ease; }
nav a:hover { color: var(--accent-color); }
.nav-cta { background-color: var(--primary-color); color: var(--text-light); padding: 10px 20px; border-radius: 4px; }
.nav-cta:hover { opacity: 0.9; color: var(--text-light); }

/* Hero Section (Video Background) */
.hero {
    position: relative;
    overflow: hidden;
    color: var(--text-light);
    text-align: center;
    padding: 120px 20px;
}
.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8) 0%, rgba(140, 115, 66, 0.6) 100%);
    z-index: 2;
}
.hero-content {
    position: relative;
    z-index: 3;
}
.hero h1 { color: var(--text-light); font-size: 3rem; margin-bottom: 20px; text-shadow: 0 2px 10px rgba(0,0,0,0.3); }
.hero p { font-size: 1.25rem; max-width: 700px; margin: 0 auto; opacity: 0.9; text-shadow: 0 2px 10px rgba(0,0,0,0.3); }
.btn-primary {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--text-light);
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: bold;
    transition: background-color 0.3s ease;
    margin-top: 25px;
    border: none;
    cursor: pointer;
    position: relative;
    z-index: 3;
}
.btn-primary:hover { filter: brightness(110%); }

/* Services Section */
.services { padding: 80px 20px; text-align: center; max-width: 1200px; margin: 0 auto; }
.services h2 { font-size: 2.5rem; margin-bottom: 50px; }
.service-grid { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr);
    gap: 30px; 
}
.service-card {
    background-color: var(--bg-light);
    padding: 40px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border-top: 4px solid var(--accent-color);
    transition: transform 0.3s ease;
}
.service-card:hover { transform: translateY(-5px); }
.service-card h3 { margin-bottom: 15px; font-size: 1.25rem; }

/* Testimonials Section */
.testimonials {
    padding: 80px 20px;
    background-color: var(--primary-color);
    color: var(--text-light);
    text-align: center;
}
.testimonials h2 {
    color: var(--text-light);
    font-size: 2.5rem;
    margin-bottom: 40px;
}
.testimonial-slider {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    min-height: 200px;
}
.testimonial-slide {
    display: none;
    padding: 20px;
    animation: fadeEffect 1s;
}
.testimonial-slide.active {
    display: block;
}
.quote {
    font-size: 1.4rem;
    font-style: italic;
    margin-bottom: 20px;
    line-height: 1.8;
    color: #cbd5e1;
}
.client-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.slider-dots {
    margin-top: 20px;
    text-align: center;
}
.dot {
    cursor: pointer;
    height: 12px;
    width: 12px;
    margin: 0 5px;
    background-color: #475569;
    border-radius: 50%;
    display: inline-block;
    transition: background-color 0.3s ease;
}
.dot.active, .dot:hover {
    background-color: var(--accent-color);
}
@keyframes fadeEffect {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Team Section */
.team { background-color: var(--bg-light); padding: 80px 20px; text-align: center; }
.team h2 { font-size: 2.5rem; margin-bottom: 10px; }
.section-subtitle { font-size: 1.1rem; color: #64748b; margin-bottom: 50px; }
.team-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
    max-width: 1100px;
    margin: 0 auto;
}
.team-member { flex: 0 1 300px; text-align: center; }
.member-photo {
    width: 180px; height: 180px;
    border-radius: 50%;
    object-fit: cover;
    object-position: top;
    margin-bottom: 20px;
    border: 5px solid var(--bg-alt);
    background-color: #e2e8f0;
}
.clickable-photo {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}
.clickable-photo:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}
.team-member h3 { 
    font-size: 1.25rem; 
    margin-bottom: 5px; 
    height: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.3;
}
.member-title { 
    color: var(--accent-color); 
    font-weight: 700; 
    text-transform: uppercase; 
    font-size: 0.85rem; 
    letter-spacing: 1px; 
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    line-height: 1.3;
}
.member-bio { font-size: 0.95rem; color: #475569; margin-top: 0; text-align: left; line-height: 1.5; }

/* FAQ Section */
.faq-section {
    padding: 80px 20px;
    background-color: var(--bg-light);
    text-align: center;
}
.faq-section h2 {
    font-size: 2.5rem;
    margin-bottom: 40px;
}
.faq-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
}
.faq-item {
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 10px;
}
.faq-question {
    width: 100%;
    background: none;
    border: none;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark);
    text-align: left;
    padding: 20px 0;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.3s ease;
}
.faq-question:hover {
    color: var(--accent-color);
}
.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--accent-color);
    transition: transform 0.3s ease;
}
.faq-item.active .faq-question::after {
    transform: rotate(45deg);
}
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}
.faq-answer p {
    padding-bottom: 20px;
    color: #475569;
    font-size: 1.05rem;
}

/* Contact Section */
.contact { padding: 80px 20px; background-color: var(--bg-alt); text-align: center; }
.contact h2 { font-size: 2.5rem; margin-bottom: 40px; }
.contact-top-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto 50px auto;
}
.office-details { flex: 1; min-width: 300px; text-align: left; }
.office-details h3 { font-size: 1.8rem; margin-bottom: 15px; }
.office-details p { font-size: 1.2rem; margin-bottom: 10px; color: #333; }
.large-phone { font-size: 1.4rem !important; font-weight: 700; color: var(--accent-color) !important; margin-top: 15px; }
.office-map { flex: 1; min-width: 300px; box-shadow: 0 6px 15px rgba(0,0,0,0.1); border-radius: 8px; }

/* Modern Form Styling */
.contact-form-container {
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--bg-light);
    padding: 50px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    text-align: left;
    border-top: 5px solid var(--accent-color);
}
.contact-form-container h3 { font-size: 1.8rem; margin-bottom: 25px; text-align: center; }
.form-row { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; }
.form-group { flex: 1; min-width: 200px; margin-bottom: 20px; }
.form-row .form-group { margin-bottom: 0; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 700; color: #334155; font-size: 0.95rem; }
.modern-form input, .modern-form textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    background-color: #f8fafc;
    transition: all 0.3s ease;
}
.modern-form input:focus, .modern-form textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    background-color: var(--bg-light);
    box-shadow: 0 0 0 3px rgba(140, 115, 66, 0.2);
}
.form-submit-btn { width: 100%; font-size: 1.2rem; padding: 18px; margin-top: 10px; }

/* Sub-page Header (Team & Legal Pages) */
.page-header {
    background-color: var(--primary-color);
    color: var(--text-light);
    text-align: center;
    padding: 80px 20px;
}
.page-header h1 { color: var(--text-light); font-size: 2.5rem; margin-bottom: 10px; }
.page-header p { font-size: 1.2rem; opacity: 0.9; }

/* Detailed Team Profiles Layout (Team Page) */
.detailed-team { padding: 80px 20px; background-color: var(--bg-light); }
.profiles-container { max-width: 1000px; margin: 0 auto; }
.full-profile { display: flex; align-items: center; gap: 40px; margin-bottom: 80px; padding-top: 40px; }
.full-profile.reverse { flex-direction: row-reverse; }
.profile-large-image {
    width: 300px; height: 300px;
    border-radius: 8px; object-fit: cover;
    object-position: top;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    border-bottom: 5px solid var(--accent-color);
}
.profile-content { flex: 1; }
.profile-content h2 { font-size: 2rem; margin-bottom: 5px; }
.profile-title {
    color: var(--accent-color); font-weight: 700;
    text-transform: uppercase; letter-spacing: 1px;
    margin-bottom: 20px; font-size: 1.1rem;
}
.profile-content p { font-size: 1.1rem; color: #475569; line-height: 1.8; }
.bio-link {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 700;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}
.bio-link:hover {
    border-bottom: 1px solid var(--accent-color);
}

/* Legal Page Styling */
.legal-section {
    padding: 60px 20px 100px 20px;
    background-color: var(--bg-light);
}
.legal-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
}
.legal-container h3 {
    font-size: 1.5rem;
    margin-top: 40px;
    margin-bottom: 15px;
    color: var(--primary-color);
}
.legal-container p {
    font-size: 1.1rem;
    color: #475569;
    line-height: 1.8;
}

/* Opportunities Section (Team Page) */
.opportunities {
    padding: 80px 20px;
    background-color: var(--primary-color);
    color: var(--text-light);
    text-align: center;
}
.opportunities h2 {
    color: var(--text-light);
    font-size: 2.5rem;
    margin-bottom: 50px;
}
.opportunities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto;
    text-align: left;
}
.opportunity-card {
    background-color: rgba(255, 255, 255, 0.05);
    padding: 40px;
    border-radius: 8px;
    border-top: 4px solid var(--accent-color);
}
.opportunity-card h3 {
    color: var(--text-light);
    font-size: 1.5rem;
    margin-bottom: 5px;
}
.opp-subtitle {
    color: var(--accent-color);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    margin-bottom: 20px;
}
.opportunity-card p:not(.opp-subtitle) {
    color: #cbd5e1;
    line-height: 1.7;
    margin-bottom: 25px;
}
.btn-secondary {
    display: inline-block;
    background-color: transparent;
    color: var(--accent-color);
    padding: 10px 20px;
    text-decoration: none;
    border: 2px solid var(--accent-color);
    border-radius: 5px;
    font-weight: bold;
    transition: all 0.3s ease;
}
.btn-secondary:hover {
    background-color: var(--accent-color);
    color: var(--text-light);
}

/* Mobile Responsiveness */
@media (max-width: 992px) {
    .service-grid { grid-template-columns: repeat(2, 1fr); }
    
    /* Stack header earlier on tablets/large phones to prevent overflow */
    header { 
        flex-direction: column; 
        padding: 20px; 
    }
    nav { 
        margin-top: 15px; 
        flex-wrap: wrap; 
        justify-content: center; 
        gap: 12px; 
    }
    nav a { 
        margin-left: 0; 
        margin: 5px 8px;
    }
}

@media (max-width: 768px) {
    .service-grid { grid-template-columns: 1fr; }
    
    /* Further mobile navigation tweaks */
    nav a { font-size: 0.95rem; margin: 5px; }
    .nav-cta { 
        margin-top: 10px; 
        width: 100%; 
        text-align: center; 
        display: block;
    }
    
    /* Typography scaling */
    .hero h1 { font-size: 2.2rem; }
    .hero p { font-size: 1.1rem; }
    h2 { font-size: 2rem !important; }
    .page-header h1 { font-size: 2rem; }
    
    /* Testimonial mobile tweaks */
    .quote { font-size: 1.1rem; }

    /* Padding reduction */
    .hero { padding: 80px 20px; }
    .services, .team, .faq-section, .contact, .page-header, .detailed-team, .legal-section, .opportunities, .testimonials { 
        padding: 50px 15px; 
    }
    .contact-form-container { padding: 30px 20px; }

    /* Component stacking */
    .contact-top-row { flex-direction: column; text-align: center; gap: 30px; }
    .office-details { text-align: center; }
    
    .full-profile, .full-profile.reverse { 
        flex-direction: column; 
        text-align: center; 
        margin-bottom: 60px; 
    }
    .profile-large-image { 
        width: 100%; 
        max-width: 300px; 
        height: auto; 
        aspect-ratio: 1 / 1; 
    }
}

/* Footer */
footer { background-color: var(--primary-color); color: #94a3b8; text-align: center; padding: 40px 20px; }
footer strong { color: var(--text-light); }
.social-link { display: inline-block; color: var(--accent-color); text-decoration: none; font-weight: 700; margin: 15px 0; font-size: 1.1rem; transition: color 0.3s ease; }
.social-link:hover { color: var(--text-light); }
.footer-link { color: var(--accent-color); text-decoration: none; margin-left: 10px; }
.footer-link:hover { text-decoration: underline; }