/* ============================================
   GlobalOcean Law Theme - Main Stylesheet
   Brand: Navy #1E3A5F | Gold #E8A838
   ============================================ */

/* --- CSS Variables --- */
:root {
    --navy: #1E3A5F;
    --navy-dark: #142a45;
    --navy-light: #2a5080;
    --gold: #E8A838;
    --gold-dark: #d49530;
    --gold-light: #f0be60;
    --white: #ffffff;
    --gray-50: #f8f9fa;
    --gray-100: #f0f2f5;
    --gray-200: #e2e6ea;
    --gray-500: #6c757d;
    --gray-700: #495057;
    --gray-900: #212529;
    --font-cn: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    --font-en: 'Playfair Display', Georgia, serif;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.16);
    --radius: 8px;
    --transition: all 0.3s ease;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: var(--font-cn);
    color: var(--gray-900);
    line-height: 1.7;
    background: var(--white);
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--gold); }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 15px;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    text-decoration: none;
    font-family: var(--font-cn);
}
.btn-gold {
    background: var(--gold);
    color: var(--white);
    border-color: var(--gold);
}
.btn-gold:hover {
    background: var(--gold-dark);
    border-color: var(--gold-dark);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.btn-outline-white {
    background: transparent;
    color: var(--white);
    border-color: var(--white);
}
.btn-outline-white:hover {
    background: var(--white);
    color: var(--navy);
}
.btn-lg { padding: 15px 36px; font-size: 16px; }

/* --- Top Bar --- */
.top-bar {
    background: var(--navy-dark);
    color: rgba(255,255,255,0.85);
    font-size: 13px;
    padding: 8px 0;
}
.top-bar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.top-bar-left {
    display: flex;
    gap: 24px;
    align-items: center;
}
.top-bar-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgba(255,255,255,0.85);
    text-decoration: none;
}
.top-bar-item:hover { color: var(--gold); }
.top-bar-item i { color: var(--gold); font-size: 12px; }
.lang-switcher { display: flex; align-items: center; }

/* --- GTranslate Plugin Override --- */
/* Hide the floating widget globally (keep in DOM for JS triggering) */
.gt_switcher_wrapper {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0,0,0,0) !important;
    opacity: 0 !important;
    pointer-events: none !important;
}
/* Style GTranslate links inside top-bar .lang-switcher (rendered by shortcode) */
.lang-switcher .gt_switcher_wrapper {
    position: static !important;
    width: auto !important;
    height: auto !important;
    overflow: visible !important;
    clip: auto !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
}
.lang-switcher .gt_switcher_wrapper .glink {
    color: rgba(255,255,255,0.85) !important;
    font-size: 13px !important;
    text-decoration: none !important;
    padding: 0 !important;
    transition: color 0.3s ease;
}
.lang-switcher .gt_switcher_wrapper .glink:hover {
    color: var(--gold) !important;
}
.lang-switcher .gt_switcher_wrapper .glink.gt-current-lang {
    color: var(--gold) !important;
    font-weight: 600;
}
/* Separator between language links */
.lang-switcher .gt_switcher_wrapper .glink + .glink::before {
    content: "|";
    margin-right: 8px;
    color: rgba(255,255,255,0.4);
    font-weight: 400;
}

/* Drawer-only elements (hidden on desktop, shown in mobile drawer) */
.drawer-cta,
.drawer-lang {
    display: none !important;
}
.drawer-lang-label {
    display: block;
    padding: 16px 24px 8px;
    font-size: 12px;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.drawer-lang-links {
    display: flex;
    gap: 0;
    padding: 0 24px 16px;
}
.drawer-lang-links a {
    flex: 1;
    text-align: center;
    padding: 10px 0;
    font-size: 14px;
    color: var(--navy);
    border: 1px solid var(--gray-200);
    transition: all 0.2s ease;
}
.drawer-lang-links a:first-child {
    border-radius: 6px 0 0 6px;
}
.drawer-lang-links a:last-child {
    border-radius: 0 6px 6px 0;
    border-left: 0;
}
.drawer-lang-links a.active,
.drawer-lang-links a:hover {
    background: var(--navy);
    color: var(--white);
    border-color: var(--navy);
}

/* --- Header / Navigation --- */
.site-header {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}
.site-logo a,
.site-logo .custom-logo-link { display: flex; align-items: center; }
.logo-img,
.site-logo img,
.custom-logo-link img,
img.custom-logo { height: 60px !important; width: auto !important; max-height: 60px !important; object-fit: contain; }
.logo-fallback strong { display: block; color: var(--navy); font-size: 16px; }
.logo-fallback small { color: var(--gray-500); font-size: 12px; }

.main-nav,
.main-nav > div { display: flex; align-items: center; }
.nav-menu,
.main-nav ul,
.main-nav > ul,
.main-nav > div > ul {
    display: flex !important;
    flex-direction: row !important;
    list-style: none !important;
    gap: 4px;
    margin: 0 !important;
    padding: 0 !important;
    flex-wrap: nowrap;
    align-items: center;
}
.nav-menu > li,
.main-nav > ul > li,
.main-nav > div > ul > li { position: relative; white-space: nowrap; }
.nav-menu li a,
.main-nav ul li a {
    display: block;
    padding: 10px 18px;
    color: var(--gray-700);
    font-weight: 500;
    font-size: 15px;
    border-radius: var(--radius);
    transition: var(--transition);
    white-space: nowrap;
}
.nav-menu li a:hover,
.nav-menu li.current-menu-item a,
.nav-menu li.current_page_item a {
    color: var(--navy);
    background: var(--gray-50);
}

/* Dropdown */
.nav-menu li ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    box-shadow: var(--shadow-md);
    border-radius: var(--radius);
    min-width: 200px;
    padding: 8px 0;
    list-style: none;
    z-index: 100;
}
.nav-menu li:hover > ul { display: block; }
.nav-menu li ul li a {
    padding: 8px 20px;
    font-size: 14px;
    border-radius: 0;
}
/* Hide overview link on desktop — only shown in mobile drawer */
.nav-menu li.submenu-overview { display: none !important; }

