/* =========================================
   1. VARIABLES & GLOBAL STYLES
   ========================================= */
:root {
    --primary-color: #C8102E; /* Medical Red */
    --primary-dark: #a10d25;
    --secondary-color: #ffffff;
    --accent-color: #f5f7fa;
    --text-dark: #2c3e50;
    --text-light: #6c757d;
    --heading-font: 'Poppins', sans-serif;
    --body-font: 'Open Sans', sans-serif;
}

html, body {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    font-family: var(--body-font);
    color: var(--text-dark);
    background-color: var(--secondary-color);
}

h1, h2, h3, h4, h5, h6, .navbar-brand, .btn {
    font-family: var(--heading-font);
}

/* =========================================
   2. UTILITIES & BUTTONS
   ========================================= */
.text-primary { color: var(--primary-color) !important; }
.bg-primary { background-color: var(--primary-color) !important; }
.bg-accent { background-color: var(--accent-color) !important; }
.text-accent { color: #ffd7d7 !important; }

/* Button Styling */
.btn-primary { 
    background-color: var(--primary-color); 
    border-color: var(--primary-color); 
}
.btn-primary:hover { 
    background-color: var(--primary-dark); 
    border-color: var(--primary-dark); 
}
.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}
.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: white;
}
.btn-success {
    background-color: #20c997;
    border-color: #20c997;
}
.btn-success:hover {
    background-color: #1ba87e;
    border-color: #1ba87e;
}

/* =========================================
   3. ULTRA PREMIUM ENTERPRISE HEADER
   ========================================= */
/* Logo Size Adjustment */
#nav-logo {
    height: 60px !important; /* Increased height for better visibility */
    transition: all 0.3s ease;
    object-fit: contain;
}

/* Top bar links hover effect */
.enterprise-link {
    transition: all 0.2s ease-in-out;
    opacity: 0.85;
}
.enterprise-link:hover {
    opacity: 1;
    color: var(--bs-primary) !important;
}

/* Nav Links - Darker, Bolder & Clean Underline */
.enterprise-nav-link {
    color: #0f172a !important; 
    font-weight: 600 !important; 
    letter-spacing: 0.2px;
    padding-left: 12px !important;
    padding-right: 12px !important;
    position: relative;
    transition: color 0.3s ease;
}
.enterprise-nav-link:hover, 
.enterprise-nav-link.active {
    color: var(--bs-primary) !important;
}
.enterprise-nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: var(--bs-primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}
.enterprise-nav-link:hover::after,
.enterprise-nav-link.active::after {
    width: 80%; 
}

/* Contact Pill Hover */
.enterprise-contact-pill {
    transition: transform 0.2s ease;
}
.enterprise-contact-pill:hover .icon-wrapper {
    background-color: var(--bs-primary) !important;
    color: white !important;
    transition: all 0.3s ease;
}

/* Enterprise Primary Button - Compact SaaS sizing */
.enterprise-btn {
    border-radius: 6px; 
    font-weight: 600;
    font-size: 0.88rem !important; 
    padding: 8px 16px !important; 
    letter-spacing: 0.3px;
    box-shadow: 0 4px 6px -1px rgba(var(--bs-primary-rgb), 0.25), 0 2px 4px -2px rgba(var(--bs-primary-rgb), 0.1);
    transition: all 0.2s ease-in-out;
    border: none;
}
.enterprise-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 12px -3px rgba(var(--bs-primary-rgb), 0.3), 0 4px 6px -2px rgba(var(--bs-primary-rgb), 0.15);
    background-color: #0b5ed7; 
}

/* =========================================
   4. FLOATING ICONS IN HERO
   ========================================= */
.floating-icon {
    position: absolute;
    background: white;
    padding: 15px;
    border-radius: 50%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    font-size: 24px;
    z-index: 3;
    animation: float 4s ease-in-out infinite;
}
.icon-1 { top: 10%; left: 10%; animation-delay: 0s; }
.icon-2 { bottom: 20%; right: 5%; animation-delay: 2s; }

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

/* =========================================
   5. CONTENT ELEMENTS & CARDS
   ========================================= */
.section-title {
    font-weight: 700;
    color: var(--text-dark);
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
}
.section-title::after {
    content: '';
    position: absolute;
    width: 50px;
    height: 3px;
    background: var(--primary-color);
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}
#about .section-title::after { left: 0; transform: none; }

.custom-list li {
    font-size: 1.1rem;
    color: var(--text-dark);
}

/* Service & Location Cards */
.service-card, .location-card {
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05) !important;
}
.service-card:hover, .location-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color) !important;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1) !important;
}
.service-card:hover .icon-box {
    background-color: var(--primary-color) !important;
    color: white !important;
    transition: all 0.3s;
}

/* =========================================
   6. FORM & MULTI-STEP LAYOUT
   ========================================= */
.form-control, .form-select {
    border-radius: 10px;
    padding: 12px 15px;
}
.form-control:focus, .form-select:focus {
    box-shadow: 0 0 0 0.25rem rgba(200, 16, 46, 0.25);
    background-color: white !important;
}

