:root {
    --bg-dark: #121212;
    --text-light: #f5f5f5;
    --text-secondary: #a0a0a0;
    --accent-color: #d4af37;
    /* Gold for a luxurious feel */
    --font-serif: 'Cormorant Garamond', serif;
    --font-sans: 'Pretendard', sans-serif;
}

/* Base Styles */
html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-light);
    font-family: var(--font-sans);
    margin: 0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    animation: fadeInPage 1s ease-in-out;
}

h1,
h2 {
    font-family: var(--font-serif);
    font-weight: 600;
}

/* Header */
.garden-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 40px;
    z-index: 100;
    box-sizing: border-box;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), transparent);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-light);
    text-decoration: none;
    font-weight: 600;
    opacity: 0.8;
    transition: opacity 0.3s, transform 0.3s;
}

.back-link:hover {
    opacity: 1;
    transform: translateX(-5px);
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.hero-section video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: translate(-50%, -50%);
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    color: var(--text-light);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.hero-title {
    font-size: clamp(3rem, 8vw, 6rem);
    margin: 0;
    font-weight: 700;
    letter-spacing: 2px;
    animation: slideUpFadeIn 1s 0.5s both;
}

.hero-subtitle {
    font-size: clamp(1rem, 3vw, 1.5rem);
    margin: 10px 0 0;
    font-weight: 400;
    opacity: 0.9;
    animation: slideUpFadeIn 1s 0.8s both;
}


/* Intro Section */
.intro-section {
    padding: 100px 40px;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.intro-section h2 {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 20px;
    color: var(--accent-color);
}

.intro-section p {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* Gallery Section */
.gallery-section {
    padding: 0 40px 100px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: repeat(8, 5vw);
    gap: 15px;
    max-width: 1400px;
    margin: 0 auto;
}

.gallery-item {
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease, filter 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.item-1 {
    grid-column: 1 / 6;
    grid-row: 1 / 6;
}

.item-2 {
    grid-column: 6 / 9;
    grid-row: 1 / 4;
}

.item-3 {
    grid-column: 9 / 13;
    grid-row: 1 / 5;
}

.item-4 {
    grid-column: 1 / 5;
    grid-row: 6 / 9;
}

.item-5 {
    grid-column: 5 / 9;
    grid-row: 4 / 9;
}

.item-6 {
    grid-column: 9 / 13;
    grid-row: 5 / 9;
}


/* NEW: Footer */
.facility-footer {
    padding: 1rem 1rem;
    background-color: var(--bg-dark);
    color: var(--text-secondary);
    border-top: 2px solid;
    border-image: linear-gradient(to right, transparent, var(--accent-color), transparent) 1;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.copyright {
    font-size: 0.8rem;
    margin: 0;
}


/* Animations */
@keyframes fadeInPage {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUpFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* Responsive Design */
@media (max-width: 992px) {
    .gallery-grid {
        grid-template-columns: repeat(6, 1fr);
        grid-template-rows: repeat(12, 10vw);
    }

    .item-1 {
        grid-column: 1 / 4;
        grid-row: 1 / 5;
    }

    .item-2 {
        grid-column: 4 / 7;
        grid-row: 1 / 4;
    }

    .item-3 {
        grid-column: 1 / 7;
        grid-row: 5 / 8;
    }

    .item-4 {
        grid-column: 1 / 3;
        grid-row: 8 / 11;
    }

    .item-5 {
        grid-column: 3 / 7;
        grid-row: 8 / 13;
    }

    .item-6 {
        grid-column: 1 / 4;
        grid-row: 11 / 13;
    }
}

@media (max-width: 768px) {
    .garden-header {
        padding: 15px 20px;
    }

    .intro-section,
    .gallery-section {
        padding-left: 20px;
        padding-right: 20px;
    }

    .intro-section {
        padding-top: 80px;
        padding-bottom: 80px;
    }

    .gallery-section {
        padding-bottom: 80px;
    }

    .gallery-grid {
        display: flex;
        flex-direction: column;
    }

    .gallery-item {
        width: 100%;
        height: auto;
        aspect-ratio: 4/3;
    }
}

/* NEW: Gallery Focus/Lightbox Styles */
.gallery-grid {
    /* Add transition for when the focus is removed */
    transition: filter 0.5s ease, transform 0.5s ease;
}

.gallery-section.is-focused .gallery-grid {
    filter: blur(10px);
    transform: scale(0.98);
    transition: filter 0.5s ease, transform 0.5s ease;
    pointer-events: none;
    /* Prevents interaction with blurred background */
}

/* The main overlay for the focused view */
.gallery-focus-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    box-sizing: border-box;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    cursor: pointer;
}

.gallery-focus-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

/* The focused image itself */
.gallery-focus-overlay img {
    display: block;
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    /* Shows original aspect ratio */
    border-radius: 8px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.4s ease;
    cursor: default;
    /* So it doesn't look like the image is clickable */
}

.gallery-focus-overlay.visible img {
    transform: scale(1);
    opacity: 1;
}