/********** SWISS HEALTHCARE NIGERIA CSS - WELL ORGANIZED **********/

/* ========== CSS VARIABLES & ROOT SETTINGS ========== */
:root {
    --primary: #0180ff;    /* Professional Healthcare Blue */
    --secondary: #4bc75f;  /* Emergency/Care Red */
    --light: #F8F9FA;      /* Clean Medical White */
    --dark: #091E3E;       /* Professional Dark Blue */
    --accent: #20db4c;     /* Health Green */
}

/* ========== TYPOGRAPHY & FONT WEIGHTS ========== */
h1,
h2,
.font-weight-bold {
    font-weight: 700 !important;
}

h3,
h4,
.font-weight-semi-bold {
    font-weight: 600 !important;
}

h5,
h6,
.font-weight-medium {
    font-weight: 500 !important;
}

/* ========== BUTTON STYLES ========== */
.btn {
    font-family: 'Jost', sans-serif;
    font-weight: 600;
    transition: .5s;
}

.btn-primary,
.btn-secondary {
    color: #FFFFFF;
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}

.btn-secondary {
    background: var(--secondary);
    border-color: var(--secondary);
}

.btn-primary:hover {
    background: #155a9d;
    border-color: #155a9d;
    transform: translateY(-2px);
}

.btn-secondary:hover {
    background: #c82333;
    border-color: #c82333;
    transform: translateY(-2px);
}

/* ========== BUTTON SIZES & SHAPES ========== */
.btn-square {
    width: 36px;
    height: 36px;
}

.btn-sm-square {
    width: 28px;
    height: 28px;
}

.btn-lg-square {
    width: 46px;
    height: 46px;
}

.btn-square,
.btn-sm-square,
.btn-lg-square {
    padding-left: 0;
    padding-right: 0;
    text-align: center;
}

/* ========== LOADING SPINNER ========== */
#spinner {
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease-out, visibility 0s linear .5s;
    z-index: 99999;
}

#spinner.show {
    transition: opacity .5s ease-out, visibility 0s linear 0s;
    visibility: visible;
    opacity: 1;
}

/* ========== BACK TO TOP BUTTON ========== */
.back-to-top {
    position: fixed;
    display: none;
    right: 45px;
    bottom: 45px;
    z-index: 99;
}

/* ========== TOPBAR SHAPE DESIGN ========== */
.top-shape::before {
    position: absolute;
    content: "";
    width: 35px;
    height: 100%;
    top: 0;
    left: -17px;
    background: var(--primary);
    transform: skew(40deg);
}

/* ========== NAVIGATION STYLES ========== */
.navbar-light .navbar-nav .nav-link {
    font-family: 'Jost', sans-serif;
    padding: 35px 15px;
    font-size: 18px;
    color: var(--dark);
    outline: none;
    transition: .5s;
}

.sticky-top.navbar-light .navbar-nav .nav-link {
    padding: 20px 15px;
}

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

/* ========== NAVBAR BRAND FLEXIBILITY ========== */
.navbar-brand {
    display: flex;
    align-items: center;
    flex-shrink: 1;
    min-width: 0; /* Allow text truncation if needed */
}

.navbar-brand h1 {
    white-space: nowrap;
    overflow: visible !important; /* Changed from hidden to visible */
    text-overflow: clip !important; /* Changed from ellipsis to clip */
    max-width: none !important; /* Remove width restriction */
    min-width: fit-content; /* Ensure it takes needed space */
}

/* ========== NAVBAR TOGGLER POSITIONING ========== */
.navbar-toggler {
    flex-shrink: 0; /* Prevent toggler from shrinking */
    margin-left: auto; /* Push toggler to the right */
}

/* ========== NAVBAR CONTAINER OPTIMIZATION ========== */
.navbar > .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    min-width: 0; /* Allow container to shrink if needed */
}

/* ========== COMPACT NAVBAR FOR ALL SCREENS ========== */
.navbar {
    min-height: 60px; /* Reduced from default */
}

