/* =========================================================
   CET Nº1 — INDEX (index.html)
   Hero, estadísticas, novedades destacadas, carrusel de galería,
   banda de historia y CTA de galería.
   Depende de: css/global.css
   ========================================================= */
.page-index {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}
.page-index h1,
.page-index h2,
.page-index h3,
.page-index .logo-text {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}
.page-shell {
    position: relative;
    z-index: 1;
    margin-top: max(100vh, 600px);
    margin-top: max(100svh, 600px);
    background: var(--bg-color);
    transform: translate3d(0, 0, 0);
}
/* =========================================================
   CAPAS APILADAS (index)
   El hero queda fijo detrás. Cada capa se desliza sobre la
   anterior y, cuando su borde inferior alcanza el fondo del
   viewport, queda fija para que la capa siguiente la cubra
   con el mismo efecto de solapamiento del hero.
   ========================================================= */
.page-layer {
    position: relative;
    background: var(--bg-color);
}

.page-layer-news {
    position: sticky;
    top: var(--layer-stick-top, 0px);
    z-index: 1;
    box-shadow: 0 -14px 30px rgba(0, 0, 0, 0.08);
}

.page-layer-identity {
    z-index: 2;
    box-shadow: 0 -14px 30px rgba(0, 0, 0, 0.12);
}
/* =========================================================
   HERO SECTION
   ========================================================= */
.hero {
    position: fixed;
    inset: 0 0 auto 0;
    width: 100%;
    height: 100vh;
    height: 100svh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 0;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.03);
    transform-origin: center center;
    opacity: 0;
    transition: opacity 0.9s ease;
}

.hero-bg img.is-active {
    opacity: 1;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(0, 52, 89, 0.82) 0%,
        rgba(0, 52, 89, 0.55) 50%,
        rgba(0, 0, 0, 0.35) 100%
    );
}

/* Base del hero recta */
.hero-overlay::after {
    content: none;
}

.hero-content {
    text-align: left;
    z-index: 2;
    color: var(--text-light);
    max-width: 800px;
    width: 100%;
    padding: 0 28px;
    margin: 0 auto;
}

.page-index .stats-section,
.page-index .history-cta,
.page-index .gallery-section,
.page-index .footer-index {
    content-visibility: auto;
    contain-intrinsic-size: 1px 900px;
}

.page-index.index-static-hero .hero {
    position: relative;
    inset: auto;
    min-height: 72vh;
    min-height: 72svh;
}

.page-index.index-static-hero .page-shell {
    margin-top: 0;
    transform: none !important;
    box-shadow: none;
}

.page-index.index-static-hero .page-layer-news {
    position: static;
    box-shadow: none;
}

.page-index.index-static-hero .hero-bg img {
    transform: none !important;
}

.page-index.index-static-hero .hero-content,
.page-index.index-static-hero .hero-overlay {
    transform: none !important;
    opacity: 1 !important;
}

