/**
 * Luisa Grace Home Healthcare Platform
 * Agency-Grade Healthcare Design System
 */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
    /* Brand Healthcare Palette */
    --color-primary: #0c3852;          /* Medical Deep Sapphire */
    --color-primary-dark: #082435;
    --color-primary-light: #164e63;
    --color-secondary: #0e7490;        /* Clinical Teal */
    --color-secondary-dark: #155e75;
    --color-secondary-light: #22d3ee;
    --color-accent: #d97706;           /* Warm Amber/Gold */
    --color-accent-hover: #b45309;
    --color-success: #10b981;          /* Health Green */
    --color-danger: #ef4444;           /* Emergency Red */
    --color-warning: #f59e0b;
    --color-info: #0284c7;

    /* Neutrals & Surfaces */
    --color-bg-main: #ffffff;
    --color-bg-subtle: #f8fafc;
    --color-bg-card: #ffffff;
    --color-bg-alt: #f0fdfa;           /* Gentle Mint White */
    --color-text-main: #0f172a;        /* Deep Charcoal */
    --color-text-muted: #64748b;       /* Slate Grey */
    --color-text-light: #94a3b8;
    --color-border: #e2e8f0;
    --color-border-subtle: #f1f5f9;

    /* Typography */
    --font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Elevations & Shadows */
    --shadow-xs: 0 1px 2px 0 rgba(12, 56, 82, 0.04);
    --shadow-sm: 0 2px 8px -2px rgba(12, 56, 82, 0.06), 0 1px 4px -1px rgba(12, 56, 82, 0.04);
    --shadow-md: 0 10px 25px -5px rgba(12, 56, 82, 0.08), 0 8px 10px -6px rgba(12, 56, 82, 0.04);
    --shadow-lg: 0 20px 35px -8px rgba(12, 56, 82, 0.12), 0 10px 15px -5px rgba(12, 56, 82, 0.05);
    --shadow-hover: 0 22px 45px -10px rgba(14, 116, 144, 0.18);

    /* Radii */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;
    --radius-xl: 32px;
    --radius-pill: 9999px;

    /* Transitions */
    --transition-fast: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    overflow-x: clip;
    max-width: 100%;
}

body {
    font-family: var(--font-body);
    color: var(--color-text-main);
    background-color: var(--color-bg-main);
    line-height: 1.68;
    overflow-x: clip;
    max-width: 100%;
    width: 100%;
}

/* Headings */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1.25;
    letter-spacing: -0.02em;
    margin-bottom: 0.85rem;
}

h1, .h1 { font-size: clamp(2.3rem, 4vw, 3.4rem); font-weight: 800; letter-spacing: -0.03em; }
h2, .h2 { font-size: clamp(1.85rem, 3vw, 2.45rem); }
h3, .h3 { font-size: clamp(1.35rem, 2vw, 1.75rem); }
h4, .h4 { font-size: 1.25rem; font-weight: 600; }
h5, .h5 { font-size: 1.1rem; font-weight: 600; }
h6, .h6 { font-size: 0.95rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }

p {
    margin-bottom: 1.25rem;
    color: var(--color-text-main);
}

p.lead {
    font-size: 1.18rem;
    font-weight: 400;
    line-height: 1.7;
    color: var(--color-text-muted);
}

a {
    color: var(--color-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-primary);
}

img, svg {
    max-width: 100%;
    height: auto;
    display: inline-block;
    vertical-align: middle;
}

