/* ==========================================================================
   1. Root Variables & Global Styles
   ========================================================================== */
:root {
    --primary-color: #1a2333; /* Dark Navy Blue */
    --secondary-color: #bfa15a; /* Gold/Bronze Accent */
    --background-color: #f8f9fa; /* Light Gray */
    --text-color: #333;
    --text-light: #555;
    --white-color: #ffffff;
    --border-color: #ddd;
    --font-primary: 'Roboto Serif', serif;
    --font-secondary: 'Poppins', sans-serif;
    --container-width: 1140px;
    --border-radius: 6px;
    --box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    color: var(--text-color);
    background-color: var(--white-color);
    line-height: 1.7;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1rem;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

h1, h2, h3 {
    font-family: var(--font-secondary);
    color: var(--primary-color);
    font-weight: 700;
    line-height: 1.3;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; margin-bottom: 1.5rem; }
h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }

section {
    padding: 4rem 0;
}

/* ==========================================================================
   2. Header & Footer (Shared Across All Pages)
   ========================================================================== */
.site-header {
    background-color: var(--white-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
.header-container { display: flex; justify-content: space-between; align-items: center; }
.logo-area { display: flex; align-items: center; gap: 1rem; }
.logo { height: 50px; }
.expertise-tag {
    font-size: 0.75rem;
    color: var(--text-light);
    border-left: 2px solid var(--secondary-color);
    padding-left: 1rem;
    display: none;
}
.main-nav ul { list-style: none; display: flex; align-items: center; gap: 1.5rem; }
.main-nav a {
    text-decoration: none;
    color: var(--primary-color);
    font-family: var(--font-secondary);
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.3s ease;
}
.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: width 0.3s ease;
}
.main-nav a:hover::after, .main-nav a.active::after { width: 100%; }
.main-nav a.active { color: var(--secondary-color); }
.hamburger-menu { font-size: 1.5rem; cursor: pointer; display: none; z-index: 1001; transition: transform 0.3s ease; }
.hamburger-menu.active { transform: rotate(90deg); }

footer {
    background-color: var(--primary-color);
    color: #ccc;
    padding: 2rem 0;
    text-align: center;
}
.footer-nav { margin-top: 1rem; }
.footer-nav a { color: #ccc; text-decoration: none; margin: 0 0.5rem; transition: color 0.3s ease; }
.footer-nav a:hover { color: var(--secondary-color); }

/* ==========================================================================
   3. Reusable Components (Buttons, Animations, Cards)
   ========================================================================== */
/* --- Buttons --- */
.btn-cta, .btn-secondary, .button-primary {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-family: var(--font-secondary);
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
    text-align: center;
}
.btn-cta, .button-primary { background-color: var(--secondary-color); color: var(--primary-color); }
.btn-cta:hover, .button-primary:hover { background-color: #ab8a42; transform: translateY(-3px); }
.btn-secondary { background-color: transparent; border: 2px solid var(--secondary-color); color: var(--secondary-color); }
.btn-secondary:hover { background-color: var(--secondary-color); color: var(--primary-color); }
.button-hover-lift:hover { transform: translateY(-3px); box-shadow: var(--box-shadow); }
.button-glow:hover { box-shadow: 0 0 15px var(--secondary-color); }

/* --- Link Button --- */
.btn-link { color: var(--secondary-color); text-decoration: none; font-family: var(--font-secondary); font-weight: 600; }
.btn-link i { margin-left: 0.5rem; transition: transform 0.3s ease; }
.btn-link:hover { color: #ab8a42; }
.btn-link:hover i { transform: translateX(5px); }

/* --- Animations --- */
.animation-fade-in, .animation-slide-up, .animation-pop-in { opacity: 0; transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.animation-slide-up { transform: translateY(40px); }
.animation-pop-in { transform: scale(0.95); }
.is-visible { opacity: 1 !important; transform: none !important; }

/* --- Base Card Style --- */
.card-hover-lift { transition: transform 0.3s ease, box-shadow 0.3s ease; }
.card-hover-lift:hover { transform: translateY(-10px); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12); }


/* ==========================================================================
   4. Page Header Styles (Hero vs. Standard)
   ========================================================================== */
.hero, .page-header {
    position: relative;
    color: var(--white-color);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 1rem;
    min-height: 400px;
    isolation: isolate; /* ADD THIS LINE */
}
.hero-img, .header-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
}
.hero-overlay, .hero-img-overlay, .header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(26, 35, 51, 0.7);
    z-index: -1;
}
.hero-content, .header-content {
    max-width: 800px;
    position: relative;
    z-index: 1;
}
.hero-content h1, .header-content h1 {
    color: var(--white-color);
}
.hero-content p, .header-content p {
    font-size: 1.1rem;
    margin-top: 1rem;
    line-height: 1.6;
}

/* ==========================================================================
   5. Page-Specific Section Styles
   ========================================================================== */

/* --- Intro Text Sections (Used on multiple pages) --- */
.services-intro, .tax-intro { text-align: center; }
.services-intro .container, .tax-intro .container { max-width: 850px; }
.services-intro p, .tax-intro p { font-size: 1.1rem; color: var(--text-light); margin-bottom: 1rem; }

/* --- Two-Column Content Sections (Home, About) --- */
.firm-identity-content, .narrative-content, .team-flex {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: center;
}
.identity-image img, .narrative-image img, .team-image img {
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

/* --- Card Grids (Used on multiple pages) --- */
.highlights-grid, .mandate-grid, .services-grid, .types-grid, .areas-grid, .stages-grid, .process-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
.highlight-card, .mandate-card, .service-card, .type-card, .area-card, .stage-card, .process-step {
    background-color: var(--white-color);
    padding: 2rem;
    text-align: center;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}
.service-card { text-decoration: none; color: var(--text-color); display: flex; flex-direction: column; }
.service-card .cta { margin-top: auto; padding-top: 1rem; color: var(--secondary-color); font-weight: 600; }
.highlight-card, .mandate-card, .type-card, .area-card, .stage-card, .process-step {
    display: flex; flex-direction: column; align-items: center;
}
.highlight-card .icon-gold, .mandate-card i, .service-card i, .type-card .type-icon, .area-card .area-icon, .stage-card .stage-icon, .process-step .process-icon {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

/* --- Banners & CTAs --- */
.cta-banner { background-color: var(--primary-color); color: var(--white-color); padding: 3rem 0; }
.cta-banner .container { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 1rem; }
.cta-text { font-size: 1.2rem; font-family: var(--font-secondary); max-width: 600px; }
.services-cta { text-align: center; margin-top: 3rem; }
.cta-section { background-color: var(--primary-color); color: var(--white-color); text-align: center; }
.cta-section h2 { color: var(--white-color); }
.cta-section p { color: #ccc; max-width: 700px; margin: 1rem auto 2rem auto; }

/* --- Accordion / FAQ --- */
.faq-section { background-color: var(--background-color); }
.accordion { max-width: 800px; margin: 2rem auto 0; }
.accordion-item { border-bottom: 1px solid var(--border-color); }
.accordion-header {
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    padding: 1.5rem 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-secondary);
}
.accordion-header i { transition: transform 0.3s ease; }
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    padding: 0 1rem;
}
.accordion-content p, .accordion-content ul { padding-bottom: 1.5rem; }
.accordion-item.active .accordion-header i { transform: rotate(45deg); }

/* --- Contact Form --- */
.contact-form-section form { max-width: 800px; margin: 2rem auto 0; }
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 0.5rem; font-weight: 600; }
.form-control, .form-control-file {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 1rem;
}
.form-group .required { color: red; }

/* ==========================================================================
   6. Responsive Design (Media Queries)
   ========================================================================== */

/* --- For Tablets and Desktops --- */
@media (min-width: 768px) {
    .expertise-tag { display: block; }
    .cta-banner .container { flex-direction: row; justify-content: space-between; text-align: left; }
    .firm-identity-content, .narrative-content, .team-flex { grid-template-columns: 1fr 1fr; gap: 3rem; }
}

/* --- For Mobile Phones --- */
@media (max-width: 767px) {
    h1 { font-size: 1.8rem; word-wrap: break-word; }
    h2 { font-size: 1.75rem; text-align: center; }

    .logo-area { display: flex; flex-direction: column; align-items: flex-start; }
    .expertise-tag { display: block; font-size: 0.7rem; border-left: none; padding-left: 0; text-align: left; margin-top: 0.25rem; }

    .hamburger-menu { display: block; }
    .main-nav { position: absolute; top: 100%; left: 0; width: 100%; background-color: var(--white-color); box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); max-height: 0; overflow: hidden; transition: max-height 0.4s ease-in-out; }
    .main-nav.active { max-height: 500px; }
    .main-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 1rem 0; }
    .main-nav li { width: 100%; text-align: center; }
    .main-nav a { padding: 1rem; display: block; border-bottom: 1px solid #eee; }
    .main-nav a::after { display: none; }
    .nav-cta { padding: 1rem; }
    .btn-cta { width: 90%; margin: 0.5rem auto 0 auto; }

    .identity-image, .narrative-image { order: -1; }
}

/* --- Contact Page Adjustments --- */
.contact-header-clean {
    min-height: 300px; /* Makes the top image shorter */
}

.contact-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 3rem auto; /* Centers the block and adds space below the form */
}

.contact-intro h1 {
    color: var(--primary-color); /* Changes text color from white to dark blue */
}

.contact-intro p {
    color: var(--text-light); /* Changes text color from white to gray */
    font-size: 1.1rem;
    line-height: 1.6;
    margin-top: 1rem;
}