/* Gallery page styles only — global resets come from style.css */

:root {
    --border: #e6e6e6;
    --shadow-sm: 0 8px 20px rgba(0, 0, 0, .06);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, .08);
}

/* ==========================================
   Gallery Hero
========================================== */
.gallery-hero {
    padding: 140px 0 60px;
    background: linear-gradient(135deg,
            #ffffff,
            #f7f7f7);
    text-align: center;
}

.gallery-hero .hero-content h1 {
    font-size: 52px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 18px;
}

.gallery-hero .hero-content p {
    max-width: 750px;
    margin: auto;
    color: var(--text);
    font-size: 17px;
    line-height: 1.8;
}

.gallery-hero .hero-content strong {
    color: var(--primary);
}

/* ==========================================
   Gallery Filter
========================================== */
.gallery-filter {
    padding: 25px 0 50px;
}

.filter-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.gallery-filter .filter-btn {
    padding: 13px 28px;
    border: none;
    outline: none;
    border-radius: 50px;
    cursor: pointer;
    background: var(--white);
    color: var(--primary);
    font-size: 15px;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.gallery-filter .filter-btn:hover {
    background: #73C3E5;
    color: var(--white);
    transform: translateY(-3px);
}

.gallery-filter .filter-btn.active {
    background: var(--primary);
    color: rgb(255, 255, 255);
}

/* ==========================================
   Gallery Section
========================================== */
.gallery-section {
    padding-bottom: 90px;
}

.gallery-grid {
    display: grid;
    grid-template-columns:
        repeat(auto-fit,
            minmax(320px, 1fr));
    gap: 28px;
}

/* ==========================================
   Gallery Card
========================================== */
.gallery-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    cursor: pointer;
}

.gallery-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.gallery-card img,
.gallery-card video {
    width: 100%;
    height: 260px;
    object-fit: cover;
    display: block;
}

/* ==========================================
   Gallery Info
========================================== */
.gallery-info {
    padding: 18px;
}

.gallery-info h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 8px;
}

.gallery-info p {
    font-size: 14px;
    color: #666;
}

/* ==========================================
   Gallery Overlay
========================================== */
.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top,
            rgba(0, 0, 0, .75),
            rgba(0, 0, 0, .15));
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    padding: 22px;
    opacity: 0;
    transition: var(--transition);
}

.gallery-card:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay h3 {
    color: var(--white);
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 6px;
}

.gallery-overlay p {
    color: #f5f5f5;
    font-size: 14px;
}

/* ==========================================
   Image Zoom
========================================== */
.gallery-card img,
.gallery-card video {
    transition: .45s ease;
}

.gallery-card:hover img,
.gallery-card:hover video {
    transform: scale(1.08);
}

/* ==========================================
   Video Badge
========================================== */
.video-icon {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 18px;
    color: var(--primary);
    box-shadow: 0 10px 25px rgba(0, 0, 0, .15);
}

/* ==========================================
   Loader
========================================== */
.loader {
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, .9);
    backdrop-filter: blur(8px);
    z-index: 9999;
}

.spinner {
    width: 65px;
    height: 65px;
    border: 5px solid #ddd;
    border-top: 5px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.hidden {
    display: none !important;
}

/* ==========================================
   Empty State
========================================== */
.empty-state {
    text-align: center;
    padding: 100px 20px;
}

.empty-state i {
    font-size: 75px;
    color: #bdbdbd;
    margin-bottom: 20px;
}

.empty-state h2 {
    font-size: 30px;
    color: var(--primary);
    margin-bottom: 10px;
}

.empty-state p {
    color: #777;
    font-size: 16px;
}

/* ==========================================
   Card Animation
========================================== */
.gallery-card {
    animation: fadeUp .45s ease;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(35px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================
   Lightbox
========================================== */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .95);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    z-index: 99999;
    animation: fadeIn .35s ease;
}

.lightbox-content {
    max-width: 1200px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.lightbox img,
.lightbox video {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 18px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, .45);
}

/* ==========================================
   Close Button
========================================== */
.close-btn {
    position: absolute;
    top: 25px;
    right: 25px;
    z-index: 3;
    width: 55px;
    height: 55px;
    border: none;
    border-radius: 50%;
    background: #fff;
    color: #111827;
    font-size: 22px;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .28);
    transition: var(--transition);
}

