/* =========================================================
   GALLERY.CSS
   TEH MAYANG
   Premium Spa Gallery
   Theme: White + Tosca + Soft Lime
========================================================= */


/* =========================================================
   01. GALLERY VARIABLES
========================================================= */

:root {
    --gallery-white: #ffffff;
    --gallery-bg: #f7f9fb;
    --gallery-tosca: #142f7b;
    --gallery-tosca-dark: #10245f;
    --gallery-tosca-light: #e0e7f3;
    --gallery-lime: #d9ff4f;
    --gallery-lime-soft: #f1ffd0;
    --gallery-dark: #171c25;
    --gallery-text: #303540;
    --gallery-muted: #747982;
    --gallery-border: rgba(20, 47, 123, 0.16);
    --gallery-shadow: 0 20px 55px rgba(25, 41, 79, 0.10);
    --gallery-shadow-hover: 0 30px 70px rgba(25, 41, 79, 0.17);
    --gallery-radius: 28px;
}


/* =========================================================
   02. RESET
========================================================= */

.gallery-page,
.gallery-page *,
.gallery-section,
.gallery-section * {
    box-sizing: border-box;
}

.gallery-page {
    margin: 0;
    padding: 0;
    background: var(--gallery-bg);
    color: var(--gallery-text);
}


/* =========================================================
   03. BODY SAFETY
========================================================= */

body {
    overflow-x: hidden;
}


/* =========================================================
   04. CONTAINER
========================================================= */

.gallery-page .container {
    width: min(1180px, calc(100% - 48px));
    margin-left: auto;
    margin-right: auto;
}


/* =========================================================
   05. HEADER
========================================================= */

.site-header {
    position: relative;
    z-index: 1000;
    width: 100%;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid rgba(20, 47, 123, 0.10);
    box-shadow: 0 8px 30px rgba(22, 40, 78, 0.05);
}

.site-header .nav-wrap {
    min-height: 82px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}


/* =========================================================
   06. LOGO
========================================================= */

.site-header .logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--gallery-dark);
    text-decoration: none;
    font-family: "Playfair Display", Georgia, serif;
    font-size: 22px;
    font-weight: 700;
    white-space: nowrap;
}

