/* CES Gallery – identidad visual distinta de Noticias (foto-first, mosaico, sin sidebar) */

.ces-gallery-page {
    padding-bottom: 0;
    background: #101418;
}

.ces-gallery-page .container-fluid.container-xl {
    max-width: 1380px;
}

.ces-gallery {
    color: #eef2f5;
}

.ces-gallery-hero {
    text-align: center;
    padding: 2.5rem 1rem 2rem;
    margin: 0 0 1.5rem;
    border-radius: 1rem;
    background:
        radial-gradient(circle at top right, rgba(212, 175, 55, .18), transparent 42%),
        linear-gradient(135deg, #182028 0%, #0f1419 100%);
    border: 1px solid rgba(255, 255, 255, .08);
}

.ces-gallery-hero-icon {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--secondary, #d4af37);
    color: #1a1a1a;
    font-size: 1.65rem;
    box-shadow: 0 10px 30px rgba(212, 175, 55, .25);
}

.ces-gallery-hero-kicker {
    margin: 0 0 .35rem;
    font-size: .78rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--secondary, #d4af37);
    font-weight: 700;
}

.ces-gallery-hero-title {
    margin: 0 0 .75rem;
    font-size: clamp(1.65rem, 3vw, 2.35rem);
    color: #fff;
    line-height: 1.2;
}

.ces-gallery-hero-lead {
    max-width: 42rem;
    margin: 0 auto;
    color: rgba(255, 255, 255, .72);
    font-size: 1rem;
    line-height: 1.55;
}

.ces-gallery-chips-wrap {
    margin-bottom: 2rem;
    overflow: hidden;
}

.ces-gallery-category-select-wrap {
    max-width: 28rem;
    margin: 0 auto 2rem;
}

.gallery-category-select-wrap {
    max-width: 22rem;
}

.gallery-category-select-label {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: .55rem;
    font-size: .78rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--secondary, #d4af37);
}

.ces-gallery-category-select-field {
    position: relative;
}

.ces-gallery-category-select {
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    padding: .85rem 2.75rem .85rem 1rem;
    border-radius: .85rem;
    border: 1px solid rgba(255, 255, 255, .16);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .09) 0%, rgba(255, 255, 255, .03) 100%),
        #151b22;
    color: #fff;
    font-family: var(--font-body, inherit);
    font-size: .95rem;
    font-weight: 600;
    line-height: 1.35;
    cursor: pointer;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .24);
}

.ces-gallery-category-select:hover {
    border-color: rgba(212, 175, 55, .5);
}

.ces-gallery-category-select:focus {
    outline: none;
    border-color: var(--secondary, #d4af37);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, .24), 0 10px 28px rgba(0, 0, 0, .24);
}

.ces-gallery-category-select option {
    background: #1a1f26;
    color: #fff;
}

.ces-gallery-category-select-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--secondary, #d4af37);
    font-size: 1rem;
    line-height: 1;
}

.ces-gallery-chips {
    display: flex;
    gap: .65rem;
    overflow-x: auto;
    padding: .25rem .15rem 1rem;
    scrollbar-width: thin;
}

.ces-gallery-chip {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    flex: 0 0 auto;
    padding: .55rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .16);
    background: rgba(255, 255, 255, .04);
    color: rgba(255, 255, 255, .86);
    text-decoration: none;
    font-size: .875rem;
    white-space: nowrap;
    transition: background .2s, border-color .2s, transform .2s;
}

.ces-gallery-chip:hover,
.ces-gallery-chip:focus {
    color: #fff;
    border-color: rgba(212, 175, 55, .55);
    background: rgba(212, 175, 55, .12);
}

.ces-gallery-chip.is-active {
    background: var(--secondary, #d4af37);
    border-color: var(--secondary, #d4af37);
    color: #1a1a1a;
    font-weight: 700;
}

.ces-gallery-chip-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5rem;
    height: 1.5rem;
    padding: 0 .35rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, .18);
    font-size: .75rem;
    font-weight: 700;
}

.ces-gallery-chip.is-active .ces-gallery-chip-count {
    background: rgba(0, 0, 0, .12);
}