.page-index.hero-animating .page-shell,
.page-index.hero-animating .hero-bg img,
.page-index.hero-animating .hero-content,
.page-index.hero-animating .hero-overlay {
    will-change: transform, opacity;
    backface-visibility: hidden;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.hero-eyebrow::before {
    content: '';
    display: block;
    width: 36px;
    height: 2px;
    background: var(--primary-color);
}

.hero-content h1 {
    font-size: clamp(2.8rem, 6vw, 5.2rem);
    line-height: 1.05;
    letter-spacing: -2px;
    text-transform: uppercase;
    margin-bottom: 8px;
    font-weight: 800;
}

.hero-content h1 span {
    display: block;
    font-size: clamp(1.1rem, 2.2vw, 1.6rem);
    font-weight: 300;
    letter-spacing: 2px;
    color: rgba(255,255,255,0.8);
    text-transform: none;
    margin-top: 10px;
}

.hero-divider {
    width: 60px;
    height: 3px;
    background: var(--primary-color);
    margin: 28px 0;
}

.hero-btns {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* =========================================================
   STATS
   ========================================================= */
.stats-section {
    padding: 90px 0;
    background: var(--bg-color);
    border-top: 1px solid var(--border-color);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 40px 50px;
    border-right: 1px solid var(--border-color);
    position: relative;
}

.stat-item:last-child { border-right: none; }

.stat-item::before {
    content: '';
    display: block;
    width: 32px;
    height: 3px;
    background: var(--primary-color);
    margin-bottom: 20px;
}

.stat-item i {
    display: none;
}

.stat-number {
    font-size: clamp(2.8rem, 4vw, 3.8rem);
    font-weight: 800;
    color: var(--secondary-color);
    line-height: 1;
    letter-spacing: -2px;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.82rem;
    color: var(--text-secondary);
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* =========================================================
   GALLERY SECTION — editorial grid, sharp corners
   ========================================================= */
.gallery-section {
    padding: 100px 0;
    background: var(--bg-alt);
}

/* Carrusel Swiper con efecto coverflow (estilo Venecia Sofá) */
.gallery-carousel {
    width: 100%;
    padding: 40px 0 60px;
    overflow: visible;
}

.gallery-slide {
    width: 480px;
    height: 270px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    background: var(--secondary-color);
}

.gallery-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width: 768px) {
    .gallery-slide {
        width: 320px;
        height: 180px;
    }
}

.gallery-pagination .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: var(--secondary-color);
    opacity: 0.4;
}

.gallery-pagination .swiper-pagination-bullet-active {
    opacity: 1;
    background: var(--primary-color);
}

.swiper-3d .swiper-slide-shadow-left,
.swiper-3d .swiper-slide-shadow-right {
    background-image: none;
}

/* =========================================================
   HISTORY CTA — premium editorial band
   ========================================================= */
.history-cta {
    padding: 0;
    background: var(--secondary-color);
    position: relative;
    overflow: hidden;
}

.history-cta::before {
    content: '1943';
    position: absolute;
    right: -20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: clamp(140px, 18vw, 220px);
    font-weight: 800;
    color: rgba(255,255,255,0.035);
    line-height: 1;
    letter-spacing: -8px;
    pointer-events: none;
    user-select: none;
}

.history-cta-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 60px;
    padding: 80px 0;
}

.history-cta-text {}

.history-cta-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.history-cta-eyebrow::before {
    content: '';
    display: inline-block;
    width: 24px;
    height: 2px;
    background: var(--primary-color);
}

.history-cta-text h2 {
    font-size: clamp(2rem, 4vw, 3.2rem);
    color: var(--text-light);
    letter-spacing: -1.5px;
    line-height: 1.05;
    margin-bottom: 16px;
}

.history-cta-text p {
    font-size: 1rem;
    color: rgba(255,255,255,0.6);
    max-width: 520px;
    line-height: 1.7;
}

.history-cta-action {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 20px;
}

.history-cta-stat {
    text-align: right;
}

.history-cta-stat strong {
    display: block;
    font-size: clamp(3rem, 5vw, 4.5rem);
    font-weight: 800;
    color: var(--text-light);
    letter-spacing: -2px;
    line-height: 1;
}

.history-cta-stat span {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 500;
}

