/* =============================================
         PÁGINA: BLOQUES 
============================================= */
.bloques-galeria {
    max-width: 1320px;
    margin: auto;
    padding: 88px 5% 0;
}

.bloques-seccion-intro {
    max-width: 1200px;
    margin: 0 auto 32px;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 32px;
}

.bloques-eyebrow {
    display: block;
    color: #2966c4;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .16em;
    margin-bottom: 12px;
}

.bloques-seccion-intro h2 {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(1.7rem, 3vw, 2.6rem);
    line-height: 1.2;
    color: #12345b;
    margin: 0;
    max-width: 620px;
}

.bloques-seccion-intro > p {
    max-width: 350px;
    margin: 0;
    line-height: 1.75;
    color: #627184;
}

.bloques-carrusel {
    border-radius: 22px;
    overflow: hidden;
    background: white;
    border: 1px solid #e1e7ef;
    box-shadow: 0 18px 45px #12345b0d;
}

.bloques-pista {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: #2966c4 #eaf0f6;
}

.bloques-slide {
    flex: 0 0 100%;
    min-width: 0;
    margin: 0;
    position: relative;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    background: #eaf0f6;
}

.bloques-slide > img {
    display: block;
    width: 100%;
    height: clamp(320px, 43vw, 550px);
    object-fit: cover;
}

.bloques-slide figcaption {
    position: absolute;
    inset: auto 0 0;
    padding: 80px 40px 34px;
    background: linear-gradient(transparent, #0b2138ed);
    color: white;
    pointer-events: none;
}

.bloques-slide figcaption span {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .15em;
    color: #ffcb11;
}

.bloques-slide figcaption h3 {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(1.4rem, 3vw, 2rem);
    margin: 10px 0;
}

.bloques-slide figcaption p {
    margin: 0;
    line-height: 1.6;
    color: #e2e9f1;
}

.bloques-controles {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 20px 28px;
}

.bloques-controles[hidden] {
    display: none;
}

.bloques-miniaturas {
    display: flex;
    gap: 10px;
}

.bloques-miniaturas button {
    width: 66px;
    height: 52px;
    border: 2px solid transparent;
    background: #eaf0f6;
    padding: 3px;
    border-radius: 9px;
    cursor: pointer;
    opacity: .6;
}

.bloques-miniaturas button[aria-current="true"] {
    opacity: 1;
    border-color: #2966c4;
}

.bloques-miniaturas img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.bloques-navegacion {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bloques-contador {
    color: #627184;
    font-size: .85rem;
    white-space: nowrap;
    margin-right: 12px;
    font-variant-numeric: tabular-nums;
}

.bloques-navegacion button {
    width: 46px;
    height: 46px;
    border: 1px solid #dce3ed;
    border-radius: 50%;
    background: white;
    color: #12345b;
    font-size: 1.4rem;
    cursor: pointer;
}

.bloques-navegacion button:hover {
    background: #ffcb11;
    border-color: #ffcb11;
}

.bloques-carrusel :focus-visible {
    outline: 3px solid #2966c4;
    outline-offset: -3px;
}

.bloques-productos .bloques-slide > img {
    object-fit: contain;
    height: clamp(320px, 38vw, 460px);
    padding: 28px;
}

.bloques-productos .bloques-slide figcaption {
    position: static;
    padding: 24px 32px;
    background: #12345b;
    border-top: 4px solid #ffcb11;
}

.main-bloques .contenedor-grilla {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
}

.galeria-fotos-bloques {
    width: 100%;
    margin: 0;
    padding: 88px 0 112px;
    background: #f4f7fa;
}

.galeria-fotos-bloques .bloques-seccion-intro {
    max-width: 1200px;
    padding: 0 5%;
}

.galeria-fotos-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    grid-template-rows: repeat(2, minmax(260px, 1fr));
    gap: 0;
    min-height: 720px;
}

.foto-bloque {
    position: relative;
    min-height: 360px;
    margin: 0;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: #eaf0f6;
    box-shadow: 0 18px 45px #12345b0d;
}

.foto-bloque-destacada {
    grid-column: 1;
    grid-row: span 2;
    min-height: 0;
}

.foto-bloque-pista {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 0;
}

.foto-bloque-pista img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #f7f9fb;
    opacity: 0;
    animation: carrusel-foto-bloque var(--duracion-carrusel) ease-in-out infinite;
}

.foto-bloque-pista img:nth-child(2) {
    animation-delay: calc(var(--duracion-carrusel) / -3);
}

.foto-bloque-pista img:nth-child(3) {
    animation-delay: calc(var(--duracion-carrusel) / -1.5);
}

@keyframes carrusel-foto-bloque {
    0%, 27% { opacity: 1; }
    38%, 100% { opacity: 0; }
}