.site-header .logo span {
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient( 135deg, var(--gallery-tosca), #1b40a4);
    color: white;
    font-family: "DM Sans", Arial, sans-serif;
    font-size: 13px;
    font-weight: 800;
    box-shadow: 0 12px 25px rgba(20, 47, 123, 0.20);
}


/* =========================================================
   07. NAVIGATION
========================================================= */

.main-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.main-nav a {
    position: relative;
    padding: 10px 13px;
    color: #4d525b;
    text-decoration: none;
    font-family: "DM Sans", Arial, sans-serif;
    font-size: 14px;
    font-weight: 600;
    border-radius: 999px;
    transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.main-nav a:hover {
    color: var(--gallery-tosca);
    background: rgba(20, 47, 123, 0.07);
    transform: translateY(-1px);
}

.main-nav a.active {
    color: white;
    background: var(--gallery-tosca);
    box-shadow: 0 10px 22px rgba(20, 47, 123, 0.18);
}


/* =========================================================
   08. MOBILE MENU BUTTON
========================================================= */

.nav-toggle {
    width: 46px;
    height: 46px;
    display: none;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--gallery-border);
    border-radius: 50%;
    background: white;
    color: var(--gallery-tosca);
    font-size: 20px;
    cursor: pointer;
}


/* =========================================================
   09. PAGE HERO
========================================================= */

.gallery-page .page-hero,
.gallery-hero {
    position: relative;
    min-height: 440px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: radial-gradient( circle at 82% 28%, rgba(217, 255, 79, 0.28), transparent 28%), radial-gradient( circle at 15% 80%, rgba(20, 47, 123, 0.09), transparent 30%), linear-gradient( 135deg, #ffffff 0%, #f5f8fb 52%, #eff9dc 100%);
    border-bottom: 1px solid rgba(20, 47, 123, 0.10);
}


/* Decorative circle */

.gallery-page .page-hero::before,
.gallery-hero::before {
    content: "";
    position: absolute;
    width: 520px;
    height: 520px;
    right: -130px;
    top: -250px;
    border: 1px solid rgba(20, 47, 123, 0.14);
    border-radius: 50%;
}

.gallery-page .page-hero::after,
.gallery-hero::after {
    content: "";
    position: absolute;
    width: 430px;
    height: 430px;
    right: -80px;
    top: -180px;
    border: 1px solid rgba(217, 255, 79, 0.45);
    border-radius: 50%;
}


/* =========================================================
   10. HERO CONTENT
========================================================= */

.gallery-page .page-hero .container,
.gallery-hero .container {
    position: relative;
    z-index: 2;
    padding-top: 55px;
    padding-bottom: 55px;
}

.gallery-page .page-hero .eyebrow,
.gallery-hero .eyebrow {
    display: flex;
    align-items: center;
    gap: 13px;
    margin: 0 0 22px;
    color: var(--gallery-tosca);
    font-family: "DM Sans", Arial, sans-serif;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.30em;
    text-transform: uppercase;
}

.gallery-page .page-hero .eyebrow::before,
.gallery-hero .eyebrow::before {
    content: "";
    width: 38px;
    height: 2px;
    background: var(--gallery-lime);
}

.gallery-page .page-hero h1,
.gallery-hero h1 {
    max-width: 850px;
    margin: 0 0 22px;
    color: var(--gallery-dark);
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(48px, 7vw, 82px);
    line-height: 0.98;
    letter-spacing: -0.04em;
}

.gallery-page .page-hero h1 em,
.gallery-hero h1 em {
    color: var(--gallery-tosca);
    font-style: italic;
}

.gallery-page .page-hero p:not(.eyebrow),
.gallery-hero p:not(.eyebrow) {
    max-width: 680px;
    margin: 0;
    color: var(--gallery-muted);
    font-family: "DM Sans", Arial, sans-serif;
    font-size: 18px;
    line-height: 1.8;
}


/* =========================================================
   11. GALLERY MAIN SECTION
========================================================= */

.gallery-section,
.gallery-page .section {
    position: relative;
    padding-top: 100px;
    padding-bottom: 120px;
    background: radial-gradient( circle at 90% 20%, rgba(217, 255, 79, 0.13), transparent 24%), radial-gradient( circle at 5% 70%, rgba(20, 47, 123, 0.06), transparent 25%), var(--gallery-bg);
}


/* =========================================================
   12. SECTION HEADING
========================================================= */

.gallery-heading {
    max-width: 800px;
    margin-bottom: 50px;
}

.gallery-heading .eyebrow {
    margin: 0 0 18px;
    color: var(--gallery-tosca);
    font-family: "DM Sans", Arial, sans-serif;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.30em;
    text-transform: uppercase;
}

.gallery-heading h2 {
    margin: 0 0 18px;
    color: var(--gallery-dark);
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(38px, 5vw, 62px);
    line-height: 1.05;
    letter-spacing: -0.035em;
}

.gallery-heading h2 em {
    color: var(--gallery-tosca);
    font-style: italic;
}

.gallery-heading p {
    max-width: 700px;
    margin: 0;
    color: var(--gallery-muted);
    font-family: "DM Sans", Arial, sans-serif;
    font-size: 17px;
    line-height: 1.8;
}


/* =========================================================
   13. FILTER AREA
========================================================= */

.gallery-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 45px;
}

.gallery-filter-btn {
    appearance: none;
    min-height: 48px;
    padding: 0 22px;
    border: 1px solid rgba(20, 47, 123, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.80);
    color: #505661;
    font-family: "DM Sans", Arial, sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
}

.gallery-filter-btn:hover {
    border-color: var(--gallery-tosca);
    color: var(--gallery-tosca);
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(20, 47, 123, 0.10);
}

.gallery-filter-btn.active {
    border-color: var(--gallery-tosca);
    background: var(--gallery-tosca);
    color: white;
    box-shadow: 0 12px 28px rgba(20, 47, 123, 0.20);
}

.gallery-filter-btn.active::after {
    content: "•";
    margin-left: 8px;
    color: var(--gallery-lime);
    font-size: 16px;
}


/* =========================================================
   14. GALLERY GRID
========================================================= */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
    align-items: stretch;
}


