/**
 * Our Impact (page-our-impact.php). Va encima de stories.css: hereda las
 * variables, fuentes y bloques .sty-* y solo añade lo propio de esta página.
 * En este tema 1rem = 10px, por eso se trabaja en px y clamp().
 */

.imp-h2 {
    margin: 14px 0 0;
    font-family: var(--f-display);
    font-size: clamp(32px, 4.4vw, 56px);
    font-weight: 800;
    font-stretch: 90%;
    line-height: 1.02;
    letter-spacing: -.012em;
    color: var(--ink);
}

.imp-h2--light {
    color: var(--paper);
}

.imp-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 50px;
    padding: 0 24px;
    border: 1.5px solid transparent;
    border-radius: 999px;
    font-family: var(--f-display);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    transition: background-color .2s, color .2s, border-color .2s, transform .25s var(--ease);
}

.imp-btn:hover {
    transform: translateY(-2px);
}

.imp-btn:focus-visible {
    outline: 3px solid var(--mint);
    outline-offset: 3px;
}

.imp-btn--solid {
    background: var(--night);
    color: var(--paper);
}

.imp-btn--solid:hover {
    background: var(--night-2);
    color: var(--paper);
}

.imp-btn--outline {
    border-color: var(--ink);
    color: var(--ink);
}

.imp-btn--outline:hover {
    background: var(--ink);
    color: var(--paper);
}

.imp-btn--light {
    border-color: rgb(247 241 232 / .45);
    color: var(--paper);
}

.imp-btn--light:hover {
    border-color: var(--paper);
    background: rgb(247 241 232 / .08);
    color: var(--paper);
}

.imp .screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* Sin franjas entre secciones con fondo (como en las historias): el
   carrusel trae margen propio para ir entre párrafos; aquí va pegado. */
.imp > .sty-gallery {
    margin-block: 0;
    padding-block: clamp(56px, 7vw, 96px);
}

/* ---------- Cifras ---------- */
.imp-stats {
    padding: clamp(64px, 8vw, 112px) 0;
}

.imp-stats__grid {
    display: grid;
    gap: 16px;
    margin: 28px 0 0;
    padding: 0;
    list-style: none;
}

@media (min-width: 760px) {
    .imp-stats__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 20px;
    }
}

.imp-stat {
    position: relative;
    overflow: hidden;
    min-height: 340px;
    border-radius: 18px;
    background: var(--night);
    color: var(--paper);
}

.imp-stat__link {
    display: block;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.imp-stat__media {
    position: absolute;
    inset: 0;
}

.imp-stat__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s var(--ease);
}

.imp-stat:hover .imp-stat__media img {
    transform: scale(1.05);
}

.imp-stat__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgb(15 39 41 / .05) 20%, rgb(15 39 41 / .88) 100%);
}

.imp-stat__body {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    gap: 6px;
    padding: 26px;
}

.imp-stat__value {
    font-family: var(--f-display);
    font-size: clamp(52px, 6vw, 84px);
    font-weight: 800;
    font-stretch: 85%;
    line-height: .95;
    letter-spacing: -.02em;
    color: var(--sun);
    font-variant-numeric: tabular-nums;
}

.imp-stat__text {
    font-size: 18px;
    line-height: 1.4;
    color: var(--paper);
}

/* ---------- Mapa ---------- */
.imp-map {
    padding: clamp(64px, 8vw, 112px) 0;
    background:
        radial-gradient(80% 60% at 100% 0%, rgb(82 202 164 / .14), transparent 60%),
        var(--night);
    color: var(--paper);
}

.imp-map__head {
    display: grid;
    gap: 20px;
    align-items: end;
    margin-bottom: 32px;
}

@media (min-width: 900px) {
    .imp-map__head {
        grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
        gap: 56px;
    }
}

.imp-map__text {
    margin: 0;
    font-size: 18px;
    color: rgb(247 241 232 / .72);
}

.imp-map__frame {
    position: relative;
    overflow: hidden;
    height: min(78vh, 720px);
    min-height: 460px;
    border: 1px solid rgb(247 241 232 / .14);
    border-radius: 18px;
    background: var(--night-2);
}

.imp-map__frame iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.imp-map__veil {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 14px;
    background: var(--night-2);
    font-family: var(--f-display);
    font-size: 15px;
    font-weight: 600;
    color: rgb(247 241 232 / .8);
    transition: opacity .5s var(--ease), visibility .5s;
}

