/* ================== INICIO (index.html) ================== */
/* Solo lo propio de esta página. Lo común (tipografía, colores, navbar, formulario,
   mapa, footer y WhatsApp) está en general.css, que se carga antes. */

/* HERO */
.hero {
    position: relative;
    height: 950px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.hero::after {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(73, 73, 73, 0.4);
    top: 0;
    left: 0;
    z-index: 2;
    pointer-events: none;
}

.hero-text,
.buttons {
    position: relative;
    z-index: 3;
    color: white;
    text-align: center;

}   

.btn-outline,
.btn-dark, .btn-dark a {
    background: transparent;              /* 🔥 transparente */
    color: rgba(69, 111, 250, 1);                        /* celeste */
    border: 2px solid rgba(69, 111, 250, 1);             /* borde celeste */
    padding: 10px 25px;
    border-radius: 8px;
    cursor: pointer;
    z-index: 10;
    transition: 0.3s;
    text-decoration: none;
    
}

.btn-outline:hover,
.btn-dark:hover {
    background: #4FC3F7;   /* 🔥 se rellena */
    color: white;
}

.buttons button{
    padding: 10px 50px;
}

/*.btn-dark a {
 text-decoration: none;
 color:white;
}*/

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.carousel,
.slides {
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.8s ease;
    top: 0;
    left: 0;
}

.slide.active {
    opacity: 1;
}

/* BOTONES */
.prev, .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    background: rgba(0,0,0,0.4);
    color: white;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 5px;
    position:absolute;
}

.prev {
    left: 10px;
}

.next {
    right: 10px;
}

/* PRODUCTS */
/* SECCION GENERAL */
.services-section {

    width: 100%;

    min-height: 100vh;

    display: flex;

    background: transparent;
}

/* IZQUIERDA */
.services-left {

    width: 50%;

    display: flex;

    flex-direction: column;

    justify-content: center;

    align-items: center;

    text-align: center;

    padding: 80px;

    backdrop-filter: blur(10px);
}

/* TITULO */
.services-left h2 {

    font-size: 60px;

    margin-bottom: 25px;

    font-weight: bold;
}

/* DESCRIPCION */
.services-left p {

    max-width: 500px;

    font-size: 20px;

    line-height: 1.7;

    margin-bottom: 40px; /* espacio antes del botón "Ver servicios", igual que en Nuestro Equipo */
}

/* DERECHA */
.services-right {

    width: 50%;

    background: rgba(255,255,255,0.92);

    display: flex;

    flex-direction: column;

    justify-content: center;

    text-align: center;

    gap: 60px;

    padding: 80px;
}

/* BLOQUE DE SERVICIO */
.service-box {

    display: flex;

    align-items: center;

    gap: 35px;

    transition: 0.4s ease;
}

/* HOVER */
.service-box:hover {

    transform: scale(1.03);
}

/* ICONO */
.service-icon {

    width: 130px;

    height: 130px;

    border-radius: 50%;

    background: #eaf6ff;

    display: flex;

    justify-content: center;

    align-items: center;

    flex-shrink: 0;
}

/* IMAGEN ICONO */
.service-icon img {

    width: 60px;
}

/* TEXTO */
.service-text h3 {

    font-size: 32px;

    margin-bottom: 15px;
}

.service-text p {

    font-size: 18px;

    line-height: 1.7;

    margin-bottom: 15px;

    max-width: 500px;
}

/* LINK */
.service-text a {

    text-decoration: none;

    color: #5dbb2f;

    font-weight: bold;
}

.articles, .contact {
    background: #F5F7FA;
}

.services-mobile {
    display: none;
}

/* ARTICLES eleminado*/

.img-small {
    width: 60px;
    height: 60px;
    background: #ccc;
}

/* TESTIMONIOS */
.testimonials {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 5%;
    background:white ;
    overflow: hidden    ;

}

.testimonial-cards {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 15px;

    transition: all 0.5s ease;
}

.testimonial {
    backdrop-filter: blur(10px);
    background: #8d8383;
    padding: 15px;
    width: 200px;
    border-radius: 5px;
    
    transform: scale(0.85);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.5s ease;
    border-radius: 25px;
}

.testimonial.active {
    transform: scale(1.08);
    opacity: 1;
}

/* DOCTOR */
/* ========================= */
/* TEAM SECTION */
/* ========================= */

