/* =====================================================
   gallery.css – Pushkar Adventure Desert Camp
   Gallery Page Styles — Unified Premium Redesign
   ===================================================== */

/* ====== Hero ====== */
.gallery-hero {
    position: relative;
    height: 62vh;
    min-height: 420px;
    overflow: hidden;
    margin-top: 100px;
}

.gallery-hero-image {
    position: absolute;
    inset: 0;
    background-image: url('../assets/folk_dance_bonfire_1778739230115.png');
    background-size: cover;
    background-position: center 35%;
    transform: scale(1.08);
    transition: transform 12s ease;
    filter: brightness(0.4) saturate(1.2);
}

.gallery-hero:hover .gallery-hero-image { transform: scale(1); }

/* Gradient fade to page */
.gallery-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(0,0,0,0.15) 0%,
        transparent 30%,
        transparent 50%,
        rgba(253, 251, 247, 0.05) 75%,
        rgba(253, 251, 247, 1) 100%
    );
    z-index: 1;
    pointer-events: none;
}

.gallery-hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 20px;
    max-width: 900px;
    margin: 0 auto;
    color: white;
}

.gallery-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    margin-bottom: 20px;
    opacity: 0.85;
}

.gallery-breadcrumb a { color: white; text-decoration: none; }
.gallery-breadcrumb a:hover { opacity: 0.7; }
.gallery-breadcrumb .separator { font-size: 0.7rem; opacity: 0.6; }

.gallery-hero-content h1 {
    font-family: var(--font-heading);
    font-size: 3.6rem;
    font-weight: 700;
    margin-bottom: 16px;
    text-shadow: 0 3px 30px rgba(0,0,0,0.5);
    letter-spacing: -0.5px;
    line-height: 1.15;
}

.gallery-hero-content p {
    font-size: 1.12rem;
    color: rgba(255,255,255,0.88);
    max-width: 580px;
    line-height: 1.7;
    text-shadow: 0 1px 10px rgba(0,0,0,0.3);
}

/* ====== Photo Counter Ribbon ====== */
.gallery-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    padding: 36px 0;
    background: var(--primary-color);
    position: relative;
}

.gallery-stats::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 140px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    border-radius: 3px;
}

.gallery-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.gallery-stat-number {
    font-family: var(--font-heading);
    font-size: 2.1rem;
    font-weight: 700;
    color: var(--accent-color);
    line-height: 1;
}

.gallery-stat-label {
    font-size: 0.82rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 500;
}

/* ====== Gallery Section ====== */
.gallery-section {
    padding: 60px 0 100px;
    background: var(--primary-color);
}

/* ====== Masonry Grid ====== */
.gallery-grid {
    columns: 4;
    column-gap: 18px;
}

.gallery-item {
    position: relative;
    break-inside: avoid;
    margin-bottom: 18px;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    display: block;
    background: #e8e0d5;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: transform 0.45s cubic-bezier(0.165, 0.84, 0.44, 1),
                box-shadow 0.45s cubic-bezier(0.165, 0.84, 0.44, 1);
    opacity: 0;
    transform: translateY(35px);
}

/* Intersection Observer will add this class */
.gallery-item.revealed {
    animation: revealItem 0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes revealItem {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gallery-item:hover {
    transform: scale(1.025) translateY(-8px);
    box-shadow: 0 22px 55px rgba(0,0,0,0.18);
    z-index: 2;
}

.gallery-item img {
    width: 100%;
    display: block;
    transition: transform 0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-radius: 16px;
}

.gallery-item:hover img { transform: scale(1.1); }

/* ====== Hover Overlay ====== */
.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(74, 51, 32, 0.92) 0%,
        rgba(74, 51, 32, 0.35) 45%,
        transparent 100%
    );
    opacity: 0;
    transition: opacity 0.4s ease;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding: 22px;
    border-radius: 16px;
}

.gallery-item:hover .gallery-overlay { opacity: 1; }

