@charset "UTF-8";

/* ==========================================================
   RESPONSIVE.CSS — ONCOSUR
   Versión depurada
   ========================================================== */


/* ==========================================================
   0. PREVENCIÓN DE OVERFLOW
   ========================================================== */

html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

img,
iframe,
video,
svg {
    max-width: 100%;
    height: auto;
}


/* ==========================================================
   1. ESPECIALIDADES — COMPORTAMIENTO GENERAL
   ========================================================== */

.specialties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    justify-content: center;
}


/* ==========================================================
   2. PANTALLAS HASTA 1200 PX
   ========================================================== */

@media screen and (max-width: 1200px) {

    .container {
        width: 90%;
    }

    /* HERO */

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-content {
        text-align: center;
    }

    .hero-buttons {
        justify-content: center;
    }


    /* QUIÉNES SOMOS */

    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-image {
        order: -1;
    }


    /* CONTACTO */

    .contact-grid {
        grid-template-columns: 1fr;
    }


    /* FOOTER */

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

}


/* ==========================================================
   3. TABLET / IPAD — 769 PX A 992 PX
   ========================================================== */

@media screen and (min-width: 769px) and (max-width: 992px) {

    /* ------------------------------------------------------
       ESPECIALIDADES
       ------------------------------------------------------ */

    .specialties-grid > :last-child:nth-child(odd) {
        grid-column: 1 / -1;
        justify-self: center;
        width: 100%;
        max-width: 450px;
    }


    /* ------------------------------------------------------
       TRATAMIENTOS
       Mantener 2 columnas en iPad/tablet
       ------------------------------------------------------ */

    #servicios .services-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 25px;
    }


    /* ------------------------------------------------------
       PROCESO DE ATENCIÓN
       ------------------------------------------------------ */

    .process-timeline {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .process-timeline::before {
        display: none;
    }


    /* ------------------------------------------------------
       TESTIMONIOS
       ------------------------------------------------------ */

    .testimonials-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}


/* ==========================================================
   4. NAVEGACIÓN RESPONSIVE
   TABLET + TELÉFONO
   ========================================================== */

@media screen and (max-width: 992px) {

    /* ------------------------------------------------------
       MENÚ
       ------------------------------------------------------ */

    nav {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);

        background: #ffffff;

        transition: left 0.3s ease;

        padding: 30px 0;

        overflow-y: auto;
        overflow-x: hidden;

        z-index: 999;
    }

    nav.active {
        left: 0;
    }


    /*
       Margen lateral del contenido del menú.
       Evita que "Inicio", "Quiénes Somos", etc.
       queden pegados al borde.
    */

    nav ul {
        display: flex;
        flex-direction: column;
        align-items: stretch;

        width: 100%;

        margin: 0;
        padding-left: 30px;
        padding-right: 30px;

        gap: 0;

        box-sizing: border-box;
    }


    nav ul li {
        width: 100%;

        margin: 0;

        border-bottom: 1px solid #ededed;
    }


    nav ul li a {
        display: block;

        width: 100%;

        padding: 20px 0;

        box-sizing: border-box;
    }


    /* BOTÓN MENÚ HAMBURGUESA */

    .menu-mobile {
        display: block;
    }


    /* BOTÓN DEL HEADER */

    .header-button {
        display: none;
    }


    /* PROCESO */

    .process-timeline::before {
        display: none;
    }

}


/* ==========================================================
   5. MÓVILES — HASTA 768 PX
   ========================================================== */

