/* ========== NAVBAR ========== */
.navbar-mobile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
}

/* Contenedores flex */
/* Contenedores flex */
.logo-container {
    flex: 0 0 auto;
     order: 1;
}
.slider-container {
    flex: 1 1 auto;
    margin: 0 15px;
    max-width: 280px;
     order: 2;
}


.menu-button {
    flex: 0 0 auto;
    order: 3;
}

/* Logo */
.main-logo {
    height: 65px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    padding: 1px;
    transition: transform 0.3s ease;
}
/* Ajustes para el slider interno */
.slider-container .carousel-inner {
    max-height: 55px;
    border-radius: 8px;
}

.slider-container .carousel-item img {
    object-fit: cover;
    height: 55px;
    width: 100%;
}
/* Responsive para móviles pequeños */
@media (max-width: 576px) {
    .logo-container {
        width: 90px;
    }

    .slider-container {
        max-width: 200px;
    }

    .slider-container .carousel-inner {
        max-height: 40px;
    }

    .slider-container .carousel-item img {
        height: 40px;
    }

    .menu-button {
        width: 40px;
    }
}

.navbar-brand img:hover {
    transform: scale(1.05);
}

/* Título */
.clinic-location {
    font-size: 0.85rem;
    white-space: nowrap;
    margin: 0;
    color: #333;
    font-weight: 600;
}

/* Botón hamburguesa - asegurar visibilidad */
.navbar-toggler {
    display: inline-block;
    padding: 4px 8px;
}

.navbar-toggler:focus {
    box-shadow: none;
}

/* ========== HERO SECTION ========== */
.hero-section {
    background: linear-gradient(rgba(0, 123, 255, 0.85), rgba(0, 123, 255, 0.9)),
                url('https://images.unsplash.com/photo-1588776814546-1ffcf47267a5?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
    padding: 120px 0;
    min-height: 85vh;
    display: flex;
    align-items: center;
    position: relative;
}

/* Logo en el lado derecho - TAMAÑO REDUCIDO */
.hero-logo {
    position: absolute;
    top: 50%;
    right: 5%;
    transform: translateY(-50%);
    width: 200px; /* TAMAÑO REDUCIDO */
    max-width: 20vw; /* TAMAÑO REDUCIDO */
    z-index: 1;
    opacity: 0.9;
}

/* Animación sutil para el logo */
.floating-logo {
    animation: floatLogo 8s ease-in-out infinite;
    filter: drop-shadow(0 5px 15px rgba(255, 255, 255, 0.2));
}

@keyframes floatLogo {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-15px) rotate(1deg);
    }
}

/* Ajustes para el contenido del hero */
.hero-section h1 {
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
    margin-bottom: 25px;
    color: white;
}

.hero-section .lead {
    font-size: 1.25rem;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 35px;
    color: rgba(255, 255, 255, 0.95);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-section .btn-light {
    background-color: rgba(255, 255, 255, 0.95);
    border: 2px solid white;
    padding: 12px 35px;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    font-size: 1.1rem;
}

.hero-section .btn-light:hover {
    background-color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* ========== MEDIA QUERIES ========== */
/* Móvil */
@media (max-width: 767.98px) {
    .main-logo {
        height: 50px;
        max-width: 140px;
    }

    .clinic-location {
        font-size: 0.8rem;
        line-height: 1.2;
        padding: 0 5px;
    }


    .navbar-nav {
        padding-top: 15px;
        text-align: center;
        background-color: #fff;
        border-radius: 8px;
        margin-top: 10px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    }

    .nav-item {
        margin-bottom: 8px;
    }

    .nav-link {
        padding: 10px 15px !important;
        border-radius: 5px;
    }

    .nav-link:hover {
        background-color: #f8f9fa;
    }
}



    /* Tablet y Desktop */
    @media (min-width: 768px) {
        .navbar-mobile {
            min-height: 80px;
        }

        .main-logo {
            height: 70px;
        }

        .slider-container {
            max-width: 320px;
            flex: 1 1 auto;
            margin: 0 15px;
        }

        .slider-container .carousel-inner {
            max-height: 65px;
        }

        .slider-container .carousel-item img {
            height: 65px;
        }

        /* CORRECCIÓN: Eliminar porcentajes fijos */
        .logo-container {
            order: 1;
            flex: 0 0 auto;  /* ← Cambiado de 30% a auto */
        }

        .menu-button {
            order: 3;
            flex: 0 0 auto;  /* ← Cambiado de 30% a auto */
            text-align: right;
        }

        .navbar-nav {
            padding-top: 0;
        }

        .nav-link {
            position: relative;
            margin: 0 2px;
        }

        .nav-link::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 15px;
            right: 15px;
            height: 2px;
            background-color: #007bff;
            transform: scaleX(0);
            transition: transform 0.3s ease;
        }

        .nav-link:hover::after {
            transform: scaleX(1);
        }
        }


/* Responsive para hero section */
@media (max-width: 1199px) {
    .hero-logo {
        width: 180px; /* TAMAÑO REDUCIDO */
        right: 3%;
    }
}

@media (max-width: 991px) {
    .hero-section {
        background-attachment: scroll;
        padding: 100px 0;
        min-height: 70vh;
    }

    .hero-logo {
        width: 150px; /* TAMAÑO REDUCIDO */
        right: 2%;
        opacity: 0.8;
    }

    .hero-section h1 {
        font-size: 2.5rem;
    }

    .hero-section .lead {
        font-size: 1.1rem;
    }
}

@media (max-width: 767px) {
    .hero-section {
        padding: 80px 0;
        min-height: 60vh;
    }

    /* El logo se oculta automáticamente en móvil por d-none d-md-block */
    .hero-section h1 {
        font-size: 2rem;
    }

    .hero-section .lead {
        font-size: 1rem;
        padding: 0 15px;
    }

    .hero-section .btn-light {
        padding: 10px 25px;
        font-size: 1rem;
    }
}

/* ========== SERVICE CARDS ========== */
.service-card {
    transition: all 0.4s ease;
    overflow: hidden;
    border-radius: 15px !important;
    height: 100%;
}

.service-card img {
    height: 180px;
    width: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0,123,255,0.15) !important;
}

.service-card:hover img {
    transform: scale(1.08);
}

.service-card h5 {
    color: #007bff;
    margin-top: 10px;
    font-weight: 600;
}

/* ========== WHATSAPP BUTTON ========== */
.whatsapp-btn {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 25px;
    right: 25px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50%;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 15px rgba(0,0,0,0.3);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    animation: pulse-whatsapp 2s infinite;
    text-decoration: none;
}

.whatsapp-btn img {
    width: 35px;
    height: 35px;
}

.whatsapp-btn:hover {
    background-color: #128c7e;
    transform: scale(1.1);
    box-shadow: 3px 3px 20px rgba(0,0,0,0.4);
}

@keyframes pulse-whatsapp {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { box-shadow: 0 0 0 12px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* ========== GLOBAL ========== */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
}

body {
    padding-top: 70px;
}

/* Responsive body padding */
@media (min-width: 768px) {
    body {
        padding-top: 85px;
    }
}

/* Ajustes para dispositivos muy pequeños */
@media (max-width: 360px) {
    .main-logo {
        height: 45px;
        max-width: 120px;
    }

    .clinic-location {
        font-size: 0.75rem;
    }

    .whatsapp-btn {
        width: 55px;
        height: 55px;
        bottom: 15px;
        right: 15px;
    }

    .whatsapp-btn img {
        width: 30px;
        height: 30px;
    }
}