/* Header Language Switcher (desktop) */
.header-lang {
    position: relative;
    flex-shrink: 0;
    margin-right: 16px;
}
.header-lang-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
    color: var(--navy);
    transition: all 0.2s ease;
    font-family: var(--font-cn);
}
.header-lang-btn:hover {
    border-color: var(--navy);
    background: var(--gray-50);
}
.header-lang-btn .fa-globe {
    font-size: 15px;
    color: var(--navy-light);
}
.header-lang-arrow {
    font-size: 10px;
    transition: transform 0.2s ease;
    color: var(--gray-500);
}
.header-lang.open .header-lang-arrow {
    transform: rotate(180deg);
}
.header-lang-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    min-width: 140px;
    padding: 6px 0;
    z-index: 100;
}
.header-lang.open .header-lang-dropdown {
    display: block;
}
.header-lang-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    font-size: 14px;
    color: var(--gray-700);
    transition: background 0.15s ease;
}
.header-lang-option:hover {
    background: var(--gray-50);
    color: var(--navy);
}
.header-lang-option .fa-check {
    font-size: 12px;
    color: var(--gold);
    opacity: 0;
}
.header-lang-option.active {
    color: var(--navy);
    font-weight: 600;
}
.header-lang-option.active .fa-check {
    opacity: 1;
}

.header-cta { flex-shrink: 0; }

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 1002;
    position: relative;
}
.mobile-toggle span {
    display: block;
    width: 28px;
    height: 3px;
    background: var(--navy);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform-origin: center;
}
/* Hamburger → X animation */
.mobile-toggle.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.mobile-toggle.active span:nth-child(2) { opacity: 0; }
.mobile-toggle.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Nav Overlay */
.nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.nav-overlay.active {
    display: block;
    opacity: 1;
}

/* --- Hero --- */
.hero {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
    background-color: var(--navy);
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(30,58,95,0.82) 0%, rgba(30,58,95,0.6) 100%);
}
.hero-content {
    position: relative;
    z-index: 2;
    color: var(--white);
    padding: 100px 0 80px;
    text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.hero-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.2;
    font-family: var(--font-cn);
}
.hero-subtitle {
    font-size: 20px;
    opacity: 1;
    margin-bottom: 36px;
    max-width: 600px;
    line-height: 1.6;
}
.hero-buttons {
    display: flex;
    gap: 16px;
    margin-bottom: 50px;
}
.hero-stats {
    display: flex;
    gap: 48px;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.2);
}
.stat-item { text-align: center; }
.stat-number {
    font-size: 40px;
    font-weight: 700;
    color: var(--gold);
    font-family: var(--font-en);
}
.stat-suffix {
    font-size: 28px;
    color: var(--gold);
    font-family: var(--font-en);
}
.stat-label {
    display: block;
    font-size: 14px;
    opacity: 0.8;
    margin-top: 4px;
}

/* --- Section Common --- */
.section-header {
    text-align: center;
    margin-bottom: 50px;
}
.section-header h2 {
    font-size: 36px;
    color: var(--navy);
    margin-bottom: 12px;
    font-weight: 700;
}
.section-header p {
    font-size: 17px;
    color: var(--gray-500);
}

/* --- Services --- */
.services-section {
    padding: 80px 0;
    background: var(--white);
}
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}
.service-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 36px 28px;
    transition: var(--transition);
    text-align: center;
}
.service-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--gold);
}
.service-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--navy), var(--navy-light));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}
.service-icon i {
    font-size: 28px;
    color: var(--white);
}
.service-card h3 {
    font-size: 20px;
    color: var(--navy);
    margin-bottom: 12px;
}
.service-card p {
    font-size: 15px;
    color: var(--gray-500);
    line-height: 1.8;
    margin-bottom: 16px;
}
.service-link {
    color: var(--gold);
    font-weight: 500;
    font-size: 14px;
}
.service-link:hover { color: var(--gold-dark); }
.service-link i { font-size: 12px; transition: transform 0.3s; }
.service-link:hover i { transform: translateX(4px); }

/* --- Achievements Bar --- */
.achievements-bar {
    background: var(--navy);
    padding: 40px 0;
}
.achievements-grid {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
}
.achievement-item {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--white);
}
.achievement-item i {
    font-size: 32px;
    color: var(--gold);
}
.achievement-item strong {
    display: block;
    font-size: 16px;
}
.achievement-item span {
    display: block;
    font-size: 13px;
    opacity: 0.7;
}

