/* ======================================================================
   INICIO.CSS — Portada Estructuras · Laboratorio de Ingeniería Sísmica UCR
   Afecta únicamente a elementos dentro de .inicio-page.
   No altera header, menú, barra de idiomas ni footer institucional.
   ====================================================================== */

.inicio-page {
    --inicio-blue: #065ca9;
    --inicio-blue-dark: #072e53;
    --inicio-cyan: #31c1e8;
    --inicio-ink: #10263f;
    --inicio-muted: #4e647b;
    --inicio-border: #d9e3ed;
    color: var(--inicio-ink);
    padding: 0 0.3rem 1.25rem;
}

/* Anula solo en Inicio la regla genérica de layout.css para <section>. */
.inicio-page section {
    min-height: 0;
    background: transparent;
}

/* HERO CON FOTOGRAFÍA REAL DE LA ASAMBLEA LEGISLATIVA */
.inicio-page .inicio-hero {
    position: relative;
    display: flex;
    align-items: center;
    isolation: isolate;
    min-height: 390px;
    overflow: hidden;
    border-radius: 19px;
    background: linear-gradient(125deg, #06365e 5%, #085b9b 75%, #1272aa);
    box-shadow: 0 12px 28px rgba(4, 39, 73, .12);
}

.inicio-page .inicio-hero-media {
    position: absolute;
    inset: 0 0 0 40%;
    z-index: -2;
    overflow: hidden;
}

.inicio-page .inicio-hero-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 42%;
    max-width: none;
    filter: saturate(.88) contrast(1.035);
}

/* Capa azul de lectura; sin líneas decorativas sobre el edificio. */
.inicio-page .inicio-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: linear-gradient(
        90deg,
        rgba(5, 42, 78, .99) 0%,
        rgba(5, 50, 92, .97) 32%,
        rgba(5, 54, 97, .89) 50%,
        rgba(5, 58, 101, .35) 73%,
        rgba(5, 58, 101, .06) 100%
    );
}

.inicio-page .inicio-hero-body {
    position: relative;
    width: min(67%, 790px);
    padding: clamp(1.45rem, 3.2vw, 3rem);
    color: #fff;
}

.inicio-page .inicio-hero-eyebrow {
    display: inline-block;
    margin: 0 0 .8rem;
    color: #e3f5ff;
    font-size: clamp(.7rem, .85vw, .84rem);
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.inicio-page .inicio-hero-eyebrow::after {
    content: "";
    display: block;
    width: 66px;
    height: 4px;
    margin-top: .65rem;
    border-radius: 10px;
    background: var(--inicio-cyan);
}

.inicio-page .inicio-hero-title {
    margin: 0 0 1rem;
    max-width: 690px;
    color: #fff;
    font-size: clamp(2.25rem, 4.2vw, 4.25rem);
    font-weight: 800;
    line-height: 1.06;
    letter-spacing: -.045em;
    text-wrap: balance;
}

.inicio-page .inicio-hero-lead {
    max-width: 670px;
    margin: 0;
    color: #f2f8fd;
    font-size: clamp(.9rem, 1.13vw, 1.12rem);
    line-height: 1.57;
}

.inicio-page .inicio-hero-details {
    max-width: 640px;
    margin-top: .8rem;
    color: #e9f4ff;
    font-size: .89rem;
}

.inicio-page .inicio-hero-details summary {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    cursor: pointer;
    color: #d9f2ff;
    font-size: .79rem;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.inicio-page .inicio-hero-details summary:hover {
    color: #fff;
}

.inicio-page .inicio-hero-details-content {
    margin: .65rem 0 .1rem;
    padding: .8rem .9rem;
    border-left: 3px solid rgba(49, 193, 232, .9);
    border-radius: 0 8px 8px 0;
    background: rgba(3, 33, 60, .38);
    line-height: 1.55;
}

.inicio-page .inicio-hero-details-content p {
    margin: 0 0 .65rem;
}

.inicio-page .inicio-hero-details-content p:last-child {
    margin-bottom: 0;
}

.inicio-page .inicio-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
    margin-top: 1.5rem;
    background: transparent; /* anula nav global */
}

.inicio-page .inicio-hero-action {
    display: inline-flex;
    min-height: 53px;
    min-width: 0;
    flex: 1 1 135px;
    align-items: center;
    gap: .55rem;
    padding: .75rem .8rem;
    border: 1px solid rgba(219, 241, 255, .65);
    border-radius: 10px;
    background: rgba(13, 78, 129, .55);
    color: #fff;
    font-size: clamp(.78rem, .9vw, .95rem);
    font-weight: 650;
    text-decoration: none;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    transition: transform .18s ease, background-color .18s ease, border-color .18s ease;
}

.inicio-page .inicio-hero-action > .bi:first-child {
    flex: 0 0 auto;
    font-size: 1.4rem;
    line-height: 1;
}

.inicio-page .inicio-hero-action > span {
    flex: 1;
}

.inicio-page .inicio-hero-action-arrow {
    font-size: .8rem;
}

.inicio-page .inicio-hero-action:hover,
.inicio-page .inicio-hero-action:focus-visible {
    transform: translateY(-2px);
    border-color: #f4fbff;
    background: rgba(27, 105, 169, .86);
    color: #fff;
}

/* TÍTULO DE CATÁLOGO */
.inicio-page .inicio-gallery {
    padding-top: clamp(1.5rem, 2.7vw, 2.35rem);
}

.inicio-page .inicio-gallery-heading {
    margin-bottom: 1.2rem;
    padding-left: .95rem;
    border-left: 5px solid #0e67b6;
}

.inicio-page .inicio-gallery-heading h2 {
    margin: 0 0 .25rem;
    font-size: clamp(1.35rem, 2.4vw, 2rem);
    font-weight: 800;
    line-height: 1.16;
    color: #10243c;
    letter-spacing: -.025em;
}

.inicio-page .inicio-gallery-heading p {
    margin: 0;
    color: var(--inicio-muted);
    font-size: clamp(.85rem, 1vw, .99rem);
}

/* 6 columnas en escritorio amplio; 4 en portátil; 3 en tablet; 2 en móvil. */
.inicio-page .inicio-gallery-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: clamp(.65rem, 1vw, .9rem);
}

