/**
 * NgoiSaoSo team
 * @version 3.x
 * @contact: xinchao@ngoisaoso.vn
 * @see https://www.ngoisaoso.vn
 */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400..900;1,400..900&family=Inter:wght@300..800&display=swap');

/* Các tùy chỉnh CSS của giao diện nên để vào đây */

/* =========================================================
   1. GLOBAL DESIGN TOKENS (BIẾN HỆ THỐNG DÙNG CHUNG)
   ========================================================= */
:root {
    --nss-primary: #aa8453;
    --nss-primary-hover: #c5a880;
    --nss-primary-deep: #8d6c41;
    --nss-secondary: #f8f5f0;
    --nss-dark: #1a1a1a;

    /* Typography & Spacing Options (Có thể mở rộng thêm) */
    --nss-radius-md: 0.5rem;
    /* 8px */
    --nss-radius-lg: 0.75rem;
    /* 12px */
    --nss-radius-xl: 1rem;
    /* 16px */

    /* Shadows */
    --nss-shadow-primary: 0 12px 24px rgba(170, 132, 83, 0.2);
    --nss-shadow-primary-hover: 0 16px 32px rgba(170, 132, 83, 0.3);
}

/* =========================================================
   2. GLOBAL UI COMPONENTS (COMPONENTS DÙNG LIÊN MODULE)
   ========================================================= */

/* Button Primary (Màu Vàng Đồng Nhận Diện Trọn Vẹn) */
.btn-nss-primary {
    background: linear-gradient(to bottom right, var(--nss-primary), var(--nss-primary-deep));
    color: #ffffff !important;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    transition: all 0.3s ease-in-out;
    border: none;
    border-radius: var(--nss-radius-xl);
    box-shadow: var(--nss-shadow-primary);
}

.btn-nss-primary:hover,
.btn-nss-primary:focus {
    background: linear-gradient(to bottom right, var(--nss-primary-hover), var(--nss-primary));
    box-shadow: var(--nss-shadow-primary-hover);
    transform: translateY(-2px);
    color: #ffffff !important;
}

