/* Gallery page styles */

/* Use a responsive grid so each gallery card can be a consistent size
   — target card size: 600x400 (3:2). Cards will scale down on narrow viewports. */
.masonry-gallery {
    /* Mobile-first: single column by default, expand at larger breakpoints */
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    justify-content: center;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 12px;
}

@media (min-width: 641px) {
    .masonry-gallery {
        grid-template-columns: repeat(2, 1fr);
        padding: 0;
        max-width: 1024px;
    }
}

@media (min-width: 1025px) {
    .masonry-gallery {
        grid-template-columns: repeat(3, 1fr);
        max-width: 1260px;
    }
}

.gallery-item {
    margin: 0;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(20, 30, 10, 0.06);
    position: relative;
    display: block;
    aspect-ratio: 3 / 2;
    /* fixes card shape (600x400 ratio) while allowing scaling */
}

/* Make the image anchors look and behave like buttons */
.gallery-item a.img-btn {
    display: block;
    border-radius: 12px;
    overflow: hidden;
    outline: none;
    text-decoration: none;
}

.gallery-item a.img-btn:focus {
    box-shadow: 0 0 0 4px rgba(106, 168, 79, 0.18), 0 20px 60px rgba(20, 30, 10, 0.06);
    transform: translateY(-2px);
}

.gallery-item a.img-btn:hover img {
    transform: scale(1.03);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 220ms ease;
}

.gallery-item:hover img {
    transform: scale(1.02);
}

/* lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(6, 10, 10, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Ensure stray/lightbox controls don't render unexpectedly at page bottom.
   Keep hidden by default, allow display only when the JS adds the `open` class. */
.lightbox {
    visibility: hidden !important;
}

.lightbox.open {
    visibility: visible !important;
    display: flex !important;
}

/* Strong overrides to ensure the lightbox truly fills the viewport */
.lightbox,
.lightbox .inner {
    margin: 0 !important;
    padding: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    inset: 0 !important;
}

.lightbox.open {
    display: flex;
}

.lightbox .inner {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Full-display: image fills the viewport and may crop edges for an immersive view */
.lightbox img {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: cover;
    display: block;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
}

/* Force full-viewport coverage even if other rules exist elsewhere */
.lightbox img {
    width: 100vw !important;
    height: 100vh !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: cover !important;
}

.lightbox .close,
.lightbox .prev,
.lightbox .next {
    position: absolute;
    top: 12px;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    border-radius: 10px;
    padding: 12px 14px;
    cursor: pointer;
    border: none;
    z-index: 10002;
    font-size: 18px;
}

.lightbox .close,
.lightbox .prev,
.lightbox .next,
.lightbox .fs-toggle {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
}

.lightbox .fs-toggle {
    position: absolute;
    top: 12px;
    right: 60px;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    border: none;
}

.lightbox .close {
    /* Rounded floating close button like the reference image */
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 10005;
    width: 44px;
    height: 44px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
    color: #fff;
    background: rgba(0, 0, 0, 0.55);
    border-radius: 999px;
    border: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    cursor: pointer;
}

.lightbox .close:hover {
    transform: scale(1.03);
    background: rgba(0, 0, 0, 0.65);
}

.lightbox .prev {
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox .next {
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
}

/* Touch & small-screen adjustments: make controls larger and ensure image fits inside viewport */
@media (max-width: 768px) {
    .lightbox img {
        object-fit: contain !important;
        background: rgba(0, 0, 0, 0.75);
    }

    .lightbox .prev,
    .lightbox .next,
    .lightbox .close {
        padding: 14px 16px;
        font-size: 20px;
        width: 52px;
        height: 52px;
        border-radius: 999px;
    }

    .lightbox .prev {
        left: 8px;
    }

    .lightbox .next {
        right: 8px;
    }
}

/* Hero slider styles */
.hero {
    position: relative;
    overflow: hidden;
    /* make gallery hero full viewport height */
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* when hero text is inside a centered container, remove extra left padding */
.hero .container {
    position: relative;
    z-index: 4;
}


.hero .container .hero-text {
    padding-left: 0;
    padding-right: 0;
    margin: 0 auto;
}

.hero .container {
    position: relative;
    z-index: 3;
}

.hero-slider {
    position: absolute;
    inset: 0;
    z-index: 0;
}

/* animated decorative gradient overlay and background pan/zoom */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 10% 20%, rgba(106, 168, 79, 0.08), transparent 18%),
        radial-gradient(circle at 85% 80%, rgba(90, 160, 200, 0.06), transparent 20%);
    z-index: 1;
    pointer-events: none;
    mix-blend-mode: overlay;
    animation: bgShift 14s linear infinite;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.44));
    z-index: 2;
    pointer-events: none;
}