/* --- Why Choose Us --- */
.why-section {
    padding: 80px 0;
    background: var(--gray-50);
}
.why-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}
.why-card {
    text-align: center;
    padding: 36px 24px;
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.why-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}
.why-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}
.why-icon i {
    font-size: 24px;
    color: var(--white);
}
.why-card h3 {
    font-size: 18px;
    color: var(--navy);
    margin-bottom: 10px;
}
.why-card p {
    font-size: 15px;
    color: var(--gray-500);
    line-height: 1.8;
}

/* --- Testimonials --- */
.testimonials-section {
    padding: 80px 0;
    background: var(--white);
}
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}
.testimonial-card {
    background: var(--gray-50);
    border-radius: 12px;
    padding: 32px;
    border: 1px solid var(--gray-200);
}
.stars { margin-bottom: 16px; }
.stars i { color: var(--gold); font-size: 16px; }
.testimonial-text {
    font-size: 15px;
    color: var(--gray-700);
    line-height: 1.8;
    margin-bottom: 20px;
    font-style: italic;
}
.testimonial-author strong {
    display: block;
    color: var(--navy);
    font-size: 15px;
}
.testimonial-author span {
    font-size: 14px;
    color: var(--gray-500);
}

/* --- CTA Section --- */
.cta-section {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
    padding: 80px 0;
    text-align: center;
    color: var(--white);
}
.cta-section h2 {
    font-size: 32px;
    margin-bottom: 12px;
}
.cta-section p {
    font-size: 17px;
    opacity: 0.85;
    margin-bottom: 30px;
}
.cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
}

/* --- Footer --- */
.site-footer {
    background: var(--gray-900);
    color: rgba(255,255,255,0.75);
    padding: 60px 0 0;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
    gap: 40px;
    padding-bottom: 40px;
}
.footer-col h3 {
    color: var(--white);
    font-size: 17px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--gold);
    display: inline-block;
}
.footer-desc {
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 16px;
}
.footer-links {
    list-style: none;
    padding: 0;
}
.footer-links li { margin-bottom: 10px; }
.footer-links a {
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    transition: var(--transition);
}
.footer-links a:hover {
    color: var(--gold);
    padding-left: 4px;
}
.footer-contact {
    list-style: none;
    padding: 0;
}
.footer-contact li {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
    font-size: 14px;
    align-items: flex-start;
}
.footer-contact i {
    color: var(--gold);
    margin-top: 4px;
    flex-shrink: 0;
}
.footer-contact a {
    color: rgba(255,255,255,0.7);
}
.footer-contact a:hover { color: var(--gold); }

.footer-social { display: flex; gap: 12px; }
.social-icon, .wechat-hover {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
}
.social-icon:hover, .wechat-hover:hover {
    background: var(--gold);
    color: var(--white);
}
.wechat-qr-popup {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--white);
    padding: 8px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    width: 160px;
    margin-bottom: 8px;
}
.wechat-hover:hover .wechat-qr-popup { display: block; }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 20px 0;
    text-align: center;
    font-size: 13px;
}

/* --- Page Content (for inner pages) --- */
.page-header {
    background: var(--navy);
    padding: 60px 0;
    text-align: center;
    color: var(--white);
}
.page-header h1 {
    font-size: 36px;
    margin-bottom: 8px;
}
.page-content {
    padding: 60px 0;
}
.page-content .container {
    max-width: 900px;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .why-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    /* Tablet section padding - slightly reduced from desktop */
    .features-section,
    .services-section,
    .about-section,
    .team-section,
    .testimonials-section,
    .why-section { padding: 64px 0; }
    .cta-section { padding: 64px 0; }
    .section-header { margin-bottom: 40px; }
}

