/* ===================================
   Index Page Specific Styles
   =================================== */

/* 모든 섹션을 Closing 배경 위에 표시 */
section:not(.index-closing) {
    position: relative;
    z-index: 10;
}


/* ===================================
   Room Preview Section - Tab Layout
   =================================== */

.room-preview-section {
    min-height: 100vh;
    padding: 120px 0;
    background: linear-gradient(to right,
color-mix(in srgb, var(--color-secondary) 30%, black 10%) 35%,
color-mix(in srgb, var(--color-secondary) 10%, transparent 90%) 35%);
}

/* Right side container */
.rooms-right {
    width: 60%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.room-preview-header {
    text-align: left;
    margin: 0;
}

.room-preview-title {
    font-family: var(--font-en-main);
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 50px;
    color: var(--color-secondary);
}

.rooms-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 90%;
    margin: 0 auto;
    gap: 60px;
    padding: 0 40px;
}

/* Left side - Room List */
.rooms-list {
    width: 35%;
    padding-top: 60px;
    position: relative;
    z-index: 10;
}

.room-name {
    margin: 0;
    padding: 0;
    list-style: none;
    margin-bottom: 30px;
}

.room-name li {
    width: 100%;
    height: 47px;
    line-height: 47px;
    margin-bottom: 15px;
    padding: 0 30px;
    background: rgba(237, 233, 231, 0.6);
    transition: 0.4s;
    cursor: pointer;
    position: relative;
    z-index: 1;
    border-radius: 8px;
}

.room-name li:hover,
.room-name li.active {
    background: var(--color-secondary);
    z-index: 10;
    color: #fff;
}

.room-name li a {
    display: block;
    font-family: var(--font-en-main);
    font-size: 16px;
    letter-spacing: 0.1em;
    color: #333;
    text-decoration: none;
}

.room-name li.active a {
    color: #fff;
}

/* Room Info Area */
.room-info {
    position: relative;
    width: 100%;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding-top: 60px;
}

.room-info ul {
    position: absolute;
    left: 0;
    top: 30px;
    display: none;
    margin: 0;
    padding: 20px;
    list-style: none;
    background: rgba(255, 255, 255, 0.5);
    width: 100%;
    text-align: center;
    border-radius: 8px;
    min-height: 130px;
    align-content: center;
}

.room-info ul.active {
    display: block;
}

.room-info li {
    font-family: var(--font-ko-sub);
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    color: #333;
}

/* Right side - Images */
.rooms-thumb {
    position: relative;
    z-index: 5;
    width: 100%;
    height: 500px;
}

.rooms-thumb a {
    position: relative;
    width: 100%;
    height: 100%;
    display: block;
}

.rooms-thumb .imgbox {
    position: absolute;
    left: -140px;
    top: 0;
    bottom: 0;
    right: 0;
    display: none;
    border-radius: 20px;
    overflow: hidden;
}

.rooms-thumb .imgbox.active {
    display: block;
}

.rooms-thumb .imgbox img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.room-view-btn {
    position: absolute;
    right: 30px;
    bottom: 30px;
    font-size: 14px;
    color: #000;
    background: rgba(255, 255, 255, 0.6);
    padding: 12px 28px;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 400;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
    font-family: var(--font-en-main);
}

.rooms-thumb .imgbox a:hover .room-view-btn {
    background: var(--color-secondary);
    color: #fff;
    backdrop-filter: none;
    transform: translateY(-2px);
}

.room-view-btn .arrow-icon {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    transition: transform 0.3s ease;
}

.rooms-thumb .imgbox a:hover .room-view-btn .arrow-icon {
    transform: translate(3px, -3px);
}

/* Room Image Slider */
.room-image-slider {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.room-slide-track {
    position: relative;
    width: 100%;
    height: 100%;
}

.room-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
    overflow: hidden;
}

.room-slide.active {
    opacity: 1;
}

.room-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Room Slider Navigation */
.room-slider-nav {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 10;
}

.room-slider-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
    font-family: var(--font-en-main);
}

.room-slider-btn:hover {
    background: rgba(255, 255, 255, 0.4);
    border-color: rgba(255, 255, 255, 0.9);
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .rooms-wrap {
        gap: 40px;
    }

    .rooms-list {
        width: 40%;
    }

    .rooms-thumb {
        width: 60%;
    }

    .room-preview-header {
        margin-bottom: 40px;
    }

    .room-name li {
        height: 45px;
        line-height: 45px;
        margin-bottom: 25px;
        padding: 0 25px;
        font-size: 15px;
    }

    .room-info {
        padding-top: 50px;
    }

    .room-info li {
        font-size: 13px;
        margin-bottom: 25px;
    }

    .room-preview-title {
        font-size: 2.5rem;
    }
}

