/* Estilos extraídos de `src/pages/muros-moviles/index.astro`
   (antes en <style is:global>) */

/*
    Muros móviles:
    - Encabezado full-width (100%)
    - Padding-top para evitar contenido oculto bajo el menú
    - Márgenes 5% lateral para contenido (excepto Fotografia y Footer)
*/

/*
    Nota:
    - El full-bleed de `#encabezados-*`, `.container-fluid-responsive` y `.Fotografia-wrapper`
      se gestiona en `src/layouts/Layout.astro` para evitar hacks duplicados (100vw/-50vw)
      que suelen provocar overflow/márgenes “fantasma”.
    - El offset superior para el menú fijo se gestiona en `/public/css/muro-movil.css`.
*/

@media (max-width: 768px) {
    .detalles-calidad-rieles {
        width: 96%;
        max-width: 96%;
        padding: 1.25rem;
    }

    .detalles-calidad-rieles h3 {
        font-size: 1.1rem;
    }

    .detalles-calidad-rieles li {
        font-size: 0.95rem;
        padding-left: 2rem;
    }

    .rieles-container {
        margin-top: 2rem;
    }

    .cuadro-enmarcadon {
        margin-bottom: 2rem;
    }

    .card-title-riel {
        font-size: 1.25rem;
    }

    .card-header-riel {
        padding: 1rem;
    }

    .rieles-tarjetas-container {
        width: 96%;
        max-width: 96%;
    }

    .rieles-tarjetas-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .riel-img {
        height: 260px;
    }

    .riel-descripcion {
        font-size: 0.95rem;
    }

    .detalles-calidad-guardado {
        padding: 1.25rem;
    }

    .detalles-calidad-guardado h3 {
        font-size: 1.1rem;
    }

    .detalles-calidad-guardado li {
        font-size: 0.95rem;
        padding-left: 2rem;
    }

    .ensayos-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        width: 96%;
        max-width: 96%;
    }

    .ensayo-imagen-placeholder {
        height: 200px;
    }

    .ensayo-card h3 {
        font-size: 1.15rem;
        margin: 1rem 1rem 0.75rem;
    }

    .ensayo-descripcion {
        font-size: 0.95rem;
        margin: 0 1rem 1rem;
    }

    .btn-leer-mas {
        margin: 0 1rem 1rem;
        padding: 0.65rem 1.25rem;
        font-size: 0.95rem;
    }
}

/* Alineación icono + texto (Características) */
.caracteristicas-producto {
    line-height: 1.65;
}

.caracteristicas-producto svg {
    display: inline-block;
    margin-right: 6px !important;
    vertical-align: -0.125em !important;
}

/* Grid de Módulos - Nuevo diseño con columnas */
.murosmodulos-grid-new {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    margin-top: 3rem;
}

.murosmodulo-new {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.murosmodulo-new:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.murosmodulo-img-container {
    width: 100%;
    height: 350px;
    overflow: hidden;
    background: transparent;
}

.murosmodulo-img-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    padding: 1rem;
}

.murosmodulo-texto-new {
    padding: 1.5rem;
}

.murosmodulo-texto-new h4 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 1rem;
    border-bottom: 3px solid #0066cc;
    padding-bottom: 0.5rem;
}

.murosmodulo-texto-new p {
    font-size: 1rem;
    line-height: 1.6;
    color: #4a4a4a;
    margin-bottom: 0;
}

/* Detalles de calidad (módulo telescópico) */
.modulo-detalles-calidad {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: transparent;
    border-left: 4px solid #0066cc;
    border-radius: 8px;
}

.modulo-detalles-calidad h5 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0066cc;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modulo-detalles-calidad ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.modulo-detalles-calidad li {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #2c2c2c;
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
    position: relative;
}

.modulo-detalles-calidad li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #0066cc;
    font-weight: 900;
    font-size: 1.2rem;
}

.modulo-detalles-calidad strong {
    color: #0066cc;
    font-weight: 600;
}

/* Variaciones - Ocupa todo el ancho */
.murosmodulo-variaciones {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 60% 40%;
    gap: 2rem;
    align-items: center;
}

.imagenes-variaciones-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.variacion-img {
    background: transparent;
    border-radius: 8px;
    overflow: hidden;
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.variacion-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 1rem;
    text-align: center;
}

/* Detalles de calidad de rieles */
.detalles-calidad-rieles {
    width: 90%;
    max-width: 90%;
    margin: 2rem auto;
    padding: 1.5rem;
    background: transparent;
    border-left: 4px solid #0066cc;
    border-radius: 8px;
}

.detalles-calidad-rieles h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #0066cc;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detalles-calidad-rieles ol {
    list-style: none;
    counter-reset: item;
    padding-left: 0;
    margin: 0;
}

.detalles-calidad-rieles li {
    font-size: 1rem;
    line-height: 1.7;
    color: #2c2c2c;
    margin-bottom: 1rem;
    padding-left: 2.5rem;
    position: relative;
    counter-increment: item;
}