@media (max-width: 768px) {
    /* --- Top Bar Mobile --- */
    .top-bar { padding: 6px 0; font-size: 12px; }
    .top-bar-inner { flex-wrap: wrap; gap: 4px; justify-content: center; }
    .top-bar-left { gap: 10px; font-size: 11px; flex-wrap: wrap; justify-content: center; }
    .top-bar-item i { font-size: 10px; }
    /* Hide address on small mobile to save space */
    .top-bar-item:nth-child(3) { display: none; }

    /* --- Header Mobile --- */
    .header-inner { height: 66px; }
    .logo-img,
    .site-logo img,
    .custom-logo-link img,
    img.custom-logo { height: 56px !important; max-height: 56px !important; }
    .header-cta { display: none; }
    .header-lang { display: none; }
    .mobile-toggle { display: flex; }

    /* Mobile Drawer Nav */
    .main-nav {
        display: block !important;
        position: fixed;
        top: 0;
        right: 0;
        width: 280px;
        height: 100vh;
        background: var(--white);
        z-index: 1001;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        box-shadow: -4px 0 20px rgba(0,0,0,0.15);
        overflow-y: auto;
        padding-top: 80px;
    }
    .main-nav.active {
        transform: translateX(0);
    }
    .main-nav .nav-menu {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0;
    }
    .main-nav .nav-menu li a {
        display: block;
        padding: 16px 24px;
        border-bottom: 1px solid var(--gray-100);
        font-size: 16px;
        color: var(--navy);
        transition: background 0.2s ease, padding-left 0.2s ease;
        -webkit-tap-highlight-color: transparent;
    }
    .main-nav .nav-menu li a:hover {
        background: rgba(30,58,95,0.05);
        padding-left: 32px;
    }
    .main-nav .nav-menu li:first-child a {
        border-top: 1px solid var(--gray-100);
    }
    /* Drawer CTA button */
    .drawer-cta {
        display: block !important;
        margin: 24px;
        padding: 14px 0;
        text-align: center;
        background: var(--gold);
        color: var(--white) !important;
        border-radius: 8px;
        font-weight: 600;
        font-size: 16px;
        text-decoration: none;
    }
    .drawer-cta:hover { background: #d49730; }

    /* Hide GTranslate fixed widget on mobile (keep in DOM for JS triggering) */
    .gt_switcher_wrapper {
        position: absolute !important;
        width: 1px !important;
        height: 1px !important;
        overflow: hidden !important;
        clip: rect(0,0,0,0) !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }
    .top-bar-right {
        display: none;
    }
    /* Show drawer language switcher on mobile */
    .drawer-lang {
        display: block !important;
        border-top: 1px solid var(--gray-100);
        margin-top: 8px;
        width: 100%;
    }
    .drawer-lang-links {
        width: 100%;
    }

    /* Mobile Drawer Sub-menu */
    .main-nav .nav-menu li ul {
        display: none;
        position: static;
        box-shadow: none;
        background: transparent;
        padding: 0;
        border-radius: 0;
        min-width: 0;
    }
    .main-nav .nav-menu li.menu-item-has-children.sub-open > ul {
        display: block;
    }
    .main-nav .nav-menu li ul li a {
        padding: 14px 24px;
        font-size: 15px;
        color: var(--gray-500);
        border-bottom: 1px solid var(--gray-100);
        background: var(--gray-50, #f8f9fa);
        -webkit-tap-highlight-color: transparent;
    }
    .main-nav .nav-menu li ul li a:hover {
        color: var(--navy);
        background: rgba(30,58,95,0.08);
    }
    .main-nav .nav-menu li.menu-item-has-children > a {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
    }
    .main-nav .nav-menu li.menu-item-has-children > a::after {
        content: '\f078';
        font-family: 'Font Awesome 5 Free';
        font-weight: 900;
        font-size: 10px;
        color: var(--gray-400);
        transition: transform 0.3s ease;
        margin-left: 12px;
        flex-shrink: 0;
    }
    .main-nav .nav-menu li.menu-item-has-children.sub-open > a::after {
        transform: rotate(180deg);
    }
    /* Overview link at top of submenu — show on mobile */
    .nav-menu li.submenu-overview {
        display: list-item !important;
    }
    .main-nav .nav-menu li.submenu-overview a {
        color: var(--gold);
        font-weight: 600;
        font-size: 14px;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    .main-nav .nav-menu li.submenu-overview a i {
        font-size: 11px;
    }

    /* --- Hero Section Mobile --- */
    .hero { min-height: auto; background-position: 30% center; }
    .hero-content { padding: 40px 0 40px; }
    .hero-title { font-size: 28px; margin-bottom: 12px; }
    .hero-subtitle { font-size: 15px; margin-bottom: 24px; line-height: 1.6; }
    .hero-philosophy { font-size: 14px; padding: 10px 16px; margin-bottom: 24px; line-height: 1.7; }
    .hero-buttons {
        flex-direction: row;
        gap: 12px;
        margin-bottom: 32px;
    }
    .hero-buttons .btn {
        padding: 12px 20px;
        font-size: 14px;
        white-space: nowrap;
    }
    .hero-buttons .btn-lg { padding: 12px 20px; font-size: 14px; }
    .hero-stats {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
        flex-wrap: nowrap;
        padding-top: 24px;
    }
    .stat-number { font-size: 26px; }
    .stat-suffix { font-size: 18px; }
    .stat-label { font-size: 12px; margin-top: 2px; }

    /* --- Container padding increase on mobile --- */
    .container { padding-left: 16px; padding-right: 16px; }

    /* --- Grid layouts --- */
    .services-grid { grid-template-columns: 1fr; }
    .why-grid { grid-template-columns: 1fr; }
    .testimonials-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }

    .achievements-grid { flex-direction: column; gap: 20px; }

    /* --- Section typography mobile --- */
    .section-header h2 { font-size: 24px; }
    .section-header { margin-bottom: 32px; }
    .section-header p { font-size: 15px; }
    .cta-section h2 { font-size: 22px; }
    .cta-buttons { flex-direction: column; align-items: center; }

    /* --- Section padding - Google UX mobile --- */
    .features-section,
    .services-section,
    .about-section,
    .team-section,
    .testimonials-section,
    .why-section { padding: 52px 0; }
    .cta-section { padding: 52px 0; }
    .achievements-bar { padding: 32px 0; }
    .page-header { padding: 40px 0; }
    .page-header h1 { font-size: 26px; }
    .page-content { padding: 40px 0; }
    .site-footer { padding: 40px 0 0; }

    /* --- Content typography mobile --- */
    .why-card h3 { font-size: 17px; }
    .why-card p,
    .features-grid .why-card p { font-size: 15px; line-height: 1.8; }
    .service-card h3,
    .service-card-large h3 { font-size: 18px; }
    .service-card p,
    .service-card-large p { font-size: 15px; line-height: 1.8; }
    .about-text p { font-size: 15px; line-height: 1.8; }
    .about-highlight-item { font-size: 15px; }

    /* --- Footer mobile typography --- */
    .site-footer { font-size: 14px; }
    .footer-col h4 { font-size: 16px; }
}

/* --- Animations --- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
.fade-hidden {
    opacity: 0;
    transform: translateY(30px);
    transition: none;
}
.fade-in-up {
    animation: fadeInUp 0.6s ease forwards !important;
    opacity: 1 !important;
}

/* --- Hero Enhancements --- */
.hero-title-en {
    display: block;
    font-family: var(--font-en);
    font-size: 18px;
    font-weight: 400;
    letter-spacing: 3px;
    text-transform: uppercase;
    opacity: 0.7;
    margin-bottom: 8px;
}
.hero-philosophy {
    background: rgba(30,58,95,0.35);
    border-left: 3px solid var(--gold);
    padding: 12px 20px;
    margin-bottom: 30px;
    max-width: 640px;
    font-size: 15px;
    line-height: 1.7;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.hero-philosophy strong {
    color: var(--gold);
}
.stat-label small {
    font-size: 11px;
    opacity: 0.6;
    font-family: var(--font-en);
    font-style: italic;
}

/* --- Section Subtitle (English) --- */
.section-subtitle-en {
    font-family: var(--font-en);
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 6px;
}
.section-header-left {
    text-align: left;
}

/* --- Features Section (Why Choose Us - rearranged) --- */
.features-section {
    padding: 80px 0;
    background: var(--gray-50);
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}
.features-grid .why-card p {
    font-size: 14px;
    text-align: left;
    line-height: 1.8;
}

/* --- Services Grid 3-column variant --- */
.services-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}
.service-card-large {
    text-align: left;
}
.service-card-large .service-icon {
    margin: 0 0 20px 0;
}
.service-card-large h3 {
    font-size: 22px;
}
.service-card-large h3 small {
    font-size: 13px;
    font-weight: 400;
    color: var(--gray-500);
    font-family: var(--font-en);
}
.service-card-large p {
    font-size: 15px;
    line-height: 1.8;
}

/* --- About Section --- */
.about-section {
    padding: 80px 0;
    background: var(--white);
}
.about-content-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 60px;
    align-items: start;
}
.about-text p {
    font-size: 15px;
    color: var(--gray-700);
    line-height: 1.8;
    margin-bottom: 16px;
}
.about-highlights {
    margin: 24px 0;
}
.about-highlight-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 15px;
    color: var(--gray-700);
}
.about-highlight-item i {
    color: var(--gold);
    font-size: 18px;
    flex-shrink: 0;
}
.about-image img {
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* --- About Page Sections --- */
.about-philosophy-section {
    background: var(--gray-50);
    padding: 60px 0;
}
.about-advantage-section {
    padding: 60px 0;
}
.about-philosophy-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-bottom: 36px;
}
.about-advantage-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