/* ===================================
   Mobile Responsive (768px and below)
   =================================== */

@media (max-width: 768px) {
    /* Room Preview Section */
    .room-preview-section {
        padding: 40px 20px;
        box-sizing: border-box;
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 100vh;
    }

    .room-preview-header {
        margin-bottom: 30px;
        order: -1;
        margin-bottom: 30px;
    }

    .room-preview-title {
        font-size: 2rem;
        margin-bottom: 15px;
    }

    .rooms-wrap {
        flex-direction: column;
        width: 100%;
        gap: 0;
        padding: 0;
        margin: 0 auto;
    }

    .rooms-list {
        width: 100%;
        padding: 0;
        padding-top: 0;
        order: 1;
        margin-top: 30px;
    }

    .rooms-right {
        width: 100%;
        order: 0;
        padding: 0;
        margin: 0;
    }

    .room-name {
        margin-bottom: 30px;
    }

    .room-name li {
        height: 40px;
        line-height: 40px;
        margin-bottom: 20px;
        padding: 0 20px;
        font-size: 14px;
    }

    .room-info {
        display: none;
    }

    .rooms-thumb {
        width: 100%;
        height: 300px;
        padding: 0;
    }

    .rooms-thumb .imgbox {
        left: 0;
    }

    .room-view-btn {
        font-size: 11px;
        padding: 8px 18px;
        right: 20px;
        bottom: 20px;
        gap: 6px;
    }

    .room-view-btn .arrow-icon {
        width: 12px;
        height: 12px;
    }

}

/* ===================================
   Essence Section - Three Column Layout
   =================================== */

.essence-section {
    height: auto;
    min-height: 100vh;
    padding: 100px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: visible;
    background: var(--color-primary);
    position: relative;
    z-index: 9; /* 히어로 아래 */
}

.essence-wrapper {
    position: relative;
    max-width: 80%;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1.5fr 1fr;
    grid-template-rows: auto 1fr;
    gap: 60px;
    align-items: center;
    min-height: 600px;
    width: 100%;
    grid-template-areas:
        "title title right"
        "image center right";
}

/* Left Large Image */
.essence-left-image {
    position: relative;
    border-radius: 50%;
    overflow: hidden;
    opacity: 0;
    transform: translateX(-30px) translateY(20px);
    transition: all 1s ease-out;
    padding: 15px;
    border: 1.5px solid var(--color-secondary);
    box-sizing: border-box;
    grid-area: image;
}

.essence-left-image::before {
    display: none;
}

.essence-left-image.visible {
    opacity: 1;
    transform: translateX(0) translateY(0) scale(1.1);
    z-index: 1;
}

.essence-left-image img {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
    border-radius: 50%;
}

/* Center Content */
.essence-center-content {
    text-align: center;
    opacity: 0;
    transform: translateY(30px);
    transition: all 1s ease-out 0.2s;
    grid-area: center;
    align-self: center;
    margin-top: -150px;
    position: relative;
}

.essence-center-content::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle,
color-mix(in srgb, var(--color-secondary) 30%, var(--color-primary)) 0%,
color-mix(in srgb, var(--color-secondary) 15%, var(--color-primary)) 40%,
color-mix(in srgb, var(--color-secondary) 0%, var(--color-primary)) 70%, var(--color-primary) 100%);
    z-index: -1;
    pointer-events: none;
}

.essence-center-content.visible {
    opacity: 1;
    transform: translateY(0);
}

.essence-title {
    font-family: var(--font-ko-main);
    font-size: 34px;
    font-weight: 700;
    line-height: 1.5;
    color: var(--color-secondary);
    margin-bottom: 60px;
    letter-spacing: -0.02em;
    white-space: pre-line;
    grid-area: title;
    display: flex;
    align-items: center;
    gap: 30px;
}

.essence-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--color-secondary);
    min-width: 100px;
}

.essence-spacing {
    margin-bottom: 40px;
}

.essence-subtitle {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 25px;
    color: #111;
}

.essence-description {
    font-family: var(--font-ko-sub);
    font-size: 1.1rem;
    line-height: 1.8;
    color: #666;
    font-weight: 400;
}