.close-btn:hover {
    background: var(--primary);
    color: #fff;
}

/* ==========================================
   Previous / Next Button
========================================== */
.nav-btn {
    position: absolute;
    top: 50%;
    z-index: 3;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, .15);
    backdrop-filter: blur(10px);
    color: #fff;
    cursor: pointer;
    font-size: 22px;
    transition: var(--transition);
}

.nav-btn:hover {
    background: var(--primary);
    color: var(--primary);
}

.prev-btn {
    left: 30px;
}

.next-btn {
    right: 30px;
}

/* ==========================================
   Tablet
========================================== */
@media(max-width:992px) {
    .gallery-hero .hero-content h1 {
        font-size: 42px;
    }

    .gallery-grid {
        grid-template-columns:
            repeat(auto-fit, minmax(280px, 1fr));
    }
}

/* ==========================================
   Mobile
========================================== */
@media(max-width:768px) {
    .gallery-hero {
        padding: 120px 0 40px;
    }

    .gallery-hero .hero-content h1 {
        font-size: 34px;
    }

    .gallery-hero .hero-content p {
        font-size: 15px;
        max-width: 750px;
        margin: auto;
        color: var(--text);
        font-size: 17px;
        line-height: 1.8;
    }

    .gallery-card img,
    .gallery-card video {
        height: 230px;
    }

    .nav-btn {
        width: 48px;
        height: 48px;
        font-size: 18px;
    }

    .prev-btn {
        left: 10px;
    }

    .next-btn {
        right: 10px;
    }
}

/* ==========================================
   Small Mobile
========================================== */
@media(max-width:480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .filter-buttons {
        gap: 10px;
    }

    .gallery-filter .filter-btn {
        width: 100%;
    }

    .gallery-card img,
    .gallery-card video {
        height: 240px;
    }

    .close-btn {
        width: 48px;
        height: 48px;
        top: 15px;
        right: 15px;
    }
}

/* ==========================================
   Fade Animation
========================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ==========================================
   Scrollbar
========================================== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f2f2f2;
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 50px;
}

::-webkit-scrollbar-thumb:hover {
    background: #000000;
}

/* ==========================================
   Text Selection
========================================== */
::selection {
    background: var(--primary);
    color: var(--primary);
}

/* ==========================================
   Focus State
========================================== */
button:focus,
a:focus {
    outline: 3px solid #1E4E8C;
    outline-offset: 3px;
}

/* ==========================================
   Lazy Loading Effect
========================================== */
.gallery-card img,
.gallery-card video {
    background: #f3f3f3;
}

.gallery-card img {
    transition:
        transform .45s ease,
        opacity .35s ease;
}

/* ==========================================
   Hover Glow
========================================== */
.gallery-card:hover {
    box-shadow:
        0 18px 45px rgba(0, 0, 0, .15),
        0 0 0 1px rgba(255, 212, 59, .18);
}

/* ==========================================
   Glass Effect
========================================== */
.gallery-filter .filter-btn {
    backdrop-filter: blur(12px);
}

/* ==========================================
   Smooth Button Press
========================================== */
.gallery-filter .filter-btn:active,
.close-btn:active,
.nav-btn:active {
    transform: scale(.96);
}

/* ==========================================
   Prevent Media Selection
========================================== */
.gallery-card img,
.gallery-card video {
    user-select: none;
    -webkit-user-drag: none;
}

/* ==========================================
   Better Video
========================================== */
.gallery-card video {
    background: #000;
}

/* ==========================================
   Footer Hover
========================================== */
.footer-content p {
    transition: .3s;
}

.footer-content p:hover {
    color: var(--primary);
}

/* ==========================================
   Print
========================================== */
@media print {

    .header,
    .gallery-filter,
    .gallery-footer,
    .lightbox,
    .loader {
        display: none !important;
    }
}

/* ==========================================
   Reduce Motion
========================================== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}