@keyframes bgShift {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }

    50% {
        transform: translateY(-6%) scale(1.02);
        opacity: 0.95;
    }

    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@keyframes pan {
    0% {
        transform: translateY(0) scale(1.02);
    }

    50% {
        transform: translateY(-2%) scale(1.06);
    }

    100% {
        transform: translateY(0) scale(1.02);
    }
}

.hero-slider .slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: scale(1);
    transition: opacity 900ms ease, transform 900ms ease;
}

.hero-slider .slide.active {
    opacity: 1;
    transform: scale(1.02);
    animation: pan 22s ease-in-out infinite;
}

/* Hero text (simple design) */
.hero-inner {
    display: flex;
    align-items: center;
    min-height: inherit;
}

.hero-text {
    color: #fff;
    max-width: 780px;
    padding-left: clamp(18px, 6vw, 68px);
}

.hero-strap {
    margin: 10px 0 14px 0;
    font-weight: 600;
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.95);
    opacity: 0.95;
    letter-spacing: 0.2px;
    transform: translateY(6px);
    animation: strapIn 700ms ease forwards 220ms;
}

@keyframes strapIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 0.95;
        transform: translateY(0);
    }
}

.hero-text h1 {
    font-size: clamp(2rem, 6vw, 3.6rem);
    margin: 0 0 8px 0;
    font-weight: 700;
    text-shadow: 0 8px 30px rgba(6, 10, 10, 0.5);
    color: var(--accent, #5a6f4c);
}

.hero-text .subtle {
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 6px 0;
}

.hero-text .lead {
    color: #f3f5ef;
    margin: 0 0 14px 0;
    font-size: 1.05rem;
}

.btn-primary {
    display: inline-block;
    background: var(--accent, #6aa84f);
    color: #fff;
    padding: 10px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
}

/* muted inline button used for the gallery instruction */
.muted-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(106, 168, 79, 0.08);
    border: 1px solid rgba(106, 168, 79, 0.18);
    color: var(--accent, #5a6f4c);
    font-size: 0.95rem;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 8px;
    font-weight: 600;
}

.muted-btn i {
    font-size: 0.95rem;
    opacity: 0.95;
}

.muted-btn:hover {
    background: rgba(106, 168, 79, 0.12);
}

.muted-btn:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(106, 168, 79, 0.18);
}

@media (max-width:720px) {
    .hero-text {
        padding: 0 18px;
        text-align: left;
    }

    .hero-inner {
        padding: 20px 0;
    }
}

/* entrance animation for hero text */
.hero-text {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 560ms ease, transform 560ms cubic-bezier(.2, .9, .2, 1);
}

.hero-text.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* slider dots */
.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 22px;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 6;
}

.hero-dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.28);
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(6, 10, 10, 0.2);
}

.hero-dots .dot.active {
    background: #fff;
    transform: scale(1.15);
}

/* Studio & Treatments section */
.content-block h2 {
    text-align: center;
    font-size: clamp(1.6rem, 3.2vw, 2.2rem);
    color: var(--accent, #4d7a3a);
    margin-bottom: 8px;
    position: relative;
    padding-bottom: 18px;
    letter-spacing: 0.6px;
}

.content-block h2::after {
    content: '';
    display: block;
    width: 56px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent, #6aa84f), #4d7a3a);
    margin: 8px auto 0;
    border-radius: 4px;
    box-shadow: 0 8px 20px rgba(77, 122, 58, 0.08);
}

.content-block .intro {
    max-width: 900px;
    margin: 6px auto 18px;
    color: rgba(6, 10, 10, 0.72);
    font-size: 1.02rem;
    text-align: center;
    line-height: 1.45;
}

/* Text animations */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-block h2 {
    animation: fadeUp 700ms cubic-bezier(.2, .9, .2, 1) both;
    animation-delay: 120ms;
}

.content-block .intro {
    animation: fadeUp 700ms cubic-bezier(.2, .9, .2, 1) both;
    animation-delay: 300ms;
}

/* Animate the underline bar growth */
.content-block h2::after {
    width: 0;
    animation: underlineGrow 700ms ease forwards 220ms;
}

@keyframes underlineGrow {
    to {
        width: 56px;
    }
}

/* Staggered reveal for gallery items */
.masonry-gallery .gallery-item {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 420ms ease, transform 420ms ease;
}

.masonry-gallery .gallery-item.reveal {
    opacity: 1;
    transform: translateY(0);
}

.content-block .muted {
    text-align: center;
}

.gallery-item figcaption {
    position: absolute;
    left: 12px;
    bottom: 12px;
    background: rgba(6, 10, 10, 0.5);
    color: #fff;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 180ms ease;
}

.gallery-item:hover figcaption {
    opacity: 1;
}

@media (max-width:640px) {
    .hero-dots {
        bottom: 12px;
        gap: 6px;
    }

    .hero-dots .dot {
        width: 9px;
        height: 9px;
    }
}

@media (min-width: 1024px) {
    .hero {
        min-height: 100vh;
    }
}

/* Ensure hero container fills the hero and centers text vertically */
.hero .container {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Testimonials */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 16px;
}

.testimonial-card {
    background: var(--card);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 18px 40px rgba(20, 30, 10, 0.04);
}

/* Enhanced testimonial styles */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    align-items: start;
}