/* Button Dark (Nút Đen Bổ Trợ) */
.btn-nss-dark {
    background-color: var(--nss-dark);
    color: #ffffff !important;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    transition: all 0.3s ease-in-out;
    border: none;
    border-radius: var(--nss-radius-xl);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-nss-dark:hover,
.btn-nss-dark:focus {
    background-color: var(--nss-primary);
    transform: translateY(-1px);
    box-shadow: 0 6px 10px rgba(170, 132, 83, 0.25);
}

/* Form Input Element (Chuẩn hóa viền vàng khi focus) */
.form-input-nss {
    background-color: #ffffff;
    border-width: 1px !important;
    border-style: solid !important;
    border-color: #d1d5db !important;
    /* gray-300 */
    border-radius: var(--nss-radius-xl);
    font-family: 'Inter', sans-serif;
    transition: all 0.2s ease-in-out;
    outline: none;
}

.form-input-nss:focus {
    border-color: var(--nss-primary) !important;
    box-shadow: 0 0 0 2px rgba(170, 132, 83, 0.2) !important;
}

/* =========================================================
   3. GLOBAL UTILITY CLASSES (DỰ PHÒNG CHỐNG LỖI JIT)
   ========================================================= */

/* Text Colors */
.text-nss-primary {
    color: var(--nss-primary) !important;
}

.hover\:text-nss-primary:hover {
    color: var(--nss-primary) !important;
}

.text-nss-dark {
    color: var(--nss-dark) !important;
}

.hover\:text-nss-dark:hover {
    color: var(--nss-dark) !important;
}

/* Background Colors */
.bg-nss-primary {
    background-color: var(--nss-primary) !important;
}

.hover\:bg-nss-primary:hover {
    background-color: var(--nss-primary) !important;
}

.bg-nss-dark {
    background-color: var(--nss-dark) !important;
}

/* Border Colors */
.border-nss-primary {
    border-color: var(--nss-primary) !important;
}

.focus\:border-nss-primary:focus {
    border-color: var(--nss-primary) !important;
}

/* Nút Viền (Outline Button) */
.btn-nss-outline {
    background-color: transparent;
    color: var(--nss-dark);
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    border: 1px solid #e2e2e2;
    border-radius: var(--nss-radius-md);
    transition: all 0.2s ease-in-out;
}

.btn-nss-outline:hover,
.btn-nss-outline:focus {
    background-color: var(--nss-primary);
    color: #ffffff !important;
    border-color: var(--nss-primary);
}

/* =========================================================
   4. LUMINOUS HERITAGE SCALES (DIGITAL ARCHITECT)
   ========================================================= */
:root {
    --lh-primary: #aa8453;
    --lh-primary-container: #8d6c41;
    --lh-background: #fdfbf7;
    --lh-surface: #fdfbf7;
    --lh-surface-container-low: #f4f0e6;
    --lh-surface-container-highest: #e8e1d2;
    --lh-surface-lowest: #ffffff;
    --lh-on-surface: #2c2620;
    --lh-outline-ghost: rgba(170, 132, 83, 0.15);
}

/* Typography Editorial */
.lh-editorial {
    font-family: 'Inter', sans-serif;
    color: var(--lh-on-surface);
    background-color: var(--lh-background);
}

.lh-editorial h1,
.lh-editorial h2,
.lh-editorial h3,
.lh-editorial h4,
.lh-editorial h5,
.lh-editorial h6,
.lh-font-display {
    font-family: 'Playfair Display', serif;
    letter-spacing: -0.02em;
    color: var(--lh-on-surface);
}

/* Tonal Layering Surfaces */
.lh-surface {
    background-color: var(--lh-surface);
}

.lh-surface-low {
    background-color: var(--lh-surface-container-low);
}

.lh-surface-lowest {
    background-color: var(--lh-surface-lowest);
}

.lh-surface-highest {
    background-color: var(--lh-surface-container-highest);
}

/* Ambient Shadows (No Hard Black) */
.lh-ambient-shadow {
    box-shadow: 0px 20px 40px rgba(25, 28, 26, 0.05);
    /* Tinted with on-surface */
    transition: all 0.3s ease;
}

.lh-ambient-shadow:hover {
    box-shadow: 0px 24px 48px rgba(25, 28, 26, 0.08);
}

/* Structural Gradients */
.lh-hero-gradient {
    /* Subtle linear gradient top-left to bottom-right */
    background: linear-gradient(135deg, var(--lh-primary) 0%, var(--lh-primary-container) 100%);
    color: #ffffff;
}

/* The Ghost Border */
.lh-ghost-border {
    border: 1px solid var(--lh-outline-ghost);
}

.lh-ghost-border-b {
    border-bottom: 1px solid var(--lh-outline-ghost);
}

/* Interaction Cards */
.lh-card {
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    border-radius: 1rem;
    /* lg radius */
}

.lh-card:hover {
    background-color: var(--lh-surface-lowest);
    /* Surface bright */
    box-shadow: 0px 10px 30px rgba(25, 28, 26, 0.04);
}

/* Glassmorphism */
.lh-glass {
    background: rgba(248, 250, 246, 0.8);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

/* =========================================================
   5. BỔ TÚC UTILITY CLASSES (DỰ PHÒNG KHÔNG CÓ TAILWIND COMPILER)
   ========================================================= */

/* Luminous Heritage Arbitrary Fixes */
.bg-\[var\(--lh-primary\)\] {
    background-color: var(--lh-primary) !important;
    color: #ffffff !important;
}

.text-\[var\(--lh-primary\)\] {
    color: var(--lh-primary) !important;
}

.text-\[var\(--lh-on-surface\)\] {
    color: var(--lh-on-surface) !important;
}

.bg-\[var\(--lh-surface-container-highest\)\] {
    background-color: var(--lh-surface-container-highest) !important;
}

/* Các Utility màu chuẩn của Tailwind */
.bg-zinc-900 {
    background-color: #18181b !important;
    color: #ffffff !important;
}

.text-white {
    color: #ffffff !important;
}

.text-zinc-400 {
    color: #a1a1aa !important;
}

.bg-white\/5 {
    background-color: rgba(255, 255, 255, 0.05) !important;
}

.bg-white\/10 {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

.bg-red-800\/20 {
    background-color: rgba(153, 27, 27, 0.2) !important;
}

.bg-blue-900\/20 {
    background-color: rgba(30, 58, 138, 0.2) !important;
}

.border-white\/10 {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

.text-white\/80 {
    color: rgba(255, 255, 255, 0.8) !important;
}

.bg-red-800 {
    background-color: #991b1b !important;
}

.hover\:bg-red-800:hover {
    background-color: #991b1b !important;
}

/* Sửa các vấn đề về nút bấm */
.bg-primary {
    background-color: var(--lh-primary) !important;
    color: white !important;
}

.text-primary {
    color: var(--lh-primary) !important;
}

.bg-primary-container {
    background-color: var(--lh-primary-container) !important;
}

.text-primary-container {
    color: var(--lh-primary-container) !important;
}

/* Grid gap khẩn cấp */
.gap-6 {
    gap: 1.5rem !important;
}

.gap-8 {
    gap: 2rem !important;
}

.mb-6 {
    margin-bottom: 1.5rem !important;
}

.mb-8 {
    margin-bottom: 2rem !important;
}

.mb-10 {
    margin-bottom: 2.5rem !important;
}

.text-on-surface {
    color: var(--lh-on-surface) !important;
}

.text-secondary {
    color: #52525b !important;
}

/* zinc-600 */
.bg-surface-container {
    background-color: var(--lh-surface) !important;
}

.bg-surface-container-low {
    background-color: var(--lh-surface-container-low) !important;
}

.bg-surface-container-lowest {
    background-color: var(--lh-surface-lowest) !important;
}

/* Các Background cho dark-mode */
.text-on-primary {
    color: #ffffff !important;
}

.text-on-primary-container {
    color: #ffffff !important;
}

/* Menu Sub-item Icon Hover Fix */
.group\/item:hover .group-hover\/item\:text-white {
    color: #ffffff !important;
}

.group\/item:hover .group-hover\/item\:bg-primary {
    background-color: var(--lh-primary) !important;
}

.group\/item:hover .group-hover\/item\:scale-110 {
    transform: scale(1.1);
}

/* =========================================================
   5. HERO SLIDER STYLES
   ========================================================= */
.hero-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    z-index: 1;
    transform: scale(1.05);
    transition: opacity 0.6s ease-in-out, transform 4s ease-out;
}

.hero-slide.active {
    opacity: 1;
    z-index: 2;
    transform: scale(1);
}

.material-symbols-outlined {
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    display: inline-block;
    vertical-align: middle;
}

/* Override line-height for large text columns on desktop */
@media (min-width: 1024px) {
    .lg\:text-5xl,
    .lg\:text-6xl {
        line-height: 1.2 !important;
    }
}

/* =========================================================
   6. LOCATION SECTION STYLES
   ========================================================= */
.location-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.location-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(170, 132, 83, 0.08);
    border-color: rgba(170, 132, 83, 0.4);
}

.location-highlight-card {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.location-highlight-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.2) 100%
    );
    transform: skewX(-25deg);
    transition: 0.75s;
}