.ces-gallery-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.ces-gallery-category-tile {
    border-radius: 1rem;
    overflow: hidden;
    background: #171d24;
    border: 1px solid rgba(255, 255, 255, .08);
    transition: transform .25s, box-shadow .25s;
}

.ces-gallery-category-tile:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, .35);
}

.ces-gallery-category-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.ces-gallery-category-collage {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: .35rem;
    aspect-ratio: 16 / 10;
    padding: .35rem;
    background: #0d1116;
}

.ces-gallery-category-thumb {
    overflow: hidden;
    border-radius: .45rem;
    background: #222831;
}

.ces-gallery-category-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .45s;
}

.ces-gallery-category-tile:hover .ces-gallery-category-thumb img {
    transform: scale(1.06);
}

.ces-gallery-category-info {
    display: block;
    padding: 1rem 1.1rem 1.15rem;
}

.ces-gallery-category-name {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: .35rem;
}

.ces-gallery-category-meta {
    display: block;
    font-size: .8125rem;
    color: rgba(255, 255, 255, .58);
}

.ces-gallery-masonry {
    column-gap: 1rem;
}

.ces-gallery-album-grid {
    column-count: 3;
}

.ces-gallery-mosaic-item {
    break-inside: avoid;
    margin-bottom: 1rem;
}

.ces-gallery-album-tile {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: .85rem;
    aspect-ratio: 4 / 3;
    text-decoration: none;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .28);
}

.ces-gallery-mosaic-item.is-tall .ces-gallery-album-tile {
    aspect-ratio: 3 / 4;
}

.ces-gallery-mosaic-item.is-wide .ces-gallery-album-tile {
    aspect-ratio: 16 / 9;
}

.ces-gallery-album-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .55s;
}

.ces-gallery-album-tile:hover img,
.ces-gallery-album-tile:focus img {
    transform: scale(1.07);
}

.ces-gallery-album-tile-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, .05) 20%, rgba(0, 0, 0, .82) 100%);
}

.ces-gallery-album-tile-body {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 1rem 1rem 1.1rem;
}

.ces-gallery-album-tile-badge {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    margin-bottom: .55rem;
    padding: .28rem .6rem;
    border-radius: 999px;
    background: rgba(212, 175, 55, .92);
    color: #1a1a1a;
    font-size: .75rem;
    font-weight: 700;
}

.ces-gallery-album-tile-title {
    display: block;
    color: #fff;
    font-size: .98rem;
    font-weight: 700;
    line-height: 1.35;
}

.ces-gallery-album-tile-date {
    display: block;
    margin-top: .35rem;
    color: rgba(255, 255, 255, .72);
    font-size: .78rem;
}

.ces-gallery-album-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.ces-gallery-back-link {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    color: rgba(255, 255, 255, .78);
    text-decoration: none;
    font-size: .9rem;
}

.ces-gallery-back-link:hover,
.ces-gallery-back-link:focus {
    color: var(--secondary, #d4af37);
}

.ces-gallery-album-toolbar-badge {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .35rem .75rem;
    border-radius: 999px;
    background: rgba(212, 175, 55, .14);
    border: 1px solid rgba(212, 175, 55, .35);
    color: var(--secondary, #d4af37);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.ces-gallery-album-hero {
    margin-bottom: 1.75rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.ces-gallery-album-title {
    margin: 0 0 .75rem;
    font-size: clamp(1.5rem, 2.8vw, 2.1rem);
    color: #fff;
    line-height: 1.25;
}

.ces-gallery-album-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1rem;
    color: rgba(255, 255, 255, .62);
    font-size: .9rem;
}

.ces-gallery-photo-wall {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: .85rem;
}

.ces-gallery-photo-cell {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: .65rem;
    aspect-ratio: 1;
    background: #171d24;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .22);
}

.ces-gallery-photo-cell img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .45s, filter .45s;
}

.ces-gallery-photo-cell:hover img,
.ces-gallery-photo-cell:focus img {
    transform: scale(1.05);
    filter: brightness(.88);
}

.ces-gallery-photo-zoom {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .28);
    color: #fff;
    font-size: 1.75rem;
    opacity: 0;
    transition: opacity .25s;
}

