/* =====================================================================
   SUMITCA · responsive.css
   Ajustes SOLO para tablet y móvil (≤ 992px). El escritorio no cambia.
   Se carga DESPUÉS de todos los estilos de la página (ver welcome.blade.php)
   ===================================================================== */

/* ---------------------------------------------------------------------
   0. BASE MÓVIL
   --------------------------------------------------------------------- */
@media (max-width: 992px) {

    html,
    body {
        overflow-x: clip;               /* sin scroll lateral (no rompe el header sticky) */
    }

    body {
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }

    img,
    video {
        max-width: 100%;
    }

    /* -------- Hero principal (header.blade.php) -------- */
    .hero-slider {
        height: 70vh;
        height: 70svh;
        min-height: 380px;
    }

    .slide-home img,
    .slide-home video {
        width: 100%;
        height: 100%;
        object-fit: cover;              /* sin deformar la foto ni desbordar el video */
        display: block;
    }

    .triangle-separator {
        height: 90px;
        margin-top: -90px;
    }

    /* -------- Quiénes somos / Misión (ente.blade.php) -------- */
    .smt-figure::before {
        inset: 12px -12px -12px 12px;
    }

    .smt-figure:hover::before {
        inset: 12px -12px -12px 12px;
    }

    .smt-figure:hover .smt-figure__img {
        transform: none;
    }

    .smt-stat {
        left: 12px;
        bottom: 14px;
    }

    /* -------- Marco legal: carrusel deslizable con el dedo (bannerOrdenanza) -------- */
    .ordenanza-wrapper {
        padding: 56px 20px;
        gap: 28px;
    }

    .container-ordenanza {
        padding: 0;
        border-radius: 18px;
    }

    .track-ordenanza {
        transform: none !important;     /* el JS de las flechas no aplica en móvil */
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scroll-padding-left: 20px;
        padding: 20px;
        gap: 14px;
        scrollbar-width: none;
    }

    .track-ordenanza::-webkit-scrollbar {
        display: none;
    }

    .grid-ordenanza {
        flex: 0 0 240px;
        scroll-snap-align: start;
    }

    .arrow-btn {
        display: none;
    }

    /* En pantallas táctiles no hay hover: mostramos la descripción siempre */
    .card-overlay {
        transform: none;
    }

    .card-overlay p {
        opacity: 1;
        transform: none;
        max-height: none;
        margin-top: 6px;
    }

    .grid-ordenanza:hover .card-ordenanza {
        transform: none;
    }

    .grid-ordenanza:hover .card-img {
        transform: none;
        opacity: .9;
    }

    /* -------- Hero "Somos SUMITCA" (slider.blade.php) -------- */
    .hero3 {
        min-height: 0;
    }

    .hero3__inner {
        padding: 96px 24px 104px;
    }
}

/* ---------------------------------------------------------------------
   1. TABLET Y MÓVIL (≤ 900px)
   --------------------------------------------------------------------- */
@media (max-width: 900px) {

    /* -------- Boletín (noticias.blade.php) -------- */
    .custom-news-wrapper {
        padding: 64px 24px;
    }

    .custom-news-wrapper .cn-news-section {
        gap: 16px;
    }

    .custom-news-wrapper .cn-news-item {
        margin-bottom: 0;
        height: 320px;
    }

    .custom-news-wrapper .cn-news-overlay {
        min-width: 0;
        height: auto;
        padding: 64px 18px 18px;
        background: linear-gradient(to top, rgba(15, 23, 42, .97) 0%, rgba(15, 23, 42, .8) 55%, transparent 100%);
    }

    .custom-news-wrapper .cn-news-category {
        font-size: .72rem;
        padding: 5px 12px;
        margin-bottom: 10px;
    }

    .custom-news-wrapper .cn-news-title {
        font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        font-size: 1.15rem;
        line-height: 1.3;
        margin-bottom: 6px;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
    }

    .custom-news-wrapper .cn-news-excerpt {
        font-size: .88rem;
        height: auto;
        max-width: none;
        margin: 0 0 10px;
        opacity: .9;
    }

    .custom-news-wrapper .cn-news-date {
        font-size: .8rem;
    }

    .custom-news-wrapper .cn-news-play {
        width: 52px;
        height: 52px;
        top: 38%;
    }
}

/* ---------------------------------------------------------------------
   2. MÓVIL (≤ 768px)
   --------------------------------------------------------------------- */
