/* ==========================================================================
   CSS Variables & Design Tokens (Traditional Law Firm)
   ========================================================================== */
:root {
    /* Colors - Traditional Professional Palette */
    --clr-background: #ffffff;
    --clr-surface: #f9f9f9;
    --clr-primary-dark: #12233f; /* Deep Navy Blue */
    --clr-primary-light: #2b4c7e;
    --clr-accent: #c4a25a; /* Gold/Bronze accent */
    --clr-text-main: #333333;
    --clr-text-muted: #666666;
    --clr-border: #e0e0e0;

    /* Typography */
    --font-heading: 'Cormorant Garamond', serif;
    --font-body: 'Inter', sans-serif;

    /* Fluid Typography Base */
    --fs-xs: 0.875rem;
    --fs-sm: 1rem;
    --fs-base: 1.125rem;
    --fs-md: 1.5rem;
    --fs-lg: 2.25rem;
    --fs-xl: 3rem;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 6rem;

    /* Layout */
    --container-width: 1200px;
    --header-height: 90px;
    --border-radius: 4px; /* Slight rounded corners, traditional */
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    font-weight: 400;
    color: var(--clr-text-main);
    background-color: var(--clr-background);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 400;
    line-height: 1.2;
    color: var(--clr-primary-dark);
    margin-bottom: var(--space-sm);
}

p {
    margin-bottom: var(--space-sm);
    color: var(--clr-text-muted);
}

a {
    color: var(--clr-primary-light);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--clr-accent);
}

img {
    max-width: 100%;
    display: block;
}

/* ==========================================================================
   Utility Classes & Layout
   ========================================================================== */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.section-padding {
    padding: var(--space-xl) 0;
}

.bg-surface {
    background-color: var(--clr-surface);
}

.bg-dark {
    background-color: var(--clr-primary-dark);
    color: #ffffff;
}

.bg-dark h1, .bg-dark h2, .bg-dark h3, .bg-dark h4 {
    color: #ffffff;
}

.bg-dark p {
    color: #e0e0e0;
}

.text-center {
    text-align: center;
}

.section-title {
    font-size: var(--fs-xl);
    text-align: center;
    margin-bottom: var(--space-lg);
    position: relative;
    padding-bottom: var(--space-sm);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--clr-accent);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    font-family: var(--font-body);
    font-size: var(--fs-sm);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--clr-primary-dark);
    color: #ffffff;
}

.btn-primary:hover {
    background-color: var(--clr-accent);
    color: #ffffff;
}

.btn-outline {
    background-color: transparent;
    color: var(--clr-primary-dark);
    border-color: var(--clr-primary-dark);
}

.btn-outline:hover {
    background-color: var(--clr-primary-dark);
    color: #ffffff;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.site-header {
    background-color: #ffffff;
    border-bottom: 1px solid var(--clr-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--header-height);
    display: flex;
    align-items: center;
}

.header-container {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    flex-direction: column;
}

.logo-main {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 500;
    color: var(--clr-primary-dark);
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1;
}

.logo-sub {
    font-family: var(--font-body);
    font-size: 0.7rem;
    color: var(--clr-text-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-top: 4px;
}

.desktop-nav {
    display: none;
    align-items: center;
    gap: 2rem;
}

@media (min-width: 992px) {
    .desktop-nav {
        display: flex;
    }
}

.nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--clr-text-main);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-link:hover {
    color: var(--clr-accent);
}

.lang-toggle {
    font-size: 0.8rem;
    color: var(--clr-text-muted);
}

.lang-toggle a.active {
    color: var(--clr-primary-dark);
    font-weight: bold;
}

.lang-toggle .divider {
    margin: 0 8px;
}

.mobile-menu-btn {
    display: block;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.hamburger, .hamburger::before, .hamburger::after {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--clr-primary-dark);
    position: relative;
    transition: 0.3s ease;
}

.hamburger::before, .hamburger::after {
    content: '';
    position: absolute;
    left: 0;
}

.hamburger::before { top: -8px; }
.hamburger::after { bottom: -8px; }