.ces-gallery-photo-cell:hover .ces-gallery-photo-zoom,
.ces-gallery-photo-cell:focus .ces-gallery-photo-zoom {
    opacity: 1;
}

.ces-gallery-album-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, .1);
    color: rgba(255, 255, 255, .58);
    font-size: .875rem;
}

.ces-gallery-news-link {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    color: var(--secondary, #d4af37);
    text-decoration: none;
    font-weight: 600;
}

.ces-gallery-news-link:hover,
.ces-gallery-news-link:focus {
    color: #fff;
}

.ces-gallery-empty {
    text-align: center;
    padding: 3rem 1rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, .03);
    border: 1px dashed rgba(255, 255, 255, .14);
    color: rgba(255, 255, 255, .68);
}

.ces-gallery-empty i {
    display: block;
    font-size: 2rem;
    margin-bottom: .75rem;
    color: var(--secondary, #d4af37);
}

.ces-gallery-pagination .pagination {
    justify-content: center;
}

.ces-gallery-pagination .page-link {
    background: rgba(255, 255, 255, .04);
    border-color: rgba(255, 255, 255, .12);
    color: rgba(255, 255, 255, .82);
}

.ces-gallery-pagination .page-item.active .page-link {
    background: var(--secondary, #d4af37);
    border-color: var(--secondary, #d4af37);
    color: #1a1a1a;
}

@media (max-width: 991.98px) {
    .ces-gallery-album-grid {
        column-count: 2;
    }
}

@media (max-width: 575.98px) {
    .ces-gallery-album-grid {
        column-count: 1;
    }

    .ces-gallery-category-select-wrap {
        max-width: 100%;
    }

    .ces-gallery-photo-wall {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: .55rem;
    }
}

/* Home gallery strip */
.gallery-section-home {
    background:
        radial-gradient(circle at top right, rgba(212, 175, 55, .12), transparent 40%),
        linear-gradient(180deg, #12171d 0%, #0d1116 100%);
    color: #fff;
}

.gallery-section-home-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.gallery-section-home-kicker {
    margin: 0 0 .35rem;
    font-size: .78rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--secondary, #d4af37);
    font-weight: 700;
}

.gallery-section-home-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: #fff;
}

.btn-gallery-home {
    background: var(--secondary, #d4af37);
    border: 0;
    color: #1a1a1a;
    font-weight: 700;
    padding: .55rem 1rem;
    border-radius: 999px;
}

.btn-gallery-home:hover,
.btn-gallery-home:focus {
    background: #e0bc45;
    color: #1a1a1a;
}

.gallery-section-home .ces-gallery-category-select-wrap {
    margin-left: auto;
    margin-right: auto;
}

.gallery-section-home .ces-gallery-category-select-label {
    justify-content: center;
}

.gallery-section-home .gallery-overlay {
    opacity: 1;
    background: linear-gradient(transparent 35%, rgba(0, 0, 0, .82));
    font-size: .8125rem;
    font-weight: 600;
}

.gallery-section-home .gallery-link {
    border-radius: .75rem;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .28);
}

.ces-gallery-albums-centered .ces-gallery-masonry,
.ces-gallery-albums-centered .ces-gallery-category-grid {
    justify-content: center;
}

.ces-gallery-photo-item {
    display: flex;
    flex-direction: column;
    gap: .65rem;
}

.ces-gallery-photo-cell {
    position: relative;
}

.ces-gallery-photo-zoom {
    flex-direction: column;
    gap: .35rem;
    font-size: 1.35rem;
}

.ces-gallery-photo-zoom span {
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.ces-gallery-photo-download-bar,
.ces-gallery-photo-share-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .45rem .65rem;
    padding: .55rem .7rem;
    border-radius: .65rem;
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .1);
}

.ces-gallery-photo-download-label,
.ces-gallery-photo-share-label,
.ces-gallery-lightbox-downloads-label,
.ces-gallery-lightbox-shares-label {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    color: rgba(255, 255, 255, .78);
    font-size: .78rem;
    font-weight: 600;
    white-space: nowrap;
}

.ces-gallery-share-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}

.ces-gallery-share-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .14);
    color: #fff;
    text-decoration: none;
    transition: background .2s ease, border-color .2s ease, transform .2s ease;
}