/* ========== LAPTOP/DESKTOP REDUCTION ========== */
@media (min-width: 992px) {
    /* Reduce navbar size on laptop by 50% */
    .navbar {
        padding: 0.5rem 1rem !important; /* Reduced by 50% */
        min-height: 50px !important; /* Reduced by 50% */
    }
    
    /* Ensure full text visibility on desktop */
    .navbar-brand h1 {
        font-size: 1.6rem !important; /* Slightly larger for readability */
        white-space: nowrap;
        overflow: visible !important;
        text-overflow: clip !important;
        max-width: none !important;
    }
    
    .navbar-brand .fa-hospital {
        font-size: 1.4rem !important; /* Balanced icon size */
        margin-right: 0.4rem !important;
    }
    
    /* Reduce navigation link padding on desktop */
    .navbar-light .navbar-nav .nav-link {
        padding: 15px 12px !important; /* Reduced from 35px 15px */
        font-size: 16px !important; /* Slightly smaller */
    }
    
    .sticky-top.navbar-light .navbar-nav .nav-link {
        padding: 12px 10px !important; /* Reduced from 20px 15px */
    }
}

/* ========== MOBILE NAVIGATION ========== */
@media (max-width: 991.98px) {
    .navbar-light .navbar-nav .nav-link,
    .sticky-top.navbar-light .navbar-nav .nav-link {
        padding: 10px 0;
    }
}

/* ========== MOBILE NAVBAR OPTIMIZATION ========== */
@media (max-width: 991.98px) {
    /* Make navbar more compact on mobile */
    .navbar {
        padding: 0.8rem 1rem !important; /* Increased by 30% */
    }
    
    /* Ensure full text visibility on mobile */
    .navbar-brand h1 {
        font-size: 1.5rem !important; /* Increased by 20% */
        margin: 0 !important;
        white-space: nowrap;
        overflow: visible !important;
        text-overflow: clip !important;
        max-width: none !important;
        min-width: fit-content;
    }
    
    /* Adjust hospital icon size */
    .navbar-brand .fa-hospital {
        font-size: 1.3rem !important; /* Increased by 20% */
        margin-right: 0.4rem !important; /* Increased spacing */
    }
    
    /* Ensure navbar items fit on one line */
    .navbar-toggler {
        padding: 0.3rem 0.5rem !important; /* Increased by 25% */
        font-size: 1.1rem !important; /* Increased by 10% */
        margin-left: auto;
        flex-shrink: 0; /* Prevent shrinking */
    }
    
    /* Compact navbar collapse area */
    .navbar-collapse {
        margin-top: 0.5rem;
    }
    
    /* Adjust navigation links for mobile */
    .navbar-light .navbar-nav .nav-link,
    .sticky-top.navbar-light .navbar-nav .nav-link {
        padding: 8px 0;
        font-size: 0.9rem;
    }
    
    /* Ensure container doesn't restrict text */
    .navbar > .container {
        min-width: 0;
        flex-wrap: nowrap;
    }
}

/* ========== EXTRA SMALL SCREENS (Phones) ========== */
@media (max-width: 576px) {
    /* Ensure full text visibility on very small screens */
    .navbar-brand h1 {
        font-size: 1.3rem !important; /* Increased by 20% */
        white-space: nowrap;
        overflow: visible !important;
        text-overflow: clip !important;
        max-width: none !important;
        min-width: fit-content;
    }
    
    .navbar-brand .fa-hospital {
        font-size: 1.1rem !important; /* Increased by 20% */
        margin-right: 0.3rem !important; /* Increased spacing */
    }
    
    .navbar-toggler {
        padding: 0.25rem 0.4rem !important; /* Increased by 25% */
        font-size: 1rem !important; /* Increased by 10% */
    }
    
    /* Ensure everything stays on one line */
    .navbar > .container {
        flex-wrap: nowrap;
        min-width: 0;
    }
    
    /* Extra small screen adjustments */
    .navbar {
        padding: 0.7rem 0.8rem !important; /* Slightly reduced for very small screens */
    }
}


/* ========== CAROUSEL/CAROUSEL STYLES ========== */
.carousel-caption {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(9, 30, 62, 0.575);
    z-index: 1;
}

/* ========== CAROUSEL CONTAINER & HEIGHT CONTROL ========== */
.container-fluid.p-0 {
    width: 100%;
    margin: 0;
    padding: 0;
}

#header-carousel {
    width: 100%;
    margin: 0;
    padding: 0;
}

.carousel-inner {
    width: 100%;
}