@media (min-width: 992px) {
    .mobile-menu-btn {
        display: none;
    }
}

/* Mobile Menu Overlay */
.mobile-nav-overlay {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    height: calc(100vh - var(--header-height));
    background-color: #ffffff;
    z-index: 999;
    padding: var(--space-lg) var(--space-md);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.mobile-nav-overlay.open {
    transform: translateX(0);
}

.mobile-nav-overlay .nav-link {
    font-size: 1.2rem;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
    position: relative;
    min-height: 650px; /* Increased from 500px */
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    text-align: center;
    overflow: hidden;
    /* Push content below the sticky header on mobile */
    padding-top: var(--header-height);
    padding-bottom: var(--space-xl); /* Add space at the bottom */
}

@media (min-width: 992px) {
    .hero-section {
        height: 70vh; /* Set height only on desktop */
        padding-top: 0;
        padding-bottom: 0;
    }
}

/* Reduced font sizes for mobile to fit better */
@media (max-width: 768px) {
    .hero-title {
        font-size: var(--fs-lg) !important; /* 2.25rem instead of 3rem */
    }
    .hero-text {
        font-size: var(--fs-base) !important; /* 1.125rem instead of 1.5rem */
    }
    .hero-section {
        min-height: 100vh; /* On small screens, take more space */
    }
}

.hero-slider {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 0;
}

.hero-slider .slide {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover;
    object-position: center;
    image-rendering: -webkit-optimize-contrast; /* Safari / Webkit sharpening */
    image-rendering: crisp-edges;
    transform: translateZ(0); /* Hardware acceleration for smoother scaling */
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.hero-slider .slide.active {
    opacity: 1;
}

.hero-section::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(18, 35, 63, 0.7); /* Deep Navy dark tint overlay */
    z-index: 1;
}

/* Simple solid background to keep it extremely basic, or a subtle texture */
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 var(--space-md);
}

.hero-title {
    font-size: var(--fs-xl);
    color: #ffffff;
    margin-bottom: var(--space-sm);
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero-text {
    font-size: var(--fs-md);
    color: #e0e0e0;
    margin-bottom: var(--space-lg);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    padding: 0 1rem;
}

/* ==========================================================================
   About Section
   ========================================================================== */
.about-section {
    text-align: center;
    /* Removed max-width restriction to allow image to span full container width */
    margin: 0 auto;
}

.about-text {
    font-size: var(--fs-md);
    font-family: var(--font-heading);
    color: var(--clr-primary-dark);
    line-height: 1.5;
    max-width: 900px; /* Keep text at a readable width */
    margin-left: auto;
    margin-right: auto;
}

/* ==========================================================================
   Practice Areas Grid
   ========================================================================== */
.practice-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-md);
}

@media (min-width: 768px) {
    .practice-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .practice-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.practice-card {
    background-color: #ffffff;
    padding: var(--space-md);
    border: 1px solid var(--clr-border);
    border-top: 4px solid var(--clr-primary-dark);
    border-radius: var(--border-radius);
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.practice-card:hover {
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    border-top-color: var(--clr-accent);
}

.practice-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.practice-card p {
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* Centering logic for the 10th item in a 3-column grid */
@media (min-width: 1024px) {
    .card-centered {
        grid-column: 2;
    }
}

/* ==========================================================================
   Attorneys Section
   ========================================================================== */
.attorneys-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-lg);
}

.attorney-card {
    background-color: #ffffff;
    border: 1px solid var(--clr-border);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    display: flex;
    flex-direction: column;
    height: auto;
    width: 100%;
}

.attorney-card:hover {
    box-shadow: 0 15px 35px rgba(0,0,0,0.08);
    transform: translateY(-5px);
}

@media (min-width: 768px) {
    .attorney-card {
        width: calc(50% - (var(--space-lg) / 2));
    }
}

@media (min-width: 1024px) {
    .attorney-card {
        width: calc(33.333% - (var(--space-lg) * 2 / 3));
    }
}

.attorney-photo {
    width: 100%;
    height: 320px;
    margin: 0;
    background-color: var(--clr-border);
    overflow: hidden;
    position: relative;
}

.attorney-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    filter: grayscale(10%); /* Very subtle professional tone */
}

