/* ============================================================
   SAKURA RESIDENCE DETAIL CSS MODULE
   Follows DESIGN.md standards (Tokens, No Inline CSS)
   ============================================================ */

/* SPACING UTILITY EXTENSION */
.mb-section {
    margin-bottom: var(--sp-section);
}
.pt-section {
    padding-top: var(--sp-section);
}

.text-center {
    text-align: center;
}

/* CONTAINER & HEADER */
.rsd-detail-container {
    width: 100%;
    overflow: hidden;
    background-color: var(--clr-canvas);
    padding-bottom: var(--sp-section);
}

.rsd-page-header {
    max-width: var(--container-max);
    width: calc(100% - (var(--container-gutter) * 2));
    margin: 0 auto;
    padding-top: calc(var(--nav-height) + var(--sp-xl));
    margin-bottom: var(--sp-xl);
}

.rsd-back-btn {
    display: inline-flex;
}
.rsd-back-icon {
    font-size: var(--fs-heading-sm);
    margin-right: var(--sp-xs);
}

/* TYPOGRAPHY EXTENSIONS */
.rsd-section-title {
    font-family: var(--ff-display);
    font-size: var(--fs-heading-xl);
    line-height: var(--lh-heading-xl);
    letter-spacing: var(--ls-heading-xl);
    color: var(--clr-ink);
    margin-bottom: var(--sp-xl);
    font-weight: var(--fw-bold);
}

/* ========================================
   HERO SECTION (Editorial Layout)
   ======================================== */
/* ========================================
   HERO SECTION (Editorial Layout)
   ======================================== */
/* ========================================
   HERO SECTION (Editorial Layout)
   ======================================== */
.rsd-hero-editorial {
    max-width: var(--container-max);
    width: calc(100% - (var(--container-gutter) * 2));
    margin: 0 auto;
}

.rsd-hero-image-wrap {
    width: 100%;
    min-height: 80vh;
    padding: var(--sp-xxl) 0;
    margin-bottom: var(--sp-xxl);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.rsd-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.rsd-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.8) 100%);
    z-index: 2;
}

.rsd-hero-content {
    max-width: 800px;
    text-align: center;
    width: 100%;
    position: relative;
    z-index: 3;
    padding: var(--sp-xl);
}

.rsd-hero-title {
    margin-bottom: var(--sp-sm);
    color: var(--clr-on-dark);
}

.rsd-hero-subtitle {
    font-size: var(--fs-heading-md);
    color: var(--clr-on-dark);
    font-weight: var(--fw-medium);
    margin-bottom: var(--sp-xl);
    opacity: 0.9;
}

.rsd-hero-desc {
    margin-bottom: var(--sp-xl);
}
.rsd-hero-desc p {
    color: var(--clr-on-dark);
    opacity: 0.9;
}

.rsd-hero-divider {
    border: 0;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.2);
    margin: var(--sp-xl) 0;
}

.rsd-hero-actions {
    display: flex;
    justify-content: center;
    gap: var(--sp-md);
    flex-wrap: wrap;
    margin-top: var(--sp-xl);
}

.rsd-btn-icon {
    font-size: var(--fs-body-lg);
    margin-right: var(--sp-sm);
}

/* ========================================
   FACILITIES SECTION (Category Tiles)
   ======================================== */
.rsd-facilities-section {
    max-width: var(--container-max);
    width: calc(100% - (var(--container-gutter) * 2));
    margin: 0 auto;
}

.rsd-category-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--sp-lg);
    margin-bottom: var(--sp-section);
}

.category-tile {
    background-color: var(--clr-surface-card);
    border-radius: var(--rd-md);
    padding: 8px 16px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: var(--sp-xs);
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.category-tile:hover {
    background-color: var(--clr-secondary-bg);
}

.rsd-amenity-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--clr-ink);
}
.rsd-amenity-icon span {
    font-size: var(--fs-heading-sm);
    line-height: 1;
}

.rsd-amenity-label {
    font-family: var(--ff-primary);
    font-size: var(--fs-body-sm);
    font-weight: var(--fw-semibold);
    color: var(--clr-ink);
    line-height: 1.2;
}

/* Extended Facilities Lists */
.rsd-extended-facilities {
    border-top: 1px solid var(--clr-hairline);
    padding-top: var(--sp-xxl);
}

.rsd-subsection-title {
    font-size: var(--fs-heading-lg);
    font-weight: var(--fw-semibold);
    color: var(--clr-ink);
    margin-bottom: var(--sp-xl);
}

.rsd-facilities-lists {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-xxl);
}

.rsd-list-header {
    font-size: var(--fs-body-md);
    color: var(--clr-ink);
    font-weight: var(--fw-bold);
    margin-bottom: var(--sp-md);
}

.rsd-facilities-lists ul {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    column-gap: var(--sp-xl);
}

.hairline-list li {
    border-bottom: 1px solid var(--clr-hairline-soft);
    padding: var(--sp-sm) 0;
}
.hairline-list li:last-child {
    border-bottom: none;
}

.clean-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.clean-list li {
    display: flex;
    align-items: center;
    font-size: var(--fs-body-md);
    color: var(--clr-body);
}

.rsd-check-icon {
    color: var(--clr-primary);
    font-size: var(--fs-heading-sm);
    margin-right: var(--sp-md);
}

/* ========================================
   BENTO GRID GALLERY
   ======================================== */
