﻿/* =========================================
   PHOTOS PAGE STYLING - BLACK & WHITE
   ========================================= */

.photos-page {
    min-height: 100vh;
    background: #fff;
    padding-top: 0;
}

/* =========================================
   PAGE TITLE SECTION (EDGE-TO-EDGE)
   ========================================= */
.page-title-section {
    background: #000000; /* Strict Black */
    padding: 120px 20px 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-top: 0;
}

    /* Animated background pattern (Subtle texture) */
    .page-title-section::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: radial-gradient(circle at 20% 50%, rgba(255,255,255,0.1) 0%, transparent 50%), radial-gradient(circle at 80% 80%, rgba(255,255,255,0.1) 0%, transparent 50%);
        animation: patternMove 20s ease-in-out infinite;
    }

@keyframes patternMove {
    0%, 100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(20px, 20px);
    }
}

.page-title {
    font-size: 3.5rem;
    font-weight: 900;
    color: #fff;
    margin: 0;
    position: relative;
    z-index: 1;
    text-shadow: 0 4px 20px rgba(0,0,0,0.5);
    animation: titleFadeIn 1s ease-out;
}

@keyframes titleFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

/* =========================================
   CATEGORY TABS (YouTube Style - Exact Edges)
   ========================================= */
.category-tabs-wrapper {
    background: #fff;
    padding: 15px 0;
    position: sticky;
    top: 70px;
    z-index: 90;
    border-bottom: 1px solid #eaeaea;
}

.tabs-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    overflow: hidden; /* Ensures no scrollbars appear outside */
}

.category-tabs {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 12px;
    padding: 0 50px; /* Space for arrows so text doesn't get cut off immediately */
    width: 100%;
    /* Hide scrollbar */
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
}

    .category-tabs::-webkit-scrollbar {
        display: none;
    }

.tab-btn {
    flex: 0 0 auto;
    white-space: nowrap;
    background: #fff;
    color: #000;
    border: 1px solid #e0e0e0;
    padding: 10px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    /* UPDATED: Rounded Pill Shape (Matches Navmenu) */
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .tab-btn:hover {
        background: #f5f5f5;
        border-color: #000;
    }

    .tab-btn.active {
        background: #000;
        color: #fff;
        border-color: #000;
    }

/* === SCROLL ARROW BUTTONS === */
.scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    /* Perfect Circle & Styling */
    border-radius: 50%;
    background: #fff; /* Solid white to cover text passing under */
    border: 1px solid #e0e0e0;
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2; /* Sit on top of tabs */
    transition: opacity 0.3s ease, background 0.2s ease;
    /* NO SHADOW as requested */
    box-shadow: none;
}

    .scroll-btn:hover {
        background: #f0f0f0;
        border-color: #000;
    }

    .scroll-btn svg {
        width: 20px;
        height: 20px;
    }

/* === EXACT POSITIONING === */
.left-btn {
    left: 0; /* Pinned exactly to left edge */
}

.right-btn {
    right: 0; /* Pinned exactly to right edge */
}

/* Visibility State */
.scroll-btn.hidden {
    opacity: 0;
    pointer-events: none; /* Allows clicking tabs underneath if arrow is hidden */
}

/* === MOBILE: HIDE ARROWS === */
/* Standard UX: Phones use swipe (touch), Desktop uses Arrows */
@media (max-width: 768px) {
    .scroll-btn {
        display: none;
    }

    .category-tabs {
        padding: 0 20px; /* Reset padding since arrows are gone */
    }
}

/* =========================================
   GALLERY GRID
   ========================================= */
.gallery-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
}

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

.gallery-item {
    position: relative;
    aspect-ratio: 1/1;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    opacity: 0;
    transform: scale(0.8);
    animation: itemFadeIn 0.5s ease-out forwards;
}

@keyframes itemFadeIn {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.gallery-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 30px rgba(0,0,0,0.3);
}

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

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

/* Image overlay */
.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 100%); /* Strict Black gradient */
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-overlay h3 {
    color: #fff;
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

/* Loading skeleton */
.gallery-item.loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* =========================================
   GLASSMORPHISM BUTTONS
   ========================================= */
.gallery-actions {
    text-align: center;
    margin-top: 40px;
}

/* Base Glass Button Style */
.btn-glass {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.06);
    color: #000;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

    .btn-glass:hover {
        background: rgba(255, 255, 255, 0.85);
        transform: translateY(-2px);
        box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.1);
    }

/* SHOW MORE: Pill Shape */
.btn-show-more {
    padding: 12px 35px;
    font-size: 1rem;
    border-radius: 50px;
    gap: 10px;
}

/* SHOW LESS: Circular Button Bottom Right */
.btn-show-less {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    padding: 0;
    z-index: 999;
    animation: slideUpFade 0.4s ease-out;
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.btn-icon {
    width: 20px;
    height: 20px;
    stroke-width: 2.5px;
}

.hidden {
    display: none !important;
}

/* =========================================
   LIGHTBOX MODAL
   ========================================= */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

    .lightbox.active {
        display: flex;
    }

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.lightbox-content {
    position: relative;
    max-width: 95vw;
    max-height: 95vh;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.lightbox-content img {
    max-width: 100%;
    max-height: 95vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 50px rgba(0,0,0,0.5);
}

/* Close Button */
.lightbox-close {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    color: #000;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 10000;
}

    .lightbox-close:hover {
        background: #fff;
        transform: rotate(90deg) scale(1.1);
        box-shadow: 0 6px 20px rgba(0,0,0,0.5);
    }

    .lightbox-close:active {
        transform: rotate(90deg) scale(0.95);
    }

/* Click outside to close hint */
.lightbox::after {
    content: 'Click anywhere to close';
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 8px 20px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 20px;
    pointer-events: none;
    animation: fadeInOut 3s ease-in-out;
}

@keyframes fadeInOut {
    0%, 100% {
        opacity: 0;
    }

    10%, 90% {
        opacity: 1;
    }
}

/* =========================================
   RESPONSIVE DESIGN
   ========================================= */
@media (max-width: 900px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .page-title {
        font-size: 2.5rem;
    }

    .page-title-section {
        padding: 100px 20px 60px;
    }

    .category-tabs {
        gap: 10px;
    }

    .tab-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    /* Fixed position adjustments for show less */
    .btn-show-less {
        bottom: 20px;
        right: 20px;
    }

    /* Lightbox */
    .lightbox {
        padding: 10px;
    }

    .lightbox-content img {
        max-height: 90vh;
    }

    .lightbox-close {
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 600px) {
    .page-title-section {
        padding: 90px 20px 50px;
    }

    .page-title {
        font-size: 2rem;
    }

    .gallery-section {
        padding: 40px 15px;
    }

    .lightbox::after {
        display: none;
    }
}