/* Container Structure */
.container {
    width: 100%;
    max-width: 1240px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.container-fluid {
    width: 100%;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

/* ============================================================
   RESPONSIVE GRID SYSTEM
   Bootstrap-compatible row/col classes for all viewports
   ============================================================ */

/* Global overflow guard */
html, body { overflow-x: clip; }

.row {
    display: flex;
    flex-wrap: wrap;
    margin-left: -0.75rem;
    margin-right: -0.75rem;
}

/* Gap utilities */
.g-0 { gap: 0; }
.g-1 { gap: 0.25rem; }
.g-2 { gap: 0.5rem; }
.g-3 { gap: 1rem; }
.g-4 { gap: 1.5rem; }
.g-5 { gap: 2rem; }

/* When gap utilities are used on .row, remove negative margins */
.row.g-3, .row.g-4, .row.g-5 {
    margin-left: 0;
    margin-right: 0;
}

/* Base columns (always full width on mobile) */
[class*="col-"] {
    width: 100%;
    max-width: 100%;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    flex-shrink: 0;
}

.col-12 { width: 100%; }
.col-6  { width: 50%; }
.col-4  { width: 33.333%; }
.col-3  { width: 25%; }

/* Medium breakpoint ≥768px */
@media (min-width: 768px) {
    .col-md-6  { width: 50%; }
    .col-md-4  { width: 33.333%; }
    .col-md-3  { width: 25%; }
    .col-md-8  { width: 66.667%; }
    .col-md-12 { width: 100%; }
}

/* Large breakpoint ≥992px */
@media (min-width: 992px) {
    .col-lg-3  { width: 25%; }
    .col-lg-4  { width: 33.333%; }
    .col-lg-5  { width: 41.667%; }
    .col-lg-6  { width: 50%; }
    .col-lg-7  { width: 58.333%; }
    .col-lg-8  { width: 66.667%; }
    .col-lg-9  { width: 75%; }
    .col-lg-12 { width: 100%; }
    .text-lg-end { text-align: right; }
    .text-lg-start { text-align: left; }
}

/* XL breakpoint ≥1200px */
@media (min-width: 1200px) {
    .col-xl-2  { width: 16.667%; }
    .col-xl-3  { width: 25%; }
    .col-xl-4  { width: 33.333%; }
}

/* Gap utilities for non-row use */
.gap-0 { gap: 0 !important; }
.gap-1 { gap: 0.25rem !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 1rem !important; }
.gap-4 { gap: 1.5rem !important; }
.gap-5 { gap: 2rem !important; }

/* Margin utilities */
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mb-5 { margin-bottom: 2rem !important; }
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.mt-5 { margin-top: 2rem !important; }
.ms-auto { margin-left: auto !important; }
.me-auto { margin-right: auto !important; }
.me-1 { margin-right: 0.25rem !important; }
.me-2 { margin-right: 0.5rem !important; }

/* Padding utilities */
.p-4 { padding: 1.5rem !important; }
.p-3 { padding: 1rem !important; }
.p-2 { padding: 0.5rem !important; }
.px-3 { padding-left: 1rem !important; padding-right: 1rem !important; }
.px-4 { padding-left: 1.5rem !important; padding-right: 1.5rem !important; }
.py-3 { padding-top: 1rem !important; padding-bottom: 1rem !important; }
.py-4 { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }

@media (min-width: 768px) {
    .p-md-5 { padding: 2rem !important; }
}

/* Sticky positioning */
.sticky-top {
    position: sticky;
    top: 5rem;
}

/* Font-size utilities */
.fs-sm  { font-size: 0.88rem !important; }
.fs-xs  { font-size: 0.78rem !important; }
.fs-xxs { font-size: 0.68rem !important; }

/* Font-weight utilities */
.font-weight-bold   { font-weight: 700 !important; }
.font-weight-medium { font-weight: 500 !important; }

/* Text utilities */
.text-center  { text-align: center !important; }
.text-start   { text-align: left !important; }
.text-end     { text-align: right !important; }
.text-muted   { color: var(--color-text-muted) !important; }
.text-dark    { color: var(--color-text-main) !important; }
.text-white   { color: #ffffff !important; }
.text-primary { color: var(--color-primary) !important; }
.text-teal    { color: var(--color-secondary) !important; }
.text-secondary { color: var(--color-text-muted) !important; }

/* Background color utilities */
.bg-white  { background-color: #ffffff !important; }
.bg-dark   { background-color: var(--color-primary) !important; }

/* Border utilities */
.border             { border: 1px solid var(--color-border) !important; }
.border-bottom      { border-bottom: 1px solid var(--color-border) !important; }
.border-top         { border-top: 1px solid var(--color-border) !important; }
.border-success-subtle { border-color: rgba(16,185,129,0.2) !important; }
.rounded-4          { border-radius: 1rem !important; }
.rounded-3          { border-radius: 0.75rem !important; }
.rounded-pill       { border-radius: 9999px !important; }

/* Shadow utilities */
.shadow-sm { box-shadow: 0 1px 3px rgba(0,0,0,0.08) !important; }
.shadow-md { box-shadow: 0 4px 16px rgba(0,0,0,0.10) !important; }

/* Display & flex utilities */
.h-100 { height: 100% !important; }
.w-100 { width: 100% !important; }
.overflow-hidden { overflow: hidden !important; }
.position-relative { position: relative !important; }
.position-absolute { position: absolute !important; }

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2em 0.55em;
    font-size: 0.75em;
    font-weight: 700;
    border-radius: 0.375rem;
    letter-spacing: 0.03em;
}
.bg-danger { background-color: var(--color-danger) !important; }



/* Section Spacing */
.section-py {
    padding-top: clamp(4rem, 7vw, 6.5rem);
    padding-bottom: clamp(4rem, 7vw, 6.5rem);
    overflow-x: clip;
}

.section-py-sm {
    padding-top: 3rem;
    padding-bottom: 3rem;
    overflow-x: clip;
}

/* Ensure main element never overflows */
main { overflow-x: clip; }



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

/* Section Header Component */
.section-header {
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 3.5rem;
}

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

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    background-color: rgba(14, 116, 144, 0.08);
    color: var(--color-secondary);
    font-family: var(--font-heading);
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-radius: var(--radius-pill);
    margin-bottom: 1rem;
}

.section-badge i {
    font-size: 0.85rem;
}

.section-subtitle {
    font-size: 1.12rem;
    color: var(--color-text-muted);
    margin-top: 0.75rem;
}

/* Top Emergency Bar */
.top-notice-bar {
    background-color: var(--color-primary);
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.top-notice-bar a {
    color: #ffffff;
    font-weight: 600;
}

.top-notice-bar a:hover {
    color: var(--color-secondary-light);
}

.notice-pill {
    background-color: #ef4444;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 0.15rem 0.6rem;
    border-radius: var(--radius-pill);
    margin-right: 0.5rem;
    letter-spacing: 0.04em;
}

/* Main Header Navigation */
.site-header {
    background-color: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all var(--transition-normal);
    border-bottom: 1px solid var(--color-border);
}

.site-header.is-scrolled {
    box-shadow: var(--shadow-sm);
    background-color: rgba(255, 255, 255, 0.98);
}

.header-nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.brand-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.brand-logo-img {
    height: 52px;
    width: auto;
}

/* Navigation Links */
.main-nav-list {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
}

.nav-link-item {
    position: relative;
}

.nav-link {
    font-family: var(--font-heading);
    font-size: 0.94rem;
    font-weight: 600;
    color: var(--color-primary);
    padding: 0.6rem 0.2rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: color var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-secondary);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2.5px;
    background-color: var(--color-secondary);
    border-radius: var(--radius-pill);
}

/* Dropdown Menu */
.nav-dropdown {
    position: relative;
}

.dropdown-menu-list {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 270px;
    background-color: #ffffff;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--color-border);
    padding: 0.75rem 0;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition-normal);
    z-index: 1010;
}

.nav-dropdown:hover .dropdown-menu-list,
.nav-dropdown:focus-within .dropdown-menu-list {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item-link {
    display: block;
    padding: 0.6rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text-main);
    transition: all var(--transition-fast);
}

.dropdown-item-link:hover {
    background-color: var(--color-bg-alt);
    color: var(--color-secondary);
    padding-left: 1.5rem;
}

/* Header CTAs */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.phone-cta-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--color-primary);
    white-space: nowrap;
}

