/* ==========================================================================
   1. ROOT VARIABLES
   ========================================================================== */
:root {
    /* Premium Dark Theme Colors (Header/Footer) */
    --pro-dark-bg: rgba(15, 23, 42, 0.92);
    --pro-accent: #3b82f6;
    --pro-accent-hover: #60a5fa;
    --header-height: 76px;
    --footer-height: 60px;
    /* Base Theme Variables (Cards/Heroes) */
    --brand-primary: #0b5ed7;
    --brand-accent: #0d6efd;
    --muted: #6c757d;
    --bg-soft: #f1f5f9;
    --card-radius: .6rem;
    --max-width: 1200px;
    /* Diagnostic Network Specific Variables */
    --brand-primary-light: #e0f2fe;
    --brand-gradient: linear-gradient(135deg, var(--pro-primary, #3b82f6) 0%, #0284c7 100%);
    --bg-ultra-light: #f8fafc;
    --shadow-glass: 0 10px 40px rgba(15, 23, 42, 0.04);
    --shadow-hover: 0 20px 50px rgba(59, 130, 246, 0.15);
    --transition-smooth: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ==========================================================================
   2. BASE HTML & BODY
   ========================================================================== */
html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    background-color: var(--bg-soft);
    color: #212529;
    /* CRITICAL: Padding prevents content from hiding under fixed header/footer */
    padding-top: var(--header-height);
    padding-bottom: var(--footer-height);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Custom Focus Rings */
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.main-container {
    max-width: var(--max-width);
    margin: 0 auto;
}

/* ==========================================================================
   3. PRO HEADER (Glassmorphism)
   ========================================================================== */
.glass-header {
    background: var(--pro-dark-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    height: var(--header-height);
}

.brand-text {
    background: linear-gradient(to right, #ffffff, #93c5fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.nav-link {
    color: #cbd5e1 !important;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    position: relative;
    transition: color 0.3s ease;
}

    .nav-link:hover, .nav-link.active {
        color: #ffffff !important;
    }

    /* Animated glowing underline */
    .nav-link::after {
        content: '';
        position: absolute;
        width: 0;
        height: 2px;
        bottom: 0;
        left: 50%;
        background-color: var(--pro-accent);
        box-shadow: 0 0 8px var(--pro-accent);
        transition: all 0.3s ease-in-out;
        transform: translateX(-50%);
    }

    .nav-link:hover::after {
        width: 80%;
    }

/* ==========================================================================
   4. PRO FOOTER (Glassmorphism)
   ========================================================================== */
.glass-footer {
    background: var(--pro-dark-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    height: var(--footer-height);
    display: flex;
    align-items: center;
    z-index: 1030;
}

.footer-link {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s;
}

    .footer-link:hover {
        color: var(--pro-accent-hover);
    }

/* ==========================================================================
   5. BUTTONS
   ========================================================================== */
.btn-premium {
    background: linear-gradient(135deg, var(--pro-accent), #2563eb);
    color: white;
    border: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

    .btn-premium:hover {
        color: white;
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    }

/* ==========================================================================
   6. INNER PAGE COMPONENTS (Heroes, Cards, Icons)
   ========================================================================== */
.hero {
    background: linear-gradient(180deg, rgba(255,255,255,0.6), rgba(255,255,255,0.6));
    padding: 3.5rem 1rem;
    border-radius: .75rem;
    margin-top: 1rem;
    display: flex;
    gap: 2rem;
    align-items: center;
}

    .hero .hero-cta {
        max-width: 560px;
    }

    .hero .hero-illustration {
        flex: 1;
        text-align: center;
    }

.card-elevated {
    background: #fff;
    border-radius: var(--card-radius);
    box-shadow: 0 8px 24px rgba(33,37,41,0.06);
    padding: 1.25rem;
}

.feature-icon {
    width: 56px;
    height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(13,110,253,0.08);
    color: var(--brand-accent);
    font-size: 1.25rem;
}

.trust-badges img {
    height: 36px;
    margin-right: .75rem;
    opacity: .95;
}

/* ==========================================================================
   7. RESPONSIVE DESIGN TWEAKS
   ========================================================================== */
@media (max-width: 767.98px) {
    .hero {
        flex-direction: column;
        text-align: center;
    }

    /* Expand padding on mobile if elements stack */
    :root {
        --header-height: 92px;
        --footer-height: 92px;
    }
}

/* ==========================================================================
   8. PAGE SPECIFIC: DIAGNOSTIC NETWORK UI
   ========================================================================== */

/* Animations */
@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(40px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes pulseGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(59, 130, 246, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
}

.animate-fade-up {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}

.animate-fade-scale {
    animation: fadeInScale 0.8s ease-out forwards;
    opacity: 0;
}

.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}

.delay-4 {
    animation-delay: 0.4s;
}

/* Landing Hero Section */
.landing-hero {
    background: radial-gradient(120% 100% at top right, #f0f9ff 0%, #ffffff 100%);
    position: relative;
    padding-top: 4rem;
    padding-bottom: 9rem;
}

.promo-banner {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-left: 4px solid #f59e0b;
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.05);
}

/* Director Section */
.director-section {
    background: #1e293b; /* Fallback for var(--pro-text-main) */
    color: white;
    border-radius: 2rem;
    padding: 4rem;
    margin-top: -5rem; /* Pulls it up into the hero */
    position: relative;
    z-index: 10;
}

.director-img-wrapper {
    position: relative;
    display: inline-block;
}

    .director-img-wrapper::after {
        content: '';
        position: absolute;
        top: 10px;
        left: 10px;
        right: -10px;
        bottom: -10px;
        border: 2px solid var(--pro-primary, #3b82f6);
        border-radius: 1rem;
        z-index: -1;
    }

.director-img {
    width: 240px;
    height: 300px;
    object-fit: cover;
}

/* Premium Diagnostic Cards */
.premium-card {
    background: #ffffff;
    border-radius: 1.5rem;
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: var(--shadow-glass);
    transition: var(--transition-smooth);
    height: 100%;
    position: relative;
    overflow: hidden;
}

    .premium-card.hover-lift:hover {
        transform: translateY(-8px);
        box-shadow: var(--shadow-hover);
        border-color: rgba(59, 130, 246, 0.25);
    }

    .premium-card.active-step {
        border: 2px solid var(--pro-primary, #3b82f6);
        background: #f8fbff;
    }

/* Partner Centers */
.partner-network-section {
    background: linear-gradient(180deg, #ffffff 0%, #f0f9ff 100%);
    border-top: 1px solid #e0f2fe;
}

.partner-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 2px solid transparent;
}

    .partner-card:hover {
        border-color: var(--pro-primary, #3b82f6);
        animation: pulseGlow 2s infinite;
    }

.partner-icon-wrapper {
    width: 70px;
    height: 70px;
    background: var(--brand-primary-light);
    color: var(--pro-primary, #3b82f6);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

    .partner-icon-wrapper.active {
        background: var(--pro-primary, #3b82f6);
        color: white;
    }

.partner-card:hover .partner-icon-wrapper {
    background: var(--brand-gradient);
    color: white;
    transform: scale(1.1) rotate(5deg);
}

/* Premium Rates Table */
.table-scrollable-container {
    max-height: 500px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

    .table-scrollable-container::-webkit-scrollbar {
        width: 6px;
    }

    .table-scrollable-container::-webkit-scrollbar-thumb {
        background-color: #cbd5e1;
        border-radius: 10px;
    }

.premium-table {
    margin-bottom: 0;
}

    .premium-table thead th {
        background-color: var(--bg-ultra-light);
        color: #64748b; /* Slate text muted */
        font-weight: 700;
        text-transform: uppercase;
        font-size: 0.8rem;
        letter-spacing: 1px;
        padding: 1.25rem 1.5rem;
        border-bottom: 2px solid #e2e8f0;
        position: sticky;
        top: 0;
        z-index: 2;
    }

    .premium-table tbody td {
        padding: 1rem 1.5rem;
        border-bottom: 1px solid #f1f5f9;
        vertical-align: middle;
    }

    .premium-table tbody tr {
        transition: background-color 0.2s ease;
    }

        .premium-table tbody tr:hover {
            background-color: #f8fafc;
        }

/* Interactive Equipment Image */
.hero-equipment-img {
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.08));
    max-height: 480px;
    object-fit: cover;
    border-radius: 2rem;
    transition: var(--transition-smooth);
}

.equipment-link:hover .hero-equipment-img {
    transform: scale(1.03) translateY(-10px);
    filter: drop-shadow(0 30px 50px rgba(59, 130, 246, 0.25));
}