/* Right Top Small Image */
.essence-right-image {
    position: relative;
    align-self: flex-start;
    margin-top: -80px;
    width: calc((100% + 70px) * 1.2);
    aspect-ratio: 1;
    overflow: hidden;
    opacity: 0;
    transform: translateX(30px);
    transition: all 1s ease-out 0.4s;
    padding: 15px;
    border: 1.5px solid var(--color-secondary);
    box-sizing: border-box;
    border-radius: 50%;
    grid-area: right;
}

.essence-right-image::before {
    display: none;
}

.essence-right-image.visible {
    opacity: 1;
    transform: translateX(0);
}

.essence-right-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 50%;
}

/* Essence Footer */
.essence-footer {
    display: flex;
    align-items: center;
    gap: 30px;
    width: 100%;
    max-width: 80%;
    margin: 40px auto 0;
    padding: 0 20px;
}

.essence-footer::before {
    content: '';
    height: 1px;
    flex: 1;
    background: var(--color-secondary);
}

.essence-footer h3 {
    font-family: var(--font-en-main);
    font-size: 34px;
    font-weight: 400;
    color: var(--color-secondary);
    margin: 0;
    white-space: nowrap;
}

/* Mobile Responsive */
/* Tablet: 768px ~ 1201px */
@media (min-width: 768px) and (max-width: 1201px) {
    /* Essence Section */
    .essence-section {
        height: auto;
        min-height: auto;
        padding: 100px 0;
    }

    .essence-title {
        margin-bottom: 0;
    }

    .essence-left-image {
        max-width: 300px;
        margin: 0 auto;
    }

    /* Room Preview Section - Same as Mobile */
    .room-preview-section {
        padding: 40px 60px;
        box-sizing: border-box;
    }

    .room-preview-header {
        margin-top: 40px;
    }

    .room-preview-title {
        margin-bottom: 0;
    }

    .rooms-wrap {
        flex-direction: column;
        width: 100%;
        max-width: 100%;
        padding: 0;
        margin: 0 auto;
        gap: 0;
    }

    .rooms-right {
        width: 100%;
        order: 0;
        padding: 0;
        margin: 0;
    }

    .rooms-list {
        width: 100%;
        padding: 0;
        order: 1;
        margin-top: 30px;
    }

    .rooms-thumb {
        width: 100%;
        height: 300px;
        padding: 0;
    }

    .rooms-thumb .imgbox {
        left: 0;
    }

    .room-info {
        display: none;
    }
}

@media (max-width: 1200px) {
    .essence-wrapper {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto auto;
        gap: 60px;
        padding: 0 20px;
        grid-template-areas:
            "title"
            "image"
            "center"
            "right";
    }

    .essence-title {
        order: unset;
    }

    .essence-title::after {
        display: none;
    }

    .essence-left-image {
        order: unset;
    }

    .essence-center-content {
        order: unset;
        text-align: center;
        align-self: unset;
        margin-top: 0;
    }

    .essence-center-content::before {
        display: none;
    }

    .essence-right-image {
        order: unset;
        margin-top: 0;
        width: 80%;
        margin: 0 auto;
    }

    .essence-left-image img {
        aspect-ratio: 1;
    }

    .essence-right-image img {
        aspect-ratio: 1;
    }

    .essence-footer {
        display: none;
    }

    .essence-footer::before {
        display: none;
    }

    .essence-footer h3 {
        font-size: 1.2rem;
    }
}

@media (max-width: 768px) {
    .essence-section {
        height: auto;
        min-height: auto;
        padding: 60px 20px;
        box-sizing: border-box;
    }

    .essence-wrapper {
        width: 100%;
        padding: 0;
        gap: 30px;
    }

    .essence-center-content.visible {
        padding: 30px 0;
    }

    .essence-left-image img {
        aspect-ratio: 1;
    }

    .essence-title {
        font-size: 2rem;
        margin-bottom: 40px;
    }

    .essence-subtitle {
        font-size: 1.3rem;
        margin-bottom: 20px;
    }

    .essence-description {
        font-size: 0.9rem;
    }

    .essence-right-image {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
        aspect-ratio: 1;
    }

    .essence-right-image img {
        aspect-ratio: 1;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}

/* ===================================
   Experience Gallery Section
   =================================== */

.experience-gallery-section {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--color-primary);
    padding: 0;
    justify-content: center;
}

.experience-container {
    max-width: 80%;
    width: 80%;
    margin: 0 auto;
    padding: 0 60px;
    margin-bottom: 60px;
    box-sizing: border-box;
}

/* Header Area */
.experience-header {
    margin-bottom: 0;
    text-align: left;
    opacity: 0;
    transform: translateY(50px);
    transition: all 1s ease-out;
}

