/* Gallery Module Styles */
.gallery-body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    background: #f6f7fb;
    color: #111827;
}

.gallery-section,
.video-section {
    padding: 36px 24px;
    background: #f6f7fb;
    clear: both;
    width: 100%;
}

.gallery-header,
.video-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.gallery-kicker,
.video-kicker {
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 12px;
    color: #10b981;
    margin: 0 0 6px;
}

.video-kicker {
    color: #ef4444;
}

.gallery-title,
.video-title {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
}

.gallery-cta,
.video-cta {
    padding: 10px 18px;
    background: #10b981;
    color: #fff;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}

.video-cta {
    background: #ef4444;
}

.gallery-grid,
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}

.gallery-card,
.video-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(31, 41, 55, 0.08);
}

.video-embed {
    position: relative;
    padding-top: 56.25%;
    background: #000;
}

.video-embed iframe,
.video-embed video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.video-embed .video-fallback-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
}

.gallery-thumb,
.video-thumb {
    display: block;
    position: relative;
    height: 160px;
    background: #e5e7eb;
    border: none;
    padding: 0;
    cursor: pointer;
}

.gallery-thumb img,
.video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-thumb.is-fallback,
.video-thumb.is-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #d1fae5, #ecfdf5);
}

.video-thumb.is-fallback {
    background: linear-gradient(135deg, #fee2e2, #fef2f2);
}

.gallery-fallback-text,
.video-fallback-text {
    color: #10b981;
    font-weight: 700;
}

.video-fallback-text {
    color: #ef4444;
}

.gallery-body,
.video-body {
    padding: 16px;
}

.gallery-body h3,
.video-body h3 {
    margin: 0;
    font-size: 18px;
}

.gallery-body a,
.video-body a {
    color: #111827;
    text-decoration: none;
}

.gallery-tag {
    display: inline-block;
    margin-bottom: 6px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 11px;
    text-transform: uppercase;
    background: #d1fae5;
    color: #047857;
    font-weight: 700;
}

.video-play {
    position: absolute;
    right: 12px;
    bottom: 12px;
    background: rgba(17, 24, 39, 0.7);
    color: #fff;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
}

.gallery-empty,
.video-empty {
    padding: 24px;
    background: #fff;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 6px 18px rgba(31, 41, 55, 0.08);
}

/* Page layout */
.gallery-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 20px 60px;
}

.gallery-hero,
.video-hero {
    background: #fff;
    border-radius: 20px;
    padding: 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    box-shadow: 0 10px 25px rgba(31, 41, 55, 0.08);
    margin-bottom: 24px;
}

.gallery-hero-title,
.video-hero-title {
    margin: 0 0 6px;
    font-size: 32px;
}

.gallery-hero-subtitle,
.video-hero-subtitle {
    margin: 0;
    color: #6b7280;
}

.gallery-search,
.video-search {
    display: flex;
    gap: 10px;
    align-items: center;
}

.gallery-search input,
.gallery-search select,
.video-search input,
.video-search select {
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
}

.gallery-search button,
.video-search button {
    padding: 10px 16px;
    border: none;
    border-radius: 10px;
    background: #111827;
    color: #fff;
    font-weight: 600;
}

.gallery-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 24px;
}

.gallery-album-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.gallery-album-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(31, 41, 55, 0.08);
}

.gallery-album-item {
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
    border-radius: 12px;
    overflow: hidden;
}

.gallery-album-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.gallery-sidebar {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.gallery-panel {
    background: #fff;
    border-radius: 16px;
    padding: 18px;
    box-shadow: 0 8px 20px rgba(31, 41, 55, 0.08);
}

.gallery-panel h3 {
    margin: 0 0 12px;
    font-size: 16px;
}

.gallery-archive-list,
.gallery-quick-list,
.gallery-recent-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.gallery-archive-list a,
.gallery-quick-list a,
.gallery-recent-list a {
    text-decoration: none;
    color: #111827;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 13px;
}

.gallery-archive-list span {
    color: #6b7280;
}

.gallery-muted {
    color: #6b7280;
    margin: 0;
}

.gallery-pagination,
.video-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(31, 41, 55, 0.08);
}

.gallery-page-btn,
.video-page-btn {
    padding: 8px 12px;
    background: #f3f4f6;
    border-radius: 8px;
    text-decoration: none;
    color: #111827;
    font-weight: 600;
}

.gallery-page-btn.disabled,
.video-page-btn.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.gallery-page-info,
.video-page-info {
    font-size: 13px;
    color: #6b7280;
}

.gallery-nav,
.video-nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.gallery-nav-link,
.video-nav-link {
    background: #fff;
    padding: 14px;
    border-radius: 14px;
    text-decoration: none;
    color: #111827;
    box-shadow: 0 6px 16px rgba(31, 41, 55, 0.08);
}

.gallery-nav-link span,
.video-nav-link span {
    display: block;
    font-size: 12px;
    color: #6b7280;
}

/* Lightbox */
.gallery-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.gallery-lightbox.is-open {
    display: flex;
}

.gallery-lightbox img {
    max-width: 90%;
    max-height: 80%;
    border-radius: 12px;
}

.gallery-lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #fff;
    border: none;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 18px;
    cursor: pointer;
}

/* Video list */
.video-row {
    display: grid;
    grid-template-columns: 220px 1fr auto;
    gap: 16px;
    background: #fff;
    border-radius: 16px;
    padding: 18px;
    box-shadow: 0 8px 20px rgba(31, 41, 55, 0.08);
    margin-bottom: 18px;
    align-items: center;
}

.video-row-content h2 {
    margin: 0 0 8px;
    font-size: 20px;
}

.video-row-content h2 a {
    color: #111827;
    text-decoration: none;
}

.video-row-content p {
    margin: 0;
    color: #6b7280;
    font-size: 13px;
}

.video-row-meta {
    text-align: right;
}

.video-link {
    color: #ef4444;
    text-decoration: none;
    font-weight: 600;
    font-size: 12px;
}

.video-player {
    background: #000;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    padding-top: 56.25%;
}

.video-iframe iframe,
.video-player video,
.video-modal-content iframe,
.video-modal-content video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.video-iframe {
    position: absolute;
    inset: 0;
}

.video-file {
    width: 100%;
    height: 100%;
}

.video-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.video-modal.is-open {
    display: flex;
}

.video-modal-content {
    width: min(900px, 90%);
    position: relative;
    padding-top: 56.25%;
}

.video-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #fff;
    border: none;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 18px;
    cursor: pointer;
    z-index: 1;
}

@media (max-width: 960px) {
    .gallery-layout {
        grid-template-columns: 1fr;
    }
    .gallery-hero,
    .video-hero {
        flex-direction: column;
        align-items: flex-start;
    }
    .video-row {
        grid-template-columns: 1fr;
        text-align: left;
    }
    .video-row-meta {
        text-align: left;
    }
}

