/* ===================================
   OVERLAY GALLERY PAGE
   =================================== */

/* --- Top Bar --- */
.top-bar {
    height: 70px;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    position: sticky;
    top: 0;
    z-index: 900;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-icon {
    background: none;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 8px 10px;
    cursor: pointer;
    color: #374151;
    font-size: 18px;
    display: none;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: #f3f4f6;
}

.page-title {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.page-title i {
    color: #6c5ce7;
    font-size: 24px;
}

.page-subtitle {
    font-size: 13px;
    color: #9ca3af;
    margin: 2px 0 0 0;
}

/* --- Content Area --- */
.content-wrapper {
    padding: 30px;
    flex: 1;
}

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

/* --- Gallery Card --- */
.gallery-card {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: cardFadeIn 0.5s ease both;
}

.gallery-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

/* --- Image Wrapper --- */
.card-image-wrapper {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.card-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gallery-card:hover .card-image-wrapper img {
    transform: scale(1.05);
}

/* --- Label --- */
.card-label {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-top: 1px solid #f3f4f6;
}

.card-number {
    font-size: 12px;
    font-weight: 700;
    color: #6c5ce7;
    background: #f3e8ff;
    padding: 4px 10px;
    border-radius: 6px;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.card-name {
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.3;
}

/* --- Animation --- */
@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .btn-icon {
        display: flex;
    }

    .content-wrapper {
        padding: 16px;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 16px;
    }

    .top-bar {
        padding: 0 16px;
    }

    .page-title {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .card-label {
        padding: 12px 16px;
    }

    .card-name {
        font-size: 14px;
    }

    .page-title {
        font-size: 16px;
    }

    .page-subtitle {
        font-size: 11px;
    }
}

/* Professional Header appended from overlay-themes */
.themes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    padding: 20px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin-bottom: 20px;
}

.themes-header h2 {
    color: #ffffff;
    margin: 0 0 5px 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.themes-header p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
    margin: 0;
}

.header-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-header-fb {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: #1877F2;
    color: #ffffff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(24, 119, 242, 0.4);
}

.btn-header-fb:hover {
    background: #166fe5;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(24, 119, 242, 0.5);
    color: #fff;
}

.btn-header-yt {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: #FF0000;
    color: #ffffff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 0, 0, 0.4);
}

.btn-header-yt:hover {
    background: #cc0000;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.5);
    color: #fff;
}

@media screen and (max-width: 768px) {
    .themes-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 16px;
        margin-bottom: 10px;
        border-radius: 0;
        width: 100% !important;
        box-sizing: border-box;
    }

    .themes-header h2 {
        font-size: 1.15rem;
    }

    .themes-header p {
        font-size: 0.85rem;
    }

    .header-actions {
        width: 100%;
        display: flex;
        gap: 10px;
        justify-content: flex-start;
    }

    .btn-header-fb,
    .btn-header-yt {
        flex: none;
        width: 100%;
        justify-content: center;
        padding: 10px 16px;
        font-size: 13px;
    }

    .btn-text {
        display: inline;
    }
}
