/* Estilo básico para establecer el color de la letra */
.talentum-gallery-widget-frontend,
.talentum-gallery-widget-editor {
    color: #A0A0A0;
}

/* Limitar la altura máxima del módulo a 1000px */
.talentum-gallery-widget-frontend {
    background-color: #000;
    max-height: 1000px;
    overflow: hidden;
    padding: 10px 0 0 0;
}

/* Estructura principal */
.talentum-gallery-widget-frontend .widget-header {
    background-color: #0A0A0A;
}

.talentum-gallery-widget-frontend .header-row {
    display: flex;
    gap: 20px;
    justify-content: space-between;
}

.talentum-gallery-widget-frontend .header-column {
    width: 48%;
}

.talentum-gallery-widget-frontend .header-column.left {
    padding: 20px;
    text-align: left;
}

.talentum-gallery-widget-frontend .header-column.left h2 {
    color: #969696;
    font-family: 'puristaLight';
    font-size: 33px;
    margin-bottom: 0;
    margin-top: 0;
}

.talentum-gallery-widget-frontend .header-column.left p.subtitle {
    color: #646464;
    margin-bottom: 0;
    margin-bottom: 0;
}

.talentum-gallery-widget-frontend .header-column.right {
    align-items: center;
    display: inline-flex;
    justify-content: flex-end;
    padding: 20px;
    text-align: right;
}

.talentum-gallery-widget-frontend .header-column.right .level {
    margin-bottom: 0;
}

.talentum-gallery-widget-frontend .header-column.right .level span {
    border: 1px solid #3C3C3C;
    -webkit-border-radius: 10px;
    -moz-border-radius: 10px;
    border-radius: 10px;
    color: #3C3C3C!important;
    cursor: pointer;
    display: inline-block;
    font-family: "microgrammaBold";
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 0;
    padding: 3px 15px;
    text-transform: uppercase;
}

.talentum-gallery-widget-frontend .header-column.right .level span:not(:first-of-type) {
    margin-left: 12px;
}

.talentum-gallery-widget-frontend .header-column.right .level span.active {
    color: #B40000!important;
    border-color: #B40000;
}

.talentum-gallery-widget-frontend .header-column.right .level span:hover {
    color: #B40000!important;
    border-color: #B40000;
}

/* Main Row */
.talentum-gallery-widget-frontend .main-row {
    display: flex;
    background-color: #141414;
    height: calc(100% - 100px); /* Ajustar altura restante */
}

.talentum-gallery-widget-frontend .left-column {
    display: flex;
    flex-direction: column;
    max-width: 330px;
}

.talentum-gallery-widget-frontend .tgw-level {
    display: none;
}

.talentum-gallery-widget-frontend .tgw-level.active {
    display: block;
}

.talentum-gallery-widget-frontend .right-column {
    overflow: hidden;
    padding-left: 50px;
    padding-right: 50px;
    position: relative;
    text-align: left;
    width: 100%;
}

.talentum-gallery-widget-frontend .right-column .tgw-gallery-prev {
    background: transparent;
    color: #505050;
    font-size: 80px;
    left: 18px;
    padding: 0;
    position: absolute;
    text-decoration: none;
    top: 50%;
    transform: translateY(-50%);
    z-index: 999;
}

.talentum-gallery-widget-frontend .right-column .tgw-gallery-next {
    background: transparent;
    color: #505050;
    font-size: 80px;
    padding: 0;
    position: absolute;
    right: 18px;
    text-decoration: none;
    top: 50%;
    transform: translateY(-50%);
    z-index: 999;
}

.talentum-gallery-widget-frontend .right-column .tgw-gallery-prev img, .talentum-gallery-widget-frontend .right-column .tgw-gallery-next img {
    width: 20px;
}

.talentum-gallery-widget-frontend .right-column .tgw-gallery-prev:hover, 
.talentum-gallery-widget-frontend .right-column .tgw-gallery-next:hover {
    text-decoration: none;
}

.talentum-gallery-widget-frontend .right-column .tgw-gallery-prev.disabled, 
.talentum-gallery-widget-frontend .right-column .tgw-gallery-next.disabled {
    color: #141414;
    pointer-events: none;
}