/* Latest news preview section (index) */
.latest-news {
    padding: 100px 0;
    background: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
}
.latest-news-carousel {
    width: 100%;
    margin-top: 50px;
    overflow: visible;
    /* Reserva de altura para evitar saltos visuales cuando los skeletons
       se reemplazan por las noticias reales (tamaños variables). */
    min-height: 560px;
}
.latest-news-carousel .latest-news-slide {
    width: 420px;
    max-width: calc(100vw - 48px);
    height: auto;
    padding: 6px;
}
.latest-news-slide .latest-news-card {
    height: 100%;
}
.latest-news-carousel .latest-news-pagination {
    position: static;
    margin-top: 34px;
}
.latest-news-pagination .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: var(--secondary-color);
    opacity: 0.4;
}
.latest-news-pagination .swiper-pagination-bullet-active {
    opacity: 1;
    background: var(--primary-color);
}
.latest-news-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
    text-decoration: none;
    color: inherit;
}
.latest-news-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(29, 78, 137, 0.25);
}
.latest-news-media {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: var(--bg-alt);
}
.latest-news-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}
.latest-news-card:hover .latest-news-media img {
    transform: scale(1.05);
}
.latest-news-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10, 37, 64, 0) 60%, rgba(10, 37, 64, 0.55) 100%);
    pointer-events: none;
}
.latest-news-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: white;
    background: var(--primary-color);
    border-radius: 999px;
}
.latest-news-date {
    position: absolute;
    bottom: 12px;
    left: 14px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 11px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--secondary-color);
    background: rgba(255, 255, 255, 0.92);
    border-radius: 999px;
}
.latest-news-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 22px 22px 24px;
    flex: 1;
}
.latest-news-title {
    font-size: 1.2rem;
    line-height: 1.3;
    margin: 0;
    color: var(--secondary-color);
    transition: color 0.3s ease;
}
.latest-news-card:hover .latest-news-title {
    color: var(--primary-color);
}
.latest-news-excerpt {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.93rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.latest-news-foot {
    margin-top: auto;
    padding-top: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.latest-news-skeleton {
    pointer-events: none;
    min-height: 280px;
}
.latest-news-skeleton .latest-news-media {
    background: linear-gradient(90deg, rgba(224, 228, 235, 0.9), rgba(244, 246, 248, 1), rgba(224, 228, 235, 0.9));
    background-size: 200% 100%;
    animation: newsSkeletonPulse 1.5s ease-in-out infinite;
}
.latest-news-cta {
    display: flex;
    justify-content: center;
    margin-top: 50px;
}
/* =========================================================
   GALLERY SECTION CTA (index) — "Ver más fotos"
   ========================================================= */
.gallery-section-cta {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}


/* =========================================================
   RESPONSIVE (index)
   ========================================================= */
@media (max-width: 1200px) {
    .latest-news-carousel .latest-news-slide { width: 340px; }
    .latest-news-carousel { min-height: 520px; }
}

@media (max-width: 992px) {
    .hero-content { text-align: center; }
    .hero-eyebrow { justify-content: center; }
    .hero-divider { margin: 28px auto; }
    .hero-btns { justify-content: center; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .stat-item:nth-child(2) { border-right: none; }
    .stat-item:nth-child(3) { border-top: 1px solid var(--border-color); grid-column: 1 / 3; border-right: none; }
    .history-cta-inner { grid-template-columns: 1fr; gap: 40px; }
    .history-cta-action { flex-direction: row; align-items: center; justify-content: space-between; }
}

@media (max-width: 768px) {
    .gallery-section { padding-top: 120px !important; }

    .hero,
    .gallery-section {
        scroll-margin-top: 90px;
    }

    .stats-grid { grid-template-columns: 1fr; }
    .stat-item { border-right: none; border-bottom: 1px solid var(--border-color); padding: 30px 20px; }
    .stat-item:last-child { border-bottom: none; }
    .stat-item::before { margin-bottom: 14px; }

    .history-cta::before { display: none; }
    .history-cta-inner { grid-template-columns: 1fr; }
    .history-cta-action { flex-direction: column; align-items: flex-start; }
    .history-cta-stat { text-align: left; }
}

@media (max-width: 480px) {
    .hero-content h1 { font-size: 2.4rem; }
    .hero-btns { flex-direction: column; width: 100%; }
    .hero-btns .btn { width: 100%; text-align: center; }
}

/* Flecha del botón de la banda de historia */
.icon-arrow-cta { margin-left: 8px; font-size: 0.75rem; }