.location-highlight-card:hover::before {
    left: 125%;
}

.location-highlight-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 25px 50px -12px rgba(170, 132, 83, 0.2);
}

.icon-bg-gray {
    background-color: #ededed !important;
}

.amenity-tag {
    transition: all 0.3s ease;
}
.amenity-tag:hover {
    color: #aa8453;
    background-color: rgba(170, 132, 83, 0.05);
    border-color: rgba(170, 132, 83, 0.2);
}

/* ------------------------------------------------------------
   NSS HOTEL: Infinite Marquee Slider cho hình ảnh
------------------------------------------------------------ */
@keyframes scrollX {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

.animate-scrollX {
    animation: scrollX 20s linear infinite;
}

/* Khi người dùng di chuột vào thì dừng lại để xem */
.animate-scrollX:hover,
.group:hover .animate-scrollX {
    animation-play-state: paused;
}

/* Làm mờ 2 bên viền để tạo hiệu ứng slider chuyên nghiệp */
.mask-edges {
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}
/* =========================================================
   7. CKEDITOR FIGURE & IMAGE ALIGNMENT FIXES
   ========================================================= */
.bodytext figure.image,
.prose figure {
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
    display: table;
}

.bodytext figure.image img,
.prose figure img {
    margin-left: auto;
    margin-right: auto;
    display: block;
    max-width: 100%;
    height: auto;
}

.bodytext figure.image figcaption,
.prose figure figcaption {
    display: table-caption;
    caption-side: bottom;
    text-align: center;
    padding-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--lh-secondary, #666);
}

/* Specific alignment classes from CKEditor */
.bodytext figure.image.image-style-align-left,
.bodytext figure.image.image-left {
    float: left;
    margin-right: 1.5rem;
    margin-left: 0;
}

.bodytext figure.image.image-style-align-right,
.bodytext figure.image.image-right {
    float: right;
    margin-left: 1.5rem;
    margin-right: 0;
}

.bodytext figure.image.image-style-align-center,
.bodytext figure.image.image-center {
    float: none;
    margin-left: auto;
    margin-right: auto;
    display: table;
}

/* Reset default browser margins for plain figures */
.bodytext figure, .prose figure {
    margin-inline-start: 0;
    margin-inline-end: 0;
}

/* =========================================================
/* =========================================================
   8. CSS-ONLY MASONRY GALLERY TABS
   ========================================================= */
.gallery-tabs-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 4rem;
}