.testimonial-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 250, 250, 0.98));
    border: 1px solid rgba(6, 10, 10, 0.04);
    padding: 22px;
    position: relative;
    overflow: visible;
}

/* make all cards equal height */
.testimonials-grid {
    align-items: stretch;
}

/* center testimonials and limit width like other sections */
.testimonials-grid {
    max-width: 980px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 12px;
}

/* reveal animation for testimonial cards */
.testimonial-card {
    transform: translateY(8px);
    opacity: 0;
    transition: transform 420ms cubic-bezier(.2, .9, .2, 1), opacity 420ms ease;
}

.in-view .testimonial-card {
    transform: translateY(0);
    opacity: 1;
}

.testimonial-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 28px 60px rgba(20, 30, 10, 0.08);
}

.testimonial-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 220px;
}

.testimonial-card .quote {
    flex: 1 1 auto;
}

.testimonial-meta {
    flex: 0 0 auto;
}

.testimonial-meta {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 8px;
}

.testimonial-meta .avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent, #6aa84f), #4d7a3a);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    box-shadow: 0 8px 18px rgba(20, 30, 10, 0.08);
}

/* avatar image (real photo) */
.avatar-img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    display: inline-block;
    box-shadow: 0 8px 18px rgba(20, 30, 10, 0.08);
}

.meta-text .date {
    font-size: 0.85rem;
    color: rgba(6, 10, 10, 0.5);
    margin-top: 4px;
}

.testimonial-meta .meta-text .name {
    font-weight: 700;
    color: #234;
}

.testimonial-meta .rating {
    color: var(--accent, #6aa84f);
    font-size: 0.85rem;
}

.testimonial-meta .rating i {
    margin-right: 4px;
}

.testimonial-card .quote {
    font-style: italic;
    margin: 0;
    color: #223;
    line-height: 1.5;
    position: relative;
    padding-left: 20px;
}

.testimonial-card .quote::before {
    content: '“';
    position: absolute;
    left: 0;
    top: -8px;
    font-size: 38px;
    color: rgba(106, 168, 79, 0.18);
    line-height: 1;
}

@media (max-width:720px) {
    .testimonial-meta .meta-text .name {
        font-size: 0.95rem;
    }
}

.testimonial-card .quote {
    font-style: italic;
    margin: 0 0 8px 0;
}

.testimonial-card .by {
    margin: 0;
    font-weight: 600;
}

@media (max-width:1024px) {
    .masonry-gallery {
        column-count: 2;
    }
}

@media (max-width:640px) {
    .masonry-gallery {
        column-count: 1;
    }

    .lightbox .prev,
    .lightbox .next {
        display: none;
    }
}

/* Pagination controls for gallery (inserted by js/gallery.js) */
.gallery-pagination {
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
    margin-top: 18px;
}

.gallery-pagination button {
    background: transparent;
    border: 1px solid rgba(6, 10, 10, 0.08);
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
}

.gallery-pagination button[disabled] {
    opacity: 0.45;
    cursor: default;
}

.gallery-pagination .pg-pages {
    display: flex;
    gap: 8px;
}

.gallery-pagination .pg-num.active {
    background: var(--accent, #6aa84f);
    color: #fff;
    border-color: transparent;
}