.overlay-content {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    transform: translateY(12px);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gallery-item:hover .overlay-content { transform: translateY(0); }

.overlay-content i {
    width: 38px;
    height: 38px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    border: 1px solid rgba(255,255,255,0.25);
    flex-shrink: 0;
    transition: all 0.35s ease;
}

.gallery-item:hover .overlay-content i {
    background: var(--accent-color);
    border-color: var(--accent-color);
    box-shadow: 0 4px 16px rgba(211,84,0,0.4);
}

.overlay-content span {
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 0.4px;
    text-shadow: 0 1px 8px rgba(0,0,0,0.5);
}

/* ====== Lightbox ====== */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.94);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.lightbox-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.lightbox-inner {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    transform: scale(0.92) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.lightbox-overlay.open .lightbox-inner {
    transform: scale(1) translateY(0);
}

.lightbox-inner img {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 16px;
    box-shadow: 0 30px 90px rgba(0,0,0,0.6);
    transition: opacity 0.2s ease;
}

.lightbox-caption {
    color: rgba(255,255,255,0.85);
    font-size: 0.95rem;
    text-align: center;
    max-width: 600px;
    font-weight: 500;
}

.lightbox-counter {
    color: rgba(255,255,255,0.4);
    font-size: 0.8rem;
    letter-spacing: 2.5px;
    font-weight: 500;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: fixed;
    background: rgba(255,255,255,0.07);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255,255,255,0.12);
    color: white;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close {
    top: 24px;
    right: 24px;
    width: 50px;
    height: 50px;
    border-radius: 14px;
    font-size: 1.15rem;
    z-index: 10001;
}

.lightbox-prev,
.lightbox-next {
    top: 50%;
    transform: translateY(-50%);
    width: 54px;
    height: 54px;
    border-radius: 14px;
    font-size: 1.05rem;
    z-index: 10001;
}

.lightbox-prev { left: 24px; }
.lightbox-next { right: 24px; }

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    box-shadow: 0 8px 28px rgba(211,84,0,0.45);
}

.lightbox-prev:hover,
.lightbox-next:hover {
    transform: translateY(-50%) scale(1.08);
}

.lightbox-close:hover { transform: scale(1.08); }

/* ====== CTA Section ====== */
.gallery-cta {
    background-image: url('../assets/camel_safari_1778739196416.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    padding: 120px 0;
    color: white;
}

.gallery-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(74,51,32,0.9), rgba(44,30,19,0.95));
}

.gallery-cta-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 720px;
    margin: 0 auto;
}

.gallery-cta-content h2 {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    margin-bottom: 18px;
    color: white;
    line-height: 1.2;
}

.gallery-cta-content p {
    font-size: 1.08rem;
    color: rgba(255,255,255,0.85);
    margin-bottom: 42px;
    line-height: 1.7;
}

.gallery-cta-btns {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-cta-primary,
.btn-cta-secondary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 36px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.btn-cta-primary {
    background: #25d366;
    color: white;
    box-shadow: 0 6px 28px rgba(37,211,102,0.35);
}

.btn-cta-primary:hover {
    background: #1fb855;
    transform: translateY(-3px);
    box-shadow: 0 14px 40px rgba(37,211,102,0.5);
}

.btn-cta-secondary {
    background: rgba(255,255,255,0.1);
    color: white;
    border: 1.5px solid rgba(255,255,255,0.25);
    backdrop-filter: blur(8px);
}

.btn-cta-secondary:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.55);
    transform: translateY(-3px);
}

/* ====== Responsive ====== */
@media (max-width: 1100px) {
    .gallery-grid { columns: 3; column-gap: 16px; }
}

@media (max-width: 768px) {
    .gallery-hero { height: 46vh; min-height: 300px; }
    .gallery-hero-content h1 { font-size: 2.5rem; }
    .gallery-hero-content p { font-size: 1rem; }
    .gallery-grid { columns: 2; column-gap: 14px; }
    .gallery-item { margin-bottom: 14px; }
    .gallery-stats { gap: 30px; padding: 26px 15px; }
    .gallery-stat-number { font-size: 1.7rem; }
    .gallery-section { padding: 40px 0 70px; }
    .lightbox-prev { left: 12px; }
    .lightbox-next { right: 12px; }
    .lightbox-close { top: 16px; right: 16px; }
    .gallery-cta-content h2 { font-size: 2rem; }
    .gallery-cta { padding: 80px 0; }
}

@media (max-width: 480px) {
    .gallery-grid { columns: 2; column-gap: 10px; }
    .gallery-item { margin-bottom: 10px; border-radius: 12px; }
    .gallery-item img { border-radius: 12px; }
    .gallery-overlay { border-radius: 12px; padding: 14px; }
    .gallery-hero-content h1 { font-size: 1.9rem; }
    .gallery-hero-content p { font-size: 0.92rem; }
    .gallery-stats { gap: 20px; flex-wrap: wrap; }
    .lightbox-inner img { border-radius: 10px; }
    .lightbox-close,
    .lightbox-prev,
    .lightbox-next { border-radius: 10px; }
    .overlay-content span { font-size: 0.82rem; }
    .gallery-cta-content h2 { font-size: 1.75rem; }
}