.foto-bloque figcaption {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    gap: 6px;
    padding: 54px 24px 22px;
    color: #fff;
    background: linear-gradient(transparent, #0b2138e8);
}

.foto-bloque figcaption span {
    color: #ffcb11;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .15em;
}

.foto-bloque figcaption strong {
    font-family: 'Poppins', sans-serif;
    font-size: 1.15rem;
}

@media (max-width: 640px) {
    .bloques-galeria {
        padding-top: 56px;
    }

    .bloques-seccion-intro {
        flex-direction: column;
        align-items: start;
        gap: 18px;
    }

    .bloques-seccion-intro > p {
        max-width: none;
    }

    .bloques-slide figcaption {
        padding: 70px 22px 24px;
    }

    .bloques-controles {
        flex-wrap: wrap;
        padding: 16px;
        gap: 16px;
    }

    .bloques-miniaturas {
        gap: 7px;
    }

    .bloques-miniaturas button {
        width: 53px;
        height: 46px;
    }

    .bloques-navegacion {
        margin-left: auto;
    }

    .main-bloques .hero-arquitectura {
        padding: 64px 5%;
    }

    .main-bloques .hero-arquitectura h1 {
        font-size: 2.25rem;
    }

    .galeria-fotos-bloques {
        padding-top: 56px;
        padding-bottom: 76px;
    }

    .galeria-fotos-grid {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(3, 280px);
        min-height: 0;
    }

    .foto-bloque,
    .foto-bloque-destacada {
        grid-column: auto;
        grid-row: auto;
        min-height: 280px;
    }

    .main-bloques .encabezado-tecnico {
        flex-wrap: wrap;
        gap: 10px;
    }
}

.main-bloques {
    background-color: #fafbfc; /* Un gris muy, muy claro, casi blanco */
    font-family: sans-serif;
    color: #333;
    border-top: 5px solid #2966C4; /* Línea superior con azul corporativo */
}

/* =============================================
   NUEVO HERO (Versión Compacta)
============================================= */
/* =============================================
   NUEVO HERO (Compacto + Carrusel Automático)
============================================= */
.hero-arquitectura {
    position: relative;
    /* Redujimos drásticamente el padding superior e inferior */
    padding: 80px 5% 100px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; /* Evita que el zoom de las fotos ensanche la página */
}




/* --- ESTILOS DEL CARRUSEL DE FONDO OPTIMIZADO --- */
.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;

    /* El CSS multiplica automáticamente (ej. 3 * 6s = 18s total) */
    animation: animacionCarrusel calc(var(--tiempo-por-foto) * var(--total-fotos)) infinite linear;

    /* El CSS calcula el retraso según el turno de la foto (ej. 1 * 6s = 6s) */
    animation-delay: calc(var(--tiempo-por-foto) * var(--i));
}

/* La animación se queda igual */
@keyframes animacionCarrusel {
    0% { opacity: 0; transform: scale(1); }
    5% { opacity: 1; }
    33% { opacity: 1; }
    38% { opacity: 0; transform: scale(1.08); }
    100% { opacity: 0; transform: scale(1.08); }
}

/* --- CAPAS Y CONTENIDO --- */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* HEMOS CAMBIADO EL GRADIENTE AZUL POR UN GRADIENTE GRIS OSCURO/NEGRO */
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8) 0%, rgba(30, 30, 30, 0.6) 100%);
    z-index: 1;
}



.badge-ingenieria {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: rgba(255, 203, 17, 0.2);
    color: #FFCB11;
    border: 1px solid #FFCB11;
    padding: 6px 16px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-radius: 50px;
    margin-bottom: 15px;
}

.hero-arquitectura h1 {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(2rem, 3.5vw, 3rem);
    line-height: 1.1;
    margin-bottom: 15px;
    text-shadow: 0 4px 15px rgba(0,0,0,0.3);
}


.hero-arquitectura p {
    font-size: 1rem;
    color: #e2e9f1;
    line-height: 1.5;
    max-width: 650px;
    margin: 0 auto 25px;
}