/* --- Contact Page Grids --- */
.contact-offices-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}
.contact-china-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    text-align: center;
}

/* --- Team Section (Redesigned) --- */
.team-section {
    padding: 80px 0;
    background: var(--gray-50);
}

/* Lead attorney - featured card */
.team-lead {
    display: flex;
    align-items: center;
    gap: 48px;
    background: var(--white);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.06);
    margin-bottom: 48px;
}
.team-lead-photo {
    flex-shrink: 0;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--gold);
    box-shadow: 0 4px 20px rgba(232,168,56,0.2);
}
.team-lead-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
}
.team-lead-info {
    flex: 1;
}
.team-lead-info h3 {
    font-size: 26px;
    color: var(--navy);
    margin-bottom: 4px;
}
.team-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    color: var(--gold);
    font-weight: 500;
    font-size: 15px;
    text-decoration: none;
    transition: var(--transition);
}
.team-link:hover {
    color: var(--navy);
}
.team-link i {
    transition: transform 0.2s;
}
.team-link:hover i {
    transform: translateX(4px);
}

/* Other team members - horizontal card grid */
.team-grid-v2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}
.team-member {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--white);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 8px rgba(0,0,0,0.05);
    transition: var(--transition);
}
.team-member:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}
.team-avatar {
    flex-shrink: 0;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--gray-100);
}
.team-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
}
.team-member-info {
    flex: 1;
    min-width: 0;
}
.team-member-info h4 {
    font-size: 17px;
    color: var(--navy);
    margin-bottom: 2px;
}
.team-role {
    font-size: 13px;
    color: var(--gold);
    font-weight: 500;
    margin-bottom: 8px;
}
.team-bio {
    font-size: 14px;
    color: var(--gray-500);
    line-height: 1.7;
}

/* --- Team Detail Card (Founder) --- */
.team-detail-card {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
    margin-bottom: 60px;
    padding: 40px;
    background: var(--gray-50);
    border-radius: 12px;
}
.team-detail-photo img {
    width: 100%;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}
.team-detail-info h2 {
    color: var(--navy);
    margin-bottom: 4px;
}
.team-detail-role {
    color: var(--gold);
    font-weight: 600;
    margin-bottom: 20px;
    font-size: 16px;
}
.team-detail-bio {
    color: var(--gray-700);
    line-height: 1.8;
    font-size: 15px;
}
.team-detail-tags {
    margin-top: 16px;
    display: flex;
    gap: 20px;
}
.team-detail-tags span {
    font-size: 13px;
    color: var(--gray-500);
}
.team-detail-tags i {
    color: var(--gold);
    margin-right: 4px;
}

/* --- Team Section Title --- */
.team-section-title {
    color: var(--navy);
    font-size: 24px;
    margin-bottom: 30px;
    text-align: center;
}

