/* ==========================================================================
   GOOGLE FONTS IMPORTS (ALL OPTIONS ENABLED FOR REAL-TIME TESTING)
   ========================================================================== */

/* Official pairing (Learned Rule 10): Outfit for headings, Plus Jakarta Sans for body */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');


/* ==========================================================================
   Modern Dental Concept - Custom Design System & Premium Styling
   Active Palette: Purple (extracted from "Small Habits, Big Smiles" graphic)
   Preview file — same class/variable names as style.css, swap in <link> to compare.
   ========================================================================== */


:root {
    /* Color Palette */
    --color-brand-primary: #4B2E83;
    --color-brand-primary-dark: #2E1A54;
    --color-brand-primary-light: #6B3FA0;
    --color-brand-secondary: #6B3FA0;
    --color-brand-secondary-dark: #4B2E83;
    --color-brand-secondary-light: #8C5FBD;
    --light-grey: #F3ECFB;
    --white: #FFFFFF;
    --dark-neutral: #241934;
    --muted-neutral: #6E5C87;

    /* Layout & Styling Tokens */
    --border-radius-sm: 8px;
    --border-radius-md: 16px;
    --border-radius-lg: 24px;

    --shadow-sm: 0 4px 10px rgba(75, 46, 131, 0.05);
    --shadow-md: 0 12px 30px rgba(75, 46, 131, 0.08);
    --shadow-lg: 0 20px 50px rgba(75, 46, 131, 0.12);

    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);

    /* --font-heading: 'Playfair Display', serif;
    --font-body: 'Montserrat', sans-serif; */

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;

}

/* --- Base Elements --- */
body {
    font-family: var(--font-body);
    color: var(--dark-neutral);
    background-color: var(--white);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6,
.display-font {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-brand-primary);
}

/* --- Top Info Bar --- */
.topbar {
    background-color: var(--color-brand-primary);
    color: rgba(255, 255, 255, 0.82);
    font-family: var(--font-body);
    font-size: 0.775rem;
    letter-spacing: 0.01em;
    padding: 0.45rem 0;
}
.topbar i {
    color: var(--color-brand-secondary-light);
}
.topbar a {
    color: rgba(255, 255, 255, 0.82);
    text-decoration: none;
    transition: color 0.2s ease;
}
.topbar a:hover {
    color: #fff;
}

/* --- Navigation Styling --- */
.navbar {
    border-bottom: 3px solid var(--color-brand-secondary);
    transition: var(--transition-smooth);
    padding: 1rem 0;
    background-color: rgba(255, 255, 255, 0.98);
}

.nav-link {
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--color-brand-primary) !important;
    padding: 0.5rem 0.8rem !important;
    transition: var(--transition-smooth);
    position: relative;
    white-space: nowrap;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--color-brand-secondary);
    transition: var(--transition-smooth);
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

.nav-link:hover {
    color: var(--color-brand-secondary) !important;
}

.dropdown-menu {
    border-radius: var(--border-radius-sm);
    padding: 0.75rem 0;
}

/* Disable default Bootstrap caret to prevent overlap/glitch with custom nav underline */
.dropdown-toggle::after {
    display: none !important;
    content: none !important;
}

.dropdown-item {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--color-brand-primary);
    padding: 0.6rem 1.5rem;
    transition: var(--transition-smooth);
}

.dropdown-item:hover {
    background-color: var(--light-grey);
    color: var(--color-brand-secondary);
    padding-left: 1.8rem;
}

/* --- Nav Pills (e.g. Contact page tabbed form) --- */
.nav-pills .nav-link {
    color: var(--color-brand-primary);
    font-weight: 600;
    transition: var(--transition-smooth);
}

.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
    background-color: var(--color-brand-secondary);
    color: var(--white) !important;
}

/* --- Global Button Tokens --- */
.btn-brand-secondary {
    background-color: var(--color-brand-secondary);
    color: var(--white);
    font-weight: 600;
    letter-spacing: 0.5px;
    border: 2px solid var(--color-brand-secondary);
    transition: var(--transition-smooth);
}

.btn-brand-secondary:hover {
    background-color: var(--color-brand-secondary-dark);
    border-color: var(--color-brand-secondary-dark);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(75, 46, 131, 0.3);
}

.btn-outline-brand-secondary {
    border: 2px solid var(--color-brand-secondary);
    color: var(--color-brand-secondary);
    font-weight: 600;
    background-color: transparent;
    transition: var(--transition-smooth);
}

