/* Yubi Sports Academy - Gallery */
.gallery-page {
    --gallery-red: #f20d2d;
    --gallery-ink: #101b30;
    --gallery-muted: #667085;
    background: #f5f7fb;
    color: var(--gallery-ink);
    min-height: 70vh;
    font-family: inherit;
}

.gallery-page * {
    box-sizing: border-box;
}

.gallery-page button,
.gallery-page input,
.gallery-page select {
    font: inherit;
}

.gallery-page button {
    cursor: pointer;
}

.gallery-page a {
    text-decoration: none;
}

.gallery-hero {
    min-height: 182px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 28px clamp(20px, 5vw, 76px);
    color: #fff;
    background:
        radial-gradient(ellipse at 72% 15%, rgba(34, 98, 151, .45), transparent 34%),
        linear-gradient(110deg, #061326 0%, #102d49 48%, #06101d 100%);
}

.gallery-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(105deg, transparent 0 100px, rgba(255,255,255,.035) 102px 104px),
        linear-gradient(0deg, rgba(0,0,0,.35), transparent 60%);
    pointer-events: none;
}

.gallery-hero-content,
.gallery-hero-message {
    position: relative;
    z-index: 1;
}

.gallery-hero-content {
    border-left: 4px solid var(--gallery-red);
    padding-left: 20px;
}

.gallery-eyebrow {
    display: block;
    color: #ffc344;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 2px;
}

.gallery-hero h1 {
    color: #fff;
    font-size: clamp(42px, 5vw, 68px);
    font-weight: 900;
    line-height: .98;
    margin: 5px 0 4px;
    letter-spacing: -1.8px;
}

.gallery-hero p {
    margin: 0;
    color: #f4f7fb;
    font-size: clamp(16px, 2vw, 22px);
}

.gallery-hero-message {
    display: flex;
    flex-direction: column;
    padding-right: 10px;
    font-size: clamp(19px, 3vw, 34px);
    font-weight: 800;
    font-style: italic;
    line-height: 1.02;
    text-shadow: 0 2px 8px #000;
}

.gallery-hero-message small {
    max-width: 150px;
    margin-top: 12px;
    font-size: 9px;
    font-style: normal;
    letter-spacing: 2px;
    line-height: 1.8;
}

.gallery-quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
    margin-top: 22px;
}

.gallery-quick-links a {
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.gallery-quick-links a:first-child,
.gallery-quick-links a:hover {
    color: #ffe45b;
}

.gallery-content {
    width: min(100% - 40px, 1500px);
    margin: 0 auto;
}

.gallery-category-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    padding: 14px 0;
}

.gallery-category-card {
    position: relative;
    min-height: 155px;
    overflow: hidden;
    isolation: isolate;
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 0;
    text-align: left;
    color: #fff;
    background: #12243a;
    box-shadow: 0 4px 14px rgba(16, 27, 48, .12);
    transition: border-color .2s ease, transform .2s ease;
}

.gallery-category-card:hover,
.gallery-category-card.is-featured {
    border-color: var(--gallery-red);
}

.gallery-category-card:hover {
    transform: translateY(-2px);
}

.gallery-category-image {
    position: absolute;
    z-index: -2;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}

.gallery-category-card:hover .gallery-category-image {
    transform: scale(1.04);
}

.gallery-category-shade {
    position: absolute;
    z-index: -1;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 8, 18, .92), rgba(2, 8, 18, .5) 60%, rgba(2, 8, 18, .22));
}

