/* ============================================
   RANCH 105 — Gallery Page Styles
   ============================================ */

.gallery-page {
    background: var(--color-bg);
}

/* --- Gallery Hero --- */
.gallery-hero {
    padding: 10rem 2rem 4rem;
    text-align: center;
    background: var(--color-bg);
    position: relative;
}

.gallery-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(200, 169, 110, 0.06) 0%, transparent 60%);
    pointer-events: none;
}

.gallery-hero-content {
    position: relative;
    z-index: 1;
}

.gallery-hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    color: var(--color-text);
    margin-bottom: 0.75rem;
}

.gallery-hero-subtitle {
    font-size: 1.05rem;
    color: var(--color-text-muted);
}

.active-link {
    color: var(--color-accent) !important;
}

/* --- Walkthrough Video Section --- */
.gallery-video-section {
    padding: 3rem 2rem 4rem;
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
}

.gallery-video-header {
    margin-bottom: 2rem;
}

.gallery-video-title {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    color: var(--color-text);
    margin: 0.4rem 0 0.6rem;
}

.gallery-video-subtitle {
    font-size: 1rem;
    color: var(--color-text-muted);
}

.gallery-video-wrapper {
    position: relative;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 8px 40px rgba(0,0,0,0.4);
}

.youtube-embed {
    position: relative;
    padding-top: 56.25%;
}

.youtube-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* --- Gallery Section --- */
.gallery-section {
    padding: 2rem 2rem 4rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* Masonry Grid */
.gallery-masonry {
    columns: 4;
    column-gap: 12px;
}

.gallery-item {
    break-inside: avoid;
    margin-bottom: 12px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    opacity: 0;
    transform: translateY(30px);
    transition: transform 0.4s var(--ease-smooth);
}

.gallery-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.gallery-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    transition: background 0.3s;
}

.gallery-item:hover {
    transform: translateY(-4px);
}

.gallery-item:hover::after {
    background: rgba(200, 169, 110, 0.15);
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s var(--ease-smooth);
}

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

/* --- Lightbox --- */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: var(--color-text);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s;
    z-index: 10001;
}

.lightbox-close:hover {
    color: var(--color-accent);
    background: rgba(255, 255, 255, 0.1);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--color-text);
    cursor: pointer;
    padding: 1rem;
    border-radius: 50%;
    transition: all 0.3s;
    z-index: 10001;
}

.lightbox-nav:hover {
    background: rgba(200, 169, 110, 0.2);
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.lightbox-prev {
    left: 1.5rem;
}

.lightbox-next {
    right: 1.5rem;
}

.lightbox-counter {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.85rem;
    color: var(--color-text-muted);
    letter-spacing: 0.1em;
}

/* CTA overrides for gallery page */
.gallery-page .cta-title,
.gallery-page .cta-subtitle,
.gallery-page .btn-book-large {
    opacity: 1;
    transform: none;
}

/* ============================================
   RESPONSIVE — Gallery
   ============================================ */
@media (max-width: 1024px) {
    .gallery-masonry {
        columns: 3;
    }
}

@media (max-width: 768px) {
    .gallery-masonry {
        columns: 2;
        column-gap: 8px;
    }

    .gallery-item {
        margin-bottom: 8px;
    }

    .gallery-hero {
        padding: 8rem 1.5rem 3rem;
    }

    .lightbox-prev {
        left: 0.5rem;
    }

    .lightbox-next {
        right: 0.5rem;
    }

    .lightbox-nav {
        padding: 0.75rem;
    }
}

@media (max-width: 480px) {
    .gallery-masonry {
        columns: 2;
        column-gap: 6px;
    }

    .gallery-item {
        margin-bottom: 6px;
    }
}