.team-section {

    width: 100%;

    min-height: 80vh;

    display: flex;

    background: transparent;
}

/* ========================= */
/* IZQUIERDA */
/* ========================= */

.team-content {

    width: 50%;

    background: none;

    backdrop-filter: blur(10px);

    display: flex;

    flex-direction: column;

    justify-content: center;

    align-items: center;
    
    text-align: center;

    padding: 100px;
}

/* TITULO */

.team-content h2 {

    font-size: 55px;

    margin-bottom: 25px;

    color: #111;
}

/* DESCRIPCION */

.team-content p {

    max-width: 500px;

    font-size: 20px;

    line-height: 1.8;

    margin-bottom: 40px;

    color: #000000;
}

/* BOTON */

.btn-staff {

    padding: 15px 40px;

    border: 2px solid #4a6cff;

    border-radius: 40px;

    text-decoration: none;

    color: #4a6cff;

    font-weight: 600;

    transition: 0.4s ease;
}

/* HOVER BOTON */

.btn-staff:hover {

    transform: scale(1.05);
}

/* ========================= */
/* DERECHA */
/* ========================= */

.team-image {

    width: 50%;

    overflow: hidden;
}

/* IMAGEN */

.team-image img {

    width: 100%;

    height: 100%;

    object-fit: cover;

    display: block;
}

/* ================== RESPONSIVE ================== */
/* Va al final del archivo: así estas reglas ganan a las de arriba (antes estaban al inicio y no se aplicaban) */
/* Cortes responsive del sitio (iguales en todos los CSS; píxeles CSS, iguales en iOS y Android):
   1024px tablets grandes y horizontal · 768px tablets en vertical · 480px celulares · 360px celulares pequeños */
@media (max-width: 1024px) {
    .hero, .doctor, .contact {
        padding: 40px 5%;
    }
    
    .hero {
        /* height: auto; -> desactivado: el hero mantiene su alto original en tablet y celular */
        flex-direction: column;
        text-align: center;
        align-items: center;
        gap: 30px;
    }
    .hero-text {
        order:1;
    }
    .hero-text h1 {
        font-size: 2.5rem;
    }

    .hero-image {
        order:2;
        width: 100%;
        height: 100%; /* Reducimos altura en tablets */
    }

    .buttons {
        order:3;
    }

    .services-section {

        flex-direction: column;
    }

    .services-left,
    .services-right {

        width: 100%;
    }

    .services-left {

        padding: 70px 40px;
    }

    .services-right {

        padding: 70px 40px;
    }

    .team-section {

        flex-direction: column;
    }

    .team-content,
    .team-image {

        width: 100%;
    }

    .team-content {

        padding: 70px 50px;
    }

    .team-image {

        height: 500px;
    }

}

@media (max-width: 768px) {
    /* Navbar: Pasamos de Grid a Flex para mejor control */
    
    .services-section {

        flex-direction: column;
    }

    .services-left,
    .services-right {

        width: 100%;

        padding: 50px 25px;
    }

    .services-left h2 {

        font-size: 42px;
    }

    .services-left p {

        font-size: 17px;
    }

    .service-box {

        flex-direction: column;

        text-align: center;

        gap: 20px;
    }

    .service-icon {

        width: 100px;
        height: 100px;
    }

    .service-icon img {

        width: 45px;
    }

    .service-text h3 {

        font-size: 26px;
    }

    .service-text p {

        font-size: 15px;
    }

    /* Secciones de servicios y testimonios */
    .testimonial-cards {
        flex-direction: column;
        align-items: center;
    }
    
    .products .btn-dark {
        display: none;
    }
    .product-cards{
        display: none !important;
    }

    .card, .testimonial {
        width: 100%;
        max-width: 300px;
    }

    .services-mobile {
        display: flex !important;
        flex-direction: column;
        align-items: center;
        gap: 40px;
        padding: 20px;
    }

    .service-item {
        text-align: center;
        max-width: 350px;
    }

    .icon-circle {
        width: 100px;
        height: 100px;
        margin: 0 auto 15px;
        border-radius: 50%;
        background: rgba(0, 150, 255, 0.1);

        display: flex;
        justify-content: center;
        align-items: center;
    }

    .icon-circle img {
        width: 40px;
    }

    .service-item a {
        color: #00c853;
        text-decoration: none;
    }

    /* Artículos */
    .article {
        width: 100%;
        flex-direction: column;
        text-align: center;
    }

    /* ========================= */
/* RESPONSIVE MOVIL */
/* ==========Doctor======= */
    .team-content {

        padding: 60px 30px;

        align-items: center;

        text-align: center;
    }

    .team-content h2 {

        font-size: 42px;
    }

    .team-content p {

        font-size: 16px;
    }

    .team-image {

        height: 350px;
    }

    .btn-staff {

        padding: 14px 35px;
    }
}