.detalles-calidad-rieles li:before {
    content: counter(item) ".";
    position: absolute;
    left: 0;
    color: #0066cc;
    font-weight: 900;
    font-size: 1.3rem;
}

.detalles-calidad-rieles strong {
    color: #0066cc;
    font-weight: 600;
}

/* Espaciado para tarjetas de rieles */
.rieles-container {
    margin-top: 3rem;
}

/* Nuevo contenedor para tarjetas de rieles con 90% ancho */
.rieles-tarjetas-container {
    width: 90%;
    max-width: 90%;
    margin: 0 auto;
    padding: 0;
}

.rieles-tarjetas-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.riel-tarjeta {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.riel-tarjeta:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* Estilos para títulos de tarjetas de rieles */
.card-header-riel {
    background: linear-gradient(135deg, #0066cc 0%, #004d99 100%);
    padding: 1.25rem;
    border-radius: 12px 12px 0 0;
}

.card-title-riel {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.riel-tarjeta-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.riel-img {
    width: 100%;
    height: clamp(280px, 28vw, 420px);
    object-fit: contain;
    margin-bottom: 1rem;
}

.riel-descripcion {
    font-size: 1rem;
    line-height: 1.6;
    color: #4a4a4a;
    text-align: justify;
    margin: 0;
}

/* Detalles de calidad para guardado de módulos */
.detalles-calidad-guardado {
    width: 100%;
    margin: 0 0 2rem 0;
    padding: 1.5rem;
    background: transparent;
    border-left: 4px solid #0066cc;
    border-radius: 8px;
}

.detalles-calidad-guardado h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #0066cc;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detalles-calidad-guardado ol {
    list-style: none;
    counter-reset: item;
    padding-left: 0;
    margin: 0;
}

.detalles-calidad-guardado li {
    font-size: 1rem;
    line-height: 1.7;
    color: #2c2c2c;
    margin-bottom: 1rem;
    padding-left: 2.5rem;
    position: relative;
    counter-increment: item;
}

.detalles-calidad-guardado li:before {
    content: counter(item) ".";
    position: absolute;
    left: 0;
    color: #0066cc;
    font-weight: 900;
    font-size: 1.3rem;
}

.detalles-calidad-guardado strong {
    color: #0066cc;
    font-weight: 600;
}

/* Sección Resistencia al Fuego - Full Width */
.resistencia-fuego-fullwidth {
    position: relative;
    padding: 4rem 0;
    overflow: hidden;
}

.fire-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #ff4500 0%, #ff8c00 25%, #ffa500 50%, #ff6347 75%, #ff4500 100%);
    background-size: 400% 400%;
    animation: fireGradient 8s ease infinite;
    z-index: 0;
}

.fire-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 100%, rgba(255, 69, 0, 0.3) 0%, transparent 70%);
    animation: fireFlicker 3s ease-in-out infinite;
    z-index: 1;
}

@keyframes fireGradient {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes fireFlicker {

    0%,
    100% {
        opacity: 0.6;
    }

    50% {
        opacity: 0.9;
    }
}

.resistencia-fuego-content-wrapper {
    position: relative;
    z-index: 2;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5%;
}

.resistencia-fuego-title {
    position: relative;
    z-index: 2;
    text-align: center;
    margin-bottom: 2rem;
    color: #ffffff;
}

.resistencia-fuego-contenido {
    position: relative;
    z-index: 2;
    max-width: 1000px;
    margin: 0 auto;
    background: linear-gradient(135deg,
            rgba(255, 69, 0, 0.15) 0%,
            rgba(255, 140, 0, 0.15) 25%,
            rgba(255, 165, 0, 0.15) 50%,
            rgba(255, 99, 71, 0.15) 75%,
            rgba(255, 69, 0, 0.15) 100%);
    background-size: 400% 400%;
    animation: fireGradient 8s ease infinite;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.texto-centrado {
    text-align: center;
    line-height: 1.8;
    color: #ffffff;
    font-weight: 500;
}

/* Sección de Descarga */
.descarga-section {
    margin: 3rem 0;
}

.descarga-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.descarga-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 2.5rem 2rem;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 280px;
}

.descarga-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(0, 102, 204, 0.2);
    text-decoration: none;
}

.descarga-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #0066cc 0%, #004d99 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.descarga-card:hover .descarga-icon {
    background: linear-gradient(135deg, #004d99 0%, #003366 100%);
    transform: scale(1.1);
}

.descarga-icon svg {
    color: #ffffff;
}

.descarga-titulo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.descarga-descripcion {
    font-size: 1rem;
    line-height: 1.6;
    color: #666;
    margin: 0;
}

/* Video autoplay con Intersection Observer */
.video-acustica {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Estilos para Ensayos y Pruebas */
.ensayos-pruebas-section {
    margin-top: 4rem;
    margin-bottom: 4rem;
}

.ensayos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin: 3rem auto;
    width: 90%;
    max-width: 90%;
}

