:root {
    --sos-cyan: #4dc4bc;
    --sos-dark: #262626;
    --sos-gray: #707070;
}

/* Ajuste para que las imagenes del carrusel sean uniformes */
        .carousel-item img {
            height: 400px; /* Ajuste de altura*/
            object-fit: cover; /* Recorta la imagen para que llene el espacio sin deformarse */
            border-radius: 10px;
        }
        
        .carousel {
            max-width: 450px;
            margin: 0 auto 1.5rem; /* Centrado y margen inferior */
            border-radius: 10px;
            overflow: hidden;
            box-shadow: 0 5px 15px rgba(0,0,0,0.2);
        }

        body {
            /* Imagen de fondo principal */
            background-image: url('../img/fondo-arbol.jpg');
            background-size: cover;
            background-position: center;
            background-repeat: no-repeat;
            background-attachment: fixed; /* Mantiene el fondo fijo al hacer scroll */
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            position: relative; /* Necesario para el overlay */
            min-height: 100vh; /* Asegura que ocupe todo el alto de la pantalla */
            margin: 0;
            padding: 0;
        }

        /* Capa de desenfoque y tinte */
        body::before {
            content: "";
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.4); /* Tinte oscuro (ajusta la opacidad 0.4) */
            backdrop-filter: blur(8px); /* Cantidad de desenfoque (ajusta los pixeles) */
            z-index: 1; /* Coloca la capa detrás del contenido */
        }

        /* Asegurar que el contenido esté sobre la capa */
        .container-fluid, .container {
            position: relative;
            z-index: 2; /* Mayor que el z-index de body::before Son capas como las cebollas */
        }


        /* Contenedor central blanco para contraste */
        .content-card {
            background-color: rgba(255, 255, 255, 0.9); /* Blanco semitransparente */
            padding: 10px;
            border-radius: 15px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.2);
            margin-top: -50px;
            margin-bottom: 50px;
        }

        .hero-img {
            max-width: 300px;
            border-radius: 10px;
            box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        }

         .social-icons img {
            width: 45px;   /* Ancho fijo */
            height: 45px;  /* Alto fijo */
            object-fit: contain; /* Evita que se estiren, mantiene proporción */
            margin: 0 10px;
            transition: transform 0.3s;
            border-radius: 8px; /* Suaviza bordes de iconos cuadrados como el de X */
        }

        .social-icons img:hover {
            transform: scale(1.1);
        }
        
    
        .logo-header {
            max-width: 200px;
            padding: 10px 10px 10px 10px;
            border-radius: 30px;
        }

        /* Fondo para el logo 
        .logo-bg-wrapper {
            display: inline-block;
            background-color: rgb(139, 197, 231);
            border-radius: 12px;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
            margin-left: 10px;
            margin-top: 10px;
        }*/

        /* Mover solo el caption de Endoterapia a la parte superior */
        .carousel-caption.caption-top {
            top: 0 !important;
            bottom: auto !important;
            margin-top: 15px !important;
        }

        /* Media query para dispositivos móviles */
        @media (max-width: 768px) {
            .content-card {
                margin-top: 20px; /* Elimina el margen negativo en móviles */
                margin-bottom: 30px;
            }

            .carousel-item img {
                height: 320px; /* Altura en móviles para ver imagen completa */
            }

            .carousel {
                max-width: 100%;
                margin: 0 auto 1.5rem;
            }

            .logo-header {
                max-width: 120px;
                padding: 8px;
            }

            /* Mostrar captions en móviles */
            .carousel-caption {
                display: block !important;
            }

            .carousel-caption h5 {
                font-size: 1rem; /* Reduce tamaño del título en móviles */
                margin: 0.3rem 0;
            }

            .carousel-caption p {
                font-size: 0.85rem; /* Reduce tamaño del texto en móviles */
                margin: 0;
            }
        }

/* ==========================================================================
   Menú de whatsapp flotante
   ========================================================================== */

/*Contenedor Principal */
.menu-btn-whatsapp {
    width: 280px;
    height: 70px;
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 0;
}

/* Botón Principal (Logo de whatsapp con animacion) */
.botonF1.main-whatsapp-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #25D366;
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 10;
    cursor: pointer;
    font-size: 32px;
    /* Animación de contorno (respiración) */
    animation: breathe 2s ease-in-out infinite;
    transition: background-color 0.3s ease, transform 0.3s ease;
    /* Limpieza de bordes nativos */
    outline: none !important;
    -webkit-tap-highlight-color: transparent;
}

/* Icono whatsapp interno (Latido) */
.main-whatsapp-btn i {
    z-index: 10;
    color: #fff;
    display: inline-block;
    animation: beat 2s ease-in-out infinite;
    pointer-events: none; /* Evita que el navegador enfoque el icono individualmente */
}

*/Ayuda a evitar que el boton haga clicking*/
.menu-btn-whatsapp::before {
    content: "";
    position: absolute; /* Estira la caja invisible desde el botón principal hacia arriba */
    bottom: 0;
    right: 0;
    width: 100%;/* Altura suficiente para cubrir el espacio hasta el botón más alto (MIP) */
    height: 190px; 
    background: transparent; /* Invisible */
    /* Lo pone detrás para no bloquear los clics en los botones reales */
    z-index: 1; 
}


/* Botones Desplegados (texto con icono) */
.btn-desplegado {
    height: 45px;
    padding: 0 18px;
    border-radius: 25px;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    position: absolute;
    right: 5px;
    bottom: 10px;
    transform: scale(0);
    transform-origin: bottom right;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    opacity: 0;
    box-shadow: 0 3px 8px rgba(0,0,0,0.2);
    z-index: 9;
}

.texto-btn {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

/* Lógica de Activación y Pausa */

.menu-btn-whatsapp:hover .btn-desplegado {
    transform: scale(1);
    opacity: 1;
}

.menu-btn-whatsapp:hover .botonF1-extra { bottom: 80px; } /* Arbolado */
.menu-btn-whatsapp:hover .botonF2 { bottom: 135px; }       /* MIP */

/* Estado cuando el menú está abierto: Pausamos y quitamos recuadros */
.menu-btn-whatsapp:hover .main-whatsapp-btn {
    animation-play-state: paused;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3) !important; /* Sombra estática circular */
    outline: none !important;
}

.menu-btn-whatsapp:hover .main-whatsapp-btn i {
    animation-play-state: paused;
}

/* Limpieza extra para estados de foco (evita el rectángulo de seleccion al tener el mouse sobre el botón) */
.main-whatsapp-btn:focus, 
.main-whatsapp-btn:active {
    outline: none !important;
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5); /* Mantiene la base de la onda */
}

/* Colores y Estilos de Marca */
.botonF1-extra { background-color: #128C7E; } /* Verde WA oscuro */
.botonF2 { background-color: #2196F3; }       /* Azul Servicios */

/* Animaciones (Keyframes) */

@keyframes breathe {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
    }
}

@keyframes beat {
    0% { transform: scale(1); }
    50% { transform: scale(1.12); }
    100% { transform: scale(1); }
}

/* Diseño Responsivo */
@media (max-width: 768px) {
    .menu-btn-whatsapp {
        right: 15px;
        bottom: 15px;
        width: 230px;
    }
    .botonF1.main-whatsapp-btn {
        width: 55px;
        height: 55px;
        font-size: 28px;
    }
}