/* FUENTES */
@font-face {
    font-family: 'MajritTx';
    src: url('//static.elpais.com/dist/resources/fonts/majrit/majrit-text/Majrit-Text-Semibold.woff') format('woff');
    font-weight: 582;
    font-style: normal;
}

@font-face {
    font-family: 'MajritBn';
    src: url('https://static.elpais.com/dist/resources/fonts/majrit/majrit-banner/Majrit-Banner-Black.woff') format('woff');
    font-weight: 900;
    font-style: normal;
}

@font-face {
    font-family: 'MajritBn';
    src: url('https://static.elpais.com/dist/resources/fonts/majrit/majrit-banner/Majrit-Banner-Bold-Italic.woff') format('woff');
    font-weight: 720;
    font-style: italic;
}

@font-face {
    font-family: 'MajritBn';
    src: url('https://static.elpais.com/dist/resources/fonts/majrit/majrit-banner/Majrit-Banner-Light.woff') format('woff');
    font-weight: 300;
    font-style: normal;
}

/* SOBRESCRITURA */
body {
    background-color: #F2F2F2 !important;
}
body .a {
    background-color: transparent !important;
}

body .a_e {border-bottom: 0px;}

body .a_e .a_k, body .a_e .a_t {
    display: none !important;
}

body .a_e .a_st {
    font-family: 'MajritTx', sans-serif;
    /*font-size: 26px;
    line-height: 34px;
    letter-spacing: -0.2px;*/
    text-align: center;

    background: #fff;
    padding: 50px 30px;
    margin: 0 auto;
    color: #000;
}

body .a .a_c .icon_multimedia_ampliar {
    display: none !important;
}

/* APERTURA */
body .apertura {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body .apertura .apertura-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: calc(100% - 24px);
    max-width: 1199px;
    margin: 24px auto 36px auto;

    box-sizing: border-box;
    padding-top: 24px;
    border-top: 1px solid #000;
}

.apertura-title {
    text-align: left;
    text-wrap: pretty;
    width: 100%;
    max-width: 320px;
    opacity: 0;
    animation: opacidad 1s forwards .25s;
}

.apertura-title h1 {
    font-family: MajritBn, sans-serif;
    font-weight: 300;
    font-size: 30px;
    line-height: 30px;
    text-transform: uppercase;

    margin: 0;
    margin-bottom: 12px;
}

.apertura-title .bajar {
    display: inline-block;
    text-align: left;
    padding-left: 4px;
    margin: 10px auto 0;
    position: relative;
    z-index: 1;
    opacity: 0;
    visibility: visible;
    animation: bajar 3s infinite 1.5s, opacidad 1s forwards 1s;
}
  
.apertura-title .bajar span {
    display: block;
    text-indent: -9999px;
    overflow: hidden;
    width: 15px;
    height: 15px;
    border-top: 1px solid #000;
    border-right: 1px solid #000;
    transform: rotate(135deg);
}

.apertura-images {
    position: relative;
    width: 120%;
    margin-left: -10%;
    overflow: hidden;
}

.apertura-images .bucle-images {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%) rotate(7deg);
    width: auto;
    max-width: 538px;
    height: 90%;
    aspect-ratio: 521 / 698;
    overflow: hidden;
    opacity: 0;
}
.apertura-images .bucle-images.active {
    opacity: 1;
    z-index: 1;
}

.apertura-images .bucle-images img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    pointer-events: none;
}
.apertura-images .bucle-images.active img {
    transition: opacity 1s ease;
}

.apertura-images .bucle-images img.visible {
    opacity: 1;
}

.apertura-images .fondo-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    animation: opacidad 1s forwards 1s;
}

/* LADILLOS */
body .a_c h2 {
    position: relative;

    font-family: MajritBn, sans-serif;
    font-weight: 300;
    font-size: 30px;
    line-height: 30px;
    text-transform: uppercase;

    box-sizing: border-box;
    padding-left: 20px;
    border-left: 1px solid #000;

    max-width: 200px;

    padding-bottom: 0px;
    margin-bottom: 0px;
}

body .a_c h3:not(.w_t) {
    font-family: MajritBn, sans-serif;
    font-weight: 720;
    font-style: italic;
    font-size: 20px;
    line-height: 26px;

    text-transform: none;

    box-sizing: border-box;
    padding-left: 22px;
    padding-bottom: 0px;
    border-left: 1px solid #000;
}

body .a_c h2:after,
body .a_c h3:not(.w_t):after {
    height: 0px;
}

body .a_c h2 + h3 {
    padding-top: 12px;
    margin-top: 0px;
}