/* =========================================================
   15. GALLERY CARD
========================================================= */

.gallery-card {
    position: relative;
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(20, 47, 123, 0.16);
    border-radius: var(--gallery-radius);
    background: white;
    box-shadow: var(--gallery-shadow);
    cursor: pointer;
    isolation: isolate;
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
    animation: galleryCardIn 0.45s ease both;
}

.gallery-card:hover {
    transform: translateY(-8px);
    border-color: rgba(20, 47, 123, 0.28);
    box-shadow: var(--gallery-shadow-hover);
}


/* =========================================================
   16. CARD IMAGE
========================================================= */

.gallery-card img {
    display: block;
    width: 100%;
    height: 390px;
    object-fit: cover;
    object-position: center;
    background: linear-gradient( 145deg, #e7edf5, #f3ffd7);
    transition: transform 0.65s ease, filter 0.65s ease;
}

.gallery-card:hover img {
    transform: scale(1.045);
    filter: saturate(1.05);
}


/* =========================================================
   17. IMAGE GRADIENT
========================================================= */

.gallery-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient( to bottom, transparent 35%, rgba(10, 16, 30, 0.04) 55%, rgba(10, 16, 30, 0.72) 100%);
}


/* =========================================================
   18. CARD CONTENT
========================================================= */

.gallery-card-content {
    position: absolute;
    z-index: 3;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 30px 30px 28px;
    color: white;
}

.gallery-card-category {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    margin-bottom: 12px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: rgba(255, 255, 255, 0.94);
    font-family: "DM Sans", Arial, sans-serif;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.gallery-card h3 {
    margin: 0 0 8px;
    color: white;
    font-family: "Playfair Display", Georgia, serif;
    font-size: 28px;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.gallery-card p {
    max-width: 480px;
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
    font-family: "DM Sans", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
}


/* =========================================================
   19. CARD NUMBER
========================================================= */

.gallery-card-number {
    position: absolute;
    z-index: 4;
    top: 24px;
    right: 24px;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.30);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.13);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: white;
    font-family: "DM Sans", Arial, sans-serif;
    font-size: 12px;
    font-weight: 800;
}


/* =========================================================
   20. LARGE CARD
========================================================= */

.gallery-card.large {
    grid-column: span 2;
}

.gallery-card.large img {
    height: 520px;
}

.gallery-card.large .gallery-card-content {
    padding: 38px;
}

.gallery-card.large h3 {
    font-size: clamp(30px, 4vw, 44px);
}


/* =========================================================
   21. WIDE CARD
========================================================= */

.gallery-card.wide {
    grid-column: span 2;
}

.gallery-card.wide img {
    height: 440px;
}


/* =========================================================
   22. CARD VARIANTS
========================================================= */

