/* ── GALLERY STYLING ── */
.gallery-hero {
    background: var(--yellow);
    padding: 70px 32px 50px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.gallery-hero h1 {
    font-size: clamp(32px, 4vw, 50px);
    font-weight: 900;
    color: var(--dark);
    margin-bottom: 12px;
}
.gallery-hero h1 span {
    color: var(--rose);
}
.gallery-hero p {
    font-size: 16px;
    color: #4b5563;
    font-weight: 600;
    max-width: 650px;
    margin: 0 auto;
    line-height: 1.6;
}

.gallery-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px 80px;
}

/* ── 3 TAB CARDS ── */
.gallery-tabs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.gallery-tab-card {
    background: var(--white);
    border: 2px solid #e5e7eb;
    border-radius: 18px;
    padding: 24px 20px;
    display: flex;
    align-items: center;
    gap: 18px;
    cursor: pointer;
    text-decoration: none;
    color: var(--dark);
    transition: all 0.28s ease;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
    position: relative;
    user-select: none;
}

.gallery-tab-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.tab-icon-wrapper {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

.gallery-tab-card:hover .tab-icon-wrapper {
    transform: scale(1.1);
}

.tab-icon-photo { background: #fdf2f8; color: var(--rose); }
.tab-icon-video { background: #f0fdfa; color: var(--teal); }
.tab-icon-audio { background: #fef2f2; color: #dc2626; }

.tab-card-info h3 {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 4px;
    color: var(--dark);
}

.tab-card-info p {
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    margin: 0;
}

/* Active State Tabs */
.gallery-tab-card.active {
    border-color: var(--rose);
    background: #fffdfd;
    box-shadow: 0 8px 24px rgba(205, 93, 131, 0.15);
}
.gallery-tab-card.active.tab-video {
    border-color: var(--teal);
    box-shadow: 0 8px 24px rgba(81, 175, 168, 0.18);
}
.gallery-tab-card.active.tab-audio {
    border-color: #dc2626;
    box-shadow: 0 8px 24px rgba(220, 38, 38, 0.15);
}

.gallery-tab-card.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 24px;
    right: 24px;
    height: 4px;
    border-radius: 4px 4px 0 0;
    background: var(--rose);
}
.gallery-tab-card.active.tab-video::after { background: var(--teal); }
.gallery-tab-card.active.tab-audio::after { background: #dc2626; }

/* ── GALLERY MEDIA GRIDS ── */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 24px;
}

.gallery-item-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    border: 1px solid #f1f5f9;
    cursor: pointer;
    transition: all 0.28s cubic-bezier(0.25, 1, 0.5, 1);
    display: flex;
    flex-direction: column;
}

.gallery-item-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.1);
}

.gallery-thumb-container {
    position: relative;
    width: 100%;
    padding-top: 65%;
    background: #0f172a;
    overflow: hidden;
}

.gallery-thumb-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gallery-thumb-default {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-thumb-default-icon {
    font-size: 48px;
    opacity: 0.6;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.gallery-item-card:hover .gallery-thumb-default-icon {
    transform: scale(1.15);
    opacity: 0.9;
}

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

.play-badge-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.25);
    transition: background 0.2s ease;
}

.gallery-item-card:hover .play-badge-overlay {
    background: rgba(0, 0, 0, 0.4);
}

.play-icon-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    color: var(--teal);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    transition: transform 0.25s ease;
}

.gallery-item-card:hover .play-icon-circle {
    transform: scale(1.15);
}

.gallery-item-info {
    padding: 16px 18px 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.gallery-item-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 6px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gallery-item-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: #9ca3af;
    margin-top: 10px;
}

/* ── AUDIO LIST VIEW ── */
.audio-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.audio-list-item {
    background: var(--white);
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    transition: all 0.25s ease;
}

.audio-list-item:hover {
    transform: translateX(4px);
    border-color: #dc2626;
    box-shadow: 0 8px 20px rgba(220, 38, 38, 0.12);
}

.audio-item-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    min-width: 0;
}

.audio-cover-art {
    width: 58px;
    height: 58px;
    border-radius: 12px;
    overflow: hidden;
    background: #fef2f2;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid #fee2e2;
}

.audio-cover-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.audio-icon-fallback {
    font-size: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}

.audio-details {
    min-width: 0;
    flex: 1;
}

.audio-details h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.audio-details p {
    font-size: 13px;
    color: #6b7280;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.audio-play-button {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fef2f2;
    border: 2px solid #dc2626;
    color: #dc2626;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.audio-list-item:hover .audio-play-button {
    background: #dc2626;
    color: #ffffff;
    transform: scale(1.1);
}

/* ── EMPTY STATE ── */
.gallery-empty {
    text-align: center;
    padding: 60px 20px;
    background: #ffffff;
    border-radius: 20px;
    border: 2px dashed #e5e7eb;
}

.gallery-empty-icon {
    font-size: 48px;
    color: #9ca3af;
    margin-bottom: 12px;
}

.gallery-empty h4 {
    font-size: 18px;
    font-weight: 800;
    color: #374151;
    margin-bottom: 6px;
}

.gallery-empty p {
    color: #6b7280;
    font-size: 14px;
}

/* ── LIGHTBOX / POPUP MODAL ── */
.gallery-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.gallery-modal-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.gallery-modal-dialog {
    background: #ffffff;
    border-radius: 20px;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
    transform: scale(0.92);
    transition: transform 0.25s cubic-bezier(0.25, 1, 0.5, 1);
    position: relative;
}

.gallery-modal-backdrop.active .gallery-modal-dialog {
    transform: scale(1);
}

.gallery-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: #ffffff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    line-height: 1;
    z-index: 10;
    transition: background 0.2s ease, transform 0.2s ease;
}

.gallery-modal-close:hover {
    background: rgba(0, 0, 0, 0.85);
    transform: rotate(90deg);
}

.gallery-modal-media {
    background: #0b1120;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-height: 250px;
}

.gallery-modal-media img {
    max-height: 65vh;
    max-width: 100%;
    object-fit: contain;
    display: block;
}

.modal-video-wrapper {
    width: 100%;
    position: relative;
    padding-top: 56.25%; /* 16:9 */
    background: #000;
}

.modal-video-wrapper iframe,
.modal-video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.modal-audio-wrapper {
    width: 100%;
    padding: 36px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #ffffff;
}

.modal-audio-cover {
    width: 130px;
    height: 130px;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    background: #334155;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-audio-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-audio-wrapper audio {
    width: 100%;
    max-width: 460px;
}

.gallery-modal-body {
    padding: 22px 24px;
    overflow-y: auto;
    max-height: 25vh;
    background: #ffffff;
}

.gallery-modal-body h3 {
    font-size: 19px;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 8px;
    line-height: 1.4;
}

.gallery-modal-body p {
    font-size: 14px;
    color: #4b5563;
    line-height: 1.6;
    margin: 0;
    white-space: pre-line;
}

@media (max-width: 768px) {
    .gallery-tabs-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .gallery-container {
        padding: 24px 16px 60px;
    }
    .gallery-modal-dialog {
        max-height: 94vh;
    }
}