.attorney-name {
    font-size: 1.4rem;
    margin: 1.5rem 1.5rem 0.25rem;
    text-align: center;
    color: var(--clr-primary-dark);
}

.attorney-title {
    font-family: var(--font-body);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--clr-accent);
    margin: 0 1.5rem 1.5rem;
    padding-bottom: 1rem;
    font-weight: 600;
    text-align: center;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.attorney-details {
    font-size: 0.95rem;
    color: var(--clr-text-muted);
    text-align: left;
    padding: 0 1.5rem 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.attorney-details p {
    margin: 0;
    line-height: 1.4;
    display: flex;
    flex-direction: column;
}

.attorney-details strong {
    color: var(--clr-primary-dark);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.2rem;
    opacity: 0.6;
}

/* ==========================================================================
   Contact / Footer Section
   ========================================================================== */
.footer-section {
    padding: var(--space-xl) 0 var(--space-md);
}

.contact-cta {
    text-align: center;
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-xl);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.contact-cta h2 {
    margin-bottom: var(--space-md);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: repeat(5, 1fr);
        text-align: left;
    }
}

.footer-col h4 {
    font-family: var(--font-body);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--clr-accent);
    margin-bottom: 1rem;
}

.footer-col p {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.footer-bottom {
    text-align: center;
    padding-top: var(--space-md);
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.85rem;
    color: rgba(255,255,255,0.5);
}

.footer-bottom p {
    color: inherit;
    margin-bottom: 0.25rem;
}

/* ==========================================================================
   About Us Secondary Image Slider
   ========================================================================== */
/* Removed about-image section as per user request */

/* Removed secondary image cycling for About section */

/* ==========================================================================
   Attorney Card — Clickable styles
   ========================================================================== */
.attorney-card[data-bio] {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.attorney-card[data-bio]:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

.attorney-bio-hint {
    display: inline-block;
    margin-top: 1rem;
    font-size: 0.75rem;
    font-family: var(--font-body);
    color: var(--clr-primary-dark);
    background: transparent;
    border: 1px solid var(--clr-accent);
    border-radius: 20px;
    padding: 0.3rem 0.9rem;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.attorney-card[data-bio]:hover .attorney-bio-hint {
    background: var(--clr-accent);
    color: #fff;
    box-shadow: 0 4px 14px rgba(185, 151, 91, 0.4);
}

/* ==========================================================================
   Bio Modal
   ========================================================================== */
.bio-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 18, 36, 0.75);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.bio-modal-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.bio-modal-box {
    background: #fff;
    color: var(--clr-primary-dark);
    border-radius: 8px;
    max-width: 720px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 2.5rem;
    position: relative;
    box-shadow: 0 30px 60px rgba(0,0,0,0.3);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.bio-modal-overlay.open .bio-modal-box {
    transform: translateY(0);
}

.bio-modal-close {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    color: var(--clr-primary-dark);
    opacity: 0.5;
    transition: opacity 0.2s;
}

.bio-modal-close:hover {
    opacity: 1;
}

.bio-modal-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--clr-accent);
}

.bio-modal-photo {
    width: 100px;
    height: 120px;
    object-fit: cover;
    object-position: top;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    flex-shrink: 0;
}

.bio-modal-name {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    margin-bottom: 0.25rem;
    color: var(--clr-primary-dark);
}

.bio-modal-role {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--clr-accent);
    margin: 0;
    font-family: var(--font-body);
}

.bio-modal-body p {
    font-size: 0.975rem;
    line-height: 1.8;
    color: #333;
    margin-bottom: 1rem;
}

.bio-modal-details {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
}

.bio-modal-details p {
    font-size: 0.9rem !important;
    margin-bottom: 0.4rem !important;
}

.bio-modal-details strong {
    color: var(--clr-primary-dark);
}