.talentum-gallery-widget-frontend .right-column .right-column-wrapper {
    margin: 0 auto;
/*    max-width: 945px;*/
}

/* Botones GLOSSY y MATT */
.talentum-gallery-widget-frontend .finish-selection {
    background-color: #191919;
    display: flex;
    justify-content: space-around;
    padding-bottom: 15px;
    padding-left: 48px;
    padding-right: 29px;
    padding-top: 15px;
}

.talentum-gallery-widget-frontend .finish-button {
    color: #787878;
    cursor: pointer;
    background: transparent;
    border: none;
    flex: 1;
    font-family: "puristaLight";
    font-size: 16px;
    margin: 0 5px;
    padding: 3px 15px 4px;
    border: 1px solid #787878;
    border-radius: 10px;
    text-decoration: none;
}

.talentum-gallery-widget-frontend .finish-button.active {
    border-color: #B40000;
    color: #B40000;
}

.talentum-gallery-widget-frontend .finish-button:hover {
    border-color: #B40000;
    color: #B40000;
    text-decoration: none;
}

/* Categorías y Galería */
.talentum-gallery-widget-frontend .categories-and-gallery {
    background-color: #232323;
    border-top: 2px solid #282828;
    display: flex;
    flex-grow: 1;
    overflow: hidden;
    position: relative;
}

.talentum-gallery-widget-frontend .categories-and-gallery::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #282828;
}

.talentum-gallery-widget-frontend .tgw-categories-column {
    padding: 0;
    width: 30px;
    display: none;
    flex-direction: column;
    justify-content: space-between; /* Distribuir equitativamente */
    align-items: center;
}

.talentum-gallery-widget-frontend .tgw-categories-column.active {
    display: flex;
}

.talentum-gallery-widget-frontend .tgw-category-title {
    background-color: #141414;
    border-top: 1px solid #282828;
    color: #787878;
    cursor: pointer;
    flex: 0 0 33.33333%;
    font-family: "microgrammaBold";
    font-size: 17px;
    padding: 0 11px 0 5px;
    text-align: center;
    transform: rotate(180deg);
    writing-mode: vertical-rl;
}

/* .talentum-gallery-widget-frontend .tgw-category-title:first-of-type {
    padding-bottom: 20px;
} */


.talentum-gallery-widget-frontend .tgw-category-title.active {
    background-color: #232323;
    color: #B40000;
}

.talentum-gallery-widget-frontend .tgw-category-title:hover {
    color: #B40000;
}

.talentum-gallery-widget-frontend .tgw-category-title.tgw-empty {
    border-top: none;
    font-family: 'puristaSemiBold';
}

.talentum-gallery-widget-frontend .tgw-category-title span.euro {
    font-family: 'puristaSemiBold';
}

/* Galería de Imágenes */
.talentum-gallery-widget-frontend .tgw-gallery-column {
    flex-grow: 1;
    max-height: 810px;
    padding-left: 20px;
    padding-right: 14px;
    overflow-y: scroll; /* Añadir desplazamiento vertical */
}

.talentum-gallery-widget-frontend .tgw-gallery-column::-webkit-scrollbar {
    width: 12px; /* Ancho de la barra de scroll */
    background-color: #323232; /* Fondo de la barra de scroll */
}

.talentum-gallery-widget-frontend .tgw-gallery-column::-webkit-scrollbar-thumb {
    background-color: #191919; /* Color del "pulgar" (thumb) de la barra de scroll */
}

.talentum-gallery-widget-frontend .tgw-gallery-column::-webkit-scrollbar-button {
    background-color: #232323; /* Color de las flechas */
}

.talentum-gallery-widget-frontend .tgw-gallery-group {
    display: none;
    padding-top: 18px;
}

.talentum-gallery-widget-frontend .tgw-gallery-group.active {
    display: block;
}

.talentum-gallery-widget-frontend .tgw-image-thumbnails {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-bottom: 15px;
}

.talentum-gallery-widget-frontend .tgw-thumbnail-image {
    width: calc(50% - 5px);
    margin: 4px 0;
    padding: 0;
    cursor: pointer;
    border: 1px solid #787878;
}

.talentum-gallery-widget-frontend .tgw-thumbnail-image.active {
    border-color: #B40000;
}