.inicio-page .inicio-building-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 100%;
    overflow: hidden;
    border: 1px solid var(--inicio-border);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 5px rgba(19, 42, 69, .075);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.inicio-page .inicio-building-card:hover,
.inicio-page .inicio-building-card:focus-within {
    transform: translateY(-3px);
    border-color: #b8d1e8;
    box-shadow: 0 10px 23px rgba(12, 60, 98, .13);
}

.inicio-page .inicio-building-image-wrap {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #e4ebf2;
}

.inicio-page .inicio-building-image {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    filter: grayscale(8%) saturate(.87) contrast(.98);
    transition: transform .24s ease, filter .24s ease;
}

.inicio-page .inicio-building-card:hover .inicio-building-image,
.inicio-page .inicio-building-card:focus-within .inicio-building-image {
    transform: scale(1.04);
    filter: none;
}

.inicio-page .inicio-building-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: .5rem;
    padding: .8rem .7rem .85rem;
}

.inicio-page .inicio-building-title {
    display: -webkit-box;
    overflow: hidden;
    margin: 0;
    color: #0a2039;
    font-size: clamp(.82rem, .95vw, .99rem);
    font-weight: 750;
    line-height: 1.25;
    min-height: 2.5em;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

.inicio-page .inicio-building-location {
    display: flex;
    align-items: flex-start;
    gap: .33rem;
    min-height: 2.5em;
    margin: 0;
    color: #53667a;
    font-size: clamp(.7rem, .75vw, .77rem);
    line-height: 1.32;
}

.inicio-page .inicio-building-location i {
    flex: 0 0 auto;
    color: #0d5a9d;
    font-size: .82rem;
    line-height: 1.25;
}

.inicio-page .inicio-building-location span {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

.inicio-page .inicio-building-bottom {
    margin-top: auto;
}

.inicio-page .inicio-building-stats {
    display: flex;
    flex-wrap: wrap;
    gap: .3rem;
    margin-bottom: .65rem;
}

.inicio-page .inicio-stat {
    display: inline-flex;
    align-items: center;
    gap: .22rem;
    max-width: 100%;
    padding: .28rem .42rem;
    border-radius: 6px;
    background: #e6f0fc;
    color: #153f6d;
    font-size: clamp(.66rem, .7vw, .74rem);
    font-weight: 650;
    line-height: 1.15;
    white-space: nowrap;
}

.inicio-page .inicio-stat i {
    font-size: .81rem;
}

.inicio-page .inicio-building-link {
    display: inline-flex;
    align-items: center;
    gap: .32rem;
    min-height: 29px;
    max-width: 100%;
    padding: .3rem .65rem;
    border-radius: 7px;
    background: #075bad;
    color: #fff;
    font-size: .74rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    transition: background-color .18s ease, transform .18s ease;
}

.inicio-page .inicio-building-link:hover,
.inicio-page .inicio-building-link:focus-visible {
    background: #003d7a;
    color: #fff;
    transform: translateY(-1px);
}

.inicio-page .inicio-building-link i {
    font-size: .68rem;
}

.inicio-page a:focus-visible,
.inicio-page summary:focus-visible {
    outline: 3px solid #58d1fb;
    outline-offset: 3px;
}

/* BREAKPOINTS. Se usa el ancho de la ventana; la plantilla ya centra el sitio. */
@media (max-width: 1199.98px) {
    .inicio-page .inicio-gallery-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .inicio-page .inicio-hero {
        min-height: 365px;
    }

    .inicio-page .inicio-hero-body {
        width: 75%;
        padding: 1.65rem;
    }

    .inicio-page .inicio-gallery-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .inicio-page .inicio-hero {
        min-height: 0;
        border-radius: 14px;
    }

    .inicio-page .inicio-hero-media {
        inset: 0;
    }

    .inicio-page .inicio-hero-media img {
        object-position: 50% 32%;
    }

    .inicio-page .inicio-hero::before {
        background: linear-gradient(
            90deg,
            rgba(5, 37, 69, .97),
            rgba(6, 53, 94, .91) 65%,
            rgba(6, 53, 94, .8)
        );
    }

    .inicio-page .inicio-hero-body {
        width: 100%;
        padding: 1.5rem 1.15rem;
    }

    .inicio-page .inicio-hero-title {
        font-size: clamp(2rem, 7vw, 3rem);
    }

    .inicio-page .inicio-hero-actions {
        gap: .5rem;
        margin-top: 1.25rem;
    }

    .inicio-page .inicio-hero-action {
        flex: 1 1 125px;
    }

    .inicio-page .inicio-gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 420px) {
    .inicio-page {
        padding-inline: 0;
    }

    .inicio-page .inicio-hero-body {
        padding: 1.2rem .95rem;
    }

    .inicio-page .inicio-hero-action {
        flex-basis: 100%;
        min-height: 44px;
    }

    .inicio-page .inicio-building-body {
        padding: .6rem .55rem .7rem;
    }

    .inicio-page .inicio-building-title {
        font-size: .83rem;
    }

    .inicio-page .inicio-building-link {
        font-size: .7rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .inicio-page *,
    .inicio-page *::before,
    .inicio-page *::after {
        transition: none !important;
        transform: none !important;
    }
}