/* --- BOTONES --- */
.hero-botones {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-hero-primario, .btn-hero-secundario {
    padding: 10px 24px;
    font-size: 0.9rem;
    font-weight: bold;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-hero-primario {
    background-color: #FFCB11;
    color: #12345b;
    box-shadow: 0 4px 15px rgba(255, 203, 17, 0.4);
}

.btn-hero-primario:hover {
    background-color: #ffdc4d;
    transform: translateY(-2px);
}

.btn-hero-secundario {
    background-color: transparent;
    color: #ffffff;
    border: 2px solid #ffffff;
}

.btn-hero-secundario:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}


.hero-contenido {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    color: #ffffff;
}



.hero-arquitectura h1 {
    font-family: 'Poppins', sans-serif;
    /* Tamaño de título reducido */
    font-size: clamp(2rem, 3.5vw, 3rem);
    line-height: 1.1;
    margin-bottom: 15px;
    text-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.texto-resaltado {
    color: #FFCB11;
}

.hero-arquitectura p {
    font-size: 1rem; /* Texto de párrafo más pequeño */
    color: #e2e9f1;
    line-height: 1.5;
    max-width: 650px;
    margin: 0 auto 25px;
}

/* Botones del Hero más compactos */
.hero-botones {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-hero-primario, .btn-hero-secundario {
    padding: 10px 24px; /* Botones menos altos */
    font-size: 0.9rem;
    font-weight: bold;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-hero-primario {
    background-color: #FFCB11;
    color: #12345b;
    box-shadow: 0 4px 15px rgba(255, 203, 17, 0.4);
}

.btn-hero-primario:hover {
    background-color: #ffdc4d;
    transform: translateY(-2px);
}

.btn-hero-secundario {
    background-color: transparent;
    color: #ffffff;
    border: 2px solid #ffffff;
}

.btn-hero-secundario:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* =============================================
   BARRA DE DATOS FLOTANTE (Más delgada)
============================================= */
.barra-datos-fabrica.flotante {
    background-color: transparent;
    padding: 0 5%;
    position: relative;
    margin-top: -45px; /* Sube menos porque la barra es más delgada */
    z-index: 10;
}

.contenedor-datos {
    background-color: #ffffff;
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    border-radius: 8px; /* Bordes ligeramente menos curvos */
    box-shadow: 0 10px 30px rgba(18, 52, 91, 0.1);
    padding: 20px 30px; /* Caja más delgada */
    border-bottom: 3px solid #2966C4;
}

.dato-item {
    display: flex;
    align-items: center;
    gap: 15px; /* Menos separación entre icono y texto */
    flex: 1;
    justify-content: center;
}

.icono-box {
    background-color: #f1f5f9;
    width: 45px; /* Iconos más pequeños */
    height: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    color: #2966C4;
    font-size: 1.2rem; /* Tamaño de icono reducido */
    transition: transform 0.3s ease;
}

.dato-item:hover .icono-box {
    background-color: #2966C4;
    color: whitesmoke;
    transform: scale(1.1);
}

.divisor-vertical {
    width: 1px;
    height: 35px; /* Línea divisoria más corta */
    background-color: #e2e8f0;
}

.dato-texto strong {
    display: block;
    font-size: 0.95rem; /* Texto un poco más pequeño */
    color: #12345b;
}

.dato-texto span {
    font-size: 0.8rem;
    color: #64748b;
}

/* Responsive para la barra flotante */
@media (max-width: 900px) {
    .contenedor-datos {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        padding: 20px;
    }

    .divisor-vertical {
        display: none;
    }

    .dato-item {
        justify-content: flex-start;
        width: 100%;
    }

    .barra-datos-fabrica.flotante {
        margin-top: -30px;
    }
}
/* --- CATÁLOGO TÉCNICO (LA GRILLA) --- */
.seccion-catalogo-tecnico {
    padding: 80px 5%;
}

.contenedor-grilla {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
}

/* --- TARJETA DEL BLOQUE --- */
.tarjeta-bloque {
    background-color: #ffffff;
    border: 1px solid #e1e5eb; /* Borde gris muy sutil */
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.tarjeta-bloque:hover {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
    border-color: #A7C7E7; /* El borde se pinta de azul claro al pasar el mouse */
}

/* LA ZONA DE LA FOTO */
.bloque-visual {
    position: relative;
    height: 250px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e1e5eb;
    overflow: hidden;
}

/* El papel milimetrado detrás de la foto del bloque */
.fondo-cuadricula {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(rgba(41, 102, 196, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(41, 102, 196, 0.08) 1px, transparent 1px);
    background-size: 20px 20px;
    z-index: 1;
}

.tag-medida {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: #111;
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 4px;
    z-index: 3;
}

/* CONSEJO: Para que esto se vea nivel Dios, las fotos de tus bloques deberían tener el fondo borrado (PNG transparente). Si tienen fondo blanco igual se verá bien. */
.bloque-visual img {
    height: 75%;
    width: auto;
    position: relative;
    z-index: 2;
    transition: transform 0.4s ease;
}

.tarjeta-bloque:hover .bloque-visual img {
    transform: scale(1.1); /* El bloque se acerca al pasar el mouse */
}

/* LA ZONA DE INFORMACIÓN */
.bloque-info {
    padding: 30px;
}

.encabezado-tecnico {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.encabezado-tecnico h3 {
    font-size: 1.4rem;
    color: #2966C4;
    margin: 0;
}

.sku {
    font-size: 0.85rem;
    color: #888;
    font-weight: bold;
    background: #f1f3f5;
    padding: 4px 8px;
    border-radius: 4px;
}

.bloque-desc {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 25px;
}

/* LA TABLA DE ESPECIFICACIONES */
.tabla-especificaciones {
    border-top: 1px solid #eee;
    margin-bottom: 30px;
}

.fila-spec {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    font-size: 0.95rem;
}

.spec-lbl {
    color: #777;
    font-weight: 600;
}

.spec-val {
    color: #111;
    font-weight: bold;
}

/* BOTÓN ESTILO PLANO */
.btn-plano {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    width: 100%;
    background-color: transparent;
    color: #2966C4;
    border: 2px solid #2966C4;
    padding: 12px;
    border-radius: 4px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-plano i {
    transition: transform 0.3s ease;
}

.btn-plano:hover {
    background-color: #FFC107;
    color: black;

}

.btn-plano:hover i {
    transform: translateX(5px);
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .contenedor-datos {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-arquitectura h1 {
        font-size: 2.2rem;
    }

    .bloque-visual {
        height: 200px;
    }
}