.carousel-item {
    width: 100%;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ========== CAROUSEL MOBILE RESPONSIVE ========== */
@media (max-width: 991.98px) {
    /* Full screen carousel on mobile */
    .container-fluid.p-0 {
        height: calc(100vh - 120px) !important; /* Full screen minus topbar + navbar */
        min-height: 400px;
        max-height: 600px;
    }
    
    #header-carousel {
        height: 100% !important;
    }
    
    .carousel-inner {
        height: 100% !important;
    }
    
    .carousel-item {
        height: 100% !important;
    }
    
    .carousel-item img {
        height: 100% !important;
        object-fit: cover;
    }
    
    /* Adjust caption for mobile */
    .carousel-caption {
        padding: 1rem;
    }
    
    .carousel-caption h5 {
        font-size: 0.9rem;
        font-weight: 500 !important;
        margin-bottom: 0.5rem;
    }

    .carousel-caption h1 {
        font-size: 1.8rem;
        font-weight: 600 !important;
        margin-bottom: 1rem;
        line-height: 1.2;
    }
    
    /* Mobile button adjustments */
    .carousel-caption .btn {
        padding: 0.6rem 1.2rem !important;
        font-size: 0.85rem !important;
        margin: 0.2rem !important;
    }
}

@media (max-width: 576px) {
    /* Extra small screen optimization */
    .container-fluid.p-0 {
        height: calc(100vh - 110px) !important; /* Slightly adjusted for very small screens */
        min-height: 350px;
        max-height: 500px;
    }
    
    .carousel-caption h5 {
        font-size: 0.8rem;
    }

    .carousel-caption h1 {
        font-size: 1.5rem;
        margin-bottom: 0.8rem;
    }
    
    .carousel-caption .btn {
        padding: 0.5rem 1rem !important;
        font-size: 0.8rem !important;
        margin: 0.1rem !important;
    }
    
    /* Stack buttons vertically on very small screens */
    .carousel-caption .d-flex {
        flex-direction: column;
        align-items: center;
    }
    
    .carousel-caption .btn {
        width: 90%;
        max-width: 200px;
        margin: 0.2rem 0 !important;
    }
}

/* ========== CAROUSEL CONTROLS ========== */
.carousel-control-prev,
.carousel-control-next {
    width: 10%;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 3rem;
    height: 3rem;
}

/* Mobile control adjustments */
@media (max-width: 768px) {
    .carousel-control-prev,
    .carousel-control-next {
        width: 15%; /* Larger touch targets on mobile */
    }
    
    .carousel-control-prev-icon,
    .carousel-control-next-icon {
        width: 2.5rem;
        height: 2.5rem;
    }
}

/* ========== DESKTOP CAROUSEL ========== */
@media (min-width: 992px) {
    .container-fluid.p-0 {
        height: 80vh; /* Tall but not full screen on desktop */
        min-height: 600px;
        max-height: 800px;
    }
    
    #header-carousel {
        height: 100% !important;
    }
    
    .carousel-inner {
        height: 100% !important;
    }
    
    .carousel-item {
        height: 100% !important;
    }
}

/* ========== BANNER POSITIONING ========== */
@media (min-width: 991.98px) {
    .banner {
        position: relative;
        margin-top: -90px;
        z-index: 1;
    }
}

/* ========== SECTION TITLE DECORATION ========== */
.section-title h5::before {
    position: absolute;
    content: "";
    width: 45px;
    height: 3px;
    right: -55px;
    bottom: 11px;
    background: var(--primary);
}

.section-title h5::after {
    position: absolute;
    content: "";
    width: 15px;
    height: 3px;
    right: -75px;
    bottom: 11px;
    background: var(--secondary);
}

/* ========== TWENTY TWENTY COMPARISON ========== */
.twentytwenty-wrapper {
    height: 100%;
}

/* ========== HERO HEADER BACKGROUND ========== */
.hero-header {
    background: linear-gradient(rgba(30, 107, 183, .85), rgba(9, 30, 62, .85)), url(../img/healthcare-hero.jpg) center center no-repeat;
    background-size: cover;
}

/* ========== APPOINTMENT BACKGROUND ========== */
.bg-appointment {
    background: linear-gradient(rgba(30, 107, 183, .85), rgba(9, 30, 62, .85)), url(../img/appointment-bg.jpg) center center no-repeat;
    background-size: cover;
}

/* ========== CAROUSEL ACCESSIBILITY ========== */
@media (prefers-reduced-motion: reduce) {
    .carousel-item {
        transition-duration: 0s;
    }
}

/* ========== CAROUSEL LOADING OPTIMIZATION ========== */
.carousel-item {
    transition: transform 0.6s ease-in-out;
}

.carousel-fade .carousel-item {
    opacity: 0;
    transition-property: opacity;
    transform: none;
}

.carousel-fade .carousel-item.active {
    opacity: 1;
}

.appointment-form {
    background: rgba(30, 107, 183, .8);
}