/* --- Team Members Grid (Card + Inline Expand) --- */
.tm-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.tm-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    cursor: pointer;
    position: relative;
}
.tm-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}
.tm-card.active {
    box-shadow: 0 0 0 2px var(--gold), var(--shadow-md);
    transform: translateY(-2px);
}
/* Triangle indicator on active card */
.tm-card.active::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-bottom: 12px solid var(--gray-50);
    z-index: 2;
}
.tm-card-photo {
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: var(--gray-100);
}
.tm-card-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
    transition: transform 0.4s ease;
}
.tm-card:hover .tm-card-photo img {
    transform: scale(1.04);
}
.tm-card-info {
    padding: 16px 20px 20px;
}
.tm-card-info h4 {
    font-size: 18px;
    color: var(--navy);
    margin: 0 0 4px;
    font-weight: 600;
}
.tm-card-role {
    display: block;
    font-size: 13px;
    color: var(--gold);
    font-weight: 500;
    margin-bottom: 8px;
}
.tm-card-excerpt {
    font-size: 13px;
    color: var(--gray-500);
    line-height: 1.6;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.tm-card-arrow {
    position: absolute;
    bottom: 16px;
    right: 16px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--gray-50);
    color: var(--gray-400);
    font-size: 11px;
    transition: var(--transition);
}
.tm-card:hover .tm-card-arrow {
    background: var(--navy);
    color: var(--white);
}
.tm-card.active .tm-card-arrow {
    background: var(--gold);
    color: var(--white);
}
.tm-card.active .tm-card-arrow i {
    transform: rotate(180deg);
}

/* --- Expand Panel --- */
.tm-expand {
    grid-column: 1 / -1;
    background: var(--gray-50);
    border-radius: 12px;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, opacity 0.3s ease, margin-top 0.3s ease;
    margin-top: 0;
    position: relative;
}
.tm-expand-inner {
    display: flex;
    gap: 32px;
    padding: 32px;
    align-items: flex-start;
}
.tm-expand-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 3px solid var(--gold);
}
.tm-expand-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
}
.tm-expand-content {
    flex: 1;
    min-width: 0;
}
.tm-expand-name {
    font-size: 22px;
    color: var(--navy);
    margin: 0 0 4px;
    font-weight: 700;
}
.tm-expand-role {
    display: block;
    font-size: 14px;
    color: var(--gold);
    font-weight: 600;
    margin-bottom: 14px;
}
.tm-expand-bio {
    font-size: 15px;
    color: var(--gray-700);
    line-height: 1.85;
    margin: 0 0 16px;
}
.tm-expand-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.tm-expand-tag {
    display: inline-block;
    padding: 4px 14px;
    font-size: 12px;
    color: var(--navy);
    background: rgba(30, 58, 95, 0.08);
    border-radius: 20px;
    font-weight: 500;
}
.tm-expand-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--white);
    color: var(--gray-500);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}
.tm-expand-close:hover {
    background: var(--navy);
    color: var(--white);
}

/* Legacy classes kept for homepage team section */
.team-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}
.team-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.team-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}
.team-photo {
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
}
.team-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
}
.team-info {
    padding: 24px;
}
.team-info h3 {
    font-size: 20px;
    color: var(--navy);
    margin-bottom: 2px;
}
.team-title-en {
    font-family: var(--font-en);
    font-size: 13px;
    color: var(--gray-500);
    font-style: italic;
    margin-bottom: 4px;
}
.why-card h3 small {
    display: block;
    font-size: 12px;
    font-weight: 400;
    color: var(--gray-500);
    font-family: var(--font-en);
    margin-top: 2px;
}

