﻿/*------------------------------------ structure -----------------------------------------*/

.container_bg_krg.navigation_gap {
    padding-top: 140px;
}


.container_bg_krg {
    max-width: 2560px;
    margin: 0 auto;
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

@media screen and (max-width: 1024px){
    .container_bg_krg {
        padding: 3rem 0;
    }
}

/*------- menu-fragment ayuda a scrollear correctamente desde las anchors -------*/

.menu-fragment {
    scroll-margin-top: 81px;
}

body:has(.sticky_down) .menu-fragment {
    scroll-margin-top: 137px;
}

@media screen and (max-width: 1024px) {
    .menu-fragment {
        scroll-margin-top: 65px;
    }

    body:has(.sticky_down) .menu-fragment {
        scroll-margin-top: 121px;
    }
}

/*------------------------------------------*/

.container {
    max-width: 1500px;
    margin: 0 auto;
    padding-left: 0;
    padding-right: 0;
}


.container_narrow {
    max-width: 700px;
}


@media screen and (max-width: 1650px) {
    .container {
        padding-left: 5%;
        padding-right: 5%;
    }
}

.flex_container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}


.flex_unit_text {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

@media screen and (max-width: 790px) {

    .flex_unit_text {
        justify-content: center;
    }
}

.flex_unit_text_wrapper {
    display: block;
}

.flex_unit_image {
    display: flex;
    align-items: center;
    justify-content: center;
}

    .flex_unit_image img {
        width: 450px;
    }


@media screen and (min-width: 790px) {
    .flex_container {
        flex-direction: row;
    }

        .flex_container.always_column {
            flex-direction: column;
        }

        .flex_container.row_xl_reverse {
            flex-direction: row-reverse;
        }

    .flex_unit {
        flex-basis: 50%;
    }

    .flex_unit_left {
        margin-right: auto;
    }

    .flex_unit_right {
        margin-left: auto;
    }
}




/*------------------------------------ titles -----------------------------------------*/

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: 'Titillium Web', sans-serif;
    text-transform: uppercase;
    /*margin-bottom: 0.3em;*/
    font-weight: 900;
    line-height: 1.2;
}

h1, .h1 {
    font-size: 2.5rem;
}

h2, .h2 {
    font-size: 2rem;
}

h3, .h3 {
    font-size: 1.8rem;
}


.intro_block {
    text-align: center;
    max-width: 690px;
    margin: 0 auto 30px;
}


.section_h1 {
    font-size: 2.8rem;
    line-height: 0.9em;
    font-weight: 900;
    color: white;
    text-shadow: 0px 4px 0px rgba(0, 0, 0, 1);
    margin: 0 0 0.3rem;
    text-wrap: pretty;
}

.section_h2 {
    font-size: 1.9rem;
    line-height: 1em;
    margin: 0 auto 0.7rem;
    color: #ffd24a;
    text-shadow: 0px 4px 0px rgba(0, 0, 0, 1);
    text-wrap: pretty;
}

.section_p {
    font-size: 1.3rem;
    line-height: 1.2em;
    color: #fff;
    font-weight: normal;
    text-wrap: pretty;
    margin: 0;
    text-shadow: 0px 4px 10px rgba(0, 0, 0, 0.4);
}

@media screen and (max-width: 1024px){
    .section_h1 {
        font-size: 2rem;
    }

    .section_h2 {
        font-size: 1.45rem;
    }

    .section_p {
        font-size: 1rem;
    }
}

.section_h1_dark {
    font-size: 2.5rem;
    line-height: 1;
    font-weight: 900;
    color: #5d4227;
    margin-bottom: 0.3em;
    text-wrap: pretty;
}

.text_yellow {
    color: #ffd24a;
}

.header_h1 {
    font-size: 3.2rem;
    line-height: 1;
    font-weight: 900;
    color: white;
    margin-bottom: 0.3em;
    text-wrap: pretty;
}



.title_dark {
    color: #234048;
}

.title_light {
    color: white;
}


form h3.title_dark {
    margin-bottom: 1.2rem;
}




/*------------------------------------ kr6_btn -----------------------------------------*/

button {
    background: none;
    outline: none;
    border: none;
}

