/* =========================================================
   PROYECTOS INSTITUCIONALES
========================================================= */

.inem-projects-archive,
.inem-single-project {
    background: var(--inem-gray-50, #f9fafc);
}


/* =========================================================
   HERO
========================================================= */

.inem-projects-hero,
.inem-project-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(72px, 9vw, 124px) 0 clamp(56px, 7vw, 90px);
    background: linear-gradient(
        135deg,
        var(--inem-green-dark, #07502f),
        var(--inem-blue, #12344d)
    );
    color: #fff;
}

.inem-projects-hero h1,
.inem-project-hero h1 {
    max-width: 980px;
    margin: 0 0 18px;
    color: #fff;
    font-size: clamp(2.25rem, 4.5vw, 4.3rem);
    line-height: 1.04;
    font-weight: 900;
}

.inem-projects-hero p,
.inem-project-hero__content > p {
    max-width: 820px;
    margin: 0;
    color: rgba(255, 255, 255, .9);
    font-size: clamp(1rem, 1.7vw, 1.22rem);
    line-height: 1.6;
}

.inem-project-hero__image,
.inem-project-hero__overlay {
    position: absolute;
    inset: 0;
}

.inem-project-hero__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.inem-project-hero__overlay {
    background: linear-gradient(
        90deg,
        rgba(5, 57, 34, .93),
        rgba(18, 52, 77, .72)
    );
}

.inem-project-hero__content {
    position: relative;
    z-index: 2;
}


/* =========================================================
   GRID DE PROYECTOS
   Escritorio: 4 columnas
========================================================= */

.inem-projects-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    align-items: stretch;
}


/* =========================================================
   TARJETAS DE PROYECTOS
========================================================= */

.inem-project-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
    border: 1px solid rgba(18, 52, 77, .10);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(0, 35, 65, .08);
}

.inem-project-card__media {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(
        135deg,
        var(--inem-green, #0c6b3f),
        var(--inem-blue, #12344d)
    );
}

.inem-project-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}

.inem-project-card:hover .inem-project-card__media img {
    transform: scale(1.03);
}

.inem-project-card__placeholder {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    color: rgba(255, 255, 255, .9);
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: .08em;
}

.inem-project-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 26px;
}

