:root {
    --primary-color: #1b4d3e;     /* Hunter Green */
    --primary-light: #2c6e59;     /* Lighter Green */
    --accent-color: #e2efe5;      /* Soft Sage Green background */
    --text-dark: #1e293b;         /* Slate 800 */
    --text-muted: #64748b;        /* Slate 500 */
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-dark);
    background-color: #ffffff;
    line-height: 1.6;
}

/* Typography refinements */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-dark);
}

.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.bg-accent {
    background-color: var(--accent-color) !important;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transition: all 0.2s ease-in-out;
}

.btn-primary:hover {
    background-color: var(--primary-light);
    border-color: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(27, 77, 62, 0.2) !important;
}

.nav-link {
    color: var(--text-muted) !important;
    transition: color 0.2s;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-color) !important;
}

.hover-primary {
    transition: color 0.2s;
}

.hover-primary:hover {
    color: var(--primary-color) !important;
}

/* Custom utilities */
.rounded-4 {
    border-radius: 1rem !important;
}

.rounded-5 {
    border-radius: 1.5rem !important;
}

/* Hero Section specific */
.hero-bg {
    padding: 120px 0;
    position: relative;
    overflow: hidden;
    background-image: url('../img/hero_brain.jpg');
    background-color: #e2efe5;
    background-size: cover;
    background-position: top right;
    min-height: 700px;
    display: flex;
    align-items: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(226, 239, 229, 1) 0%, rgba(226, 239, 229, 0.95) 45%, rgba(226, 239, 229, 0) 60%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

/* Feature icon box */
.icon-box {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--accent-color);
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.75rem;
}

/* Custom interactive layout and card styling */
.hover-shadow {
    transition: transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.3s ease;
}
.hover-shadow:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(27, 77, 62, 0.1) !important;
}

.transition {
    transition: all 0.3s ease;
}

/* Pricing Card styling */
.pricing-card {
    border: 2px solid transparent;
    transition: all 0.3s ease;
    background-color: #ffffff;
}
.pricing-card.featured {
    border-color: var(--primary-color);
    position: relative;
}
.pricing-card .price {
    font-size: 3.75rem;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1;
}
.pricing-card .price sup {
    font-size: 1.5rem;
    top: -1em;
    font-weight: 600;
}
.pricing-badge {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--primary-color);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 0.35rem 1.5rem;
    border-radius: 50px;
    text-transform: uppercase;
}
.condition-card {
    border: 1px solid rgba(27, 77, 62, 0.08);
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.condition-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(27, 77, 62, 0.06) !important;
    border-color: rgba(27, 77, 62, 0.2);
}

/* =========================================================
   MOBILE RESPONSIVE OVERRIDES
   ========================================================= */

/* --- Tablets and below (< 992px) --- */
@media (max-width: 991.98px) {
    .hero-bg {
        padding: 80px 0 60px;
        min-height: 500px;
        background-position: center right -80px;
    }

    .hero-overlay {
        background: linear-gradient(to right, rgba(226, 239, 229, 1) 0%, rgba(226, 239, 229, 0.97) 55%, rgba(226, 239, 229, 0.7) 80%, rgba(226, 239, 229, 0.4) 100%);
    }

    .display-4 {
        font-size: 2.25rem !important;
    }

    .display-6 {
        font-size: 1.75rem !important;
    }
}

/* --- Mobile phones (< 768px) --- */
@media (max-width: 767.98px) {
    /* Hero section: full-width, shorter, stacked layout */
    .hero-bg {
        padding: 0 !important;
        min-height: auto;
        background-image: none !important;
        background-color: #e2efe5 !important;
    }

    .hero-overlay {
        display: none !important;
    }

    .hero-content .display-4 {
        font-size: 1.85rem !important;
        line-height: 1.2;
    }

    .hero-content .lead {
        font-size: 1rem !important;
    }

    .hero-content .btn-lg {
        padding: 0.65rem 1.5rem !important;
        font-size: 0.9rem !important;
    }

    /* Remove border-radius and side margins on rounded accent sections */
    section[style*="border-radius: 40px"],
    section[style*="border-radius: 0 0 40px 40px"] {
        border-radius: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* Typography scaling */
    .display-4 {
        font-size: 1.85rem !important;
    }

    .display-6 {
        font-size: 1.5rem !important;
    }

    h2 {
        font-size: 1.5rem;
    }

    /* Cards: reduce internal padding */
    .card.p-5 {
        padding: 1.5rem !important;
    }

    .card.p-4 {
        padding: 1rem !important;
    }

    /* Pricing card padding */
    .pricing-card.p-5 {
        padding: 2rem 1.25rem !important;
    }

    /* Section vertical padding */
    .py-5 {
        padding-top: 2.5rem !important;
        padding-bottom: 2.5rem !important;
    }

    /* Contact form card */
    .card.rounded-4.p-5 {
        padding: 1.5rem !important;
    }

    /* Reduce container inner padding on condition/services pages */
    .container.py-5 {
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
    }

    .container.py-4 {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }

    /* Images: fill width naturally */
    img.img-fluid[style*="height: 420px"],
    img.img-fluid[style*="height: 450px"],
    img.img-fluid[style*="height: 350px"] {
        height: 250px !important;
        max-width: 100% !important;
    }

    /* Services page service image heights */
    .card-img-top[style*="height: 220px"] {
        height: 180px !important;
    }

    /* Buttons: prevent overflow on narrow screens */
    .btn-lg {
        padding: 0.6rem 1.25rem !important;
        font-size: 0.9rem !important;
    }

    .d-flex.flex-wrap.gap-3 {
        flex-direction: column;
    }

    .d-flex.flex-wrap.gap-3 .btn {
        width: 100%;
        text-align: center;
    }

    /* Footer: tighten up */
    footer .row {
        text-align: center;
    }

    footer .col-lg-4,
    footer .col-lg-2,
    footer .col-lg-3 {
        text-align: center;
    }

    /* Dark brain banner: make it full-width and reduce height */
    section[style*="dark_brain_bg"] {
        border-radius: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        min-height: 280px !important;
    }

    /* Icon boxes: slightly smaller on mobile */
    .icon-box {
        width: 52px;
        height: 52px;
        font-size: 1.4rem;
        margin-bottom: 1rem;
    }

    /* Top contact bar */
    .bg-primary.text-white.py-2 .container {
        justify-content: center !important;
    }

    /* Navbar brand */
    .navbar-brand img {
        height: 38px !important;
    }

    /* Global container padding to 20px on mobile */
    .container,
    .container-fluid {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
}

/* --- Very small phones (< 576px) --- */
@media (max-width: 575.98px) {
    .hero-bg {
        padding: 50px 0 40px;
    }

    .hero-content .display-4 {
        font-size: 1.6rem !important;
    }

    .hero-content .lead {
        font-size: 0.95rem !important;
    }

    .display-4 {
        font-size: 1.6rem !important;
    }

    .display-6 {
        font-size: 1.35rem !important;
    }

    .pricing-card .price {
        font-size: 3rem;
    }

    /* Acuity scheduler placeholder */
    .bg-dark.rounded-5[style*="min-height: 550px"] {
        min-height: 350px !important;
    }
}
