/* =========================================================
   SUN SHINE CLUB — GALLERY
   Cleaned + responsive CSS
   ========================================================= */

/* Prevent HTML hidden elements from being forced visible */
[hidden] {
    display: none !important;
}

/* =========================================================
   PAGE HERO
   ========================================================= */

.page-hero {
    padding: 120px 20px 1px;
    background: linear-gradient(135deg, #9381FF, #B8B8FF);
    text-align: center;
    color: #fff;
}

.container {
    width: min(1200px, 100%);
    margin: 0 auto;
    padding: 0 30px;
}

.page-hero h1 {
    margin: 0 0 20px;
    font-size: clamp(2.2rem, 5vw, 3rem);
    font-weight: 700;
}

.page-hero p {
    max-width: 750px;
    margin: auto;
    font-size: 1.1rem;
    line-height: 1.8;
    opacity: .95;
}

/* =========================================================
   FILTER PANEL
   ========================================================= */

.gallery-filter-panel {
    width: min(1180px, calc(100% - 30px));
    margin: 0 auto 50px;
    padding: 26px;
    background: rgba(255, 255, 255, .96);
    border: 1px solid rgba(100, 80, 180, .08);
    border-radius: 24px;
    box-shadow: 0 15px 45px rgba(55, 40, 120, .08);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.filter-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 25px;
}

.filter-kicker {
    display: block;
    margin-bottom: 4px;
    color: var(--primary, #6847ff);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.filter-topbar h2 {
    margin: 0;
    color: #17212b;
    font-size: 1.45rem;
    font-weight: 750;
}

.filter-reset {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-shrink: 0;
    padding: 10px 16px;
    border: 1px solid #e5e1ff;
    border-radius: 12px;
    background: #fff;
    color: #6847ff;
    font: 600 13px inherit;
    cursor: pointer;
    transition: .25s ease;
}

.filter-reset:hover {
    background: #6847ff;
    color: #fff;
    transform: translateY(-2px);
}

/* =========================================================
   FILTER CHOICES
   ========================================================= */

.filter-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.filter-block {
    min-width: 0;
    padding: 8px 24px;
}

.filter-block + .filter-block {
    border-left: 1px solid #e5e2ee;
}

.filter-heading {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: default;
}

.filter-heading-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.filter-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    flex: 0 0 42px;
    border-radius: 13px;
    background: #f0ecff;
    color: #6847ff;
    font-size: 18px;
}

.filter-heading small {
    display: block;
    margin-bottom: 2px;
    color: #727080;
    font-size: 11px;
    font-weight: 500;
}

.filter-heading strong {
    display: block;
    color: #151528;
    font-size: 16px;
    font-weight: 700;
}

.filter-arrow {
    display: none;
    color: #6847ff;
    transition: transform .3s ease;
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 17px;
}

.filter-option {
    position: relative;
    min-height: 45px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border: 1px solid #e3e0ea;
    border-radius: 12px;
    background: #fff;
    color: #252437;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition:
        background .25s ease,
        color .25s ease,
        border-color .25s ease,
        transform .25s ease,
        box-shadow .25s ease;
}

.filter-option:hover {
    border-color: #8d72ff;
    color: #6847ff;
    transform: translateY(-2px);
}

.filter-option.active {
    border-color: #6847ff;
    background: linear-gradient(135deg, #6847ff, #7d5cff);
    color: #fff;
    box-shadow: 0 8px 20px rgba(104, 71, 255, .22);
}

.filter-option.active:hover {
    color: #fff;
}

.option-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.option-check {
    display: none;
    font-size: 11px;
}

.filter-option.active .option-check {
    display: inline-flex;
}

/* =========================================================
   CURRENT SELECTION
   ========================================================= */

.selection-summary {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-top: 25px;
    padding: 13px 16px;
    border-radius: 15px;
    background: linear-gradient(135deg, #faf9ff, #f3efff);
    border: 1px solid #e9e3ff;
}

.summary-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    flex: 0 0 38px;
    border-radius: 11px;
    background: #6847ff;
    color: #fff;
}

.summary-content {
    flex: 1;
    min-width: 0;
}

.summary-content span {
    display: block;
    color: #777487;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .8px;
}

.summary-content strong {
    display: block;
    margin-top: 2px;
    color: #27223d;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.summary-arrow {
    color: #6847ff;
    font-size: 14px;
}

/* =========================================================
   RESULTS
   ========================================================= */

.gallery-results {
    width: min(1200px, calc(100% - 30px));
    margin: 70px auto 0;
}

.gallery-results-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 35px;
}

.gallery-eyebrow {
    display: block;
    margin-bottom: 8px;
    color: var(--primary, #6847ff);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 2px;
}

.gallery-results-header h2 {
    margin: 0 0 8px;
    color: var(--text, #17212b);
    font-size: 2rem;
}

.gallery-results-header p {
    margin: 0;
    color: #707070;
    line-height: 1.6;
}

.gallery-count {
    padding: 10px 16px;
    border-radius: 30px;
    background: #fff;
    color: var(--primary, #6847ff);
    font-size: 13px;
    font-weight: 700;
    box-shadow: var(--shadow, 0 8px 25px rgba(0,0,0,.08));
    white-space: nowrap;
}

/* =========================================================
   IMAGE GRID
   ========================================================= */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
    margin-bottom: 20px;
}

.gallery-card {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 20px;
    background: #eee;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0,0,0,.08);
    transform: translateZ(0);
    isolation: isolate;
}

.gallery-card figure {
    width: 100%;
    height: 100%;
    margin: 0;
}

.gallery-card img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    background: #eee;
    transition: transform .5s cubic-bezier(.2,.8,.2,1);
}

.gallery-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        to top,
        rgba(0,0,0,.38),
        transparent 48%
    );
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
}