/* ========== SERVICE ITEM ANIMATIONS ========== */
.service-item img,
.service-item .bg-light,
.service-item .bg-light h5,
.team-item .team-text {
    transition: .5s;
}

.service-item:hover img {
    transform: scale(1.15);
}

/* ========== SERVICE & TEAM HOVER EFFECTS ========== */
.team-item .team-text::after,
.service-item .bg-light::after {
    position: absolute;
    content: "";
    top: 50%;
    bottom: 0;
    left: 15px;
    right: 15px;
    border-radius: 100px / 15px;
    box-shadow: 0 0 15px rgba(30, 107, 183, .3);
    opacity: 0;
    transition: .5s;
    z-index: -1;
}

.team-item:hover .team-text::after,
.service-item:hover .bg-light::after {
    opacity: 1;
}

/* ========== OFFER/BANNER BACKGROUNDS ========== */
.bg-offer {
    background: linear-gradient(rgba(30, 107, 183, .8), rgba(30, 107, 183, .8)), url(../img/services-bg.jpg) center center no-repeat;
    background-size: cover;
}

.offer-text {
    background: rgba(30, 107, 183, .9);
}

/* ========== PRICE CAROUSEL NAVIGATION ========== */
.price-carousel .owl-nav {
    position: absolute;
    width: calc(100% + 45px);
    height: 45px;
    top: calc(50% - 22.5px);
    left: -22.5px;
    display: flex;
    justify-content: space-between;
    opacity: 0;
    transition: .5s;
}

.price-carousel:hover .owl-nav {
    opacity: 1;
}

.price-carousel .owl-nav .owl-prev,
.price-carousel .owl-nav .owl-next {
    position: relative;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    background: var(--primary);
    border-radius: 2px;
    font-size: 22px;
    transition: .5s;
}

.price-carousel .owl-nav .owl-prev:hover,
.price-carousel .owl-nav .owl-next:hover {
    background: var(--secondary);
}

/* ========== TESTIMONIAL SECTION ========== */
.bg-testimonial {
    background: linear-gradient(rgba(30, 107, 183, .85), rgba(30, 107, 183, .85)), url(../img/testimonial-bg.jpg) center center no-repeat;
    background-size: cover;
}

.testimonial-carousel {
    background: rgba(30, 107, 183, .9);
}

.testimonial-carousel .owl-nav {
    position: absolute;
    width: calc(100% + 46px);
    height: 46px;
    top: calc(50% - 23px);
    left: -23px;
    display: flex;
    justify-content: space-between;
    z-index: 1;
}

.testimonial-carousel .owl-nav .owl-prev,
.testimonial-carousel .owl-nav .owl-next {
    position: relative;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    background: var(--primary);
    border-radius: 2px;
    font-size: 22px;
    transition: .5s;
}

.testimonial-carousel .owl-nav .owl-prev:hover,
.testimonial-carousel .owl-nav .owl-next:hover {
    background: var(--secondary);
}

.testimonial-carousel .owl-item img {
    width: 120px;
    height: 120px;
}

/* ========== SWISS HEALTHCARE SPECIFIC STYLES ========== */
.healthcare-badge {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
}

.emergency-banner {
    background: linear-gradient(135deg, var(--secondary), #4b69a1);
    color: white;
    padding: 15px;
    text-align: center;
    font-weight: 600;
}

.service-icon {
    color: var(--primary);
    font-size: 3rem;
    margin-bottom: 1rem;
}

.medical-feature {
    border-left: 4px solid var(--primary);
    padding-left: 15px;
    margin-bottom: 20px;
}

/* ========== RESPONSIVE IMPROVEMENTS ========== */
@media (max-width: 768px) {
    .hero-header {
        background-position: center;
    }
    
    .section-title h5::before,
    .section-title h5::after {
        display: none;
    }
}

/* ========== ANIMATIONS & EFFECTS ========== */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.emergency-btn {
    animation: pulse 2s infinite;
    background: var(--secondary);
    border-color: var(--secondary);
}

.emergency-btn:hover {
    animation: none;
    background: #c82333;
    border-color: #c82333;
}

/* ========== UTILITY CLASSES ========== */
/* Add any utility classes here for quick styling */

/* ========== FORM STYLES ========== */
/* Add form-specific styles here when needed */

/* ========== CARD STYLES ========== */
/* Add card component styles here when needed */

/* ========== MODAL STYLES ========== */
/* Add modal and popup styles here when needed */

/* ========== FOOTER STYLES ========== */
/* Add footer-specific styles here when needed */