.gallery-ybl { background-color: #432a16; }
.gallery-icbl { background-color: #22264b; }
.gallery-ycpl { background-color: #10365b; }
.gallery-academy { background-color: #24432d; }
.gallery-turf { background-color: #073f3d; }

.gallery-category-info {
    display: flex;
    height: 100%;
    min-height: 155px;
    flex-direction: column;
    align-items: flex-start;
    padding: 15px;
    gap: 5px;
}

.gallery-category-info > strong {
    font-size: clamp(21px, 2vw, 31px);
    font-weight: 900;
    line-height: 1;
}

.gallery-category-subtitle {
    font-size: 10px;
    font-weight: 800;
    line-height: 1.4;
}

.gallery-status {
    display: inline-block;
    margin-top: 7px;
    padding: 7px 12px;
    border-radius: 20px;
    background: #16c45a;
    color: #fff;
    font-size: 9px;
    font-weight: 900;
}

.gallery-status-upcoming {
    margin: 0 0 0 5px;
    background: #ffc928;
    color: #111827;
}

.gallery-season-line {
    font-size: 10px;
    font-weight: 700;
}

.gallery-view-link {
    margin-top: auto;
    padding-top: 7px;
    font-size: 11px;
    font-weight: 700;
}

.gallery-featured {
    position: relative;
    min-height: 190px;
    display: flex;
    align-items: stretch;
    gap: 14px;
    overflow: hidden;
    padding: 18px;
    margin: 0 calc((min(100vw, 1500px) - min(100vw - 40px, 1500px)) / -2);
    color: #fff;
    background: linear-gradient(110deg, #071629, #173e60 60%, #06101d);
}

.gallery-featured-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .65;
}

.gallery-featured-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(4, 13, 26, .95), rgba(4, 13, 26, .5) 50%, rgba(4, 13, 26, .8));
}

.gallery-featured-copy {
    position: relative;
    z-index: 1;
    width: 36%;
    min-width: 250px;
    align-self: center;
}

.gallery-featured-label {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 5px;
    background: var(--gallery-red);
    color: #fff;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .6px;
}

.gallery-featured-copy h2 {
    color: #fff;
    margin: 8px 0 3px;
    font-size: clamp(23px, 2.5vw, 34px);
    font-weight: 900;
}

.gallery-featured-copy p {
    margin: 0 0 12px;
    color: #f4f7fb;
    font-size: 14px;
}

.gallery-primary-button {
    display: inline-block;
    border-radius: 6px;
    padding: 10px 15px;
    background: var(--gallery-red);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.gallery-primary-button:hover {
    background: #d90826;
    color: #fff;
}

.gallery-featured-albums {
    position: relative;
    z-index: 1;
    flex: 1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 9px;
    align-self: center;
}

.gallery-mini-album {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
    border: 1px solid rgba(255,255,255,.65);
    border-radius: 8px;
    background: rgba(3, 10, 20, .65);
    color: #fff;
}

.gallery-mini-album img,
.gallery-mini-placeholder {
    display: flex;
    width: 100%;
    height: 83px;
    object-fit: cover;
    align-items: center;
    justify-content: center;
    background: #20354c;
}

.gallery-mini-album strong {
    overflow: hidden;
    padding: 7px 8px 2px;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gallery-mini-album small {
    padding: 0 8px 8px;
    color: #e3eaf3;
    font-size: 9px;
}

.gallery-browser {
    padding: 18px 0 45px;
}

.gallery-browser-top,
.gallery-search-controls,
.gallery-media-tabs {
    display: flex;
    align-items: center;
    gap: 9px;
}

.gallery-browser-top {
    justify-content: space-between;
    flex-wrap: wrap;
}

.gallery-tab,
.gallery-search-controls input,
.gallery-search-controls select {
    min-height: 40px;
    border: 1px solid #dce2eb;
    border-radius: 7px;
    background: #fff;
    color: #172033;
}

.gallery-tab {
    padding: 9px 18px;
    font-size: 12px;
    font-weight: 700;
}

.gallery-tab.active {
    border-color: var(--gallery-red);
    background: var(--gallery-red);
    color: #fff;
}

.gallery-search-controls input {
    width: min(300px, 45vw);
    padding: 9px 12px;
}

.gallery-search-controls select {
    max-width: 180px;
    padding: 9px 12px;
}

.gallery-results-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 23px 0 13px;
}

.gallery-results-heading h2 {
    margin: 0;
    color: var(--gallery-ink);
    font-size: 20px;
    font-weight: 900;
}

.gallery-results-heading > span {
    color: var(--gallery-muted);
    font-size: 12px;
}

.gallery-album-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px 15px;
}

.gallery-album-card {
    min-width: 0;
}

.gallery-album-card[hidden] {
    display: none !important;
}

.gallery-album-link {
    display: block;
    height: 100%;
    color: var(--gallery-ink);
}

.gallery-album-image-wrap {
    position: relative;
    overflow: hidden;
    height: 160px;
    border-radius: 7px;
    background: #dce5ef;
}

.gallery-album-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .25s ease;
}

.gallery-album-link:hover .gallery-album-image-wrap img {
    transform: scale(1.04);
}

.gallery-album-category {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 5px 8px;
    border-radius: 4px;
    background: rgba(3, 11, 22, .85);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
}

.gallery-album-placeholder {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
    color: #43546a;
    background: linear-gradient(135deg, #dce5ef, #f6f8fb);
}

.gallery-album-placeholder span {
    font-size: 35px;
}

.gallery-album-placeholder small {
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 1px;
}

.gallery-album-details h3 {
    margin: 7px 0 3px;
    color: #111b2e;
    font-size: 13px;
    font-weight: 900;
}

.gallery-album-details p {
    display: -webkit-box;
    overflow: hidden;
    margin: 0 0 5px;
    color: var(--gallery-muted);
    font-size: 11px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.gallery-album-details > span {
    color: var(--gallery-red);
    font-size: 11px;
    font-weight: 800;
}

.gallery-no-results {
    padding: 45px 20px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    text-align: center;
}

.gallery-no-results[hidden] {
    display: none !important;
}

.gallery-no-results h3 {
    font-size: 19px;
    font-weight: 800;
}

.gallery-no-results p {
    margin-bottom: 0;
    color: var(--gallery-muted);
}

@media (min-width: 1100px) {
    .gallery-album-image-wrap {
        height: 170px;
    }
}

@media (max-width: 1000px) {
    .gallery-category-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .gallery-featured {
        flex-direction: column;
    }

    .gallery-featured-copy {
        width: 100%;
        min-width: 0;
    }

    .gallery-featured-albums {
        width: 100%;
    }

    .gallery-album-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 650px) {
    .gallery-hero {
        min-height: 180px;
        padding: 25px 18px;
    }

    .gallery-hero-message {
        display: none;
    }

    .gallery-quick-links {
        gap: 12px 16px;
    }

    .gallery-quick-links a {
        font-size: 11px;
    }

    .gallery-content {
        width: calc(100% - 24px);
    }

    .gallery-category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
    }

    .gallery-category-card,
    .gallery-category-info {
        min-height: 145px;
    }

    .gallery-category-info {
        padding: 11px;
    }

    .gallery-category-info > strong {
        font-size: 22px;
    }

    .gallery-category-subtitle {
        font-size: 9px;
    }

    .gallery-featured {
        margin-left: -12px;
        margin-right: -12px;
        padding: 16px 12px;
    }

    .gallery-featured-albums {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .gallery-mini-album img,
    .gallery-mini-placeholder {
        height: 95px;
    }

    .gallery-browser-top {
        align-items: stretch;
        flex-direction: column;
    }

    .gallery-media-tabs {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .gallery-tab {
        padding: 9px 5px;
        font-size: 11px;
    }

    .gallery-search-controls {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .gallery-search-controls input {
        width: 100%;
        min-width: 0;
    }

    .gallery-search-controls select {
        width: 120px;
    }

    .gallery-album-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 17px 10px;
    }

    .gallery-album-image-wrap {
        height: 125px;
    }

    .gallery-results-heading h2 {
        font-size: 17px;
    }
}

/* Gallery album and season pages */
.gallery-page {
    padding-bottom: 45px;
}

.gallery-page > .container {
    width: min(100% - 32px, 1400px);
    margin: 0 auto;
    padding-top: 28px;
}

.gallery-page .btn-outline-secondary {
    display: inline-block;
    padding: 10px 16px;
    border: 1px solid #d7deea;
    border-radius: 7px;
    color: #172033;
    background: #fff;
    font-weight: 700;
}

.gallery-page header {
    margin-top: 22px;
}

.gallery-page header h1 {
    margin: 8px 0 12px;
    color: #101b30;
    font-size: clamp(30px, 4vw, 44px);
    font-weight: 900;
}

.gallery-subtitle {
    color: #667085;
    font-size: 15px;
}

.gallery-page .gallery-card {
    height: 100%;
    overflow: hidden;
    border: 1px solid #e0e6ef;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 5px 18px rgba(16, 27, 48, .08);
    transition: transform .2s ease, box-shadow .2s ease;
}

.gallery-page a .gallery-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 9px 24px rgba(16, 27, 48, .14);
}

.gallery-page .gallery-card img,
.gallery-page .gallery-media {
    display: block;
    width: 100%;
    height: 220px;
    object-fit: cover;
    background: #e8edf4;
}

.gallery-page .gallery-cover-placeholder {
    display: flex;
    height: 220px;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #102d49, #1d4b70);
    color: #fff;
    font-size: 48px;
}

.gallery-page .gallery-card-body {
    padding: 18px;
}

.gallery-page .gallery-card-body h5 {
    margin: 0 0 8px;
    color: #101b30;
    font-size: 19px;
}

.gallery-page .gallery-link {
    display: inline-block;
    margin-top: 10px;
    color: #f20d2d;
    font-weight: 800;
}

.gallery-page .gallery-empty {
    padding: 35px 20px;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    background: #fff;
    text-align: center;
}

@media (max-width: 650px) {
    .gallery-page > .container {
        width: calc(100% - 24px);
        padding-top: 18px;
    }

    .gallery-page .gallery-card img,
    .gallery-page .gallery-media,
    .gallery-page .gallery-cover-placeholder {
        height: 175px;
    }

    .gallery-page .gallery-card-body {
        padding: 13px;
    }
}


/* Professional category, season, event and media pages */
.gallery-album-page {
    padding-bottom: 60px;
}

.gallery-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 24px 0 18px;
    color: #7b8798;
    font-size: 13px;
}

.gallery-breadcrumb a {
    color: #d9102e;
    font-weight: 700;
}

.gallery-album-header {
    margin: 0 0 36px;
    padding: 30px;
    border-radius: 16px;
    border: 1px solid #e1e7ef;
    background: linear-gradient(120deg, #fff, #f1f5fa);
}

.gallery-album-kicker,
.gallery-section-eyebrow {
    display: block;
    margin-bottom: 8px;
    color: #d9102e;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 1.8px;
    text-transform: uppercase;
}

.gallery-album-header h1 {
    margin: 0 0 12px;
    color: #101b30;
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 900;
    line-height: 1.1;
}

.gallery-album-header .gallery-subtitle {
    max-width: 760px;
    margin: 0;
    line-height: 1.7;
}

.gallery-album-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 22px;
}

.gallery-album-stats span,
.gallery-section-count {
    display: inline-flex;
    align-items: center;
    padding: 7px 11px;
    border: 1px solid #e0e6ef;
    border-radius: 20px;
    background: #fff;
    color: #596579;
    font-size: 12px;
    font-weight: 700;
}

.gallery-section-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0 0 18px;
}

.gallery-section-heading h2 {
    margin: 0;
    color: #101b30;
    font-size: clamp(22px, 3vw, 29px);
    font-weight: 900;
}

.gallery-section-eyebrow {
    margin-bottom: 5px;
    font-size: 10px;
}

.gallery-folder-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    margin-bottom: 42px;
}

.gallery-folder-card {
    display: block;
    min-width: 0;
    overflow: hidden;
    border: 1px solid #e0e6ef;
    border-radius: 13px;
    background: #fff;
    color: #101b30;
    box-shadow: 0 4px 15px rgba(16, 27, 48, .06);
    transition: transform .2s ease, box-shadow .2s ease;
}

.gallery-folder-card:hover {
    color: #101b30;
    transform: translateY(-4px);
    box-shadow: 0 12px 26px rgba(16, 27, 48, .13);
}

.gallery-folder-cover {
    position: relative;
    overflow: hidden;
    height: 205px;
    background: #102d49;
}

.gallery-folder-cover > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}