/* Imagen Principal */
.talentum-gallery-widget-frontend .main-image-container {
    margin: 20px 0;
    position: relative;
}

.talentum-gallery-widget-frontend .main-image {
    cursor: zoom-in;
    height: auto;
    max-width: 100%;
}

/* Upper y Lower Title */
.talentum-gallery-widget-frontend .upper-title {
    color: #505050;
    font-size: 22px;
    font-weight: 400;
    margin: 35px 0 35px 0;
}

.talentum-gallery-widget-frontend .lower-title {
    color: #505050;
    font-size: 20px;
    font-weight: 400;
    margin: 35px 0;
}

/* Estilos para el editor */
.talentum-gallery-widget-editor {
    color: #A0A0A0;
}

.talentum-gallery-widget-editor .editor-row {
    display: flex;
    justify-content: space-between;
}

.talentum-gallery-widget-editor .editor-column {
    width: 48%;
}

.talentum-gallery-widget-editor .editor-column h2,
.talentum-gallery-widget-editor .editor-column h4,
.talentum-gallery-widget-editor .editor-column h5 {
    margin: 5px 0;
}

/** tgw lightbox **/
html.tgw-lightbox, html.tgw-lightbox body {
    background-color: #222;
    overflow: hidden!important;
}

html.tgw-lightbox .tgw-lightbox-active-section > div {
    max-width: unset!important;
}

html.tgw-lightbox div[data-elementor-type="header"], html.tgw-lightbox div[data-elementor-type="footer"] {
    display: none;
}

html.tgw-lightbox div[data-elementor-type="wp-page"] > *:not(.tgw-lightbox-active-section) {
    display: none!important;
}

html.tgw-lightbox .tgw-lightbox-active-section .widget-header {
    display: none;
}

html.tgw-lightbox .right-column.tgw-lightbox-active {
    align-items: center;
    background: #222;
    display: flex;
    height: 100%;
    padding: 0;
    position: fixed;
    width: 100%;
    z-index: 999999;
}

html.tgw-lightbox .right-column.tgw-lightbox-active .main-image {
    cursor: zoom-out;
}

html.tgw-lightbox .right-column.tgw-lightbox-active h4.upper-title, 
html.tgw-lightbox .right-column.tgw-lightbox-active h5.lower-title {
    display: none;
}

@media all and (max-width: 1024px) {
    html.tgw-lightbox .right-column.tgw-lightbox-active {
        height: auto;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }

    html.tgw-lightbox, html.tgw-lightbox body {
        align-items: center;
        background-color: #222;
        display: flex;
        height: 100vh;
    }

    html.tgw-lightbox .tgw-lightbox-active-section .main-row {
        background-color: #222;
    }

    html.tgw-lightbox .tgw-lightbox-active-section .talentum-gallery-widget-frontend {
        border-color: #222; /*Hack para movil*/
        border: none;
        padding: 0;
    }

    html.tgw-lightbox .tgw-lightbox-active-section .left-column {
        visibility: hidden;
    }

}

/** Lightbox externo **/
html.tgw_external_lightbox_opened, html.tgw_external_lightbox_opened body {
    overflow: hidden!important;
}

html.tgw_external_lightbox_opened div[data-elementor-type="header"] {
    display: none;
}

#tgw-external-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999999;
    background-color: #222;
    display: flex;
    align-items: center;
    justify-content: center;
}

#tgw-external-lightbox .tgw-lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

#tgw-external-lightbox .tgw-lightbox-content .tgw-gallery-prev {
    background: transparent;
    color: #505050;
    font-size: 80px;
    margin-left: -28px;
    padding: 0;
    position: absolute;
    text-decoration: none;
    top: 50%;
    transform: translateY(-50%);
    z-index: 999;
}

#tgw-external-lightbox .tgw-lightbox-content .tgw-gallery-next {
    background: transparent;
    color: #505050;
    font-size: 80px;
    padding: 0;
    position: absolute;
    right: 0;
    margin-right: -28px;
    text-decoration: none;
    top: 50%;
    transform: translateY(-50%);
    z-index: 999;
}

#tgw-external-lightbox .tgw-lightbox-content .tgw-lightbox-img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    display: block;
    cursor: zoom-out;
}

#tgw-external-lightbox .tgw-lightbox-content button img {
    width: 20px;
}