.inem-project-card__eyebrow {
    margin-bottom: 10px;
    color: var(--inem-green, #0c6b3f);
    font-size: .78rem;
    font-weight: 900;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.inem-project-card h2 {
    margin: 0 0 12px;
    font-size: clamp(1.25rem, 1.6vw, 1.65rem);
    line-height: 1.16;
}

.inem-project-card h2 a {
    color: var(--inem-blue, #12344d);
    text-decoration: none;
}

.inem-project-card h2 a:hover,
.inem-project-card h2 a:focus-visible {
    color: var(--inem-green-dark, #07502f);
}

.inem-project-card p {
    margin: 0 0 22px;
    color: var(--inem-gray-600, #5f6b76);
    line-height: 1.62;
}

.inem-project-card__link {
    align-self: flex-start;
    margin-top: auto;
    color: var(--inem-green-dark, #07502f);
    font-weight: 900;
    text-decoration: none;
}

.inem-project-card__link:hover,
.inem-project-card__link:focus-visible {
    text-decoration: underline;
}


/* =========================================================
   PÁGINA INDIVIDUAL DEL PROYECTO
========================================================= */

.inem-project-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
    gap: clamp(34px, 5vw, 64px);
    align-items: start;
}

.inem-project-content {
    min-width: 0;
    padding: clamp(26px, 4vw, 46px);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(0, 35, 65, .07);
}


/* =========================================================
   DESCRIPCIÓN DEL PROYECTO
========================================================= */

.inem-project-description {
    margin: 0 0 32px;
    padding: 0 0 28px;
    border-bottom: 1px solid rgba(18, 52, 77, .12);
    color: var(--inem-gray-700, #47515c);
    font-size: 1.08rem;
    line-height: 1.75;
}

.inem-project-description > :first-child {
    margin-top: 0;
}

.inem-project-description > :last-child {
    margin-bottom: 0;
}

.inem-project-content h2 {
    margin-top: 1.7em;
    color: var(--inem-blue, #12344d);
    font-size: clamp(1.55rem, 2.3vw, 2rem);
}

.inem-project-content h2:first-child {
    margin-top: 0;
}

.inem-project-content p,
.inem-project-content li {
    color: var(--inem-gray-700, #47515c);
    line-height: 1.75;
}


/* =========================================================
   INFORMACIÓN LATERAL DEL PROYECTO
========================================================= */

.inem-project-info-card {
    position: sticky;
    top: 124px;
    padding: 26px;
    border: 1px solid rgba(18, 52, 77, .10);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(0, 35, 65, .07);
}

.inem-project-info-card h2 {
    margin: 0 0 20px;
    color: var(--inem-blue, #12344d);
    font-size: 1.35rem;
}

.inem-project-info-card p {
    margin: 0 0 18px;
}

.inem-project-info-card strong,
.inem-project-info-card span {
    display: block;
}

.inem-project-info-card strong {
    margin-bottom: 4px;
    color: var(--inem-blue, #12344d);
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.inem-project-info-card span {
    color: var(--inem-gray-700, #47515c);
    line-height: 1.5;
}

.inem-project-info-card .inem-button {
    display: flex;
    width: 100%;
    margin-top: 12px;
    text-align: center;
}


/* =========================================================
   DOCUMENTOS Y PUBLICACIONES
========================================================= */

.inem-project-documents {
    margin-top: clamp(34px, 5vw, 56px);
    padding-top: 30px;
    border-top: 1px solid rgba(18, 52, 77, .12);
}

.inem-project-documents > h2 {
    margin-top: 0;
}

.inem-project-documents__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.inem-project-document-card {
    display: flex;
    gap: 16px;
    align-items: center;
    min-width: 0;
    padding: 18px;
    border: 1px solid rgba(18, 52, 77, .11);
    border-radius: 16px;
    background: var(--inem-gray-50, #f9fafc);
}

.inem-project-document-card__icon {
    display: grid;
    flex: 0 0 52px;
    place-items: center;
    width: 52px;
    height: 58px;
    border-radius: 9px;
    background: var(--inem-green-dark, #07502f);
    color: #fff;
    font-size: .78rem;
    font-weight: 900;
    letter-spacing: .06em;
}

.inem-project-document-card__body {
    min-width: 0;
}

.inem-project-document-card h3 {
    margin: 0 0 7px;
    color: var(--inem-blue, #12344d);
    font-size: 1rem;
    line-height: 1.35;
}

.inem-project-document-card__link {
    color: var(--inem-green-dark, #07502f);
    font-weight: 800;
    text-decoration: none;
}

.inem-project-document-card__link:hover,
.inem-project-document-card__link:focus-visible {
    text-decoration: underline;
}


/* =========================================================
   RESPONSIVE - TABLET
   2 proyectos por fila
========================================================= */

@media (max-width: 850px) {

    .inem-projects-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}


/* =========================================================
   RESPONSIVE - PÁGINA INDIVIDUAL
========================================================= */

@media (max-width: 900px) {

    .inem-project-layout {
        grid-template-columns: 1fr;
    }

    .inem-project-info-card {
        position: static;
    }

}


/* =========================================================
   RESPONSIVE - DOCUMENTOS
========================================================= */

@media (max-width: 700px) {

    .inem-project-documents__grid {
        grid-template-columns: 1fr;
    }

}


/* =========================================================
   RESPONSIVE - MÓVIL
   1 proyecto por fila
========================================================= */

@media (max-width: 600px) {

    .inem-projects-hero,
    .inem-project-hero {
        padding: 58px 0 48px;
    }

    .inem-projects-grid {
        grid-template-columns: 1fr;
    }

    .inem-project-card,
    .inem-project-content,
    .inem-project-info-card {
        border-radius: 18px;
    }

}


/* =========================================================
   ACCESIBILIDAD - MOVIMIENTO REDUCIDO
========================================================= */

@media (prefers-reduced-motion: reduce) {

    .inem-project-card__media img {
        transition: none;
    }

}