.gallery-folder-card:hover .gallery-folder-cover > img {
    transform: scale(1.045);
}

.gallery-folder-cover::after {
    position: absolute;
    inset: 45% 0 0;
    content: "";
    background: linear-gradient(transparent, rgba(4, 13, 26, .5));
    pointer-events: none;
}

.gallery-folder-open {
    position: absolute;
    z-index: 1;
    right: 12px;
    bottom: 12px;
    padding: 7px 10px;
    border: 1px solid rgba(255,255,255,.4);
    border-radius: 6px;
    background: rgba(4, 13, 26, .76);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
}

.gallery-folder-info {
    padding: 18px;
}

.gallery-folder-info h3 {
    margin: 0 0 7px;
    font-size: 19px;
    font-weight: 900;
}

.gallery-folder-info p {
    min-height: 20px;
    margin: 0;
    color: #667085;
    font-size: 13px;
    line-height: 1.5;
}

.gallery-folder-link {
    display: inline-block;
    margin-top: 15px;
    color: #d9102e;
    font-size: 12px;
    font-weight: 900;
}

.gallery-media-heading {
    margin-top: 12px;
    margin-bottom: 20px;
}

.gallery-media-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.gallery-media-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid #e0e6ef;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 15px rgba(16, 27, 48, .07);
}