.gallery-tab-label {
    background-color: #ffffff;
    color: #52525b;
    border: 1px solid rgba(0,0,0,0.05);
    padding: 0.5rem 1.5rem;
    border-radius: 9999px;
    cursor: pointer;
    font-weight: 400;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    text-align: center;
    user-select: none;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    display: inline-block;
}

.gallery-tab-label:hover {
    color: var(--lh-primary, #aa8453);
    border-color: var(--lh-primary, #aa8453);
}

.gallery-tab-label.active {
    background-color: var(--lh-primary, #f97316); /* Fallback to orange as in screenshot if variable missing */
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(249, 115, 22, 0.35);
}

.gallery-masonry {
    column-count: 1;
    column-gap: 1.5rem;
}
@media (min-width: 768px) {
    .gallery-masonry { column-count: 2; }
}
@media (min-width: 1024px) {
    .gallery-masonry { column-count: 3; }
}

.gallery-item {
    position: relative;
    border-radius: 32px; /* Very rounded corners like screenshot */
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    cursor: pointer;
    display: block;
    margin-bottom: 1.5rem;
    break-inside: avoid;
    animation: fadeInGalleryTab 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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



@keyframes fadeInGalleryTab {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}
/* Lightbox purely CSS */
.gallery-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-lightbox:target {
    display: flex;
    opacity: 1;
}

.gallery-lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    position: relative;
    z-index: 1;
}

.gallery-lightbox:target img {
    transform: scale(1);
}

.gallery-lightbox-close {
    position: absolute;
    inset: 0;
    cursor: zoom-out;
    width: 100%;
    height: 100%;
    display: block;
    color: transparent;
    user-select: none;
    z-index: 0;
}

.gallery-lightbox-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 32px;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    z-index: 2;
    background: rgba(0,0,0,0.5);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s;
}

.gallery-lightbox-close-btn:hover {
    background: rgba(0,0,0,0.9);
}
/* Lightbox Navigation Arrows */
.gallery-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 32px;
    text-decoration: none;
    z-index: 3;
    background: rgba(0,0,0,0.5);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s;
    user-select: none;
}
.gallery-lightbox-nav:hover {
    background: rgba(0,0,0,0.9);
}
.gallery-lightbox-nav.prev {
    left: 40px;
}
.gallery-lightbox-nav.next {
    right: 40px;
}

@media (max-width: 768px) {
    .gallery-lightbox-nav {
        width: 44px;
        height: 44px;
        font-size: 24px;
    }
    .gallery-lightbox-nav.prev {
        left: 10px;
    }
    .gallery-lightbox-nav.next {
        right: 10px;
    }
}

.title-hover:hover { color: var(--lh-primary, #aa8453) !important; }