.gallery-card::before {
    content: "\f002";
    position: absolute;
    z-index: 2;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(.7);
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255,255,255,.92);
    color: var(--primary, #6847ff);
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    opacity: 0;
    pointer-events: none;
    transition: .3s ease;
}

.gallery-card:hover img {
    transform: scale(1.06);
}

.gallery-card:hover::after,
.gallery-card:hover::before {
    opacity: 1;
}

.gallery-card:hover::before {
    transform: translate(-50%, -50%) scale(1);
}

/* =========================================================
   VIDEOS
   ========================================================= */

.video-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 25px;
}

.video-card {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    background: #111;
    box-shadow: 0 12px 35px rgba(0,0,0,.1);
}

.video-thumbnail {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: #111;
    cursor: pointer;
    text-align: left;
}

.video-thumbnail img {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: block;
    object-fit: cover;
    transition: transform .4s ease, filter .4s ease;
}

.video-thumbnail:hover img {
    transform: scale(1.03);
    filter: brightness(.7);
}

.video-play {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 65px;
    height: 65px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255,255,255,.95);
    color: #ff0000;
    font-size: 22px;
    box-shadow: 0 8px 30px rgba(0,0,0,.3);
    pointer-events: none;
}

.video-label {
    position: absolute;
    left: 15px;
    bottom: 15px;
    max-width: calc(100% - 30px);
    padding: 7px 12px;
    border-radius: 8px;
    background: rgba(0,0,0,.7);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.video-card iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: block;
    border: 0;
}

/* =========================================================
   EMPTY STATE
   ========================================================= */

.empty-gallery {
    text-align: center;
    padding: 90px 20px;
}