.btn-outline-brand-secondary:hover {
    background-color: var(--color-brand-secondary);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(107, 63, 160, 0.2);
}

.btn-brand-primary {
    background-color: var(--color-brand-primary);
    color: var(--white);
    font-weight: 600;
    border: 2px solid var(--color-brand-primary);
    transition: var(--transition-smooth);
}

.btn-brand-primary:hover {
    background-color: var(--color-brand-primary-dark);
    border-color: var(--color-brand-primary-dark);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 33, 71, 0.3);
}

/* --- Helper Classes --- */
.bg-brand-primary {
    background-color: var(--color-brand-primary) !important;
}

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

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

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

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

/* Redesign the page header sections to utilize a beautiful, multi-layered volumetric mesh gradient */
section.bg-brand-primary {
    background:
        radial-gradient(circle at 90% 80%, rgba(107, 63, 160, 0.22) 0%, rgba(31, 18, 56, 0) 50%),
        linear-gradient(135deg, #1F1238 0%, #4B2E83 100%) !important;
    position: relative;
    overflow: hidden;
}

/* Hide the old, buggy absolute positioned circular div to prevent layout conflicts */
section.bg-brand-primary .position-absolute {
    display: none !important;
}

/* --- Section Layouts --- */
.section-padding {
    padding: 80px 0;
}

.section-title {
    position: relative;
    margin-bottom: 3rem;
    font-size: 2.5rem;
}

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

.section-title.left-align::after {
    left: 0;
    transform: none;
}

/* --- Hero Section --- */
.hero-section {
    padding: 160px 0 120px 0;
    background: linear-gradient(135deg, rgba(46, 26, 84, 0.60) 0%, rgba(31, 18, 56, 0.64) 100%), url('../img/front-image.webp') no-repeat center center;
    background-size: cover;
    color: var(--white);
}

.hero-section h1 {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--white);
    line-height: 1.2;
}

/* With the hero overlay lightened (so the practice photo shows through), the
   white text needs its own contrast. A soft dark text-shadow keeps every line
   legible over the image without darkening the whole overlay again. */
.hero-section h1,
.hero-section .lead,
.hero-section > .container span {
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.55), 0 1px 3px rgba(0, 0, 0, 0.45);
}

/* The lead paragraph used .text-white-50, which is too faint over the lighter
   overlay — lift it to near-full white for readability. */
.hero-section .lead {
    color: rgba(255, 255, 255, 0.92) !important;
}

/* --- Service Cards --- */
.service-card {
    border: none;
    border-radius: var(--border-radius-md);
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
    padding: 2.5rem 2rem;
    height: 100%;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.service-icon-box {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-color: rgba(107, 63, 160, 0.1);
    color: var(--color-brand-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    transition: var(--transition-smooth);
}

.service-card:hover .service-icon-box {
    background-color: var(--color-brand-secondary);
    color: var(--white);
    transform: scale(1.1) rotate(5deg);
}

/* --- Interactive Forms --- */
.form-card {
    background-color: var(--white);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-md);
    padding: 3rem;
    border-top: 5px solid var(--color-brand-secondary);
}

.form-control,
.form-select {
    padding: 0.8rem 1.2rem;
    border: 1px solid rgba(0, 33, 71, 0.15);
    border-radius: var(--border-radius-sm);
    transition: var(--transition-smooth);
    font-size: 0.95rem;
    color: var(--color-brand-primary);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--color-brand-secondary);
    box-shadow: 0 0 0 3px rgba(107, 63, 160, 0.15);
    outline: none;
}

/* --- Footer Styling --- */
footer {
    background-color: var(--color-brand-primary-dark);
    color: rgba(255, 255, 255, 0.85);
    padding: 5rem 0 2rem 0;
    border-top: 5px solid var(--color-brand-secondary);
}

footer h2,
footer h3,
footer h4,
footer .display-font {
    color: var(--white);
}

footer a {
    color: rgba(255, 255, 255, 0.75);
    transition: var(--transition-smooth);
}

footer a:hover {
    color: var(--color-brand-secondary);
    padding-left: 5px;
}

/* --- Testimonials / Reviews Slider --- */
.review-card {
    background-color: var(--white);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
    padding: 2.5rem;
    border-left: 4px solid var(--color-brand-secondary);
    height: 100%;
    transition: var(--transition-smooth);
}

.review-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.stars {
    color: var(--color-brand-secondary);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

/* --- Insurance Savings Plan Tiers --- */
.tier-card {
    background-color: var(--white);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-md);
    padding: 3rem 2rem;
    text-align: center;
    border-top: 4px solid #EDE4F7;
    transition: var(--transition-smooth);
    height: 100%;
}