/* Mobile Call Icon Button in Header */
.btn-mobile-call-icon {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background-color: var(--color-bg-alt);
    color: var(--color-secondary);
    border: 1.5px solid rgba(14, 116, 144, 0.2);
    border-radius: var(--radius-sm);
    font-size: 1.05rem;
    transition: all var(--transition-fast);
}

.btn-mobile-call-icon:hover,
.btn-mobile-call-icon:active {
    background-color: var(--color-secondary);
    color: #ffffff;
}

/* Mobile Hamburger Menu */
.mobile-nav-toggle {
    display: none;
    background: #ffffff;
    border: 1.5px solid var(--color-border);
    cursor: pointer;
    padding: 0;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.mobile-nav-toggle:hover,
.mobile-nav-toggle:focus {
    background-color: var(--color-bg-subtle);
    border-color: var(--color-primary);
}

.hamburger-bar {
    display: block;
    width: 20px;
    height: 2px;
    background-color: var(--color-primary);
    border-radius: 2px;
    transition: all 0.25s ease;
}

/* Mobile Off-Canvas Drawer & Overlay */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(12, 56, 82, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-nav-overlay.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.mobile-nav-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 88vw;
    max-width: 420px;
    height: 100vh;
    height: 100dvh;
    background-color: #ffffff;
    z-index: 9999;
    box-shadow: -8px 0 35px rgba(0, 0, 0, 0.18);
    transform: translateX(100%);
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.32s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    overflow-y: hidden;
    visibility: hidden;
}

.mobile-nav-drawer.is-open {
    transform: translateX(0);
    visibility: visible;
}

/* Prevent floating buttons from overlapping open mobile menu */
body.mobile-menu-open .floating-contact-container {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: translateY(20px) scale(0.95);
    transition: all 0.2s ease;
}


/* Responsive Navigation Breakpoint */
@media (max-width: 1024px) {
    .main-nav-list,
    .phone-cta-link {
        display: none !important;
    }

    .mobile-nav-toggle {
        display: inline-flex !important;
    }

    .btn-mobile-call-icon {
        display: inline-flex !important;
    }
}


@media (max-width: 576px) {
    .header-actions .btn-care {
        display: none !important;
    }
    .brand-logo-img {
        height: 42px;
    }
    .header-nav-wrapper {
        height: 66px;
    }
    .top-notice-bar {
        font-size: 0.8rem;
        padding: 0.4rem 0;
    }
    .notice-pill {
        font-size: 0.65rem;
        padding: 0.1rem 0.45rem;
    }
}

@media (min-width: 1025px) {
    .mobile-nav-drawer,
    .mobile-nav-overlay,
    .mobile-nav-toggle {
        display: none !important;
    }
}

/* Responsive Utility Helpers */
.d-none { display: none !important; }
.d-flex { display: flex !important; }
.d-block { display: block !important; }
.d-inline-flex { display: inline-flex !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 1rem !important; }
.flex-wrap { flex-wrap: wrap !important; }
.justify-content-between { justify-content-between !important; }
.align-items-center { align-items: center !important; }
.list-unstyled {
    list-style: none !important;
    padding-left: 0 !important;
    margin-left: 0 !important;
}
.breadcrumb, .breadcrumb-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

@media (min-width: 576px) {
    .d-sm-none { display: none !important; }
    .d-sm-flex { display: flex !important; }
    .d-sm-block { display: block !important; }
    .d-sm-inline-flex { display: inline-flex !important; }
}

@media (min-width: 768px) {
    .d-md-none { display: none !important; }
    .d-md-flex { display: flex !important; }
    .d-md-block { display: block !important; }
}

@media (min-width: 992px) {
    .d-lg-none { display: none !important; }
    .d-lg-flex { display: flex !important; }
    .d-lg-block { display: block !important; }
}

@media (min-width: 1200px) {
    .d-xl-none { display: none !important; }
    .d-xl-flex { display: flex !important; }
    .d-xl-block { display: block !important; }
}