.empty-icon {
    width: 75px;
    height: 75px;
    display: grid;
    place-items: center;
    margin: 0 auto 20px;
    border-radius: 20px;
    background: var(--primary-light, #f0ecff);
    color: var(--primary, #6847ff);
    font-size: 30px;
}

.empty-gallery h2 {
    margin: 0 0 10px;
    color: var(--text, #17212b);
}

.empty-gallery p {
    max-width: 500px;
    margin: auto;
    color: #777;
    line-height: 1.7;
}

/* =========================================================
   LIGHTBOX
   ========================================================= */

body.lightbox-open {
    overflow: hidden;
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    background: rgba(5, 8, 15, .96);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .25s ease, visibility .25s ease;
}

.lightbox.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.lightbox-content {
    position: relative;
    width: min(1100px, calc(100vw - 160px));
    height: min(85vh, 800px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.lightbox-image-wrap {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 20px 70px rgba(0,0,0,.5);
}

.close-lightbox,
.prev-btn,
.next-btn {
    position: absolute;
    z-index: 5;
    border: 0;
    cursor: pointer;
    color: #fff;
    background: rgba(255,255,255,.12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: background .2s ease, transform .2s ease;
}

.close-lightbox {
    top: 25px;
    right: 25px;
    width: 50px;
    height: 50px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-size: 20px;
}

.prev-btn,
.next-btn {
    top: 50%;
    width: 55px;
    height: 55px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-size: 20px;
}

.prev-btn {
    left: 25px;
    transform: translateY(-50%);
}

.next-btn {
    right: 25px;
    transform: translateY(-50%);
}

.close-lightbox:hover,
.prev-btn:hover,
.next-btn:hover {
    background: var(--primary, #6847ff);
}

.lightbox-bottom {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 14px;
    border-radius: 30px;
    background: rgba(255,255,255,.12);
    color: #fff;
    font-size: 13px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1100px) {
    .gallery-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 992px) {
    .gallery-filter-panel {
        padding: 22px;
    }

    .filter-block {
        padding: 8px 16px;
    }

    .filter-option {
        padding: 9px 13px;
    }

    .gallery-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .video-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   MOBILE FILTER UI
   ========================================================= */

@media (max-width: 768px) {

    .page-hero {
        padding: 105px 20px 65px;
    }

    .page-hero h1 {
        font-size: 2.2rem;
    }

    .page-hero p {
        font-size: .95rem;
    }

    .gallery-filter-panel {
        width: calc(100% - 24px);
        margin-bottom: 30px;
        padding: 14px;
        border-radius: 20px;
    }

    .filter-topbar {
        margin-bottom: 14px;
    }

    .filter-kicker {
        font-size: 10px;
    }

    .filter-topbar h2 {
        font-size: 1.1rem;
    }

    .filter-reset {
        padding: 8px 11px;
        font-size: 12px;
    }

    .filter-grid {
        display: flex;
        flex-direction: column;
        gap: 9px;
    }

    .filter-block,
    .filter-block + .filter-block {
        padding: 0;
        border: 1px solid #ebe8f2;
        border-radius: 15px;
        overflow: hidden;
        background: #fff;
    }

    .filter-heading {
        min-height: 66px;
        padding: 12px 14px;
        cursor: pointer;
    }

    .filter-icon {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
        border-radius: 11px;
        font-size: 16px;
    }

    .filter-heading small {
        font-size: 10px;
    }

    .filter-heading strong {
        font-size: 14px;
    }

    .filter-arrow {
        display: block;
    }

    .filter-options {
        display: none;
        padding: 0 12px 13px;
        margin: 0;
    }

    .filter-block.open .filter-options {
        display: flex;
        animation: filterOpen .2s ease;
    }

    .filter-block.open .filter-arrow {
        transform: rotate(180deg);
    }

    .filter-option {
        flex: 1 1 auto;
        min-width: 90px;
        min-height: 42px;
        padding: 9px 12px;
        font-size: 12px;
    }

    .selection-summary {
        margin-top: 12px;
        padding: 11px 12px;
    }

    .summary-icon {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
    }

    .summary-content strong {
        font-size: 12px;
    }

    .gallery-results {
        width: calc(100% - 24px);
        margin-top: 45px;
    }

    .gallery-results-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
        margin-bottom: 22px;
    }

    .gallery-results-header h2 {
        font-size: 1.55rem;
    }

    .gallery-results-header p {
        font-size: .9rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .gallery-card {
        border-radius: 14px;
    }

    .gallery-card::before {
        width: 40px;
        height: 40px;
        font-size: 15px;
    }

    .video-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .video-card {
        border-radius: 15px;
    }

    .video-play {
        width: 56px;
        height: 56px;
        font-size: 19px;
    }

    .lightbox {
        padding: 15px;
    }

    .lightbox-content {
        width: 100%;
        height: 80vh;
    }

    .close-lightbox {
        top: 14px;
        right: 14px;
        width: 44px;
        height: 44px;
    }

    .prev-btn,
    .next-btn {
        width: 44px;
        height: 44px;
        font-size: 16px;
    }

    .prev-btn {
        left: 8px;
    }

    .next-btn {
        right: 8px;
    }

    .lightbox-bottom {
        bottom: 15px;
        font-size: 12px;
    }
}

@keyframes filterOpen {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================================
   SMALL PHONES
   ========================================================= */

@media (max-width: 480px) {

    .page-hero {
        padding: 90px 16px 5px;
    }

    .page-hero h1 {
        font-size: 1.9rem;
    }

    .gallery-filter-panel {
        padding: 11px;
    }

    .filter-topbar {
        gap: 8px;
    }

    .filter-topbar h2 {
        font-size: 1rem;
    }

    .filter-reset {
        padding: 7px 9px;
        border-radius: 10px;
    }

    .filter-heading {
        min-height: 62px;
    }

    .filter-option {
        min-width: 0;
        padding: 9px 10px;
        font-size: 11px;
    }

    .option-icon {
        font-size: 12px;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
    }

    .gallery-card {
        aspect-ratio: 1 / 1;
        border-radius: 11px;
    }

    .gallery-card::before {
        width: 34px;
        height: 34px;
        font-size: 13px;
    }

    .gallery-count {
        padding: 8px 12px;
        font-size: 11px;
    }

    .lightbox-content {
        height: 75vh;
    }

    .prev-btn,
    .next-btn {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
}

/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .gallery-card img,
    .gallery-card::before,
    .gallery-card::after,
    .filter-option,
    .filter-reset,
    .lightbox,
    .filter-arrow {
        transition: none !important;
    }

    .filter-block.open .filter-options {
        animation: none;
    }
}
