/* Revista CIE — seccion publica y visor con efecto de hojeo */
.revista { padding: 4.5rem 0 4.5rem; }
.revista__header { text-align: center; max-width: 52rem; margin: 0 auto 2.5rem; }
.revista__title { color: #2b3f81; font-weight: 700; margin: 0 0 .6rem; }
.revista__subtitle { color: #5b6480; font-size: 1.1rem; margin: 0; }

.revista__intro {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 2.5rem;
    align-items: center;
    margin-bottom: 3.5rem;
}
.revista__intro-media img {
    width: 100%;
    border-radius: 1rem;
    box-shadow: 0 18px 40px rgba(43, 63, 129, .18);
    display: block;
}
.revista__intro--solo {
    grid-template-columns: minmax(0, 1fr);
    max-width: 54rem;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}
.revista__intro-text { color: #4a5268; line-height: 1.7; }
.revista__intro-text p { margin: 0 0 1rem; }
.revista__intro-text p:last-child { margin-bottom: 0; }

.revista__editions-title {
    color: #2b3f81;
    font-weight: 700;
    text-align: center;
    margin: 0 0 2rem;
}
.revista__empty { text-align: center; color: #6b7280; }

.revista__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 1.8rem;
}
.revista-card {
    background: #fff;
    border: 1px solid #e6e9f2;
    border-radius: .9rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .25s ease, box-shadow .25s ease;
}
.revista-card:hover { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(43, 63, 129, .16); }
.revista-card__cover { aspect-ratio: 3 / 4; background: #eef2fb; overflow: hidden; }
.revista-card__cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.revista-card__placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    color: #a9b6dd; font-size: 2.6rem;
}
.revista-card__body { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.revista-card__title { color: #2b3f81; font-size: 1.02rem; font-weight: 700; margin: 0; line-height: 1.25; }
.revista-card__subtitle { color: #6b7280; font-size: .88rem; margin: 0; }
.revista-card__cta {
    margin-top: auto;
    align-self: flex-start;
    display: inline-flex; align-items: center; gap: .5rem;
    border: 0; border-radius: 999px;
    background: #2b3f81; color: #fff;
    padding: .6rem 1.1rem;
    font-weight: 600; font-size: .9rem; cursor: pointer;
    transition: background .2s ease, transform .2s ease;
}
.revista-card__cta:hover { background: #22336b; transform: translateY(-1px); }

/* ---------- Visor ---------- */
.revista-reader {
    position: fixed; inset: 0; z-index: 3000;
    background: rgba(12, 15, 26, .97);
    display: flex; flex-direction: column;
}
.revista-reader[hidden] { display: none !important; }
.revista-reader__bar {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem; padding: .85rem 1.2rem;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.revista-reader__name { color: #fff; font-weight: 600; font-size: .98rem; }
.revista-reader__tools { display: flex; gap: .5rem; }
.revista-reader__btn {
    width: 38px; height: 38px; border: 0; border-radius: 50%;
    background: rgba(255, 255, 255, .12); color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer; text-decoration: none;
    transition: background .2s ease;
}
.revista-reader__btn:hover { background: rgba(255, 255, 255, .24); color: #fff; }

.revista-reader__stage {
    flex: 1; min-height: 0;
    display: flex; align-items: stretch; justify-content: center;
    gap: 1rem; padding: 1rem;
}
.revista-reader__nav {
    flex: 0 0 auto; align-self: center;
    width: 46px; height: 46px; border: 0; border-radius: 50%;
    background: rgba(255, 255, 255, .14); color: #fff;
    font-size: 1rem; cursor: pointer;
    transition: background .2s ease, opacity .2s ease;
}
.revista-reader__nav:hover:not(:disabled) { background: rgba(255, 255, 255, .28); }
.revista-reader__nav:disabled { opacity: .28; cursor: default; }

.revista-book {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    display: flex; align-items: center; justify-content: center;
    perspective: 2600px;
}
.revista-book__status { color: #d7dcf0; font-size: .95rem; position: absolute; bottom: 1.2rem; }
.revista-preview { height: 100%; display: flex; align-items: center; justify-content: center; }
.revista-preview img {
    max-height: 100%; max-width: 100%;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .45);
    opacity: .85;
}
.revista-book__spread { position: relative; display: flex; transform-style: preserve-3d; }
.revista-page {
    background: #fff;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .45);
    overflow: hidden;
    display: block;
}
.revista-page canvas { display: block; width: 100%; height: 100%; }
.revista-page--empty { background: #10131f; box-shadow: none; }

.revista-leaf {
    position: absolute; top: 0;
    transform-style: preserve-3d;
    transition: transform .72s cubic-bezier(.3, .02, .2, 1);
    z-index: 5;
}
.revista-leaf__face {
    position: absolute; inset: 0;
    backface-visibility: hidden;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .45);
}
.revista-leaf__face canvas { display: block; width: 100%; height: 100%; }
.revista-leaf__face--back { transform: rotateY(180deg); }

.revista-reader__pager {
    text-align: center; color: #cbd2e8;
    font-size: .88rem; padding: .35rem 0 1rem;
}

@media (max-width: 991.98px) {
    .revista__intro { grid-template-columns: minmax(0, 1fr); gap: 1.6rem; }
}
@media (max-width: 767.98px) {
    .revista { padding: 3rem 0 3rem; }
    .revista__grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1.1rem; }
    .revista-reader__stage { gap: 0; padding: .5rem; position: relative; }
    .revista-reader__nav {
        position: absolute; top: 50%; transform: translateY(-50%);
        width: 40px; height: 40px; z-index: 6;
        background: rgba(255, 255, 255, .22);
    }
    .revista-reader__nav--prev { left: .35rem; }
    .revista-reader__nav--next { right: .35rem; }
}
