/* VARIABLES Y RESET */
:root {
    --azul-oscuro: #031F5C;
    --rojo-cruz-azul: #ca0b01;
    --fondo-gris: #f4f5f7;
    --texto-principal: #333333;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--fondo-gris);
    color: var(--texto-principal);
    display: block !important;
    overflow-x: hidden;
}

/* HERO GLASSMORPHISM BACKGROUND */
.hero-glass-bg {
    min-height: 100vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* NAVEGACIÓN FLOTANTE (GLASS) */
.navbar-glass {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 50px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0) 100%);
    z-index: 100;
}

.brand-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-logo {
    height: 40px;
    width: auto;
}

.nav-logotipo {
    height: 28px;
    width: auto;
}

.nav-links-glass {
    display: flex;
    gap: 30px;
    margin-left: auto;
    align-items: right;
}

.nav-links-glass a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    transition: color 0.2s;
}

.nav-links-glass a:hover {
    color: var(--rojo-cruz-azul);
}

.btn-phone-glass {
    background-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s;
}

.btn-phone-glass:hover {
    background-color: var(--rojo-cruz-azul);
    border-color: var(--rojo-cruz-azul);
}

/* PANEL GLASSMORPHISM */
.hero-glass-content {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 0 50px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.glass-panel {
    background: rgba(255, 255, 255, 0.85);
    /* Papel encerado claro */
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 50px;
    border-radius: 30px;
    max-width: 650px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.glass-subtitle {
    color: #5f5f5f;
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.glass-panel h1 {
    font-size: 3.5rem;
    color: var(--azul-oscuro);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 25px;
}

.highlight-red {
    color: var(--rojo-cruz-azul);
}

.glass-desc {
    font-size: 1.1rem;
    color: #444;
    line-height: 1.6;
    margin-bottom: 40px;
}

.btn-main-action {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    background-color: var(--azul-oscuro);
    color: #ffffff;
    padding: 15px 35px;
    border-radius: 40px;
    font-weight: 600;
    text-decoration: none;
    font-size: 1.05rem;
    transition: background-color 0.2s, transform 0.2s;
    margin-bottom: 50px;
    box-shadow: 0 8px 20px rgba(3, 31, 92, 0.3);
}

.btn-main-action:hover {
    background-color: var(--rojo-cruz-azul);
    transform: translateY(-2px);
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(202, 11, 1, 0.3);
}

/* STAT BOXES OSCUROS (AZUL CRUZ AZUL) */
.hero-stats-grid {
    display: flex;
    gap: 20px;
}

.stat-box-dark {
    background: linear-gradient(135deg, var(--azul-oscuro) 0%, #02143d 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 4px solid var(--rojo-cruz-azul);
    padding: 25px 20px;
    border-radius: 20px;
    flex: 1;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    color: #ffffff;
}

.stat-box-dark:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.25);
}

.stat-icon-wrapper-dark {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 15px;
    background-color: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.stat-box-dark h3 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 5px;
}

.stat-box-dark p {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.3;
}

/* CONTENEDOR PRINCIPAL POST-HERO */
.main-content {
    background-color: #ffffff;
    position: relative;
    z-index: 10;
    padding: 80px 50px;
    min-height: 50vh;
}

/* PRESENTACIÓN DE LA EMPRESA */
.company-intro {
    display: flex;
    flex-direction: column;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto 100px auto;
    padding: 0 20px;
}

.intro-content {
    flex: 1;
}

.intro-content h2 {
    font-size: 2.2rem;
    color: var(--azul-oscuro);
    margin-bottom: 20px;
    font-weight: 800;
    line-height: 1.2;
}

.intro-content p {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 20px;
    line-height: 1.6;
}

.btn-outline {
    display: inline-block;
    padding: 12px 30px;
    border: 2px solid var(--azul-oscuro);
    color: var(--azul-oscuro);
    border-radius: 30px;
    text-decoration: none;
    font-weight: 700;
    margin-top: 15px;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background-color: var(--azul-oscuro);
    color: #ffffff;
}

.intro-images {
    flex: 1;
    position: relative;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.intro-images img {
    border-radius: 20px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    object-fit: cover;
}

.img-main {
    width: 80%;
    height: 350px;
    position: relative;
    z-index: 1;
}

.img-secondary {
    width: 50%;
    height: 250px;
    position: absolute;
    bottom: -20px;
    right: 0;
    z-index: 2;
    border: 8px solid #ffffff;
}

/* CARRUSEL MORTERO (ABANICO / COVERFLOW) */
.mortero-section {
    max-width: 1200px;
    margin: 0 auto 40px auto;
    padding: 0 20px;
    text-align: center;
    overflow-x: hidden;
}

.mortero-header {
    margin-bottom: 40px;
}

.mortero-header h2 {
    font-size: 2.2rem;
    color: var(--azul-oscuro);
    font-weight: 800;
}

.mortero-header p {
    color: #666;
    font-size: 1.1rem;
    margin-top: 10px;
}

.mortero-carousel-wrapper {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 0;
}

.mortero-coverflow {
    position: relative;
    width: 100%;
    height: 550px;
    display: flex;
    justify-content: center;
    align-items: center;
    touch-action: pan-y;
}

.cover-item {
    position: absolute;
    width: 375px;
    height: 500px;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    background-color: #ffffff;
    opacity: 0;
    pointer-events: none;
    z-index: 0;
}

.cover-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cover-item.active,
.cover-item.prev,
.cover-item.next {
    pointer-events: auto;
}

.cover-item.active {
    transform: translateX(0) scale(1) translateZ(0);
    z-index: 3;
    opacity: 1;
    box-shadow: 0 15px 35px rgba(3, 31, 92, 0.3);
    /* Sombra Cruz Azul */
}

.cover-item.prev {
    transform: translateX(-190px) scale(0.85) translateZ(0);
    z-index: 1;
    opacity: 0.65;
}

.cover-item.next {
    transform: translateX(190px) scale(0.85) translateZ(0);
    z-index: 1;
    opacity: 0.65;
}

.cover-item.hidden-left {
    transform: translateX(-350px) scale(0.7) translateZ(0);
    opacity: 0;
}

.cover-item.hidden-right {
    transform: translateX(350px) scale(0.7) translateZ(0);
    opacity: 0;
}

.nav-btn-cover {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    color: var(--azul-oscuro);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.nav-btn-cover:hover {
    background-color: var(--rojo-cruz-azul);
    color: #ffffff;
    transform: translateY(-50%) scale(1.1);
}

.nav-btn-cover.disabled {
    opacity: 0.3;
    pointer-events: none;
}

.nav-btn-cover.prev-btn {
    left: 10%;
}

.nav-btn-cover.next-btn {
    right: 10%;
}

/* RESPONSIVIDAD PARA EL ABANICO */
@media (max-width: 768px) {
    .mortero-coverflow {
        height: 400px;
    }

    .cover-item {
        width: 280px;
        height: 373px;
    }

    .cover-item.prev {
        transform: translateX(-110px) scale(0.85);
    }

    .cover-item.next {
        transform: translateX(110px) scale(0.85);
    }

    .cover-item.hidden-left {
        transform: translateX(-200px) scale(0.7);
    }

    .cover-item.hidden-right {
        transform: translateX(200px) scale(0.7);
    }

    .nav-btn-cover {
        display: none;
    }
}

/* SECCIÓN DE FORMULARIO */
.form-section {
    background-color: var(--azul-oscuro);
    border-radius: 30px;
    padding: 50px;
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 50px;
    max-width: 1200px;
    margin: 0 auto;
    box-shadow: 0 20px 40px rgba(3, 31, 92, 0.2);
}

.form-text {
    flex: 1;
}

.form-text h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.form-text p {
    font-size: 1.1rem;
    opacity: 0.8;
    line-height: 1.5;
}

.contact-form {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 15px 20px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    outline: none;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.contact-form input:focus,
.contact-form textarea:focus {
    background-color: rgba(255, 255, 255, 0.2);
}

.contact-form textarea {
    resize: none;
    height: 120px;
}

.contact-form button {
    background-color: #ffffff;
    color: var(--azul-oscuro);
    font-weight: 800;
    font-size: 1.1rem;
    padding: 15px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

.contact-form button:hover {
    background-color: var(--rojo-cruz-azul);
    color: #ffffff;
}

.form-text {
    width: 100%;
}

.form-section .links-container {
    padding: 0 !important;
    width: 100%;
}

.form-section .link-card {
    width: 100%;
}

/* RESPONSIVIDAD MÓVIL */
@media (max-width: 800px) {
    .navbar-glass {
        padding: 15px 20px;
        flex-wrap: wrap;
        gap: 10px;
        justify-content: space-between;
    }

    .nav-logo {
        height: 30px;
    }

    .nav-logotipo {
        height: 20px;
    }

    .nav-links-glass {
        display: none;
        /* Ocultar enlaces de texto para ahorrar espacio en móvil */
    }

    .btn-phone-glass {
        padding: 8px 15px;
        font-size: 0.85rem;
    }

    .hero-glass-bg {
        height: 85vh;
        min-height: 500px;
        padding-bottom: 30px;
        background-position: 70% center;
    }

    .hero-glass-content {
        padding: 0 15px;
        margin-top: 10px;
        height: 100%;
        align-items: stretch;
    }

    .glass-panel {
        padding: 10px 15px;
        background: transparent;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        border: none;
        box-shadow: none;
        display: flex;
        flex-direction: column;
        height: 100%;
    }

    .glass-subtitle {
        font-size: 0.8rem;
        margin-bottom: 5px;
        color: #adadad;
        text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.8);
    }

    .glass-panel h1 {
        font-size: 2.2rem;
        margin-bottom: 15px;
        color: #ffffff;
        text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.9);
    }

    .highlight-red {
        text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.9);
    }

    .glass-desc {
        display: none;
    }

    .btn-main-action {
        margin-top: auto;
        align-self: flex-start;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    }

    .hero-stats-grid {
        display: none;
    }

    .ocultar-en-movil {
        display: none;
    }

    .main-content {
        padding: 40px 20px;
        border-radius: 24px 24px 0 0;
        margin-top: 0;
    }

    .company-intro {
        margin-bottom: 60px;
        gap: 20px;
    }

    .intro-content h2 {
        font-size: 1.6rem;
        margin-bottom: 15px;
        line-height: 1.3;
    }

    .intro-content p {
        font-size: 0.95rem;
        margin-bottom: 15px;
    }

    /* Corrección estricta para evitar que Cedis 1 y Cedis 2 se aplasten en móvil */
    .intro-images {
        display: block;
        position: relative;
        min-height: 280px;
        margin-top: 15px;
        width: 100%;
    }

    .img-main {
        display: block;
        width: 80%;
        height: 220px;
        object-fit: cover;
        border-radius: 12px;
    }

    .img-secondary {
        width: 55%;
        height: 150px;
        object-fit: cover;
        position: absolute;
        bottom: 0px;
        right: 0px;
        border: 3px solid #ffffff;
        border-radius: 12px;
    }

    .mortero-section {
        margin-bottom: 60px;
    }

    .mortero-header h2 {
        font-size: 1.6rem;
    }

    .mortero-header p {
        font-size: 0.95rem;
    }

    .slider-wrapper {
        width: 90%;
        border-radius: 16px;
    }

    .form-section {
        flex-direction: column;
        padding: 30px 20px;
        gap: 25px;
        border-radius: 20px;
    }

    .form-text h2 {
        font-size: 1.6rem;
    }

    .contact-form input,
    .contact-form textarea {
        padding: 12px 15px;
        font-size: 0.95rem;
        border-radius: 10px;
    }
}

/* RESPONSIVIDAD PARA PC */
@media (min-width: 900px) {
    .company-intro {
        flex-direction: row;
        align-items: center;
    }

    .carousel-card {
        flex: 0 0 400px;
        scroll-snap-align: start;
    }
}

/* --- WIDGET CRUZ AZUL (DESKTOP) --- */

.novedades-section {
    max-width: 1200px;
    margin: 0 auto 100px auto;
    padding: 0 20px;
    text-align: center;
}

.novedades-header {
    margin-bottom: 40px;
}

.novedades-header h2 {
    font-size: 2.2rem;
    color: var(--azul-oscuro);
    font-weight: 800;
}

.novedades-header p {
    color: #666;
    font-size: 1.1rem;
    margin-top: 10px;
}


.widget-guillotina {
    width: 100%;
    height: 480px;
    /* La ventana visible */
    overflow: hidden;
    border-radius: 8px;
}

.widget-desfasado {
    width: 100%;
    height: 650px;
    /* Empuja el botón inferior fuera de la ventana */
    margin-top: -55px;
    /* Corta el logo superior */
}

/* --- WIDGET CRUZ AZUL (MÓVIL) --- */
@media screen and (max-width: 768px) {
    .widget-guillotina {
        /* Hacemos la ventana mucho más bajita para cortar el botón que subió y matar el espacio en blanco */
        height: 350px;
    }

    .widget-desfasado {
        height: 500px;
        margin-top: -45px;
        /* Ajustamos el corte superior porque el logo también se encoge un poco */
    }

    .novedades-section {
        /* Reducimos el espaciado general de la sección para acercarla al carrusel de mortero */
        margin-bottom: 20px !important;
        padding-bottom: 0px !important;
    }
}

/* --- BENTO GALLERY SECTION (NOVEDADES) --- */
.novedades-section {
    max-width: 1200px;
    margin: 0 auto 60px auto;
    padding: 0 20px;
    text-align: center;
}

.novedades-header {
    margin-bottom: 30px;
}

.novedades-header h2 {
    font-size: 2.2rem;
    color: var(--azul-oscuro);
    font-weight: 800;
}

.novedades-header p {
    color: #666;
    font-size: 1.1rem;
    margin-top: 10px;
}

.bento-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 200px;
    gap: 15px;
    margin-bottom: 40px;
}

.bento-item {
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.bento-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(3, 31, 92, 0.2);
}

.bento-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.bento-item:hover img {
    transform: scale(1.05);
}

.bento-1 {
    grid-column: 1 / 3;
    grid-row: 1 / 3;
}

.bento-2 {
    grid-column: 3 / 4;
    grid-row: 1 / 2;
}

.bento-3 {
    grid-column: 4 / 5;
    grid-row: 1 / 2;
}

.bento-4 {
    grid-column: 3 / 4;
    grid-row: 2 / 3;
}

.bento-5 {
    grid-column: 4 / 5;
    grid-row: 2 / 3;
}

/* Scroll Animation (Intersection Observer) */
.reveal-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.8, 0.25, 1), transform 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.reveal-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 {
    transition-delay: 0.1s;
}

.delay-2 {
    transition-delay: 0.2s;
}

.delay-3 {
    transition-delay: 0.3s;
}

.delay-4 {
    transition-delay: 0.4s;
}

@media (max-width: 768px) {
    .bento-gallery {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 150px;
    }

    .bento-1 {
        grid-column: 1 / 3;
        grid-row: 1 / 3;
    }

    .bento-2 {
        grid-column: 1 / 2;
        grid-row: 3 / 4;
    }

    .bento-3 {
        grid-column: 2 / 3;
        grid-row: 3 / 4;
    }

    .bento-4 {
        grid-column: 1 / 2;
        grid-row: 4 / 5;
    }

    .bento-5 {
        grid-column: 2 / 3;
        grid-row: 4 / 5;
    }

    .novedades-header h2 {
        font-size: 1.8rem;
    }
}