:root {
    --sage: #E7EFE9;
    --navy: #0E2A3B;
    --warm-gray: #6B7280;
    --gold: #C7A463;
    --white: #FFFFFF;
    --sage-light: #F3F7F4;
    --navy-light: #1a4158;
    --shadow-sm: 0 2px 4px rgba(14, 42, 59, 0.08);
    --shadow-md: 0 4px 12px rgba(14, 42, 59, 0.12);
    --shadow-lg: 0 8px 24px rgba(14, 42, 59, 0.16);
    --max-width: 1400px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
}

body {
    font-family: 'Inter', 'Inter-fallback', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--navy);
    background-color: var(--navy);
    font-size: 18px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Typography with font fallbacks to prevent layout shift */
@font-face {
    font-family: 'Inter-fallback';
    size-adjust: 100.06%;
    ascent-override: 90%;
    src: local('Arial');
}

@font-face {
    font-family: 'Spectral-fallback';
    size-adjust: 102%;
    ascent-override: 95%;
    src: local('Georgia');
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Spectral', 'Spectral-fallback', Georgia, serif;
    font-weight: 400;
    line-height: 1.2;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* Header - Minimal and Elegant */
header {
    background: var(--white);
    border-bottom: 1px solid rgba(14, 42, 59, 0.08);
    padding: 1.25rem 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

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

.logo {
    font-family: 'Spectral', serif;
    font-size: 1.5rem;
    font-weight: 400;
    text-decoration: none;
    color: var(--navy);
    letter-spacing: -0.5px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2.5rem;
}

nav a {
    color: var(--warm-gray);
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 400;
    transition: color 0.2s;
    letter-spacing: 0.2px;
}

nav a:hover {
    color: var(--navy);
}

/* Hero Section - Compact and Sophisticated */
.hero {
    background: linear-gradient(135deg, var(--sage) 0%, var(--sage-light) 100%);
    padding-top: 6rem; /* Account for fixed header */
    min-height: calc(100vh - 70px);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    flex: 1;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('data:image/svg+xml,%3Csvg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"%3E%3Cg fill="none" fill-rule="evenodd"%3E%3Cg fill="%230E2A3B" fill-opacity="0.02"%3E%3Cpath d="M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z"/%3E%3C/g%3E%3C/g%3E%3C/svg%3E');
    opacity: 0.3;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 5rem;
    align-items: center;
    position: relative;
    z-index: 1;
    padding: 3rem 0;
    min-height: 500px; /* Prevent layout shift */
}

.hero-text {
    max-width: 600px;
}

/* Explicit font-size for h1 within sections to avoid browser deprecation warning */
section h1 {
    font-size: 4.5rem;
}

/* Optimize paint performance without causing layout shifts */
.hero-photo img,
.photo-frame {
    /* Remove will-change as it can cause shifts */
    transform: translateZ(0); /* Keep GPU acceleration */
}

/* Batch animations to prevent reflow */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

.hero-text h1 {
    font-size: 4.5rem;
    color: var(--navy);
    margin-bottom: 0.75rem;
    font-weight: 300;
    letter-spacing: -1px;
    min-height: 5.4rem; /* 1.2 line-height * 4.5rem */
    display: block;
}

.hero-text .subtitle {
    font-family: 'Spectral', serif;
    font-size: 1.75rem;
    color: var(--warm-gray);
    margin-bottom: 2.5rem;
    font-style: italic;
    min-height: 2.1rem; /* Reserve space */
    display: block;
}

.credentials-line {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
    min-height: 50px; /* Reserve space for credentials */
}

.credential {
    font-size: 1.05rem;
    color: var(--navy);
    padding: 0.6rem 1.25rem;
    background: var(--white);
    border: 1px solid var(--gold);
    border-radius: 4px;
    font-weight: 500;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
}

.practice-info {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    margin-bottom: 2.5rem;
    min-height: 180px; /* Fixed height to prevent shift */
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    min-height: 120px; /* Reserve grid space */
}

.info-item {
    display: flex;
    flex-direction: column;
    min-height: 50px; /* Fixed item height */
}

.info-label {
    font-size: 0.9rem;
    color: var(--warm-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.35rem;
}

.info-value {
    font-family: 'Spectral', serif;
    font-size: 1.5rem;
    color: var(--navy);
}

.cta-group, .button-group {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
    justify-content: center;
    min-height: 70px; /* Reserve space for buttons */
}

.btn-primary {
    background: var(--navy);
    color: var(--white);
    padding: 1.25rem 2.5rem;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.15rem;
    min-height: 60px; /* Fixed button height */
    min-width: 200px; /* Minimum width to prevent shift */
}

.btn-primary:hover {
    background: var(--navy-light);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: transparent;
    color: var(--navy);
    padding: 1.25rem 2.5rem;
    text-decoration: none;
    border: 2px solid var(--navy);
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.15rem;
    min-height: 60px; /* Fixed button height */
    min-width: 200px; /* Minimum width to prevent shift */
}

.btn-secondary:hover {
    background: var(--navy);
    color: var(--white);
}

/* Hero Photo Section */
.hero-photo {
    text-align: center;
    min-width: 340px;
    min-height: 455px; /* Reserve space for image */
}

.photo-frame {
    position: relative;
    display: inline-block;
}

.photo-frame img {
    width: 340px;
    height: 340px;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: var(--shadow-lg);
    border: 3px solid var(--white);
}

.photo-caption {
    margin-top: 1rem;
    text-align: center;
}

.photo-caption .name {
    font-family: 'Spectral', serif;
    font-size: 1.25rem;
    color: var(--navy);
    margin-bottom: 0.25rem;
    display: block;
}

.photo-caption .credentials {
    font-size: 0.9rem;
    color: var(--warm-gray);
}

/* Content Sections */
main {
    padding: 4rem 0;
    background-color: var(--sage-light);
}

.content-section {
    background: var(--white);
    padding: 3rem;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
}

.content-section h1 {
    font-size: 2.5rem;
    color: var(--navy);
    margin-bottom: 1.5rem;
}

.content-section h2 {
    font-size: 2rem;
    color: var(--navy);
    margin-bottom: 1.5rem;
    margin-top: 2.5rem;
}

.content-section h3 {
    font-size: 1.5rem;
    color: var(--navy);
    margin-bottom: 1rem;
    margin-top: 2rem;
}

.content-section p {
    line-height: 1.8;
    color: var(--warm-gray);
    margin-bottom: 1rem;
}

.content-section ul {
    margin-left: 2rem;
    margin-bottom: 1rem;
    color: var(--warm-gray);
}

.content-section li {
    margin-bottom: 0.5rem;
}

/* Service Cards */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.service-card {
    background: var(--sage-light);
    padding: 1.5rem;
    border-radius: 4px;
    border-left: 3px solid var(--gold);
}

.service-card h3 {
    color: var(--navy);
    margin-bottom: 0.5rem;
}

/* Benefits Grid */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.benefit {
    text-align: center;
    padding: 2rem;
}

.benefit h3 {
    font-family: 'Spectral', serif;
    color: var(--navy);
    margin-bottom: 1rem;
}

.benefit p {
    color: var(--warm-gray);
}

/* Client Types */
.client-types {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.client-tag {
    background: var(--sage);
    color: var(--navy);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

/* Quote Blocks */
.quote {
    background: var(--sage-light);
    padding: 2rem;
    border-left: 3px solid var(--gold);
    margin: 2rem 0;
    font-family: 'Spectral', serif;
    font-style: italic;
    color: var(--navy);
}

/* Price Box */
.price-box {
    background: var(--navy);
    color: var(--white);
    padding: 2rem;
    border-radius: 4px;
    text-align: center;
    margin: 2rem auto;
    max-width: 300px;
}

.price-box .price {
    font-family: 'Spectral', serif;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

/* Footer */
footer {
    background: var(--navy);
    color: var(--white);
    text-align: center;
    padding: 1.5rem 0;
    margin-top: auto;
    display: flex;
    align-items: center;
    min-height: 70px;
}

footer p {
    margin: 0;
    opacity: 0.9;
    font-size: 0.95rem;
    line-height: 1.4;
}

footer a {
    color: var(--gold);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Floating CTA */
.floating-cta {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 999;
}

.floating-button {
    background: var(--gold);
    color: var(--navy);
    padding: 0.75rem 1.25rem;
    border-radius: 50px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s;
    font-weight: 500;
    line-height: 1;
}

.floating-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(199, 164, 99, 0.3);
}

/* Mobile Menu Button */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    gap: 4px;
}

.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--navy);
    transition: all 0.3s;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Tablet Responsive */
@media (max-width: 968px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 2rem 0;
    }
    
    .hero-text {
        max-width: 100%;
    }
    
    .hero-text h1 {
        font-size: 3rem;
    }
    
    .hero-text .subtitle {
        font-size: 1.5rem;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .cta-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .btn-primary, .btn-secondary {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .benefits-grid {
        grid-template-columns: 1fr;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    /* Button spacing on mobile */
    .btn-primary + .btn-secondary,
    .btn-secondary + .btn-primary {
        margin-left: 0.5rem;
    }
    
    /* Mobile Navigation */
    .mobile-menu-toggle {
        display: flex;
    }
    
    nav {
        position: fixed;
        top: 65px;
        left: -100%;
        width: 100%;
        background: white;
        box-shadow: var(--shadow-lg);
        transition: left 0.3s;
        z-index: 999;
    }
    
    nav.mobile-open {
        left: 0;
    }
    
    nav ul {
        flex-direction: column;
        padding: 1rem;
        gap: 0;
    }
    
    nav li {
        border-bottom: 1px solid var(--sage-light);
    }
    
    nav a {
        display: block;
        padding: 1rem;
        font-size: 1.1rem;
    }
    
    /* Hero adjustments */
    .hero {
        min-height: auto;
        padding-top: 5rem;
    }
    
    .hero-text h1 {
        font-size: 2.5rem;
        line-height: 1.1;
    }
    
    .hero-text .subtitle {
        font-size: 1.25rem;
        margin-bottom: 2rem;
    }
    
    .credentials-line {
        justify-content: center;
    }
    
    .credential {
        font-size: 0.95rem;
        padding: 0.5rem 1rem;
    }
    
    .practice-info {
        padding: 2rem 1.5rem;
    }
    
    .info-value {
        font-size: 1.25rem;
    }
    
    .photo-frame img {
        width: 280px;
        height: 280px;
    }
    
    /* Content sections */
    .content-section {
        padding: 2rem 1.5rem;
    }
    
    .content-section h1 {
        font-size: 2rem;
    }
    
    .content-section h2 {
        font-size: 1.75rem;
    }
    
    .content-section h3 {
        font-size: 1.35rem;
    }
    
    /* Footer */
    footer {
        padding: 1.25rem 0;
        min-height: 60px;
    }
    
    footer p {
        font-size: 0.85rem;
        line-height: 1.4;
    }
    
    /* Floating CTA */
    .floating-cta {
        bottom: 1rem;
        right: 1rem;
    }
    
    .floating-button {
        padding: 0.65rem 1rem;
        font-size: 0.9rem;
    }
}

/* Small Mobile Responsive */
@media (max-width: 480px) {
    /* Stack buttons vertically on small screens */
    .btn-primary + .btn-secondary,
    .btn-secondary + .btn-primary {
        display: block;
        margin-left: 0;
        margin-top: 1rem;
        width: 100%;
    }
    
    body {
        font-size: 16px;
    }
    
    .container {
        padding: 0 16px;
    }
    
    .logo {
        font-size: 1.25rem;
    }
    
    header {
        padding: 1rem 0;
    }
    
    .hero-text h1 {
        font-size: 2rem;
    }
    
    .hero-text .subtitle {
        font-size: 1.1rem;
    }
    
    .photo-frame img {
        width: 240px;
        height: 240px;
    }
    
    .credentials-line {
        gap: 0.75rem;
    }
    
    .credential {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }
    
    .practice-info {
        padding: 1.5rem 1rem;
    }
    
    .info-label {
        font-size: 0.8rem;
    }
    
    .info-value {
        font-size: 1.1rem;
    }
    
    .btn-primary, .btn-secondary {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }
    
    .content-section {
        padding: 1.5rem 1rem;
        margin-bottom: 1rem;
    }
    
    .content-section h1 {
        font-size: 1.75rem;
    }
    
    .content-section h2 {
        font-size: 1.5rem;
        margin-top: 2rem;
    }
    
    .content-section h3 {
        font-size: 1.25rem;
    }
    
    .content-section p {
        font-size: 1rem;
        line-height: 1.7;
    }
    
    .service-card {
        padding: 1.25rem;
    }
    
    .quote {
        padding: 1.5rem;
        font-size: 1rem;
    }
    
    main {
        padding: 2rem 0;
    }
    
    /* Hide floating button on very small screens */
    .floating-cta {
        display: none;
    }
}

/* Page-specific responsive styles */
.page-hero {
    padding: 7rem 0 2.5rem;
    position: relative;
}

.page-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

@media (max-width: 768px) {
    .page-hero {
        padding: 6rem 0 2rem;
    }
    
    .page-hero h1 {
        font-size: 2.25rem;
    }
    
    .subtitle {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .page-hero {
        padding: 5rem 0 1.5rem;
    }
    
    .page-hero h1 {
        font-size: 1.75rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .cta-section {
        text-align: center;
    }
    
    .cta-section h2 {
        font-size: 1.5rem;
    }
}

/* Page-specific styles moved from PHP files */

/* Page hero styles - applies to all internal pages */
.page-hero {
    background: linear-gradient(135deg, var(--sage) 0%, var(--sage-light) 100%);
}

.page-hero h1 {
    font-family: 'Spectral', serif;
    font-size: 3rem;
    color: var(--navy);
    font-weight: 300;
    margin-bottom: 0.5rem;
}

.page-hero .subtitle {
    font-size: 1.25rem;
    color: var(--warm-gray);
    font-style: italic;
}

/* About page styles */
.timeline {
    position: relative;
    padding-left: 30px;
    margin: 2rem 0;
}

.timeline:before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--gold);
}

.timeline-item {
    position: relative;
    padding-bottom: 2rem;
}

.timeline-item:before {
    content: '';
    position: absolute;
    left: -34px;
    top: 5px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--gold);
    border: 2px solid var(--white);
}

.timeline-year {
    font-family: 'Spectral', serif;
    color: var(--gold);
    font-size: 0.9rem;
    font-weight: 600;
}

.two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin: 3rem 0;
}

/* Services page styles */
.service-category {
    background: var(--sage-light);
    padding: 2.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    border-left: 4px solid var(--gold);
}

.service-category h3 {
    font-family: 'Spectral', serif;
    color: var(--navy);
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.service-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.service-item {
    background: white;
    padding: 1.25rem;
    border-radius: 4px;
    box-shadow: var(--shadow-sm);
}

.price-highlight {
    background: var(--navy);
    color: white;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    margin: 3rem auto;
    max-width: 500px;
}

.price-highlight .price {
    font-family: 'Spectral', serif;
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

/* How it works page styles */
.process-step {
    display: flex;
    gap: 2rem;
    margin-bottom: 3rem;
    align-items: start;
}

.step-number {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    background: var(--gold);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 600;
}

.step-content h3 {
    margin-top: 0;
    color: var(--navy);
    font-family: 'Spectral', serif;
    font-size: 1.5rem;
}

.assessment-option {
    background: var(--sage-light);
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.highlight-box {
    background: var(--navy);
    color: white;
    padding: 2rem;
    border-radius: 8px;
    margin: 2rem 0;
}

.highlight-box h3 {
    color: white;
    margin-top: 0;
    margin-bottom: 1rem;
}

/* Fees & Policies page styles */
.policy-section {
    background: var(--sage-light);
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    border-left: 4px solid var(--gold);
}

.policy-section h3 {
    color: var(--navy);
    font-family: 'Spectral', serif;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.fee-table {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin: 2rem 0;
}

.fee-row {
    display: flex;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid var(--sage-light);
}

.fee-row:last-child {
    border-bottom: none;
}

.fee-label {
    font-weight: 500;
    color: var(--navy);
}

.fee-amount {
    font-family: 'Spectral', serif;
    font-size: 1.25rem;
    color: var(--gold);
    font-weight: 600;
}

.insurance-note {
    background: #fef3c7;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #f59e0b;
    margin: 2rem 0;
}

/* Responsive styles for page-specific elements */
@media (max-width: 768px) {
    .two-column {
        grid-template-columns: 1fr;
    }
    
    .page-hero h1 {
        font-size: 2.25rem;
    }
    
    .service-list {
        grid-template-columns: 1fr;
    }
    
    .process-step {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .fee-row {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .page-hero h1 {
        font-size: 1.75rem;
    }
    
    .service-category {
        padding: 1.5rem;
    }
    
    .policy-section {
        padding: 1.5rem;
    }
    
    .assessment-option {
        padding: 1.5rem;
    }
    
    .step-number {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
}