.ensayo-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.ensayo-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.ensayo-imagen-placeholder {
    width: 100%;
    height: 250px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-content {
    text-align: center;
    color: #999;
}

.placeholder-content svg {
    color: #0066cc;
    margin-bottom: 1rem;
}

.placeholder-content p {
    font-size: 0.9rem;
    font-style: italic;
}

.ensayo-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 1.5rem 1.5rem 1rem;
    border-bottom: 3px solid #0066cc;
    padding-bottom: 0.5rem;
}

.ensayo-descripcion {
    font-size: 1rem;
    line-height: 1.6;
    color: #4a4a4a;
    margin: 0 1.5rem 1.5rem;
    text-align: justify;
    flex-grow: 1;
}

.btn-leer-mas {
    display: inline-block;
    margin: 0 1.5rem 1.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #0066cc 0%, #004d99 100%);
    color: #ffffff !important;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
}

.btn-leer-mas:hover {
    background: linear-gradient(135deg, #004d99 0%, #003366 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
    color: #ffffff !important;
    text-decoration: none;
}

/* Galería de Proyectos styleMOVE */
.galeria-proyectos-stylemove {
    margin: 3rem 0;
}

.galeria-proyectos-stylemove .section-title {
    margin-bottom: 3rem;
}

.proyectos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.proyecto-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.proyecto-item a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.proyecto-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);

    .descarga-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .descarga-card {
        min-height: 240px;
        padding: 2rem 1.5rem;
    }

    .descarga-icon {
        width: 64px;
        height: 64px;
        margin-bottom: 1rem;
    }

    .descarga-icon svg {
        width: 36px;
        height: 36px;
    }

    .descarga-titulo {
        font-size: 1.25rem;
    }

    .descarga-descripcion {
        font-size: 0.95rem;
    }
}

.proyecto-imagen-wrapper {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
}

.proyecto-imagen {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.proyecto-item:hover .proyecto-imagen {
    transform: scale(1.1);
}

.proyecto-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.6) 70%, transparent 100%);
    color: #ffffff;
    padding: 1.5rem 1.25rem 1rem;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    text-align: left;
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* Títulos más notables (solo página Muros Móviles) */
.sw-title-notable {
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    font-size: clamp(1.6rem, 2.6vw, 2.6rem);
    margin-bottom: 1rem;
}

.sw-section-title-notable {
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    font-size: clamp(1.4rem, 2.2vw, 2.1rem);
    margin-top: 1.25rem;
    margin-bottom: 1rem;
    padding-left: 0.75rem;
    border-left: 6px solid currentColor;
}

/* ==========================================================
   Encabezados con fondo a 100% del ancho del viewport
   (full-bleed background, texto alineado al contenedor)
   ========================================================== */
:root {
    --sw-heading-fullbleed-bg: rgba(0, 0, 0, 0.055);
}

.sw-mm-page .h1-seo,
.sw-mm-page .section-title,
.sw-mm-page .productos-series-titulo,
.sw-mm-page .display-4,
.sw-mm-page .cuadro-enmarcado>h2,
.sw-mm-page .cuadro-enmarcado>h3 {
    position: relative;
    isolation: isolate;
    z-index: 0;
    padding-block: 0.35rem;
}

.sw-mm-page .h1-seo::before,
.sw-mm-page .section-title::before,
.sw-mm-page .productos-series-titulo::before,
.sw-mm-page .display-4::before,
.sw-mm-page .cuadro-enmarcado>h2::before,
.sw-mm-page .cuadro-enmarcado>h3::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    background: var(--sw-heading-fullbleed-bg);
    z-index: -1;
}

/* Responsive */
@media (max-width: 1200px) {
    .murosmodulos-grid-new {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    .murosmodulo-img-container {
        height: 300px;
    }

    .murosmodulo-variaciones {
        grid-template-columns: 1fr;
    }

    .imagenes-variaciones-container {
        grid-template-columns: repeat(3, 1fr);
    }

    .ensayos-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .rieles-tarjetas-grid {
        grid-template-columns: 1fr;
    }

    .proyectos-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .proyecto-imagen-wrapper {
        height: 300px;
    }
}

@media (max-width: 768px) {
    .murosmodulos-grid-new {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .murosmodulo-img-container {
        height: 280px;
    }

    .imagenes-variaciones-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .variacion-img {
        height: 240px;
    }

    .section-title {
        font-size: 2rem;
    }

    .modulo-detalles-calidad {
        padding: 1rem;
    }

    .modulo-detalles-calidad li {
        font-size: 0.9rem;
    }

    .proyectos-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .proyecto-imagen-wrapper {
        height: 280px;
    }

    .proyecto-caption {
        font-size: 0.95rem;
        padding: 1.25rem 1rem 0.85rem;
    }
}