html.tgw_external_lightbox_opened #btn-back-to-top.show {
    display: none;
}

@media all and (max-width: 600px) {
    #tgw-external-lightbox .tgw-lightbox-content {
        max-width: 85%;
    }

    #tgw-external-lightbox .tgw-lightbox-content .tgw-gallery-prev {
        margin-left: -28px;
    }

    #tgw-external-lightbox .tgw-lightbox-content .tgw-gallery-next {
        right: 0;
        margin-right: -28px;
    }
}

@media all and (min-width: 1400px) and (max-width: 2200px) {
    #tgw-external-lightbox .tgw-lightbox-content .tgw-lightbox-img {
        width: 1260px;
        height: auto;
    }

    #tgw-external-lightbox .tgw-lightbox-content .tgw-gallery-prev {
        left: 0;
        margin-left: -35px;
    }

    #tgw-external-lightbox .tgw-lightbox-content .tgw-gallery-next {
        right: 0;
        margin-right: -35px;
    }
}

@media all and (min-width: 2201px) and (max-width: 2399px) {
    #tgw-external-lightbox {
        width: 100%;
    }

    #tgw-external-lightbox .tgw-lightbox-content {
        max-width: unset;
        max-height: unset;
        display: flex;
        justify-content: center;
    }

    #tgw-external-lightbox .tgw-lightbox-content .tgw-lightbox-img {
        width: calc(100% - 400px);
        height: auto;
    }

    #tgw-external-lightbox .tgw-lightbox-content .tgw-gallery-prev {
        left: 0;
        margin-left: -35px;
    }

    #tgw-external-lightbox .tgw-lightbox-content .tgw-gallery-next {
        right: 0;
        margin-right: -35px;
    }
}

@media all and (min-width: 2400px) and (max-width: 2699px) {
    #tgw-external-lightbox {
        width: 100%;
    }

    #tgw-external-lightbox .tgw-lightbox-content {
        max-width: unset;
        max-height: unset;
        display: flex;
        justify-content: center;
    }

    #tgw-external-lightbox .tgw-lightbox-content .tgw-lightbox-img {
        width: 2000px;
        height: auto;
    }

    #tgw-external-lightbox .tgw-lightbox-content .tgw-gallery-prev {
        left: 0;
        margin-left: -35px;
    }

    #tgw-external-lightbox .tgw-lightbox-content .tgw-gallery-next {
        right: 0;
        margin-right: -35px;
    }
}

@media all and (min-width: 2700px) {
    #tgw-external-lightbox {
        width: 100%;
    }

    #tgw-external-lightbox .tgw-lightbox-content {
        max-width: unset;
        max-height: unset;
        display: flex;
        justify-content: center;
    }

    #tgw-external-lightbox .tgw-lightbox-content .tgw-lightbox-img {
        width: calc(100% - 110px);
    }

    #tgw-external-lightbox .tgw-lightbox-content .tgw-gallery-prev {
        left: 0;
        margin-left: -35px;
    }

    #tgw-external-lightbox .tgw-lightbox-content .tgw-gallery-next {
        right: 0;
        margin-right: -35px;
    }
}

@media all and (max-height: 480px) and (orientation: landscape) {
    #tgw-external-lightbox .tgw-lightbox-content {
        max-width: 60%;
    }
}

/** Media query **/
@media all and (max-width: 1368px) {
    .talentum-gallery-widget-frontend .header-column {
        width: 40%;
    }

    .talentum-gallery-widget-frontend .header-column.right {
        width: 56%;
    }

    .talentum-gallery-widget-frontend .header-column.left h2 {
        font-size: 36px;
    }

    .talentum-gallery-widget-frontend .header-column.left p.subtitle  {    
        font-size: 17px;
    }

    .talentum-gallery-widget-frontend .header-column.right .level span {
        font-size: 24px;
    }
}

@media all and (max-width: 1140px) {
    .talentum-gallery-widget-frontend .tgw-category-title > span {
        font-size: 15px;
    }
}