/* --- Responsive: New Sections --- */
@media (max-width: 1024px) {
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .services-grid-3 { grid-template-columns: repeat(2, 1fr); }
    .about-content-grid { grid-template-columns: 1fr; gap: 40px; }
    .about-philosophy-grid { grid-template-columns: repeat(2, 1fr); }
    .about-advantage-grid { grid-template-columns: repeat(2, 1fr); }
    .team-grid { grid-template-columns: repeat(2, 1fr); }
    .team-grid-v2 { grid-template-columns: repeat(2, 1fr); }
    .team-lead { gap: 32px; padding: 32px; }
    .team-lead-photo { width: 160px; height: 160px; }
    .team-detail-card { grid-template-columns: 240px 1fr; gap: 32px; padding: 32px; }
    .tm-grid { grid-template-columns: repeat(2, 1fr); }
    /* Tablet padding override (must come after section definitions) */
    .features-section,
    .about-section,
    .team-section { padding: 64px 0; }
}
@media (max-width: 768px) {
    .features-grid { grid-template-columns: 1fr; }
    .services-grid-3 { grid-template-columns: 1fr; }
    .team-grid { grid-template-columns: 1fr; }
    .about-philosophy-grid { grid-template-columns: 1fr; gap: 16px; }
    .about-advantage-grid { grid-template-columns: 1fr; gap: 16px; }
    .about-philosophy-section { padding: 40px 0; }
    .about-advantage-section { padding: 40px 0; }
    .contact-offices-grid { grid-template-columns: 1fr; gap: 24px; margin-bottom: 40px; }
    .contact-china-grid { grid-template-columns: repeat(2, 1fr); }
    .contact-page .page-content { padding: 40px 0; }

    /* Hero cascade overrides (these classes defined after first media query) */
    .hero-title-en { font-size: 13px; letter-spacing: 2px; }
    .hero-philosophy { font-size: 14px; padding: 10px 16px; margin-bottom: 24px; line-height: 1.7; }

    /* Content cascade overrides (defined after first media query) */
    .features-grid .why-card p { font-size: 15px; line-height: 1.8; }
    .service-card-large h3 { font-size: 18px; }
    .service-card-large h3 small { font-size: 12px; }
    .service-card-large p { font-size: 15px; line-height: 1.8; }

    /* About section cascade overrides */
    .about-text p { font-size: 15px; line-height: 1.8; }
    .about-highlight-item { font-size: 15px; }

    /* Team section mobile */
    .team-lead {
        flex-direction: column;
        text-align: center;
        padding: 28px 20px;
        gap: 16px;
    }
    .team-lead-photo { width: 120px; height: 120px; }
    .team-lead-info h3 { font-size: 20px; }
    .team-lead-info p { font-size: 15px; line-height: 1.8; }
    .team-grid-v2 { grid-template-columns: 1fr; }
    .team-member { padding: 16px; gap: 14px; }
    .team-avatar { width: 72px; height: 72px; }
    .team-member-info h4 { font-size: 16px; }
    .team-role { font-size: 13px; }
    .team-bio { font-size: 13px; line-height: 1.6; }
    .team-link { font-size: 14px; }

    /* Founder detail card mobile */
    .team-detail-card {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 24px;
        text-align: center;
    }
    .team-detail-photo img {
        max-width: 200px;
        margin: 0 auto;
        display: block;
    }
    .team-detail-info h2 {
        font-size: 22px;
    }
    .team-detail-bio {
        text-align: left;
    }
    .team-detail-tags {
        justify-content: center;
    }

    /* Team grid mobile - 2 columns */
    .tm-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
    .tm-card-info {
        padding: 12px 14px 16px;
    }
    .tm-card-info h4 {
        font-size: 15px;
    }
    .tm-card-excerpt {
        display: none;
    }
    .tm-card-arrow {
        bottom: 12px;
        right: 10px;
        width: 24px;
        height: 24px;
        font-size: 10px;
    }
    .tm-expand-inner {
        flex-direction: column;
        padding: 24px 20px;
        gap: 16px;
        align-items: center;
        text-align: center;
    }
    .tm-expand-avatar {
        width: 80px;
        height: 80px;
    }
    .tm-expand-bio {
        text-align: left;
        font-size: 14px;
    }
    .tm-expand-tags {
        justify-content: center;
    }
    .tm-expand-name {
        font-size: 20px;
    }

    /* Mobile padding override (must come after section definitions) */
    .features-section,
    .about-section,
    .team-section { padding: 52px 0; }
}

/* --- Practice Areas Cards --- */
.pa-card {
    background: var(--white);
    border-radius: 16px;
    padding: 40px 44px;
    margin-bottom: 36px;
    box-shadow: 0 2px 12px rgba(30,58,95,0.06);
    border: 1px solid rgba(30,58,95,0.08);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.pa-card:hover {
    box-shadow: 0 8px 32px rgba(30,58,95,0.12);
    transform: translateY(-2px);
}
.pa-card-header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 24px;
}
.pa-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.pa-icon i {
    font-size: 26px;
    color: var(--white);
}
.pa-icon--trust {
    background: linear-gradient(135deg, var(--navy), #2a5a8f);
}
.pa-icon--business {
    background: linear-gradient(135deg, #1a6b4a, #238c62);
}
.pa-icon--immigration {
    background: linear-gradient(135deg, #8b4513, #b8860b);
}
.pa-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--navy);
    margin: 0 0 2px;
}
.pa-subtitle {
    font-size: 13px;
    color: var(--gray-500);
    letter-spacing: 0.5px;
    margin: 0;
    font-weight: 500;
}
.pa-desc {
    font-size: 15px;
    color: var(--gray-700);
    line-height: 1.9;
    margin-bottom: 24px;
}
.pa-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}
.pa-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--gray-50);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--navy);
    border: 1px solid rgba(30,58,95,0.08);
    transition: all 0.2s ease;
}
.pa-tag:hover {
    background: rgba(30,58,95,0.06);
    border-color: var(--navy);
}
.pa-tag i {
    font-size: 12px;
    color: var(--gold);
}
.pa-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    background: var(--navy);
    color: var(--white);
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}
.pa-cta:hover {
    background: var(--gold);
    color: var(--navy);
    transform: translateX(4px);
    text-decoration: none;
}
.pa-cta i {
    font-size: 13px;
    transition: transform 0.3s ease;
}
.pa-cta:hover i {
    transform: translateX(4px);
}
@media (max-width: 768px) {
    .pa-card { padding: 28px 24px; }
    .pa-card-header { gap: 16px; }
    .pa-icon { width: 52px; height: 52px; border-radius: 12px; }
    .pa-icon i { font-size: 22px; }
    .pa-title { font-size: 22px; }
    .pa-tags { gap: 8px; }
    .pa-tag { padding: 6px 12px; font-size: 12px; }
    .pa-cta { width: 100%; justify-content: center; }
}