.gallery-card[data-category="space"] {
    background: linear-gradient( 135deg, #ffffff, #eef2fa);
}

.gallery-card[data-category="treatment"] {
    background: linear-gradient( 135deg, #ffffff, #f4fbeb);
}

.gallery-card[data-category="wellness"] {
    background: linear-gradient( 135deg, #ffffff, #f0f8e1);
}


/* =========================================================
   23. IMAGE FALLBACK
========================================================= */

.gallery-card.image-error img {
    object-fit: cover;
    background: linear-gradient( 135deg, #e8edf5, #f1ffd4);
}

.gallery-card.image-error::before {
    content: "Foto belum tersedia";
    position: absolute;
    z-index: 5;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 12px 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    color: var(--gallery-tosca);
    font-family: "DM Sans", Arial, sans-serif;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}


/* =========================================================
   24. FILTER ANIMATION
========================================================= */

.gallery-card.gallery-hide {
    opacity: 0;
    transform: translateY(18px) scale(0.97);
    pointer-events: none;
}

.gallery-card.gallery-show {
    animation: galleryCardIn 0.45s ease both;
}

@keyframes galleryCardIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}


/* =========================================================
   25. LIGHTBOX
========================================================= */

.lightbox {
    position: fixed;
    z-index: 99999;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 35px;
    background: rgba(8, 14, 25, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}


/* =========================================================
   26. LIGHTBOX IMAGE
========================================================= */

.lightbox img {
    display: block;
    max-width: min(1100px, 92vw);
    max-height: 86vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 20px;
    box-shadow: 0 35px 90px rgba(0, 0, 0, 0.35);
    transform: scale(0.94);
    transition: transform 0.35s ease;
}

.lightbox.active img {
    transform: scale(1);
}


/* =========================================================
   27. LIGHTBOX CLOSE
========================================================= */

.lightbox-close {
    position: absolute;
    top: 24px;
    right: 28px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.10);
    color: white;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.25s ease, transform 0.25s ease;
}

.lightbox-close:hover {
    background: var(--gallery-tosca);
    transform: rotate(90deg);
}


/* =========================================================
   28. GALLERY FOOTER
========================================================= */

.site-footer {
    position: relative;
    overflow: hidden;
    padding-top: 80px;
    background: #11192d;
    color: rgba(255, 255, 255, 0.75);
}

.site-footer::before {
    content: "";
    position: absolute;
    width: 420px;
    height: 420px;
    right: -180px;
    top: -220px;
    border: 1px solid rgba(217, 255, 79, 0.18);
    border-radius: 50%;
}

.site-footer .footer-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 60px;
    padding-bottom: 65px;
}

.site-footer .footer-logo {
    color: white;
}

.site-footer .footer-logo span {
    background: var(--gallery-tosca);
}

.site-footer p {
    margin-top: 18px;
    color: rgba(255, 255, 255, 0.62);
    line-height: 1.7;
}

.site-footer h4 {
    margin: 0 0 18px;
    color: var(--gallery-lime);
    font-family: "DM Sans", Arial, sans-serif;
    font-size: 13px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.site-footer a {
    display: block;
    width: fit-content;
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.72);
    text-decoration: none;
    font-family: "DM Sans", Arial, sans-serif;
    transition: color 0.2s ease, transform 0.2s ease;
}

.site-footer a:hover {
    color: var(--gallery-lime);
    transform: translateX(4px);
}


/* =========================================================
   29. FOOTER BOTTOM
========================================================= */

.footer-bottom {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.10);
    color: rgba(255, 255, 255, 0.45);
    font-family: "DM Sans", Arial, sans-serif;
    font-size: 12px;
}


/* =========================================================
   30. TABLET
========================================================= */

@media (max-width: 900px) {
    .gallery-page .container {
        width: min(100% - 36px, 760px);
    }
    .site-header .nav-wrap {
        min-height: 74px;
    }
    .main-nav {
        gap: 2px;
    }
    .main-nav a {
        padding: 9px 9px;
        font-size: 13px;
    }
    .gallery-page .page-hero,
    .gallery-hero {
        min-height: 400px;
    }
    .gallery-grid {
        gap: 22px;
    }
    .gallery-card img {
        height: 340px;
    }
    .gallery-card.large img {
        height: 440px;
    }
    .gallery-card-content {
        padding: 24px;
    }
    .gallery-card h3 {
        font-size: 24px;
    }
    .site-footer .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}


/* =========================================================
   31. MOBILE
========================================================= */

@media (max-width: 700px) {
    .gallery-page .container {
        width: calc(100% - 32px);
    }
    /* Header */
    .site-header .nav-wrap {
        min-height: 70px;
        gap: 12px;
    }
    .site-header .logo {
        font-size: 19px;
        gap: 9px;
    }
    .site-header .logo span {
        width: 40px;
        height: 40px;
        font-size: 11px;
    }
    .nav-toggle {
        display: flex;
    }
    .main-nav {
        display: none;
    }
    /* Hero */
    .gallery-page .page-hero,
    .gallery-hero {
        min-height: 370px;
    }
    .gallery-page .page-hero .container,
    .gallery-hero .container {
        padding-top: 50px;
        padding-bottom: 50px;
    }
    .gallery-page .page-hero h1,
    .gallery-hero h1 {
        font-size: clamp(42px, 13vw, 62px);
        line-height: 1;
    }
    .gallery-page .page-hero p:not(.eyebrow),
    .gallery-hero p:not(.eyebrow) {
        font-size: 15px;
        line-height: 1.7;
    }
    /* Section */
    .gallery-section,
    .gallery-page .section {
        padding-top: 70px;
        padding-bottom: 80px;
    }
    /* Heading */
    .gallery-heading {
        margin-bottom: 35px;
    }
    .gallery-heading h2 {
        font-size: clamp(34px, 10vw, 48px);
    }
    .gallery-heading p {
        font-size: 15px;
        line-height: 1.7;
    }
    /* Filter */
    .gallery-filter {
        gap: 9px;
        margin-bottom: 32px;
    }
    .gallery-filter-btn {
        min-height: 44px;
        padding: 0 17px;
        font-size: 13px;
    }
    /* Grid */
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .gallery-card,
    .gallery-card.large,
    .gallery-card.wide {
        grid-column: span 1;
    }
    .gallery-card img,
    .gallery-card.large img,
    .gallery-card.wide img {
        height: 350px;
    }
    .gallery-card-content {
        padding: 22px;
    }
    .gallery-card h3,
    .gallery-card.large h3 {
        font-size: 25px;
    }
    .gallery-card p {
        font-size: 13px;
    }
    /* Footer */
    .site-footer {
        padding-top: 60px;
    }
    .site-footer .footer-grid {
        grid-template-columns: 1fr;
        gap: 35px;
        padding-bottom: 45px;
    }
    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 7px;
    }
    /* Lightbox */
    .lightbox {
        padding: 20px;
    }
    .lightbox img {
        max-width: 94vw;
        max-height: 80vh;
        border-radius: 15px;
    }
    .lightbox-close {
        top: 15px;
        right: 15px;
        width: 44px;
        height: 44px;
    }
}


/* =========================================================
   32. SMALL MOBILE
========================================================= */

@media (max-width: 420px) {
    .gallery-page .container {
        width: calc(100% - 24px);
    }
    .gallery-filter-btn {
        flex: 1 1 auto;
        padding-left: 13px;
        padding-right: 13px;
    }
    .gallery-card img,
    .gallery-card.large img,
    .gallery-card.wide img {
        height: 320px;
    }
    .gallery-card-content {
        padding: 20px;
    }
    .gallery-card h3 {
        font-size: 23px;
    }
    .gallery-card-number {
        top: 18px;
        right: 18px;
        width: 38px;
        height: 38px;
    }
}


/* =========================================================
   33. ACCESSIBILITY
========================================================= */

.gallery-filter-btn:focus-visible,
.gallery-card:focus-visible,
.lightbox-close:focus-visible,
.main-nav a:focus-visible,
.nav-toggle:focus-visible {
    outline: 3px solid var(--gallery-lime);
    outline-offset: 3px;
}


/* =========================================================
   34. REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {
    .gallery-card,
    .gallery-card img,
    .gallery-filter-btn,
    .main-nav a,
    .lightbox,
    .lightbox img,
    .lightbox-close {
        transition: none !important;
        animation: none !important;
    }
}