/* ================================================
   gallery.css — Transformations Page Styles
   Nara Aesthetics & Beauty
   ================================================ */

/* ---- Hero Banner — skincare/products image overlay blend ---- */
.gallery-hero {
    position: relative;
    background-image: url('assets/about_hero_bg.jpg');
    background-size: cover;
    background-position: center 65%;
    background-repeat: no-repeat;
    padding: calc(var(--header-height) + 7rem) 2rem 7rem; /* Increased top/bottom padding to match About/Services heroes */
    text-align: center;
    margin-top: 0;
    overflow: hidden;
}

@media (min-width: 900px) {
    .gallery-hero {
        background-position: center 85%; /* Shifts image lower on desktop to show injection details */
    }
}

/* Luxury gradient texture overlay */
.gallery-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        rgba(244, 217, 213, 0.93) 0%,
        rgba(244, 217, 213, 0.82) 60%,
        var(--color-bg-primary) 100%
    );
    z-index: 1;
}

.gallery-hero-content {
    position: relative;
    z-index: 1;
    max-width: 680px;
    margin: 0 auto;
}

.gallery-hero-eyebrow {
    display: inline-block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: var(--color-gold-start);
    font-weight: 600;
    margin-bottom: 1rem;
    font-family: var(--font-body);
}

.gallery-hero-title {
    font-family: var(--font-heading);
    font-size: 3.8rem;
    font-weight: 400;
    color: var(--color-text-primary);
    line-height: 1.1;
    letter-spacing: -0.01em;
    margin-bottom: 1.2rem;
}

@media(min-width: 768px) {
    .gallery-hero-title { font-size: 5rem; }
}

.gallery-hero-italic {
    font-style: italic;
    color: var(--color-gold-start);
    font-weight: 300;
}

.gallery-hero-sub {
    font-size: 1rem;
    color: var(--color-text-secondary);
    line-height: 1.7;
    margin-bottom: 2rem;
    font-weight: 400;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

.gallery-hero-cta {
    display: inline-flex;
}


/* ---- Disclaimer Box inside grid container ---- */
.gallery-disclaimer-box {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: rgba(244, 217, 213, 0.22);
    border: 1px solid rgba(165, 134, 88, 0.12);
    border-radius: var(--border-radius-md);
    padding: 1.2rem 1.5rem;
    margin: 3.5rem auto 0 auto;
    max-width: 800px;
    text-align: left;
}

.gallery-disclaimer-box i {
    color: var(--color-gold-start);
    font-size: 1.1rem;
    margin-top: 2px;
    flex-shrink: 0;
}

.gallery-disclaimer-box span {
    font-size: 0.88rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

/* ---- Gallery Section ---- */
.gallery-section {
    background: linear-gradient(to bottom, var(--color-bg-primary) 95%, #F8F4EE 100%);
    padding-top: 0 !important;
}

/* ---- Filter Buttons ---- */
.gallery-filters {
    display: flex;
    justify-content: flex-start;
    gap: 12px;
    margin: -2.2rem auto var(--spacing-lg) auto; /* Floating overlap on hero boundary */
    padding: 0.6rem 1.2rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Hide scrollbar for Firefox */
    max-width: 100%;
    background: rgba(255, 255, 255, 0.82); /* Semi-transparent white glass */
    border: 1px solid rgba(165, 134, 88, 0.18);
    border-radius: 40px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--shadow-medium);
    z-index: 10;
    position: relative;
}

.gallery-filters::-webkit-scrollbar {
    display: none; /* Hide scrollbar for Chrome/Safari/Opera */
}

@media (min-width: 1024px) {
    .gallery-filters {
        justify-content: center;
        max-width: fit-content;
        padding: 0.5rem 1.5rem;
    }
}

.gallery-filter-btn {
    padding: 0.6rem 1.3rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    color: var(--color-text-secondary);
    border-radius: 30px;
    border: 1px solid transparent;
    background-color: transparent;
    cursor: pointer;
    transition: var(--transition-smooth);
    font-family: var(--font-body);
    white-space: nowrap; /* Prevent wrap in horizontal scroll */
}

.gallery-filter-btn:hover {
    color: var(--color-accent-gold);
    background-color: rgba(234, 218, 200, 0.2);
}

.gallery-filter-btn.active {
    color: var(--color-white);
    background: linear-gradient(135deg, var(--color-gold-start), var(--color-gold-end));
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(165, 134, 88, 0.25);
}

/* Result count */
.gallery-result-count {
    text-align: center;
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    letter-spacing: 0.05em;
    margin-bottom: var(--spacing-lg);
    text-transform: uppercase;
}

/* ---- Gallery Grid (Premium Grid Layout) ---- */
.gallery-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.2rem;
    margin-bottom: var(--spacing-xl);
    align-items: start; /* Keep cards at their natural aspect-ratio heights */
}

@media(min-width: 640px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media(min-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ---- Individual Gallery Card (Polaroid Scrapbook) ---- */
.gallery-card {
    display: block;
    width: 100%;
    border-radius: var(--border-radius-sm);
    position: relative;
    transition: transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.5s cubic-bezier(0.165, 0.84, 0.44, 1), border-color 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    background: #FAF8F5; /* Polaroid paper style background */
    border: 1px solid rgba(165, 134, 88, 0.15);
    box-shadow: 0 10px 25px rgba(165, 134, 88, 0.05);
    padding: 0.8rem; /* Even Polaroid frame spacing */
    z-index: 1;
    opacity: 1;
}

/* Organic scattered rotational offsets */
.gallery-card:nth-child(4n+1) {
    transform: rotate(-1.5deg) translateY(5px);
}
.gallery-card:nth-child(4n+2) {
    transform: rotate(1.2deg) translateY(-5px);
}
.gallery-card:nth-child(4n+3) {
    transform: rotate(-0.8deg) translateY(8px);
}
.gallery-card:nth-child(4n) {
    transform: rotate(1.8deg) translateY(-2px);
}

.gallery-card:hover {
    transform: rotate(0deg) translateY(-10px) scale(1.03) !important;
    box-shadow: 0 20px 40px rgba(165, 134, 88, 0.18);
    border-color: var(--color-gold-start);
    z-index: 15; /* Floats above neighboring cards */
}

/* Hidden state when filtered out */
.gallery-card.hidden {
    display: none !important;
}

/* Animate in */
.gallery-card.visible {
    opacity: 1;
}

.gallery-img-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    background-color: var(--color-bg-primary);
    border-radius: 2px;
    border: 1px solid rgba(165, 134, 88, 0.08);
}

/* Aspect ratios for photo collage texture */
.card-square .gallery-img-wrapper {
    aspect-ratio: 1 / 1;
}
.card-tall .gallery-img-wrapper {
    aspect-ratio: 2 / 3;
}
.card-regular .gallery-img-wrapper {
    aspect-ratio: 4 / 5;
}

/* Real client snapshots */
.gallery-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    display: block;
}

.gallery-card:hover .gallery-img-wrapper img {
    transform: scale(1.08);
}

/* ---- Luxury Placeholder Graphic ---- */
.gallery-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #FCFAF7 0%, #F4D9D5 100%);
    transition: var(--transition-smooth);
    position: relative;
    padding: 15px;
}

