@import url('https://fonts.googleapis.com/css2?family=UnifrakturCook:wght@700&display=swap');

:root {
    --rpmo-primary: #0f4c5c;
    --rpmo-primary-dark: #093743;
    --rpmo-accent: #c79a3b;
    --rpmo-text: #24313a;
    --rpmo-muted: #687780;
    --rpmo-soft: #f3f6f7
}

* {
    box-sizing: border-box
}

html,
body {
    margin: 0;
    padding: 0
}


.actas-page {
    min-height: 100vh;
    width: 100%
}

.actas-section {
    width: 100%;
    padding: 70px 20px 80px;
    overflow: hidden
}

.actas-header {
    max-width: 900px;
    margin: 0 auto 25px;
    text-align: center
}

.actas-subtitle {
    display: inline-block;
    margin-bottom: 10px;
    color: var(--rpmo-accent);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px
}

.actas-header h1 {
    margin: 0 0 12px;
    color: var(--rpmo-primary);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(30px, 4vw, 48px)
}

.actas-header p {
    max-width: 720px;
    margin: 0 auto;
    color: var(--rpmo-muted);
    font-size: 16px;
    line-height: 1.7
}

.actas-scene {
    position: relative;
    width: 100%;
    max-width: 1200px;
    height: 570px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1400px
}

.actas-carousel {
    position: relative;
    width: 250px;
    height: 360px;
    transform-style: preserve-3d;
    animation: actasGiro 65s linear infinite
}

.actas-scene:hover .actas-carousel {
    animation-play-state: paused
}

.acta-card {
    position: absolute;
    top: 0;
    left: 0;
    width: 250px;
    height: 360px;
    transform-style: preserve-3d;
    transform: rotateY(var(--angulo, 0deg)) translateZ(390px)
}

.acta-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform .85s cubic-bezier(.23, 1, .32, 1)
}

.acta-card:hover .acta-card-inner,
.acta-card.is-flipped .acta-card-inner {
    transform: rotateY(180deg)
}

.acta-front,
.acta-back {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border-radius: 22px;
    border: 1px solid rgba(199, 154, 59, .45);
    background: white;
    box-shadow: 0 20px 45px rgba(9, 55, 67, .22);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden
}

.acta-front {
    display: flex;
    flex-direction: column
}

.acta-front-image {
    position: relative;
    width: 100%;
    flex: 1 1 auto;
    overflow: hidden;
    background: black
}

.acta-front-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    position: relative;
    overflow: visible;
}

.acta-front-info {
    flex: 1;
    min-height: 115px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 12px 15px 16px;
    text-align: center;
    background: #fff
}

.acta-front-info span,
.acta-back span {
    color: var(--rpmo-accent);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.8px
}

.acta-front-info h2 {
    margin: 8px 0 6px;
    color: var(--rpmo-primary);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 22px;
    line-height: 1.15
}

.acta-front-info p {
    margin: 0;
    color: var(--rpmo-muted);
    font-size: 14px;
    font-weight: 600
}

.acta-back {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 28px;
    color: #fff;
    background: linear-gradient(145deg, var(--rpmo-primary-dark), var(--rpmo-primary));
    transform: rotateY(180deg)
}

.acta-back h3 {
    margin: 10px 0 15px;
    color: #fff;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 24px;
    line-height: 1.2
}

.acta-back p {
    margin: 0;
    color: rgba(255, 255, 255, .88);
    font-size: 14px;
    line-height: 1.7
}

@keyframes actasGiro {
    from {
        transform: rotateY(0deg)
    }

    to {
        transform: rotateY(360deg)
    }
}

@media(max-width:900px) {
    .actas-section {
        padding-top: 55px
    }

    .actas-scene {
        height: 510px;
        perspective: 1200px
    }

    .actas-carousel {
        width: 220px;
        height: 325px
    }

    .acta-card {
        width: 220px;
        height: 325px;
        transform: rotateY(var(--angulo, 0deg)) translateZ(315px)
    }

    .acta-front-image {
        height: 220px;
        flex-basis: 220px
    }

    .acta-front-info {
        min-height: 105px
    }

    .acta-front-info h2 {
        font-size: 19px
    }
}