@media screen and (max-width: 768px) {

    /* ------------------------------------------------------
       SECCIONES
       ------------------------------------------------------ */

    section {
        padding: 60px 0;
    }


    /* ------------------------------------------------------
       HERO
       ------------------------------------------------------ */

    .hero {
        padding-top: 120px;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }


    /* FEATURES DEL HERO */

    .hero-features {
        grid-template-columns: 1fr;
    }


    /* ------------------------------------------------------
       BOTONES DEL HERO
       Dos botones uno al lado del otro
       ------------------------------------------------------ */

    .hero .buttons-container,
    .hero .hero-buttons,
    .hero-btns {
        display: flex !important;

        flex-direction: row !important;

        justify-content: center !important;
        align-items: center !important;

        gap: 10px !important;

        width: 100% !important;
    }


    .hero .buttons-container a,
    .hero .hero-buttons a,
    .hero-btns a,
    .hero .btn {
        flex: 1 1 0 !important;

        width: auto !important;

        text-align: center !important;

        padding: 10px 15px !important;

        font-size: 0.9rem !important;
    }


    /* ------------------------------------------------------
       ESPECIALIDADES
       Una tarjeta por fila
       ------------------------------------------------------ */

    .especialidades .grid,
    .especialidades-container,
    .specialties-grid {
        display: grid !important;

        grid-template-columns: 1fr !important;

        width: 100% !important;

        gap: 20px !important;
    }


    .especialidades .box,
    .especialidades .card,
    .specialty-card {
        width: 100% !important;

        max-width: 100% !important;

        margin-right: 0 !important;

        box-sizing: border-box;
    }


    /* ------------------------------------------------------
       PROCESO DE ATENCIÓN
       ------------------------------------------------------ */

    .process-timeline {
        grid-template-columns: 1fr;
    }


    /* ------------------------------------------------------
       TRATAMIENTOS
       UNA SOLA TARJETA POR FILA
       ------------------------------------------------------ */

    #servicios .services-grid {
        display: grid !important;

        grid-template-columns: 1fr !important;

        width: 100% !important;

        gap: 24px !important;
    }


    #servicios .service-card {
        width: 100% !important;

        max-width: 100% !important;
        min-width: 0 !important;

        margin: 0 !important;

        padding: 35px 25px !important;

        box-sizing: border-box !important;
    }


    /*
       Elimina cualquier comportamiento heredado
       que haga que la última tarjeta ocupe 2 columnas.
    */

    #servicios .services-grid > .service-card:last-child {
        grid-column: auto !important;

        justify-self: stretch !important;

        width: 100% !important;
    }


    /* ------------------------------------------------------
       TESTIMONIOS
       ------------------------------------------------------ */

    .testimonials-grid {
        grid-template-columns: 1fr;
    }


    /* ------------------------------------------------------
       CONTACTO
       ------------------------------------------------------ */

    .contact-grid,
    .contact-info-cards {
        grid-template-columns: 1fr;
    }


    /* ------------------------------------------------------
       CTA
       ------------------------------------------------------ */

    .cta-buttons {
        flex-direction: column;
    }

    .cta-buttons a {
        width: 100%;
        text-align: center;
    }


    /* ------------------------------------------------------
       FOOTER
       ------------------------------------------------------ */

/* ------------------------------------------------------
   FOOTER — TELÉFONOS
   
   Estructura:
   1. Logo + descripción + RRSS → ancho completo
   2. Enlaces + Especialidades → dos columnas paralelas
   3. Contacto → abajo, centrado y ancho completo
   ------------------------------------------------------ */

footer .footer-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    column-gap: 25px !important;
    row-gap: 45px !important;
    width: 100% !important;
}


/* ======================================================
   COLUMNA 1
   LOGO + DESCRIPCIÓN + REDES SOCIALES
   Ocupa todo el ancho
   ====================================================== */

footer .footer-grid > .footer-column:nth-child(1) {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    text-align: center !important;
}

footer .footer-grid > .footer-column:nth-child(1) .footer-logo {
    margin-left: auto !important;
    margin-right: auto !important;
}

footer .footer-grid > .footer-column:nth-child(1) .social-links {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}


/* ======================================================
   COLUMNA 2
   ENLACES — LADO IZQUIERDO
   ====================================================== */

footer .footer-grid > .footer-column:nth-child(2) {
    grid-column: 1 !important;
    width: 100% !important;
    min-width: 0 !important;
    text-align: left !important;
}


/* ======================================================
   COLUMNA 3
   ESPECIALIDADES — LADO DERECHO
   ====================================================== */

footer .footer-grid > .footer-column:nth-child(3) {
    grid-column: 2 !important;
    width: 100% !important;
    min-width: 0 !important;
    text-align: left !important;
}


/* Enlaces y Especialidades conservan estructura vertical */

footer .footer-grid > .footer-column:nth-child(2) ul,
footer .footer-grid > .footer-column:nth-child(3) ul {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    width: 100% !important;
}


/* Títulos alineados con sus listas */

footer .footer-grid > .footer-column:nth-child(2) h3,
footer .footer-grid > .footer-column:nth-child(3) h3 {
    text-align: left !important;
}


/* Línea rosada debajo del título */

footer .footer-grid > .footer-column:nth-child(2) h3::after,
footer .footer-grid > .footer-column:nth-child(3) h3::after {
    margin-left: 0 !important;
    margin-right: auto !important;
}


/* ======================================================
   COLUMNA CONTACTO
   Bloque centrado + información alineada a la izquierda
   ====================================================== */

footer .footer-grid > .footer-column:nth-child(4) {
    grid-column: 1 / -1 !important;

    width: 100% !important;
    max-width: 430px !important;

    justify-self: center !important;

    text-align: center !important;
}


