/* ============================================================
   GALLERY PAGE — Rich & Beautiful Styles
   assets/css/pages/gallery.css
   ============================================================ */

/* ── Section Headings ── */
.gallery-section {
    margin-bottom: 64px;
}

.gallery-section-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--mm-border, #e2e8f0);
}

.gallery-section-header .section-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, #0052ff, #4d7cff);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 20px;
    flex-shrink: 0;
    box-shadow: 0 6px 16px rgba(0, 82, 255, 0.28);
}

.gallery-section-header h3 {
    font-family: 'Calistoga', Georgia, serif;
    font-size: 1.35rem;
    color: var(--mm-fg, #0f172a);
    font-weight: 400;
    margin: 0;
}

.gallery-section-header .item-count {
    margin-left: auto;
    background: rgba(0, 82, 255, 0.08);
    color: var(--mm-accent, #0052ff);
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.gallery-section.hidden {
    display: none;
}

/* ── Gallery Grid ── */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    cursor: pointer;
    height: 250px;
    background: var(--mm-muted, #f1f5f9);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    animation: mm-fadeUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.gallery-item:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 16px 36px rgba(0, 82, 255, 0.25);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 82, 255, 0.9), rgba(77, 124, 255, 0.9));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.35s ease;
    padding: 20px;
    text-align: center;
    backdrop-filter: blur(4px);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay i {
    font-size: 34px;
    color: #ffffff;
    margin-bottom: 12px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.gallery-overlay p {
    color: #ffffff;
    font-weight: 700;
    font-size: 14px;
    margin: 0 0 6px;
    line-height: 1.35;
}

.gallery-overlay .meta {
    color: rgba(255, 255, 255, 0.85);
    font-size: 12px;
    margin: 0;
}

/* ── Empty State ── */
.gallery-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--mm-muted-fg, #64748b);
}

.gallery-empty i {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
    opacity: 0.35;
}

/* ── Lightbox Overlay ── */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(12px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.lightbox.open {
    display: flex;
}

.lightbox-inner {
    position: relative;
    max-width: 920px;
    width: 100%;
    background: var(--mm-card, #ffffff);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
    animation: scaleIn 0.3s ease forwards;
}

.lightbox-img {
    width: 100%;
    max-height: 65vh;
    object-fit: contain;
    background: #0f172a;
}

.lightbox-info {
    padding: 24px 28px;
}

.lightbox-info h4 {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--mm-fg, #0f172a);
    margin: 0 0 10px;
}

.lightbox-info .lb-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13px;
    color: var(--mm-muted-fg, #64748b);
}

.lightbox-info .lb-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.lightbox-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--mm-card, #ffffff);
    border: 1px solid var(--mm-border, #e2e8f0);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    color: var(--mm-fg, #0f172a);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 2;
    transition: all 0.25s ease;
}

.lightbox-close:hover {
    background: #fee2e2;
    color: #dc2626;
    border-color: #fca5a5;
    transform: rotate(90deg);
}