@media all and (max-width: 1024px) {
    .talentum-gallery-widget-frontend {
        max-height: unset;
    }

    .talentum-gallery-widget-frontend .main-row {
        flex-flow: column;
    }

    .talentum-gallery-widget-frontend .header-row {
        flex-flow: column;
        gap: 0;
    }

    .talentum-gallery-widget-frontend .finish-selection {
        border-top: 2px solid #282828;
        padding-left: 0;
        padding-right: 0;
    }

    .talentum-gallery-widget-frontend .left-column {
        max-width: unset;
    }

    .talentum-gallery-widget-frontend .header-column.left {
        width: 100%;
    }

    .talentum-gallery-widget-frontend .header-column.right {
        flex-flow: column;
        width: 100%;
    }

    .talentum-gallery-widget-frontend .header-column.right > p {
        display: flex;
        width: 100%;
    }

    .talentum-gallery-widget-frontend .header-column.right .level span {
        flex: 1;
        text-align: center;
    }

    .talentum-gallery-widget-frontend .categories-and-gallery {
        flex-direction: column;
    }

    .talentum-gallery-widget-frontend .tgw-gallery-column {
        max-height: unset;
        overflow-y: hidden;
    }

    .talentum-gallery-widget-frontend .tgw-categories-column {
        flex-flow: row;
        transform: none;
        width: unset;
    }

    .talentum-gallery-widget-frontend .tgw-category-title {
        border-right: 1px solid #282828;
        border-top: none;
        padding: 0!important;
        transform: none;
        writing-mode: unset;
        height: 50px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .talentum-gallery-widget-frontend .tgw-category-title.tgw-empty {
        border-right: none;
    }

    .talentum-gallery-widget-frontend .finish-button {
        padding: 10px 0 10px;
    }

    .talentum-gallery-widget-frontend .tgw-thumbnail-image {
        width: 24%;
    }

    .talentum-gallery-widget-frontend .tgw-image-thumbnails {
        padding-bottom: 0;
    }

    .talentum-gallery-widget-frontend .right-column .right-column-wrapper {
        max-width: 600px;
    }

    .talentum-gallery-widget-frontend .tgw-gallery-group {
        max-height: 168px;
        overflow-y: auto;
    }

    .talentum-gallery-widget-frontend .upper-title {
        font-size: 18px;
        margin: 17px 0;
    }

    .talentum-gallery-widget-frontend .lower-title {
        font-size: 16px;
        margin: 17px 0;
    }
}

@media all and (max-width: 800px) {
    .talentum-gallery-widget-frontend .header-column.right .level span {
        font-size: 17px;
    }
}

@media all and (max-width: 632px) {
    .talentum-gallery-widget-frontend .tgw-thumbnail-image {
        width: 23%;
    }
}

@media all and (max-width: 500px) {
    .talentum-gallery-widget-frontend .header-column.right .level span {
        font-size: 13px;
    }
}

@media all and (max-width: 470px) {
    .talentum-gallery-widget-frontend .right-column {
        padding-left: 40px;
        padding-right: 40px;
    }

    .talentum-gallery-widget-frontend .upper-title {
        font-size: 14px;
    }

    .talentum-gallery-widget-frontend .lower-title {
        font-size: 13px;
    }

    .talentum-gallery-widget-frontend .right-column .tgw-gallery-next {
        right: 10px;
    }

    .talentum-gallery-widget-frontend .right-column .tgw-gallery-prev {
        left: 10px;
    }
}

@media all and (min-width: 1024px) {
    .talentum-gallery-widget-frontend .tgw-level {
        height: 100%;
    }

    .categories-and-gallery {
        height: 100%;
    }
}

@media all and (min-width: 1025px) {
    .talentum-gallery-widget-frontend .finish-button[data-finish="glossy"] {
        margin-right: 15px;
    }

    .talentum-gallery-widget-frontend .finish-button[data-finish="matt"] {
        margin-left: 12px;
    }

    .talentum-gallery-widget-frontend .finish-selection {
        padding-bottom: 15px;
        padding-left: 35px;
        padding-right: 20px;
        padding-top: 15px;
    }
}

@media all and (min-width: 1600px) {
    .tgw-special-section.elementor-section.elementor-top-section.elementor-element.elementor-section-boxed > div {
        max-width: unset;
        padding-left: 30px;
        padding-right: 30px;
    }

    .talentum-gallery-widget-frontend {
        max-height: unset;
    }
}