.kr6_btn {
    color: white;
    height: 60px;
    padding: 5px 30px 10px 30px;
    border-radius: 5px;
    font-family: 'Titillium Web', sans-serif;
    text-transform: uppercase;
    text-decoration: none;
    font-weight: 800;
    letter-spacing: 0.05em;
    font-size: 19px;
    line-height: 43px;
    cursor: var(--cursor-pointer);
    /* Text styling */
    text-shadow:
    /* Stroke negro de 1px alrededor */
    1px 0 0 #000, -1px 0 0 #000, 0 1px 0 #000, 0 -1px 0 #000, 1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000,
    /* Sombra dura 3px hacia abajo (también con stroke para que se vea limpia) */
    1px 3px 0 #000, -1px 3px 0 #000, 0 3px 0 #000, 1px 4px 0 #000, -1px 4px 0 #000, 0 4px 0 #000;
    background: url("/img/ui_icons/btn/left.png"), url("/img/ui_icons/btn/right.png"), url("/img/ui_icons/btn/center.png");
    background-repeat: no-repeat, no-repeat, no-repeat;
    background-position: left, right, center;
    background-size: auto 60px, auto 60px, 96% 60px;
    filter: drop-shadow(2px 4px 0 rgba(0, 0, 0, 0.3)) brightness(100%);
    outline: none;
    //transition: 0.15s;
}

    .kr6_btn:active {
        transform: translateY(2px);
    }

    .kr6_btn:hover {
        //filter: drop-shadow(2px 4px 0 rgba(0, 0, 0, 0.3)) brightness(110%);
        filter: drop-shadow(2px 4px 0 rgba(0, 0, 0, 0.3)) drop-shadow(0 0 1px #ffd24a) drop-shadow(0 0 2px #ffd24a) drop-shadow(0 0 2px #ffd24a) drop-shadow(0 0 2px #ffd24a) brightness(110%);
        //outline: 2px solid #ffd24a;
    }


    @media screen and (max-width: 414px){
        .kr6_btn {
            font-size: 16px;
        }
    }

a.kr6_btn {
    display: inline-block;
}

.kr6_btn.btn_center{
    margin-left: auto;
    margin-right: auto;
}


/*------------------------------------ link_mp -----------------------------------------*/
.link_mp {
    font-family: var(--site-font-family), sans-serif;
    font-size: 1.45rem;
    line-height: 1.45rem;
    font-weight: 900;
    text-transform: uppercase;
    text-decoration: none;
    display: inline-block;
    padding-bottom: .2em;
    border-bottom: 3px solid transparent;
    transition: .1s;
    --link-krg-grey: #446167;
    --link-krg-blue: #00D3FF;
    margin: 1.5em auto 5px;
}

a.link_mp_grey {
    color: var(--link-krg-grey);
}

a.link_mp_blue {
    color: var(--link-krg-blue);
}

.link_mp span {
    display: inline-block;
    width: 0;
    height: 0;
    border-top: .4em solid transparent;
    border-bottom: .4em solid transparent;
    border-left: .4em solid red;
    margin-left: .3em;
    transition: all .3s;
}

.link_mp_grey span {
    border-left: .5em solid var(--link-krg-grey);
}

.link_mp_blue span {
    border-left: .5em solid var(--link-krg-blue);
}

.link_mp_grey:hover {
    border-bottom: 3px solid var(--link-krg-grey);
    text-decoration: none;
}

.link_mp_blue:hover {
    border-bottom: 3px solid var(--link-krg-blue);
    text-decoration: none;
}

.link_mp:hover span {
    margin-left: .6em;
}

/*--------------------------------- SEPARATIONS -------------------------------------*/


.line_KRG_1 {
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width:800px;
    height: 95px;
    z-index: 2;
    margin-top: -48px;
    margin-bottom: -48px;
    background-image: url(/img/separation/line_KRG_1.png);
    background-repeat: no-repeat;
    background-position: center;
    background-size: 90% 25px;
}


.separation_simple {
    z-index: 1;
    max-width: 2560px;
    height: 16px;
    background-image: url(/img/separation/separation_KRG.png);
    background-repeat: repeat-x;
    position: relative;
    /*z-index:2;*/
    top: 0;
    left: 0;
    margin: -12px auto -12px;
    background-size: auto 16px;
}

@media screen and (min-width: 1024px) {
    .separation_simple {
        height: 18px;
        margin: -16px auto -16px;
        background-size: auto 18px;
    }
}

.div_sm {
    display: none;
    border: 0;
    margin: -1px auto 0;
    height: 1px;
    width: 50%;
    background-image: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0));
}

@media screen and (max-width: 1024px){
    .div_sm {
        display: block;
    }
}


