/* =========================================
   Chill Caffe Theme - Gallery Page Styles
   =========================================
   1. Page Layout
   2. Hero Section
   3. Gallery Wrapper
   4. Feed & Placeholder
   5. Instagram CTA
   6. Responsive Breakpoints
   ========================================= */

/* =========================================
   1. Page Layout
   ========================================= */
.gallery-page {
    min-height: 100vh;
    background-color: var(--color-bg);
    color: var(--color-white);
    overflow-x: hidden;
}

/* =========================================
   2. Hero Section
   ========================================= */
.gallery-hero {
    position: relative;
    background-size: 100%;
    background-position: center 55%;
    background-attachment: fixed;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-bg);
}

.gallery-hero .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.gallery-hero .hero-content {
    position: relative;
    z-index: 2;
    background-color: rgba(0, 0, 0, 0.3);
    padding: clamp(1.5rem, 4vw, 3rem) clamp(1rem, 3vw, 2rem);
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease 0.2s forwards;
}

.gallery-hero .hero-subtitle {
    font-size: clamp(0.75rem, 1.2vw, 1rem);
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: clamp(1px, 0.2vw, 2px);
    margin-bottom: clamp(0.5rem, 1.5vw, 1rem);
}

.gallery-hero .hero-title {
    font-size: clamp(1.8rem, 4vw, 3.5rem);
    font-weight: 400;
    color: var(--color-white);
    margin-bottom: clamp(0.75rem, 2vw, 1.5rem);
    line-height: 1.2;
}

.gallery-hero .hero-description {
    font-size: clamp(0.9rem, 1.3vw, 1.1rem);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0;
}

/* =========================================
   3. Gallery Wrapper
   ========================================= */
.gallery-content {
    padding-top: clamp(2rem, 5vw, 5rem);
    padding-bottom: clamp(2rem, 5vw, 5rem);
    overflow-x: hidden;
}

.gallery-wrapper {
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    padding: clamp(2rem, 5vw, 4rem) clamp(1.5rem, calc(10% + 1.5vw), calc(10% + 3rem));
    position: relative;
    box-sizing: border-box;
    overflow: hidden;
    max-width: 100%;
}

/* =========================================
   4. Feed & Placeholder
   ========================================= */
.gallery-feed {
    min-height: 300px;
}

/* Smash Balloon feed overrides */
.gallery-feed #sb_instagram,
.gallery-feed .sbi_images {
    background: transparent !important;
}

.gallery-feed .sbi_item {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-feed .sbi_item:hover {
    transform: scale(1.02);
    z-index: 10;
}

/* Placeholder styles */
.gallery-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    padding: clamp(40px, 6vw, 60px);
    text-align: center;
    background: rgba(0, 0, 0, 0.3);
    border: 2px dashed rgba(255, 255, 255, 0.15);
}

.gallery-placeholder i {
    font-size: clamp(48px, 8vw, 72px);
    color: var(--color-primary);
    margin-bottom: clamp(16px, 2vw, 24px);
    opacity: 0.8;
}

.gallery-placeholder p {
    font-size: clamp(0.9rem, 1.2vw, 1.1rem);
    color: rgba(255, 255, 255, 0.7);
    max-width: 400px;
    line-height: 1.6;
    margin: 0 0 clamp(16px, 2vw, 24px) 0;
}

.gallery-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
    background-color: transparent;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: clamp(10px, 2vw, 14px) clamp(20px, 4vw, 32px);
    transition: var(--transition);
    font-size: clamp(0.8rem, 1vw, 0.95rem);
    cursor: pointer;
    text-decoration: none;
}

.gallery-btn:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-gold);
}

/* =========================================
   5. Instagram CTA
   ========================================= */
.gallery-cta {
    margin-top: clamp(2.5rem, 5vw, 4rem);
    text-align: center;
    padding-top: clamp(2rem, 4vw, 3rem);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.gallery-instagram-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: clamp(10px, 1.5vw, 14px);
    padding: clamp(14px, 2.5vw, 18px) clamp(28px, 5vw, 42px);
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    color: var(--color-white);
    font-size: clamp(0.9rem, 1.2vw, 1.1rem);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    transition: var(--transition);
    border: none;
}

.gallery-instagram-link i {
    font-size: clamp(1.2rem, 1.8vw, 1.5rem);
}

.gallery-instagram-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(225, 48, 108, 0.4);
    color: var(--color-white);
}

.gallery-instagram-link span {
    white-space: nowrap;
}

/* =========================================
   6. Responsive Breakpoints
   ========================================= */

/* --- Large Desktop (min-width: 1200px) --- */
@media (min-width: 1200px) {
    .gallery-wrapper {
        margin-left: calc(50% * 0.1);
        margin-right: calc(50% * 0.1);
    }
}

/* --- Medium-Large Screens (851px - 1199px) --- */
@media (max-width: 1199px) and (min-width: 851px) {
    .gallery-wrapper {
        margin: 0 2rem;
    }
}

/* --- Tablet (max-width: 991px) --- */
@media (max-width: 991px) {
    .gallery-hero {
        min-height: 50vh;
        background-attachment: scroll;
    }

    .gallery-content .container-fluid {
        padding: 0;
    }

    .gallery-wrapper {
        padding: 2.5rem 2rem;
        margin: 0 2rem;
    }
}

/* --- Tablet and below - disable animations (max-width: 1024px) --- */
@media (max-width: 1024px) {
    .gallery-hero .hero-content {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

/* --- Mobile (max-width: 768px) --- */
@media (max-width: 768px) {
    .gallery-hero {
        min-height: 45vh;
        background-attachment: scroll;
    }

    .gallery-instagram-link {
        width: 100%;
        max-width: 300px;
    }
}

/* --- Small Mobile (max-width: 576px) --- */
@media (max-width: 576px) {
    .gallery-hero {
        min-height: 40vh;
    }

    .gallery-wrapper {
        padding: 2rem 1.5rem;
        margin: 0 1.5rem;
    }

    .gallery-placeholder {
        min-height: 250px;
        padding: 30px 20px;
    }
}

/* --- Extra Small Mobile (max-width: 400px) --- */
@media (max-width: 400px) {
    .gallery-wrapper {
        padding: 1.5rem 1rem;
        margin: 0 1rem;
    }
}

/* =========================================
   Accessibility
   ========================================= */
.gallery-btn:focus,
.gallery-instagram-link:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .gallery-hero .hero-content,
    .gallery-btn,
    .gallery-instagram-link,
    .gallery-feed .sbi_item {
        animation: none !important;
        transition: none !important;
    }
}