.gallery-photo-button {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    overflow: hidden;
    border: 0;
    background: #e8edf4;
    cursor: zoom-in;
}

.gallery-media-card .gallery-media {
    display: block;
    width: 100%;
    height: 255px;
    object-fit: cover;
    background: #e8edf4;
}

.gallery-photo-button .gallery-media {
    transition: transform .25s ease;
}

.gallery-photo-button:hover .gallery-media {
    transform: scale(1.035);
}

.gallery-photo-zoom {
    position: absolute;
    right: 12px;
    bottom: 12px;
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 1px solid rgba(255,255,255,.5);
    border-radius: 50%;
    background: rgba(5, 17, 33, .75);
    color: #fff;
    font-size: 24px;
    opacity: 0;
    transition: opacity .2s ease;
}

.gallery-photo-button:hover .gallery-photo-zoom,
.gallery-photo-button:focus-visible .gallery-photo-zoom {
    opacity: 1;
}

.gallery-media-caption {
    padding: 12px 15px;
    color: #596579;
    font-size: 13px;
    line-height: 1.5;
}

.gallery-cover-placeholder {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #102d49, #1d4b70);
    color: #fff;
    font-size: 48px;
}

.gallery-empty {
    padding: 50px 20px;
    border: 1px dashed #ccd5e2;
    border-radius: 14px;
    background: #fff;
    text-align: center;
}