.tier-card.featured {
    border-top: 6px solid var(--color-brand-secondary);
    transform: scale(1.03);
    position: relative;
    z-index: 2;
}

.tier-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--color-brand-secondary);
    color: var(--white);
    padding: 0.35rem 1.5rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tier-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.tier-card.featured:hover {
    transform: translateY(-10px) scale(1.04);
}

.price-circle {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background-color: var(--light-grey);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 2rem auto;
    border: 3px solid rgba(107, 63, 160, 0.2);
    transition: var(--transition-smooth);
}

.tier-card.featured .price-circle {
    background-color: rgba(107, 63, 160, 0.08);
    border-color: var(--color-brand-secondary);
}

.price-number {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--color-brand-primary);
    line-height: 1;
}

.price-term {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--muted-neutral);
    text-transform: uppercase;
}

.benefit-list {
    text-align: left;
    margin-bottom: 2.5rem;
}

.benefit-list li {
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: flex-start;
}

.benefit-list li i {
    color: var(--color-brand-secondary);
    margin-right: 0.75rem;
    margin-top: 0.25rem;
}

/* --- Tables & Comparisons --- */
.table-premium {
    box-shadow: var(--shadow-sm);
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    border: none;
}

.table-premium th {
    background-color: var(--color-brand-primary) !important;
    color: var(--white) !important;
    font-family: var(--font-heading);
    font-weight: 700;
    padding: 1.2rem 1rem;
    border: none;
}

.table-premium td {
    padding: 1rem;
    border-bottom: 1px solid rgba(0, 33, 71, 0.06);
    vertical-align: middle;
}

/* --- Logo Color Filters (Maintains exact Navy and Gold values for SVGs/Images) --- */
.logo-brand-primary {
    filter: brightness(0) saturate(100%) invert(30%) sepia(9%) saturate(3667%) hue-rotate(222deg) brightness(103%) contrast(83%);
}

.logo-brand-secondary {
    filter: brightness(0) saturate(100%) invert(67%) sepia(11%) saturate(1915%) hue-rotate(5deg) brightness(92%) contrast(85%);
}

/* ==========================================================================
   WCAG 2.1 AA ACCESSIBILITY — Phase 1-2 Remediations
   ========================================================================== */

/* 1. SKIP NAVIGATION LINK (WCAG 2.4.1 — Bypass Blocks)
   Visually hidden until focused by keyboard, then drops in from top. */
.skip-link {
    position: absolute;
    top: -120px;
    left: 1rem;
    z-index: 10000;
    padding: 0.75rem 1.5rem;
    background-color: var(--color-brand-primary);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: 0 0 8px 8px;
    text-decoration: none;
    transition: top 0.15s ease;
    white-space: nowrap;
}
.skip-link:focus {
    top: 0;
    color: #ffffff;
    outline: 3px solid var(--color-brand-secondary);
    outline-offset: 2px;
}

/* 2. FOCUS-VISIBLE INDICATOR (WCAG 2.4.7 — Focus Visible)
   Show a clear keyboard focus ring; suppress it for mouse/touch interactions. */
:focus-visible {
    outline: 3px solid #6B3FA0;
    outline-offset: 3px;
    border-radius: 4px;
}

/* WCAG 1.4.3 (Contrast) — Bootstrap's .text-white-50 is only used on dark brand
   surfaces (footer, CTA bands). 50% white is ~3.8:1 on #4B2E83, below the 4.5:1
   AA threshold for normal text. Lift to 82% (~7.5:1) to pass while staying
   visually secondary — matches the topbar's already-compliant treatment. */
.text-white-50 {
    color: rgba(255, 255, 255, 0.82) !important;
}
/* Remove Bootstrap's box-shadow focus duplicate when focus-visible ring shows */
.btn:focus-visible,
.nav-link:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible,
.dropdown-item:focus-visible {
    box-shadow: none !important;
}
/* Mouse/touch users: suppress the ring (it was triggered by click, not keyboard) */
.btn:focus:not(:focus-visible),
.nav-link:focus:not(:focus-visible),
.form-control:focus:not(:focus-visible),
.form-select:focus:not(:focus-visible),
.dropdown-item:focus:not(:focus-visible),
.dropdown-toggle:focus:not(:focus-visible) {
    outline: none;
    box-shadow: none;
}