.experience-header.visible {
    opacity: 1;
    transform: translateY(0);
}

.experience-title {
    font-family: var(--font-en-main);
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--color-secondary);
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.experience-description {
    font-family: var(--font-en-main);
    font-size: 1.3rem;
    font-weight: 400;
    color: #666;
    line-height: 1.6;
}

/* Images Wrapper */
/* Gallery Slider Container */
.experience-images-wrapper {
    position: relative;
    width: 100%;
    margin-top: 0;
    margin-bottom: 0;
    height: 500px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.experience-images-wrapper::before,
.experience-images-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    width: 5%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
}

.experience-images-wrapper::before {
    left: 0;
    background: linear-gradient(to right, rgba(248, 248, 248, 1), rgba(248, 248, 248, 0));
}

.experience-images-wrapper::after {
    right: 0;
    background: linear-gradient(to left, rgba(248, 248, 248, 1), rgba(248, 248, 248, 0));
}

/* Gallery Slider Wrapper - Constrain visible items to 3 */
.gallery-slider-wrapper {
    overflow: hidden;
    width: 100vw;
    height: 300px;
    position: relative;
    margin: 0 auto;
}

/* Slider Track - Base styles (shared) */
.gallery-slider-track {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    gap: 40px;
    align-items: center;
    padding: 0;
    transition: transform 0.6s ease;
}

/* Desktop version - justify-content flex-start */
@media (min-width: 769px) {
    .gallery-slider-track {
        justify-content: flex-start;
    }
}


/* Slider Item - Base styles (shared) */
.gallery-slide {
    position: relative;
    width: 300px;
    height: 300px;
    aspect-ratio: 1;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.6s ease;
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    opacity: 0.4;
}

/* Active item - Base styles (shared) */
.gallery-slide.active {
    height: 300px;
    opacity: 1;
    z-index: 10;
}

/* Desktop version - Active item 480px width */
@media (min-width: 769px) {
    .gallery-slide.active {
        width: 480px;
    }
}

/* Mobile version - Active image only visible with opacity */
@media (max-width: 768px) {
    .gallery-slide {
        width: 90%;
        opacity: 0;
    }

    .gallery-slide.active {
        width: 90%;
        opacity: 1;
    }
}

/* Adjacent items to active - Medium size, clear */
.gallery-slide.active ~ .gallery-slide {
    opacity: 0.4;
}

.gallery-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Slider Description */
.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.8) 30%, rgba(0,0,0,0) 100%);
    padding: 30px 25px;
    color: white;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gallery-slide.active .gallery-caption {
    opacity: 1;
}

.gallery-caption h4 {
    font-family: var(--font-ko-sub);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: 0.5px;
}




/* ===================================
   Animation Classes for Scroll
   =================================== */

.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-scale {
    opacity: 0;
    transform: scale(0.95);
    transition: all 0.8s ease-out;
}

.fade-in-scale.visible {
    opacity: 1;
    transform: scale(1);
}

/* Mobile Responsive - Experience Section (moved after desktop rules) */
@media (max-width: 768px) {
    .experience-gallery-section {
        padding: 0 20px;
        box-sizing: border-box;
    }

    .experience-container {
        width: 100%;
        padding: 0;
        text-align: center;
        margin-bottom: 40px;
        max-width: none;
    }


    .experience-title {
        font-size: 2rem;
    }

    .gallery-property-english-name {
        display: none;
    }
}

/* ===================================
   Closing Section - Index Page Only
   =================================== */

/* Index page specific: Left-aligned layout with gradient overlay */
.index-closing .closing-color-container {
    align-items: flex-end;
    justify-content: flex-start;
    padding-left: 50px;
}

/* 그라데이션 오버레이 - Index page only */
.index-closing .closing-color-container::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 400px;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.5));
    pointer-events: none;
    z-index: 1;
}

/* Text alignment for index page */
.index-closing .index-closing-text {
    text-align: left;
    align-items: flex-start;
    padding: 2rem 2rem 100px 2rem;
}

/* Mobile: Restore center alignment and remove overlay */
@media (max-width: 1399px) {
    .index-closing .closing-color-container {
        align-items: center;
        justify-content: center;
        padding-left: 0;
    }

    /* Remove gradient overlay on mobile */
    .index-closing .closing-color-container::after {
        display: none;
    }

    .index-closing .index-closing-text {
        text-align: center;
        align-items: center;
        padding: 2rem;
    }
}

/* Large screens: Increase rooms-thumb height */
@media (min-width: 1650px) {
    .rooms-thumb {
        height: 700px;
    }
}