.rsd-bento-section {
    max-width: var(--container-max);
    width: 100%;
    margin: 0 auto;
}

.rsd-bento-container {
    display: flex;
    gap: var(--sp-md);
    border-radius: var(--rd-lg);
    overflow: hidden;
    height: 60vh;
    min-height: 400px;
    max-height: 600px;
}

.rsd-bento-hero {
    flex: 1;
    height: 100%;
}

.rsd-bento-grid {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: var(--sp-md);
    height: 100%;
}

.rsd-bento-item {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    cursor: pointer;
}

.rsd-bento-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.rsd-bento-item:hover img {
    transform: scale(1.05);
}

.rsd-bento-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.rsd-bento-item:hover .rsd-bento-overlay {
    background: rgba(0, 0, 0, 0.5);
}

.rsd-overlay-text {
    color: var(--clr-on-dark);
    font-size: var(--fs-heading-md);
    font-weight: var(--fw-bold);
}

/* RESPONSIVE */
@media (max-width: 1024px) {
    .rsd-facilities-lists {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .rsd-facilities-lists {
        gap: var(--sp-xl);
    }
    .rsd-facilities-lists ul {
        grid-template-columns: 1fr;
    }
    
    .rsd-hero-title {
        font-size: var(--fs-display-lg);
    }

    /* Bento Grid to Horizontal Scroll */
    .rsd-bento-container {
        flex-direction: row;
        height: auto;
        min-height: auto;
        border-radius: 0;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding-bottom: var(--sp-md);
        margin: 0 calc(-1 * var(--container-gutter));
        padding: 0 var(--container-gutter);
        gap: var(--sp-sm);
    }
    
    .rsd-bento-container::-webkit-scrollbar {
        display: none;
    }
    
    .rsd-bento-hero, .rsd-bento-grid {
        display: contents; 
    }
    
    .rsd-bento-item {
        flex: 0 0 85vw;
        height: 60vw;
        border-radius: var(--rd-md);
        scroll-snap-align: center;
    }
}

@media (max-width: 480px) {
    .rsd-category-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: var(--sp-md);
    }
    
    .rsd-hero-image-wrap {
        min-height: 60vh;
        border-radius: var(--rd-none);
        width: calc(100% + (var(--container-gutter) * 2));
        margin-left: calc(-1 * var(--container-gutter));
    }
    
    .rsd-hero-actions {
        flex-direction: column;
    }
    
    .rsd-hero-actions a {
        width: 100%;
    }
}

/* ========================================
   LIGHTBOX MODAL (FROM RESTAURANT)
   ======================================== */
.rsd-lightbox-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.rsd-lightbox-modal.rsd-is-active {
    opacity: 1;
    pointer-events: auto;
}

.rsd-lightbox-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
}

.rsd-lightbox-close {
    position: absolute;
    top: var(--sp-lg, 16px);
    right: var(--sp-lg, 16px);
    z-index: 2;
    color: #fff;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    outline: none;
    border-radius: var(--rd-full, 9999px);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.rsd-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.rsd-lightbox-counter {
    position: absolute;
    top: var(--sp-xl, 24px);
    left: var(--sp-xl, 24px);
    z-index: 2;
    color: rgba(255, 255, 255, 0.8);
    font-family: var(--ff-primary, sans-serif);
    font-size: var(--fs-body-md);
    letter-spacing: 2px;
}

.rsd-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    color: #fff;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    outline: none;
    border-radius: var(--rd-full, 9999px);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease, transform 0.2s ease;
}

.rsd-lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.3);
}

.rsd-lightbox-nav:active {
    transform: translateY(-50%) scale(0.9);
}

.rsd-lightbox-prev {
    left: var(--sp-lg, 16px);
}

.rsd-lightbox-next {
    right: var(--sp-lg, 16px);
}

.rsd-lightbox-content {
    position: relative;
    z-index: 1;
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.rsd-lightbox-img {
    max-width: 100%;
    max-height: calc(85vh - 80px);
    object-fit: contain;
    border-radius: var(--rd-sm, 8px);
    border: 1px solid var(--clr-hairline);
    user-select: none;
    transition: opacity 0.2s ease;
}

.rsd-lightbox-img.rsd-loading {
    opacity: 0.5;
}

.rsd-lightbox-caption {
    margin-top: var(--sp-lg, 16px);
    text-align: center;
    color: #fff;
    max-width: 600px;
}

.rsd-lightbox-title {
    font-family: var(--ff-primary, sans-serif);
    font-size: var(--fs-heading-md);
    font-weight: var(--fw-semibold, 600);
    margin: 0 0 4px 0;
}

.rsd-lightbox-desc {
    font-family: var(--ff-primary, sans-serif);
    font-size: var(--fs-body-sm);
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

@media (max-width: 768px) {
    .rsd-lightbox-nav {
        width: 40px;
        height: 40px;
    }
    .rsd-lightbox-prev { left: var(--sp-sm, 8px); }
    .rsd-lightbox-next { right: var(--sp-sm, 8px); }
    .rsd-lightbox-close {
        width: 40px;
        height: 40px;
        top: var(--sp-sm, 8px);
        right: var(--sp-sm, 8px);
    }
    .rsd-lightbox-counter {
        top: var(--sp-md, 12px);
        left: var(--sp-md, 12px);
    }
}