.imp-map__frame.is-loaded .imp-map__veil {
    opacity: 0;
    visibility: hidden;
}

.imp-map__pulse {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--mint);
    box-shadow: 0 0 0 0 rgb(82 202 164 / .6);
    animation: imp-pulse 1.6s ease-out infinite;
}

@keyframes imp-pulse {
    to { box-shadow: 0 0 0 22px rgb(82 202 164 / 0); }
}

.imp-map__shield {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: end center;
    width: 100%;
    padding: 0 0 22px;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.imp-map__shield[hidden] {
    display: none;
}

.imp-map__chip {
    padding: 10px 18px;
    border-radius: 999px;
    background: rgb(15 39 41 / .82);
    font-family: var(--f-display);
    font-size: 14px;
    font-weight: 600;
    color: var(--paper);
    backdrop-filter: blur(6px);
}

.imp-map__chip-touch { display: none; }

@media (hover: none) {
    .imp-map__chip-touch { display: inline; }
    .imp-map__chip-mouse { display: none; }
}

.imp-map__actions {
    margin: 20px 0 0;
}

.imp-map__teaser {
    position: relative;
    display: block;
    overflow: hidden;
    min-height: 440px;
    border-radius: 18px;
    color: var(--paper);
    text-decoration: none;
}

.imp-map__teaser img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s var(--ease);
}

.imp-map__teaser:hover img {
    transform: scale(1.04);
}

.imp-map__teaser::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgb(15 39 41 / .9) 0%, rgb(15 39 41 / .35) 70%);
}

.imp-map__teaser-body {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 24px;
    justify-items: start;
    max-width: 520px;
    padding: clamp(28px, 5vw, 56px);
}

.imp-map__teaser-text {
    font-size: clamp(20px, 2vw, 26px);
    line-height: 1.4;
}

.imp-map__teaser .imp-btn--solid {
    background: var(--sun);
    color: var(--night);
}

/* ---------- Historias destacadas: 5 tarjetas en escritorio ---------- */
@media (min-width: 1100px) {
    .imp-signature__grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

/* ---------- Informe ---------- */
.imp-report {
    padding: clamp(64px, 8vw, 112px) 0;
    background: var(--paper-2);
}

.imp-report__grid {
    display: grid;
    gap: 40px;
    align-items: center;
}

@media (min-width: 900px) {
    .imp-report__grid {
        grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
        gap: 72px;
    }
}

.imp-report__cover {
    margin: 0;
    overflow: hidden;
    border-radius: 14px;
    box-shadow: 0 30px 60px -30px rgb(15 39 41 / .45);
}

.imp-report__cover img {
    display: block;
    width: 100%;
    height: auto;
}

.imp-report__text {
    margin-top: 18px;
    font-size: 19px;
    color: var(--ink-soft);
}

.imp-report__text p {
    margin: 0;
}

.imp-report__links {
    display: grid;
    margin: 28px 0 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--line);
}

.imp-report__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 4px;
    border-bottom: 1px solid var(--line);
    font-family: var(--f-display);
    font-size: 18px;
    font-weight: 700;
    color: var(--ink);
    text-decoration: none;
    transition: padding .25s var(--ease), color .2s;
}

.imp-report__link:hover {
    padding-left: 12px;
    color: var(--night);
}

.imp-report__link--featured {
    color: #b87a10;
}

/* ---------- Planes y reflexiones ---------- */
.imp-plans {
    padding: clamp(64px, 8vw, 112px) 0;
}

.imp-plans__grid {
    display: grid;
    gap: 40px;
    align-items: center;
}

@media (min-width: 900px) {
    .imp-plans__grid {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 72px;
    }
}

.imp-plans__text {
    margin: 18px 0 0;
    font-size: 19px;
    color: var(--ink-soft);
}

.imp-plans__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 28px 0 0;
}

.imp-plans__media {
    margin: 0;
    overflow: hidden;
    border-radius: 18px;
}

.imp-plans__media img {
    display: block;
    width: 100%;
    height: auto;
}

@media (prefers-reduced-motion: reduce) {
    .imp-map__pulse { animation: none; }
    .imp-stat__media img,
    .imp-map__teaser img { transition: none; }
}