/* 3. COLOR CONTRAST — .text-brand-secondary (WCAG 1.4.3)
   Purple accent #6B3FA0 — check contrast before using on white in production.
   On .bg-brand-primary / footer, --color-brand-secondary overrides to white for visibility on dark surfaces. */
:root {
    --color-brand-secondary: #6B3FA0;
    --color-brand-secondary-dark: #4B2E83;
    --color-brand-secondary-light: #8C5FBD;
}
.bg-brand-primary,
section.bg-brand-primary,
footer {
    --color-brand-secondary: #ffffff;
    --color-brand-secondary-dark: rgba(255, 255, 255, 0.85);
    --color-brand-secondary-light: rgba(255, 255, 255, 0.65);
}

/* 4. BUTTON CONTRAST — white text on .btn-brand-secondary must meet 4.5:1 (WCAG 1.4.3)
   Buttons can appear on any background so we fix absolutely, not via scope. */
.btn-brand-secondary {
    background-color: #6B3FA0;
    border-color: #6B3FA0;
}
.btn-brand-secondary:hover,
.btn-brand-secondary:focus-visible {
    background-color: #4B2E83;
    border-color: #4B2E83;
    color: #ffffff;
}
.btn-outline-brand-secondary {
    border-color: #6B3FA0;
    color: #6B3FA0;
}
.btn-outline-brand-secondary:hover,
.btn-outline-brand-secondary:focus-visible {
    background-color: #6B3FA0;
    border-color: #6B3FA0;
    color: #ffffff;
}

/* 5. FORM FOCUS STATES (WCAG 2.4.7)
   Navy-light focus ring — consistent with monochromatic navy palette. */
.form-control:focus,
.form-select:focus {
    border-color: #6B3FA0;
    box-shadow: 0 0 0 3px rgba(107, 63, 160, 0.20);
    outline: none;
}

/* --- Responsive Adjustments --- */
@media (max-width: 991.98px) {
    .hero-section {
        padding: 120px 0 80px 0;
        text-align: center;
    }

    .hero-section h1 {
        font-size: 2.6rem;
    }

    .tier-card.featured {
        transform: none !important;
        margin-top: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .tier-card.featured:hover {
        transform: translateY(-10px) !important;
    }

    .section-title {
        font-size: 2rem;
    }
}

/* ============================================================
   Fullscreen Mobile Menu — hamburger opens an icon-tile grid
   (mobile / tablet only; hidden at >= lg via .d-lg-none)
   ============================================================ */
.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 1080;
    background: linear-gradient(160deg, var(--color-brand-primary) 0%, var(--color-brand-primary-dark) 100%);
    display: flex;
    flex-direction: column;
    padding: 1rem 1.25rem 1.75rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    transition: opacity 0.28s ease, transform 0.28s ease, visibility 0.28s;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.mobile-menu-overlay.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.25rem 0.25rem 1.1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    margin-bottom: 1.5rem;
}

/* Logo is dark by default — force it white on the purple overlay */
.mobile-menu-header .logo-brand-primary {
    filter: brightness(0) invert(1);
}

.mobile-menu-close {
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: var(--white);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1.25rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
}

.mobile-menu-close:hover,
.mobile-menu-close:focus {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(90deg);
    outline: none;
}

.mobile-menu-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.9rem;
}

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

.mobile-menu-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    padding: 1.4rem 0.5rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--border-radius-md);
    color: var(--white);
    text-decoration: none;
    text-align: center;
    transition: background 0.2s ease, transform 0.15s ease, border-color 0.2s ease;
}

.mobile-menu-tile:hover,
.mobile-menu-tile:active,
.mobile-menu-tile:focus {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.4);
    color: var(--white);
    transform: translateY(-2px);
}

.mobile-menu-tile .tile-icon {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--white);
}

.mobile-menu-tile .tile-label {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.3px;
    line-height: 1.2;
}

.mobile-menu-cta {
    margin-top: auto;
    padding-top: 1.5rem;
}

/* Lock background scroll while the fullscreen menu is open */
body.mobile-menu-open {
    overflow: hidden;
}

/* ------------------------------------------------------------
   Prevent horizontal overflow / sideways scroll on small screens.
   Bootstrap .row negative gutters (and the odd wide element) can
   bleed a few px past the viewport, which also pushed the fixed
   fullscreen menu off-centre. `overflow-x: clip` stops the bleed
   WITHOUT creating a scroll container, so the sticky-top navbar
   keeps working (unlike `overflow-x: hidden`).
   ------------------------------------------------------------ */
html,
body {
    overflow-x: clip;
    max-width: 100%;
}