.step-navigation { position: relative; }
.step-nav-item {
    padding: 15px 10px;
    margin-bottom: 10px;
    border-radius: 10px;
    color: var(--text-light);
    transition: all 0.3s ease;
}
.step-nav-item .step-icon {
    width: 40px;
    height: 40px;
    background-color: #f8f9fa;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

/* Active State */
.step-nav-item.active {
    background-color: rgba(200, 16, 46, 0.05); 
    color: var(--primary-color);
}
.step-nav-item.active .step-icon {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 10px rgba(200, 16, 46, 0.3);
}

/* Selection Cards */
.cursor-pointer { cursor: pointer; }
.selection-card {
    position: relative;
    transition: all 0.2s ease;
    background-color: white;
}
.selection-card:hover { border-color: #adb5bd !important; }

.check-indicator {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.5rem;
    color: #20c997;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s ease;
}

.peer:checked + .selection-card {
    border-color: #20c997 !important;
    box-shadow: 0 0 0 1px #20c997;
    background-color: rgba(32, 201, 151, 0.05);
}
.peer:checked + .selection-card .check-indicator {
    opacity: 1;
    transform: scale(1);
}

/* =========================================
   7. FOOTER & WHATSAPP
   ========================================= */
.footer-links li { margin-bottom: 10px; }
.footer-links a {
    color: rgba(255,255,255,0.6);
    transition: 0.3s;
}
.footer-links a:hover {
    color: var(--primary-color) !important;
    padding-left: 5px;
}

.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 0px 4px 10px rgba(0,0,0,0.15);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    transition: all 0.3s ease;
}
.whatsapp-float:hover {
    background-color: #1ebe57;
    color: white;
    transform: scale(1.1);
}

/* =========================================
   8. RESPONSIVE & MOBILE FIXES
   ========================================= */
@media (max-width: 991px) {
    #nav-logo { height: 50px !important; } /* Slightly scale down logo on tablet */
    
    .navbar-nav {
        background: white;
        padding: 15px;
        border-radius: 10px;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    }
    .hero-section { text-align: center; }
    .hero-section .d-flex { justify-content: center; }
    #about .section-title::after { left: 50%; transform: translateX(-50%); }
    #about .col-lg-6.px-lg-5 { text-align: center; margin-top: 30px; }
    #about .justify-content-start { justify-content: center !important; }
    
    .floating-icon { padding: 10px; font-size: 18px; }
    .icon-1 { top: 20%; left: 0%; }
    .icon-2 { bottom: 10%; right: 0%; }
}

@media (max-width: 767px) {
    /* Hero Section Buttons Fix */
    .hero-section .d-flex.gap-3 {
        gap: 12px !important;
        flex-wrap: nowrap; 
        width: 100%;
        justify-content: center;
    }
    .hero-section .btn-lg {
        font-size: 0.9rem !important; 
        padding: 10px 15px !important; 
        flex: 1; 
        display: flex;
        justify-content: center;
        align-items: center;
        white-space: nowrap;
    }

    /* Appointment Section Setup */
    #appointment .row { gap: 1rem !important; }
    
    /* Horizontal Swipeable Step Navigation */
    .step-navigation {
        display: flex;
        overflow-x: auto;
        padding-bottom: 8px;
        gap: 10px;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch; 
    }
    .step-navigation::-webkit-scrollbar { height: 4px; }
    .step-navigation::-webkit-scrollbar-track { background: rgba(0,0,0,0.05); border-radius: 4px; }
    .step-navigation::-webkit-scrollbar-thumb { background-color: var(--bs-primary); border-radius: 4px; }

    .step-nav-item {
        flex: 0 0 auto; 
        margin-bottom: 0;
        padding: 10px 15px;
        min-width: auto;
        scroll-snap-align: start;
        border: 1px solid rgba(0,0,0,0.05);
    }
    .step-nav-item .d-flex { flex-direction: row; align-items: center; }
    .step-nav-item .step-icon { width: 32px; height: 32px; font-size: 0.9rem; }
    .step-nav-item span { font-size: 0.85rem !important; margin-left: 10px !important; white-space: nowrap; }
    
    /* Appointment Overlap Final Fix */
    #appointment .col-lg-3 .card,
    #appointment .col-md-4 .card {
        margin-bottom: 10px !important; 
        position: relative !important;
        top: 0 !important; 
        z-index: 10;
    }
    #appointment .col-lg-9, 
    #appointment .col-md-8 {
        margin-top: 45px !important; 
        position: relative;
        z-index: 1;
    }
    #appointment .card-body { padding: 1.5rem !important; }
}

@media (max-width: 576px) {
    /* Mobile Logo Fix */
    #nav-logo {
        height: 60px !important; /* Perfect size for mobile header */
        max-width: 65vw; 
    }
    .top-bar {
        font-size: 0.75rem;
        padding-top: 6px !important;
        padding-bottom: 6px !important;
    }
}

@media (max-width: 400px) {
    /* Small screen buttons stack */
    .hero-section .d-flex.gap-3 { flex-direction: column; }
}