/* IMÁGENES */
body .a_c .a_m .a_m_w {
    margin: 0 auto;
}
body .a_c .a_m_p {
    box-sizing: border-box;
    padding: 12px 16px 20px 16px;
    border-bottom: 0px !important;
    background: #fff;
    
    text-align: right;
}

/* IMÁGENES Y LOCALIZADORES */
body .a .a_c .raw_html:has(.width-especial),
body .a .a_c .a_gph {
    margin-top: -2.5rem;
    margin-bottom: 3.75rem;
}

/* GALERÍAS (STACKED) */
.gallery-vertical .stack_title {
    position: sticky;
    top: 56px;
    z-index: 10;
    background: #F2F2F2 !important;
    padding: 16px 0px;
}

.gallery-vertical .stack_title h2 {
    margin-top: 0px !important;
}
.gallery-vertical .stack_title h3 {
    margin-bottom: 0px !important;
}

.gallery-vertical .stack_cards {
    margin: 3.75rem 0;
}

.gallery-vertical .stack_card {
    display: flex;
    flex-direction: column;
    background-color: #f2f2f2 !important;

    height: auto;

    position: sticky;
    top: 0px;
    margin-top: 30vh;

    width: 100%;
    max-width: 624px;
}

.gallery-vertical .stack_card:first-child {
    margin-top: 10vh;
}

.gallery-vertical .stack_card img {
    width: auto !important;
    height: auto !important;
    max-height: calc(100% - 48px);
    object-fit: contain;
    background-color: #fff !important;
}

.gallery-vertical .stack_card figcaption {
    margin-bottom: 16px;
}

/* MEDIA QUERIES */
@media (min-width: 48em) {
    .apertura .apertura-container {
        margin: 44px auto 52px auto;
        padding-top: 44px;
    }
    .apertura-title {
        max-width: 798px;
        margin: 0 auto;
    }
    .apertura-title h1 {
        font-size: 40px;
        line-height: 40px;
        max-width: 400px;
    }

    .apertura-images {
        max-width: 798px;
        margin-left: auto;
        margin: 0 auto;
        overflow: unset;
    }

    .apertura-images .fondo-image {
        max-width: 798px;
    }

    body .a_c h2 {
        font-size: 40px;
        line-height: 40px;
        padding-left: 25px;
        max-width: 320px;

        margin-left: 0px;
    }

    body .a_c h3:not(.w_t) {
        font-size: 24px;
        line-height: 32px;
        padding-left: 25px;

        margin-left: 0px;
    }
}

@media (min-width: 62.5625em) {
    /* SOBRESCRITURA */
    body .a_e .a_st {
        padding: 100px;
    }

    body .a .a_c .raw_html:has(.width-especial),
    body .a .a_c .a_gph {
        margin-bottom: 2rem;
    }

    /* APERTURA */
    body .apertura .apertura-container {
        width: 100%;
        flex-direction: row;
        gap: 60px;
        margin: 130px auto 80px auto;
        padding-top: 40px;
    }

    .apertura-title {
        max-width: 380px;
    }

    .apertura-title h1 {
        font-size: 50px;
        line-height: 50px;
        max-width: unset;
    }

    .apertura-images {
        margin-top: -80px;
    }

    /* LADILLOS */
    body .a .a_c h2,
    body .a .a_c h3:not(.w_t) {
        padding-left: 50px;
    }

    body .a .a_c h2 {
        margin: 3.75rem var(--grid-10-2-column-content) 0px;
    }

    body .a .a_c h3:not(.w_t) {
        margin: 0px var(--grid-10-2-column-content) 1.6875rem;
    }

    body .a .a_c .stack_card {
        margin-left: var(--grid-10-2-column-content);
        margin-right: var(--grid-10-2-column-content);
    }
}

@media (min-width: 74.9375) {
    body .a .a_c .w-cr {
        margin: 0 var(--grid-10-2-column-content) 2rem var(--grid-10-2-column-content);
    }
}

@media (max-height: 45em) and (max-width: 47.9em) {
    .gallery-vertical .stack_title {
        padding: 8px 0px;
    }

    .gallery-vertical .stack_title h2 {
        font-size: 24px;
        line-height: 24px;
        max-width: unset;
    }

    .gallery-vertical .stack_title h3 {
        font-size: 16px;
        line-height: 22px;
        padding-top: 4px;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
        scroll-behavior: auto !important;
    }
}

/* ANIMACIONES */
@keyframes opacidad {
    100% {
        opacity:1;
    }
}

@keyframes bajar {
    0%, 100% {
        transform: translateY(0);
    }
    25% {
        transform: translateY(-0.5rem);
    }
    50% {
        transform: translateY(0rem);
    }
    75% {
        transform: translateY(-0.25rem);
    } 
}