/* Luxury dashed inner frame */
.gallery-placeholder::after {
    content: '';
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    bottom: 12px;
    border: 1px dashed rgba(165, 134, 88, 0.22);
    pointer-events: none;
    transition: var(--transition-smooth);
}

.gallery-card:hover .gallery-placeholder {
    background: linear-gradient(135deg, #FAF6F0 0%, #EADAC8 100%);
}

.gallery-card:hover .gallery-placeholder::after {
    border-color: var(--color-gold-start);
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
}

.gallery-placeholder-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    z-index: 2;
    text-align: center;
}

.gallery-placeholder-inner i {
    font-size: 2.2rem;
    color: var(--color-gold-start);
    background-color: rgba(255, 255, 255, 0.65);
    width: 58px;
    height: 58px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(165, 134, 88, 0.15);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.gallery-card:hover .gallery-placeholder-inner i {
    transform: scale(1.1) rotate(6deg);
    background-color: var(--color-white);
    color: var(--color-gold-start);
    box-shadow: 0 8px 20px rgba(165, 134, 88, 0.2);
}

.gallery-placeholder-brand {
    font-size: 0.6rem;
    font-family: var(--font-body);
    letter-spacing: 0.18em;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--color-text-secondary);
    opacity: 0.7;
    margin-top: 0.4rem;
    transition: var(--transition-smooth);
}

.gallery-card:hover .gallery-placeholder-brand {
    color: var(--color-gold-start);
    opacity: 1;
}



/* ---- Subtle Hover Quick-Action Overlay ---- */
.gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(18, 15, 12, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.35s ease;
    backdrop-filter: blur(1.5px);
    -webkit-backdrop-filter: blur(1.5px);
}

.gallery-card:hover .gallery-overlay {
    opacity: 1;
}

.gallery-quick-book {
    background: var(--color-white);
    color: var(--color-gold-start);
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    text-decoration: none;
    transform: translateY(10px);
}

.gallery-quick-book:hover {
    background: linear-gradient(135deg, var(--color-gold-start), var(--color-gold-end));
    color: var(--color-white);
    transform: translateY(-2px) scale(1.05);
}

.gallery-card:hover .gallery-quick-book {
    transform: translateY(0);
}

/* ---- CTA Strip ---- */
.gallery-cta-section {
    background: linear-gradient(to bottom, #F8F4EE 75%, var(--color-brand-pink-light) 100%);
    padding: 5.5rem 0;
    border-top: none;
}

.gallery-cta-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    text-align: center;
}

@media(min-width: 768px) {
    .gallery-cta-inner {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

.gallery-cta-text-block .section-subtitle {
    display: block;
    margin-bottom: 0.5rem;
}

.gallery-cta-heading {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 400;
    color: var(--color-text-primary);
    line-height: 1.2;
}

@media(min-width: 768px) {
    .gallery-cta-heading { font-size: 3rem; }
}

/* ---- Active nav highlight ---- */
.nav-link-active {
    color: var(--color-accent-gold) !important;
    font-weight: 600;
}