/* TÍTULO CONTACTO */

footer .footer-grid > .footer-column:nth-child(4) h3 {
    text-align: center !important;
}


/* Línea rosada centrada */

footer .footer-grid > .footer-column:nth-child(4) h3::after {
    margin-left: auto !important;
    margin-right: auto !important;
}


/* LISTA DE INFORMACIÓN */

footer .footer-grid > .footer-column:nth-child(4) ul {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;

    width: fit-content !important;
    max-width: 100% !important;

    margin: 30px auto 0 !important;
    padding: 0 !important;

    text-align: left !important;
}


/* CADA DATO */

footer .footer-grid > .footer-column:nth-child(4) ul li {
    display: grid !important;

    /* columna fija para icono + columna para texto */
    grid-template-columns: 28px 1fr !important;

    align-items: start !important;

    column-gap: 12px !important;

    width: 100% !important;

    margin-bottom: 18px !important;

    text-align: left !important;
}


/* ICONOS */

footer .footer-grid > .footer-column:nth-child(4) ul li > i {
    width: 28px !important;

    margin: 0 !important;
    padding-top: 3px !important;

    text-align: center !important;

    justify-self: center !important;
}


/* TEXTO Y ENLACES */

footer .footer-grid > .footer-column:nth-child(4) ul li > span,
footer .footer-grid > .footer-column:nth-child(4) ul li > a {
    margin: 0 !important;

    text-align: left !important;

    justify-self: start !important;
}


/* HORARIO */

footer .footer-grid > .footer-column:nth-child(4) .schedule-item {
    align-items: start !important;
}

footer .footer-grid > .footer-column:nth-child(4) .schedule-item span {
    text-align: left !important;
}
	
	/* CADA DATO DE CONTACTO */

footer .footer-grid > .footer-column:nth-child(4) ul li {
    display: grid !important;

    grid-template-columns: 28px 1fr !important;

    align-items: start !important;

    column-gap: 12px !important;

    width: 100% !important;

    /* DISTANCIA ENTRE CADA APARTADO */
    margin-bottom: 8px !important;

    /* INTERLINEADO DEL TEXTO */
    line-height: 1.1 !important;

    text-align: left !important;
}


/* ======================================================
   PARTE INFERIOR DEL FOOTER
   ====================================================== */

.footer-bottom .container {
    flex-direction: column !important;
    gap: 15px !important;
    text-align: center !important;
}


/* ==========================================================
   6. TELÉFONOS — HASTA 600 PX
   ========================================================== */

@media screen and (max-width: 600px) {

    /* ------------------------------------------------------
       ESTADÍSTICAS
       OCULTAR COMPLETAMENTE EN TELÉFONOS

       HTML:
       <section id="estadisticas" class="stats">
       ------------------------------------------------------ */

    #estadisticas {
        display: none !important;
    }


    /* ------------------------------------------------------
       MENÚ
       ------------------------------------------------------ */

    nav ul {
        padding-left: 30px;
        padding-right: 30px;
    }


    /* ------------------------------------------------------
       HERO
       ------------------------------------------------------ */

    .hero-content h1 {
        font-size: 2rem;
    }

}


/* ==========================================================
   7. MÓVILES PEQUEÑOS — HASTA 480 PX
   ========================================================== */

@media screen and (max-width: 480px) {

    /* ------------------------------------------------------
       CONTENEDOR GENERAL
       ------------------------------------------------------ */

    .container {
        width: 92%;
    }


    /* ------------------------------------------------------
       HERO
       ------------------------------------------------------ */

    .hero-content h1 {
        font-size: 1.8rem;
    }


    /* Botones Hero */

    .hero .buttons-container,
    .hero .hero-buttons,
    .hero-btns {
        gap: 8px !important;
    }


    .hero .buttons-container a,
    .hero .hero-buttons a,
    .hero-btns a,
    .hero .btn {
        padding: 10px 8px !important;

        font-size: 0.82rem !important;
    }


    /* ------------------------------------------------------
       ACORDEÓN
       ------------------------------------------------------ */

    .accordion-header {
        font-size: 0.95rem;
    }

}


/* ==========================================================
   8. PROTECCIÓN FINAL CONTRA DESBORDAMIENTO MÓVIL
   ========================================================== */

@media screen and (max-width: 768px) {

    .container,
    .services-grid,
    .specialties-grid,
    .process-timeline,
    .contact-grid,
    .footer-grid {
        max-width: 100%;
        box-sizing: border-box;
    }


    .service-card,
    .specialty-card,
    .process-item {
        min-width: 0;
        box-sizing: border-box;
    }

}