.gallery-empty-icon {
    margin-bottom: 12px;
    font-size: 42px;
}

.gallery-empty h3 {
    color: #101b30;
    font-weight: 900;
}

.gallery-empty p {
    margin: 0;
    color: #667085;
}

/* Full-size photo viewer */
.gallery-lightbox[hidden] {
    display: none !important;
}

.gallery-lightbox {
    position: fixed;
    z-index: 99999;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 65px 25px;
    background: rgba(3, 8, 18, .95);
}

.gallery-lightbox-content {
    display: flex;
    max-width: min(1100px, 82vw);
    max-height: 100%;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.gallery-lightbox-content img {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 145px);
    object-fit: contain;
}

.gallery-lightbox-counter {
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}

.gallery-lightbox-close,
.gallery-lightbox-nav {
    display: grid;
    flex-shrink: 0;
    place-items: center;
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 50%;
    background: rgba(255,255,255,.1);
    color: #fff;
    cursor: pointer;
}

.gallery-lightbox-close {
    position: absolute;
    top: 18px;
    right: 22px;
    width: 44px;
    height: 44px;
    font-size: 30px;
}

.gallery-lightbox-nav {
    width: 45px;
    height: 45px;
    font-size: 34px;
}

.gallery-lightbox-close:hover,
.gallery-lightbox-nav:hover {
    background: #d9102e;
}