/* --- Subpage Detail (Trust / Business / Immigration) --- */
.subpage-detail { padding: 60px 0; }
.subpage-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 40px;
    align-items: start;
}
.subpage-tabs {
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: var(--gray-50);
    border-radius: 12px;
    padding: 16px 12px;
}
.subpage-tab {
    display: block;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    color: var(--gray-700);
    transition: var(--transition);
    text-decoration: none;
    border: none;
    cursor: pointer;
}
.subpage-tab:hover {
    background: var(--gray-200);
    color: var(--navy);
}
.subpage-tab.active {
    background: var(--navy);
    color: var(--white);
    font-weight: 600;
}
.subpage-tab-group {
    font-size: 12px;
    font-weight: 700;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 16px 4px;
    margin-top: 4px;
}
.subpage-tab-group:first-child { margin-top: 0; padding-top: 4px; }
.subpage-content { min-height: 400px; }
.subpage-panel {
    display: none;
    animation: fadeInPanel 0.3s ease;
}
.subpage-panel.active { display: block; }
@keyframes fadeInPanel {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.subpage-panel h2 {
    color: var(--navy);
    font-size: 24px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--gold);
}
.subpage-panel h3 {
    color: var(--navy);
    font-size: 17px;
    margin: 24px 0 12px;
}
.subpage-panel p {
    color: var(--gray-700);
    line-height: 1.8;
    font-size: 15px;
    margin-bottom: 12px;
}
.subpage-panel ul {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
}
.subpage-panel ul li {
    position: relative;
    padding: 8px 0 8px 24px;
    color: var(--gray-700);
    font-size: 14px;
    line-height: 1.7;
    border-bottom: 1px solid var(--gray-100);
}
.subpage-panel ul li:last-child { border-bottom: none; }
.subpage-panel ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 14px;
    width: 8px;
    height: 8px;
    background: var(--gold);
    border-radius: 50%;
}

/* --- Accordion Nav (Immigration page) --- */
.subpage-accordion-nav {
    position: sticky;
    top: 100px;
    align-self: start;
    background: var(--white);
    border-radius: 12px;
    border: 1px solid var(--gray-100);
    overflow: hidden;
}
.acc-group {
    border-bottom: 1px solid var(--gray-100);
}
.acc-group:last-child {
    border-bottom: none;
}
.acc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 14px 16px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    color: var(--navy);
    font-family: var(--font-cn);
    transition: background 0.2s ease;
}
.acc-header:hover {
    background: var(--gray-50);
}
.acc-arrow {
    font-size: 10px;
    color: var(--gray-400);
    transition: transform 0.3s ease;
}
.acc-group.acc-open .acc-arrow {
    transform: rotate(180deg);
}
.acc-body {
    display: none;
    padding: 0 8px 8px;
}
.acc-group.acc-open .acc-body {
    display: block;
}
.acc-item {
    display: block;
    padding: 9px 16px;
    font-size: 13px;
    color: var(--gray-600);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
}
.acc-item:hover {
    background: var(--gray-50);
    color: var(--navy);
}
.acc-item.active {
    background: var(--navy);
    color: var(--white);
    font-weight: 600;
}

@media (max-width: 768px) {
    .subpage-accordion-nav {
        position: static;
        margin-bottom: 24px;
        border-radius: 10px;
    }
    .acc-header {
        padding: 16px 20px;
        font-size: 15px;
    }
    .acc-body { padding: 0 10px 10px; }
    .acc-item {
        padding: 12px 16px;
        font-size: 14px;
    }
}

/* Mobile tab dropdown for subpages */
.subpage-mobile-select {
    display: none;
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--navy);
    border-radius: 8px;
    font-size: 15px;
    color: var(--navy);
    background: var(--white);
    font-family: var(--font-cn);
    margin-bottom: 24px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%231E3A5F' stroke-width='2' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
}

@media (max-width: 768px) {
    .subpage-layout {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .subpage-tabs {
        display: none;
        position: static;
    }
    .subpage-mobile-select {
        display: block;
    }
    .subpage-detail { padding: 40px 0; }
    .subpage-panel h2 { font-size: 20px; }
}

/* --- WordPress overrides --- */
.wp-block-image img { border-radius: var(--radius); }
.entry-content h2 { color: var(--navy); margin: 1.5em 0 0.5em; }
.entry-content h3 { color: var(--navy-light); margin: 1.2em 0 0.5em; }
.entry-content p { margin-bottom: 1em; }
.entry-content ul, .entry-content ol { margin-bottom: 1em; padding-left: 1.5em; }

/* --- Colibri / Plugin Override --- */
.site-header .nav-menu { display: flex !important; flex-direction: row !important; }
.site-header .header-inner { display: flex !important; align-items: center !important; justify-content: space-between !important; }
body .site-logo img { height: 60px !important; width: auto !important; max-width: 280px !important; }
/* Hide any Colibri-generated front-end wrapper */
.colibri-page-builder-content,
[data-colibri-id],
.h-navigation_sticky { display: none !important; }

/* Sub-menu should never inherit nav-menu flex */
.site-header .nav-menu li ul {
    display: none !important;
    flex-direction: column !important;
}
.site-header .nav-menu li:hover > ul {
    display: block !important;
}

/* --- Mobile overrides for plugin styles --- */
@media (max-width: 768px) {
    body .site-logo img { height: 56px !important; max-width: 260px !important; }
    /* Override Colibri nav-menu flex-direction for mobile drawer */
    .site-header .nav-menu {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0 !important;
    }
    /* Mobile: sub-menu hidden by default, show on toggle */
    .site-header .nav-menu li:hover > ul {
        display: none !important;
    }
    .site-header .nav-menu li.menu-item-has-children.sub-open > ul {
        display: block !important;
    }
}