/* ================== SERVICIOS DEL INICIO ================== */
/* Tablets (481px a 1024px): el título arriba y las dos cajas (Odontología y Ortodoncia) una al lado de la otra */
@media (max-width: 1024px) {
    /* Sin alto mínimo de pantalla completa: la sección mide lo que su contenido,
       así no queda espacio vacío antes de Testimonios */
    .services-section {
        min-height: auto;
    }

    /* Lo mismo en Nuestro Equipo: tenía min-height 80vh y en pantallas altas
       quedaba una franja vacía entre la foto y "Visítanos" */
    .team-section {
        min-height: auto;
    }

    .services-right {
        flex-direction: row;
        justify-content: center;
        align-items: flex-start;
        gap: 30px;
    }

    .service-box {
        flex: 1;
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .service-text p {
        max-width: none;
    }
}

/* Celulares (480px o menos): todo en vertical, una caja debajo de la otra */
@media (max-width: 480px) {
    .services-left,
    .services-right {
        padding: 50px 20px;
    }

    .services-right {
        flex-direction: column;
        align-items: center;
        gap: 50px;
    }

    .services-left h2 {
        font-size: 36px;
    }
}

/* Celulares pequeños */
@media (max-width: 360px) {
    .services-left h2 {
        font-size: 32px;
    }
}

/* ================== CARRUSEL DEL INICIO EN TABLET Y CELULAR ================== */
/* Las fotos del carrusel son horizontales (16:9). Con el alto fijo de 950px el navegador
   las recortaba a los lados: en celular solo se veía ~20% de la foto y en tablet ~50%. */

/* Tablets: el carrusel toma la misma proporción que las fotos, así se ven completas */
@media (max-width: 1024px) {
    .hero {
        /* Alto = proporción 16:9 del ancho (foto completa); mínimo 400px para que entre el texto */
        height: max(400px, 56.25vw);
        padding-top: 70px; /* espacio para el navbar fijo */
    }

    /* Botones legibles sobre la foto (antes: texto azul sobre la imagen) */
    .buttons button {
        background: rgba(255, 255, 255, 0.92);
    }

    .buttons button:hover {
        background: #4FC3F7;
    }
}

/* Celulares: la foto completa arriba y el texto con los botones debajo,
   sobre la misma foto difuminada (la pone script.js en --slide-actual) */
@media (max-width: 480px) {
    .hero {
        height: auto;
        justify-content: flex-start;
        gap: 22px;
        padding: 60px 0 36px; /* 60px: alto del navbar fijo */
        background: #1e293b;
    }

    /* Fondo: la foto actual difuminada y oscurecida */
    .hero::before {
        content: "";
        position: absolute;
        inset: -30px;
        background: var(--slide-actual) center / cover no-repeat;
        filter: blur(18px) brightness(0.55);
        z-index: 0;
    }

    /* Sin la capa gris encima de la foto: ahora el texto no va sobre ella */
    .hero::after {
        display: none;
    }

    .hero > br {
        display: none;
    }

    .hero-image {
        position: relative;
        order: 0;
        height: auto;
        aspect-ratio: 16 / 9;
        z-index: 1;
    }

    .hero-text {
        order: 1;
        padding: 0 20px;
    }

    .hero-text h1 {
        font-size: 1.75rem;
        line-height: 1.25;
        margin-bottom: 8px;
    }

    .hero-text p {
        font-size: 15px;
    }

    .buttons {
        order: 2;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 12px;
        width: 100%;
        padding: 0 20px;
    }

    .buttons button {
        width: 100%;
        max-width: 320px;
        min-height: 46px;
        padding: 10px 20px;
        margin: 0;
        font-size: 16px;
    }
}

/* Celulares pequeños */
@media (max-width: 360px) {
    .hero-text h1 {
        font-size: 1.55rem;
    }
}