.gallery-lightbox button:focus-visible {
    outline: 3px solid #ffc344;
    outline-offset: 3px;
}

body.gallery-lightbox-open {
    overflow: hidden;
}

@media (max-width: 900px) {
    .gallery-folder-grid,
    .gallery-media-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 15px;
    }

    .gallery-folder-cover {
        height: 190px;
    }

    .gallery-media-card .gallery-media {
        height: 220px;
    }
}

@media (max-width: 560px) {
    .gallery-album-header {
        padding: 22px 18px;
        margin-bottom: 28px;
    }

    .gallery-folder-grid,
    .gallery-media-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }

    .gallery-folder-cover {
        height: 220px;
    }

    .gallery-media-card .gallery-media {
        height: auto;
        max-height: 420px;
        aspect-ratio: 4 / 3;
    }

    .gallery-lightbox {
        gap: 8px;
        padding: 60px 10px;
    }

    .gallery-lightbox-content {
        max-width: calc(100vw - 100px);
    }

    .gallery-lightbox-nav {
        width: 35px;
        height: 35px;
        font-size: 27px;
    }

    .gallery-lightbox-close {
        top: 12px;
        right: 12px;
    }

    .gallery-photo-zoom {
        opacity: 1;
    }
}


/* Larger, premium gallery album header */
.gallery-album-page .gallery-album-header {
    min-height: 300px;
    padding: 48px 40px;
    border-radius: 22px;
    background:
        radial-gradient(ellipse at 80% 15%, rgba(45, 110, 165, .65), transparent 42%),
        linear-gradient(115deg, #061222, #153957 58%, #071222);
    box-shadow: 0 18px 42px rgba(10, 30, 55, .16);
}

.gallery-album-page .gallery-album-header h1 {
    font-size: clamp(48px, 6vw, 72px);
    letter-spacing: -2px;
}

@media (max-width: 600px) {
    .gallery-album-page .gallery-album-header {
        min-height: 240px;
        padding: 30px 22px;
    }

    .gallery-album-page .gallery-album-header h1 {
        font-size: 42px;
    }
}


/* YCPL album header slideshow */
.gallery-album-page .gallery-album-header-slideshow {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    min-height: 340px;
    overflow: hidden;
    padding: 48px 40px;
    background: #071222;
}

.gallery-header-slideshow {
    position: absolute;
    z-index: -2;
    inset: 0;
    overflow: hidden;
    background: #071222;
}

.gallery-header-slideshow::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        rgba(4, 14, 29, .94) 0%,
        rgba(4, 14, 29, .76) 45%,
        rgba(4, 14, 29, .38) 100%
    );
}

.gallery-header-slideshow img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    opacity: 0;
    animation: ycpl-header-slide 32s infinite;
}

.gallery-header-slideshow img:nth-child(1) { animation-delay: 0s; }
.gallery-header-slideshow img:nth-child(2) { animation-delay: 4s; }
.gallery-header-slideshow img:nth-child(3) { animation-delay: 8s; }
.gallery-header-slideshow img:nth-child(4) { animation-delay: 12s; }
.gallery-header-slideshow img:nth-child(5) { animation-delay: 16s; }
.gallery-header-slideshow img:nth-child(6) { animation-delay: 20s; }
.gallery-header-slideshow img:nth-child(7) { animation-delay: 24s; }
.gallery-header-slideshow img:nth-child(8) { animation-delay: 28s; }

@keyframes ycpl-header-slide {
    0%   { opacity: 0; transform: scale(1.02); }
    4%   { opacity: 1; }
    13%  { opacity: 1; transform: scale(1.08); }
    17%  { opacity: 0; }
    100% { opacity: 0; }
}

.gallery-album-header-content {
    position: relative;
    z-index: 1;
    width: 100%;
}

.gallery-album-page .gallery-album-header-slideshow h1 {
    color: #fff;
    font-size: clamp(48px, 6vw, 76px);
}