@media (max-width: 768px) {

    /* -------- Barra superior y menú (cabecera.blade.php) -------- */
    .header {
        padding: 12px 18px;
    }

    .logo img {
        height: 28px;
    }

    .menu-toggle {
        width: 42px;
        height: 42px;
        display: grid;
        place-items: center;
        border-radius: 10px;
        font-size: 24px;
        line-height: 1;
        color: #0f172a;
        transition: background .2s ease;
    }

    .menu-toggle:active {
        background: #eef3fb;
    }

    .menu {
        top: calc(100% + 8px);
        left: 12px;
        right: 12px;
        width: auto;
        max-height: calc(100vh - 90px);
        overflow-y: auto;
        padding: 10px 16px 16px;
        border-radius: 14px;
    }

    .menu a {
        margin: 0;
        padding: 13px 0;
        font-size: 1rem;
        border-bottom: 1px solid #eef1f6;
    }

    .menu a:not(.btn)::after {
        display: none;
    }

    .menu .btn {
        margin-top: 14px;
        padding: 13px 14px;
        border-bottom: 0;
        border-radius: 10px;
    }

    .submenu li a {
        padding: 11px 14px;
        font-size: .95rem;
        border-bottom: 0;
        white-space: normal;
    }

    /* -------- Hero principal -------- */
    .hero-slider {
        height: 56vh;
        height: 56svh;
        min-height: 320px;
    }

    /* -------- Quiénes somos / Misión -------- */
    .smt-title {
        font-size: clamp(1.9rem, 8.4vw, 2.4rem);
    }

    .smt-text {
        font-size: 1rem;
        line-height: 1.75;
    }

    .smt-btn {
        width: 100%;
        justify-content: center;
    }

    /* -------- Política y Servicios (about.blade.php) -------- */
    .seccion-servicios {
        padding: 56px 20px;
    }

    .titulo-seccion {
        font-size: 1.85rem;
        line-height: 1.2;
        margin-bottom: 28px;
    }

    .titulo-seccion::before {
        display: none;                  /* la barra azul quedaba pegada al borde de la pantalla */
    }

    .cuadricula-servicios {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .tarjeta-servicio {
        padding: 26px 18px;
        border-radius: 16px;
    }

    .icono-servicio {
        width: 52px;
        height: 52px;
        margin-bottom: 12px;
        border-radius: 14px;
        background: #eef4ff;
    }

    .icono-servicio svg {
        width: 28px;
        height: 28px;
    }

    .titulo-servicio {
        font-size: 1.05rem;
        margin-bottom: 8px;
    }

    .texto-servicio {
        font-size: .9rem;
        line-height: 1.55;
    }

    /* -------- Marco legal -------- */
    .info-side {
        padding: 0;
        margin-bottom: 0;
    }

    .info-side h2 {
        font-size: 1.8rem;
    }

    .info-side p {
        font-size: .98rem;
        margin-bottom: 20px;
    }

    .btn-info-primary {
        padding: 13px 26px;
    }

    /* -------- Ubicación (map.blade.php) -------- */
    .cov {
        padding: 64px 20px;
    }

    .cov-title {
        font-size: clamp(1.9rem, 8.6vw, 2.5rem);
    }

    .cov-eyebrow {
        margin-bottom: 16px;
    }

    .cov-btn {
        min-width: 0;
    }

    /* -------- Hero "Somos SUMITCA" -------- */
    .hero3__word {
        font-size: clamp(2.4rem, 12vw, 3.4rem);
    }

    .hero3__sub {
        font-size: 1rem;
        margin: 20px 0 0;
    }

    /* -------- Botón flotante de WhatsApp -------- */
    .whatsapp-float {
        width: 54px;
        height: 54px;
        right: 16px;
        bottom: 18px;
        bottom: calc(18px + env(safe-area-inset-bottom));
    }

    .whatsapp-float img {
        width: 28px;
        height: 28px;
    }
}

/* ---------------------------------------------------------------------
   3. TELÉFONOS (≤ 600px)
   --------------------------------------------------------------------- */
@media (max-width: 600px) {

    /* -------- Boletín: tarjetas a todo lo ancho -------- */
    .custom-news-wrapper {
        padding: 56px 18px 64px;
    }

    .custom-news-wrapper article {
        padding: 0;
        margin-bottom: 28px !important;
    }

    .custom-news-wrapper h1 {
        font-size: 2.3rem;
        margin-bottom: 10px;
    }

    .custom-news-wrapper .cn-subtitle {
        font-size: .98rem;
        line-height: 1.55;
        max-width: 340px;
    }

    .custom-news-wrapper .cn-news-item {
        height: 300px;
    }

    /* -------- Servicios: una columna, icono a la izquierda -------- */
    .cuadricula-servicios {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .tarjeta-servicio {
        display: grid;
        grid-template-columns: 52px 1fr;
        column-gap: 16px;
        align-items: start;
        text-align: left;
        padding: 20px 18px;
    }

    .icono-servicio {
        grid-row: span 2;
        margin-bottom: 0;
    }

    .titulo-servicio {
        margin: 2px 0 6px;
    }

    /* -------- Marco legal -------- */
    .ordenanza-wrapper {
        padding: 48px 16px;
    }

    .grid-ordenanza {
        flex-basis: 78%;
    }

    .card-ordenanza {
        height: 320px;
    }

    .card-overlay {
        padding: 22px 18px;
    }

    .card-overlay h3 {
        font-size: 1.2rem;
    }

    /* -------- Ubicación -------- */
    .cov {
        padding: 56px 18px;
    }

    .cov-acts {
        flex-direction: column;
    }

    .cov-btn {
        width: 100%;
        flex: none;
    }

    .cov-r__v {
        font-size: .95rem;
    }

    /* -------- Quiénes somos -------- */
    .smt-section {
        padding: 56px 18px;
    }

    .smt-glass {
        padding: 30px 22px;
        border-radius: 18px;
    }

    .smt-figure__img {
        height: 340px;
    }

    .smt-collage {
        height: 380px;
    }

    /* -------- Hero "Somos SUMITCA" -------- */
    .hero3__inner {
        padding: 88px 20px 96px;
    }
}

/* ---------------------------------------------------------------------
   4. TELÉFONOS PEQUEÑOS (≤ 380px)
   --------------------------------------------------------------------- */
@media (max-width: 380px) {

    .header {
        padding: 10px 14px;
    }

    .logo img {
        height: 25px;
    }

    .custom-news-wrapper {
        padding-left: 14px;
        padding-right: 14px;
    }

    .custom-news-wrapper .cn-news-item {
        height: 280px;
    }

    .custom-news-wrapper .cn-news-title {
        font-size: 1.05rem;
    }

    .seccion-servicios,
    .smt-section,
    .cov {
        padding-left: 16px;
        padding-right: 16px;
    }
}