@media(max-width:650px) {
    .actas-section {
        padding: 45px 12px 60px
    }

    .actas-header p {
        font-size: 14px;
        line-height: 1.6
    }

    .actas-scene {
        height: 450px;
        perspective: 900px
    }

    .actas-carousel {
        width: 185px;
        height: 285px
    }

    .acta-card {
        width: 185px;
        height: 285px;
        transform: rotateY(var(--angulo, 0deg)) translateZ(235px)
    }

    .acta-front {
        border-radius: 18px
    }

    .acta-front-image {
        height: 190px;
        flex-basis: 190px
    }

    .acta-front-info {
        min-height: 95px;
        padding: 8px 10px 12px
    }

    .acta-front-info h2 {
        margin: 5px 0;
        font-size: 17px
    }

    .acta-front-info span,
    .acta-back span {
        font-size: 9px;
        letter-spacing: 1.3px
    }

    .acta-front-info p {
        font-size: 12px
    }

    .acta-back {
        padding: 20px
    }

    .acta-back h3 {
        font-size: 19px
    }

    .acta-back p {
        font-size: 12px;
        line-height: 1.55
    }
}

@media(prefers-reduced-motion:reduce) {
    .actas-carousel {
        animation: none
    }

    .acta-card-inner {
        transition: none
    }
}

/* AÑO INDEPENDIENTE DE LA TARJETA */
.acta-year-wrap {
    position: absolute;
    left: 0;
    bottom: -82px;
    width: 100%;
    height: 72px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    pointer-events: none;
    z-index: 20;
    transform-style: preserve-3d;
}

.acta-year {
    display: block;
    position: relative;
    margin: 0;
    font-family:  "Times New Roman", Times, serif;
    font-size: clamp(1rem, 6vw, 1rem);
    font-weight: 700;
    line-height: 1;
    color: #000;
    white-space: nowrap;
    transform-origin: center center;
    transform: translateX(0) rotateY(calc(var(--angulo, 0deg) * -1));
    animation: actaYearCounter 65s linear infinite;
    animation-play-state: running;
    will-change: transform;
    text-shadow: 0 2px 2px rgba(255, 255, 255, .55);
}

@keyframes actaYearCounter {
    from {
        transform: translateX(0) rotateY(calc(var(--angulo, 0deg) * -1)) rotateY(0deg);
    }
    to {
        transform: translateX(0) rotateY(calc(var(--angulo, 0deg) * -1)) rotateY(-360deg);
    }
}

/* El carrusel se detiene con el mouse; el año debe detenerse exactamente
   en la misma posición para no perder la sincronización. */
.actas-scene:hover .acta-year {
    animation-play-state: paused;
}

@media (max-width: 900px) {
    .acta-year-wrap {
        bottom: -70px;
        height: 62px;
    }

    .acta-year {
        font-size: 44px;
    }
}

@media (max-width: 650px) {
    .acta-year-wrap {
        bottom: -62px;
        height: 56px;
    }

    .acta-year {
        font-size: 40px;
    }
}

/* EFECTO DE BORDES ENVEJECIDOS */

.actas-section::before,
.actas-section::after {
    content: "";
    position: absolute;
    left: 0;
    width: 100%;
    height: 45px;

    pointer-events: none;
    z-index: 0;
}

.actas-section::before {
    top: 0;

    background:
        linear-gradient(
            to bottom,
            rgba(104, 75, 29, 0.22),
            transparent
        );
}

.actas-section::after {
    bottom: 0;

    background:
        linear-gradient(
            to top,
            rgba(104, 75, 29, 0.22),
            transparent
        );
}
/* FONDO TIPO PERGAMINO*/

body {
    font-family: Arial, Helvetica, sans-serif;
    color: var(--rpmo-text);

    background:
        radial-gradient(
            ellipse at center,
            rgba(255, 248, 220, 0.95) 0%,
            rgba(232, 211, 166, 0.95) 55%,
            rgba(194, 163, 105, 0.95) 100%
        );

    background-attachment: fixed;
}

.actas-page {
    min-height: 100vh;
    width: 100%
}