.gallery-album-page .gallery-album-header-slideshow .gallery-album-kicker {
    color: #f5bd45;
}

.gallery-album-page .gallery-album-header-slideshow .gallery-album-stats span {
    background: rgba(255, 255, 255, .14);
    border-color: rgba(255, 255, 255, .35);
}

@media (max-width: 600px) {
    .gallery-album-page .gallery-album-header-slideshow {
        min-height: 260px;
        padding: 30px 22px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .gallery-header-slideshow img {
        animation: none;
    }

    .gallery-header-slideshow img:first-child {
        opacity: 1;
    }
}

/* =========================================================
   GALLERY COVER IMAGE IMPROVEMENTS
   Append at the bottom of gallery.css
   ========================================================= */

/* Consistent image rendering */
.gallery-page .gallery-category-card,
.gallery-page .gallery-featured,
.gallery-page .gallery-mini-album,
.gallery-page .gallery-album-card,
.gallery-page .gallery-folder-card {
    min-width: 0;
}

/* Category covers */
.gallery-page .gallery-category-card {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.gallery-page .gallery-category-card .gallery-category-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
    transition: transform 0.55s ease;
    z-index: -2;
}

.gallery-page .gallery-category-card:hover .gallery-category-image {
    transform: scale(1.07);
}

/* Keep text readable over sports photos */
.gallery-page .gallery-category-card .gallery-category-shade {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background: linear-gradient(
        180deg,
        rgba(5, 15, 32, 0.08) 0%,
        rgba(5, 15, 32, 0.25) 35%,
        rgba(5, 15, 32, 0.88) 100%
    );
}

/* Featured album cover */
.gallery-page .gallery-featured {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.gallery-page .gallery-featured .gallery-featured-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.6s ease;
}

.gallery-page .gallery-featured:hover .gallery-featured-image {
    transform: scale(1.025);
}

.gallery-page .gallery-featured .gallery-featured-shade {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(
        90deg,
        rgba(4, 13, 29, 0.92) 0%,
        rgba(4, 13, 29, 0.62) 48%,
        rgba(4, 13, 29, 0.12) 100%
    );
}

/* Main album cards */
.gallery-page .gallery-album-image-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: #e9eef5;
}

.gallery-page .gallery-album-image-wrap > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.45s ease;
}

.gallery-page .gallery-album-card:hover .gallery-album-image-wrap > img {
    transform: scale(1.06);
}

.gallery-page .gallery-album-card {
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.gallery-page .gallery-album-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(12, 30, 55, 0.14);
}

/* Album cover placeholders */
.gallery-page .gallery-album-placeholder,
.gallery-page .gallery-cover-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 180px;
    color: #ffffff;
    background:
        radial-gradient(circle at top right, rgba(255,255,255,.16), transparent 42%),
        linear-gradient(135deg, #17365d, #091d38);
}

.gallery-page .gallery-album-placeholder > span,
.gallery-page .gallery-cover-placeholder > span {
    font-size: clamp(2.5rem, 5vw, 4rem);
}

/* Mini-album images */
.gallery-page .gallery-mini-album {
    overflow: hidden;
}

.gallery-page .gallery-mini-album > img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 90px;
    object-fit: cover;
    object-position: center;
    transition: transform 0.4s ease;
}

.gallery-page .gallery-mini-album:hover > img {
    transform: scale(1.05);
}

/* Child album cover images */
.gallery-page .gallery-folder-cover {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: #e9eef5;
}

.gallery-page .gallery-folder-cover > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.45s ease;
}

.gallery-page .gallery-folder-card:hover .gallery-folder-cover > img {
    transform: scale(1.06);
}

/* Avoid hover animations for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    .gallery-page .gallery-category-image,
    .gallery-page .gallery-featured-image,
    .gallery-page .gallery-album-image-wrap > img,
    .gallery-page .gallery-mini-album > img,
    .gallery-page .gallery-folder-cover > img,
    .gallery-page .gallery-album-card {
        transition: none !important;
    }
}