/*---------------------------------------------- text utilities ---------------------------------------------------*/

.text_center {
    text-align: center;
}

.text_left {
    text-align: left;
}

@media screen and (min-width: 790px) {
    .text_md_left {
        text-align: left;
    }

    .text_md_right {
        text-align: right;
    }

    .text_md_center {
        text-align: center;
    }
}

@media screen and (min-width: 1024px) {
    .text_xl_left {
        text-align: left;
    }

    .text_xl_right {
        text-align: right;
    }

    .text_xl_center {
        text-align: center;
    }
}

/*----------------------------------------------- news article-item --------------------------------------------------------*/

 .article-item .content {
    text-align: left;
}


/*------------------------------------------------------ MODAL ---------------------------------------------------------*/

.modal{ 
    box-sizing: border-box;
}

.modal h3{
    margin-top: 0;
}

.modal p{
    margin: 0;
}

.modal-frame {
    max-height: 95vh;
    overflow: auto;
}

/*------------------------------------------------- LIGHTBOX (blueimp-gallery) ------------------------------------------------*/
/* Override de posición del caption: la librería (Ironhide.UI) lo pone arriba a la izquierda por default */

.blueimp-gallery .title {
    /* La libreria solo lo muestra si el modal tiene la clase .blueimp-gallery-controls
       (se agrega/quita al tocar la imagen). Lo forzamos visible siempre. */
    display: block !important;
    top: auto;
    left: 0;
    right: 0;
    bottom: 40px;
    margin: 0 auto;
    text-align: center;
    font-family: var(--site-font-family), sans-serif;
    font-size: 1.3rem;
    font-weight: normal;
    color: #fff;
    /* Pastilla negra: con imágenes muy claras el texto blanco se perdía */
    width: fit-content;
    max-width: calc(100% - 2rem);
    padding: 0.4rem 1rem;
    background: #000;
    border-radius: 8px;
}

/* Sin título (p. ej. screenshots de terrains) no se muestra la pastilla vacía */
.blueimp-gallery .title:empty {
    display: none !important;
}

/* Portraits de spells (lightbox compartido con terrains): se limitan por src para no afectar a los screenshots,
   que deben ocupar todo el ancho disponible (comportamiento por defecto de la librería).
   Portrait completo: ancho máximo de 1000px (sin pasar del viewport). */
.blueimp-gallery > .slides > .slide > .slide-content[src*="/img/chars/spells/"] {
    max-width: min(100%, 1000px);
}

/* Pantallas retina (2x o más): los portraits miden 1180px, a 2x son nítidos hasta ~590px CSS.
   Máximo de 550px para que no se vean pixelados. */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 2dppx) {
    .blueimp-gallery > .slides > .slide > .slide-content[src*="/img/chars/spells/"] {
        max-width: min(100%, 550px);
    }
}

/*--------------------------------------------- IMAGES ----------------------------------------------------*/


img{
    max-width: 100%;
    height: auto;
    box-sizing: border-box;
}

/*--------------------------------------------- NEW TAG ----------------------------------------------------*/
/* Agregar la clase "is_new" a cualquier elemento: círculo "NEW" pegado a su esquina superior derecha (por fuera,
   sin tapar el texto), rotado 15° antihorario, con un pulso suave de escala (1 -> 1.1, 1.5s en loop).
   Se ajusta por elemento con --new-size / --new-font / --new-top / --new-right. */
.is_new {
    position: relative;
}

    .is_new::after {
        content: "NEW";
        position: absolute;
        top: var(--new-top, -0.9rem);
        right: var(--new-right, calc(var(--new-size, 2.4rem) * -1 - 0.15rem)); /* por defecto: todo el círculo a la derecha del elemento */
        width: var(--new-size, 2.4rem);
        height: var(--new-size, 2.4rem);
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        background: #caf34b;
        color: #195323;
        font-family: 'Titillium Web', sans-serif;
        font-weight: 900;
        font-size: var(--new-font, 0.75rem);
        line-height: 1;
        letter-spacing: 0.02em;
        transform: rotate(-15deg);
        animation: new_tag_pulse 1.5s ease-in-out infinite;
        will-change: transform;
        pointer-events: none;
    }

@keyframes new_tag_pulse {
    0%, 100% {
        transform: rotate(-15deg) scale(1);
    }

    50% {
        transform: rotate(-15deg) scale(1.1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .is_new::after {
        animation: none;
    }
}