.ces-gallery-share-chip:hover {
    background: rgba(212, 175, 55, .18);
    border-color: rgba(212, 175, 55, .45);
    color: #fff;
    transform: translateY(-1px);
}

.ces-gallery-photo-inedita-badge {
    position: absolute;
    top: .65rem;
    left: .65rem;
    z-index: 2;
    padding: .25rem .55rem;
    border-radius: 999px;
    background: rgba(212, 175, 55, .92);
    color: #151b22;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.ces-gallery-news-link-note {
    margin-top: .65rem;
    color: rgba(255, 255, 255, .68);
    font-size: .88rem;
}

.ces-gallery-lightbox-shares {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: .45rem .65rem;
    margin-top: .85rem;
}

.ces-gallery-download-select {
    min-width: 10rem;
    max-width: 100%;
    flex: 1 1 10rem;
    padding: .45rem 2.25rem .45rem .75rem;
    border-radius: .5rem;
    border: 1px solid rgba(255, 255, 255, .18);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .12) 0%, rgba(255, 255, 255, .06) 100%),
        rgba(255, 255, 255, .08);
    color: #fff;
    font-family: var(--font-body, inherit);
    font-size: .8rem;
    font-weight: 600;
    line-height: 1.35;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23d4af37' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .75rem center;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.ces-gallery-download-select:hover,
.ces-gallery-download-select:focus {
    outline: none;
    border-color: rgba(212, 175, 55, .55);
    box-shadow: 0 0 0 2px rgba(212, 175, 55, .18);
}

.ces-gallery-download-select option {
    background: #1a1f26;
    color: #fff;
}

.ces-gallery-lightbox-downloads .ces-gallery-download-select {
    min-width: 12rem;
}

.ces-gallery-lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: rgba(0, 0, 0, .88);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, visibility .25s ease;
}

.ces-gallery-lightbox-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.ces-gallery-lightbox-dialog {
    position: relative;
    width: min(96vw, 1200px);
    max-height: 92vh;
}

.ces-gallery-lightbox-figure {
    margin: 0;
}

.ces-gallery-lightbox-figure img {
    display: block;
    max-width: 100%;
    max-height: 72vh;
    margin: 0 auto;
    border-radius: .75rem;
    object-fit: contain;
}

.ces-gallery-lightbox-caption {
    margin-top: .85rem;
    color: #fff;
    text-align: center;
    font-size: .95rem;
}

.ces-gallery-lightbox-downloads {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: .55rem .75rem;
    margin-top: 1rem;
    padding: .75rem 1rem;
    border-radius: .75rem;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .14);
}

.ces-gallery-lightbox-close,
.ces-gallery-lightbox-nav {
    position: absolute;
    z-index: 2;
    border: 0;
    background: rgba(255, 255, 255, .14);
    color: #fff;
    cursor: pointer;
}

.ces-gallery-lightbox-close {
    top: -2.5rem;
    right: 0;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 999px;
    font-size: 1.5rem;
    line-height: 1;
}

.ces-gallery-lightbox-nav {
    top: 50%;
    transform: translateY(-50%);
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 999px;
    font-size: 1.75rem;
}

.ces-gallery-lightbox-prev {
    left: -3.25rem;
}

.ces-gallery-lightbox-next {
    right: -3.25rem;
}

.ces-gallery-album-crop-lightbox .ces-gallery-lightbox-figure img {
    object-fit: cover;
    width: min(92vw, 1200px);
    height: min(72vh, 900px);
}

body.ces-gallery-lightbox-open {
    overflow: hidden;
}

@media (max-width: 768px) {
    .ces-gallery-lightbox-prev {
        left: .25rem;
    }

    .ces-gallery-lightbox-next {
        right: .25rem;
    }

    .ces-gallery-lightbox-close {
        top: .25rem;
        right: .25rem;
    }
}

