/* homepage-blocks.css — Styles for frontend homepage blocks */

/* ===== SWIPER SLIDER ===== */
.hp-swiper-container {
    width: 100%;
    aspect-ratio: 16/7;
    border-radius: 8px;
    overflow: hidden;
    background: transparent;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.hp-swiper-container .swiper-slide {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    background: transparent;
}

.hp-swiper-container .swiper-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Fallback contain for 3D Cards / PNGs */
.hp-swiper-container[data-layout="card_fan"] .swiper-slide img,
.hp-swiper-container[data-layout="stack_3d"] .swiper-slide img,
.hp-swiper-container[data-layout="cards_carousel"] .swiper-slide img,
.hp-swiper-container[data-layout="portrait_character"] .swiper-slide img {
    object-fit: contain;
    background: transparent;
}

.hp-swiper-container .hp-slide-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px 20px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
    color: #fff;
    font-family: var(--font-cinzel, serif);
    font-size: 16px;
    letter-spacing: 1px;
    z-index: 2;
    pointer-events: none;
}

/* Fix lỗi khung ảo do Gradient của Caption đối với ảnh PNG trong suốt */
.hp-swiper-container[data-layout="card_fan"] .hp-slide-caption,
.hp-swiper-container[data-layout="stack_3d"] .hp-slide-caption,
.hp-swiper-container[data-layout="cards_carousel"] .hp-slide-caption,
.hp-swiper-container[data-layout="portrait_character"] .hp-slide-caption {
    background: transparent;
    text-shadow: 0 2px 10px rgba(0,0,0,1), 0 0 5px rgba(0,0,0,0.8);
    font-size: 20px;
}

/* Custom Swiper Controls */
.hp-swiper-container .swiper-button-next,
.hp-swiper-container .swiper-button-prev {
    color: var(--gold-primary, #D4AF37);
    background: rgba(0, 0, 0, 0.5);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(212, 175, 55, 0.3);
    backdrop-filter: blur(4px);
    transition: all 0.3s;
}

.hp-swiper-container .swiper-button-next:after,
.hp-swiper-container .swiper-button-prev:after {
    font-size: 18px;
    font-weight: bold;
}

.hp-swiper-container .swiper-button-next:hover,
.hp-swiper-container .swiper-button-prev:hover {
    background: rgba(212, 175, 55, 0.3);
    border-color: var(--gold-primary);
}

.hp-swiper-container .swiper-pagination-bullet {
    background: rgba(255, 255, 255, 0.5);
    opacity: 1;
}

.hp-swiper-container .swiper-pagination-bullet-active {
    background: var(--gold-primary, #D4AF37);
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.5);
}

/* Adjustments for specific layouts if needed */
.hp-swiper-container[data-layout="hero_preview"] {
    overflow: visible; /* Allow next/prev slides to peek outside */
    border: none;
    box-shadow: none;
    border-radius: 0;
    background: transparent;
}
.hp-swiper-container[data-layout="hero_preview"] .swiper-slide {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.hp-swiper-container[data-layout="coverflow"],
.hp-swiper-container[data-layout="coverflow_3d"] {
    overflow: visible;
    border: none;
    box-shadow: none;
    background: transparent;
    padding-top: 20px;
    padding-bottom: 20px;
}
.hp-swiper-container[data-layout="coverflow"] .swiper-slide,
.hp-swiper-container[data-layout="coverflow_3d"] .swiper-slide {
    width: 70%; /* Give it an explicit width so auto works well */
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 25px rgba(0,0,0,0.8);
}

.hp-swiper-container[data-layout="card_fan"],
.hp-swiper-container[data-layout="stack_3d"] {
    overflow: visible;
    border: none;
    background: transparent;
    box-shadow: none;
    width: 300px; /* Cards look better boxed */
    height: 400px;
    aspect-ratio: auto;
    margin: 0 auto;
}
.hp-swiper-container[data-layout="cards_carousel"] .swiper-slide,
.hp-swiper-container[data-layout="card_fan"] .swiper-slide,
.hp-swiper-container[data-layout="stack_3d"] .swiper-slide {
    border-radius: 0;
    overflow: visible;
    background: transparent;
    box-shadow: none;
}

.hp-swiper-container[data-layout="cards_carousel"] {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 20px 0;
}
.hp-swiper-container[data-layout="cards_carousel"] .swiper-slide {
    width: 280px;
    opacity: 0.5;
    transition: transform 0.4s, opacity 0.4s;
    transform: scale(0.85);
    background: transparent;
}
.hp-swiper-container[data-layout="cards_carousel"] .swiper-slide-active {
    opacity: 1;
    transform: scale(1.05);
    box-shadow: none;
}

/* Portrait Poster */
.hp-swiper-container[data-layout="portrait_poster"] {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 30px 0;
}
.hp-swiper-container[data-layout="portrait_poster"] .swiper-slide {
    width: 260px;
    height: 380px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    background: #0a0a0a;
    transition: transform 0.4s ease, filter 0.4s ease;
    filter: brightness(0.6);
}
.hp-swiper-container[data-layout="portrait_poster"] .swiper-slide-active {
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(212,175,55,0.4);
    filter: brightness(1);
    z-index: 2;
}
.hp-swiper-container[data-layout="portrait_poster"] .swiper-slide img {
    object-fit: cover;
    width: 100%;
    height: 100%;
}
.hp-swiper-container[data-layout="portrait_poster"] .hp-slide-caption {
    background: linear-gradient(transparent, rgba(0,0,0,0.9));
    font-size: 18px;
    padding: 20px 15px;
    text-shadow: 0 2px 5px rgba(0,0,0,1);
}

/* Portrait Character */
.hp-swiper-container[data-layout="portrait_character"] {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 20px 0;
}
.hp-swiper-container[data-layout="portrait_character"] .swiper-slide {
    width: 280px;
    height: 420px;
    border-radius: 0;
    overflow: visible;
    background: transparent;
    box-shadow: none;
    transition: transform 0.4s ease, filter 0.4s ease, opacity 0.4s ease;
    opacity: 0.5;
    transform: scale(0.85);
}
.hp-swiper-container[data-layout="portrait_character"] .swiper-slide-active {
    opacity: 1;
    transform: scale(1.05);
    z-index: 2;
    box-shadow: none;
}

/* Panoramic */
.hp-swiper-container[data-layout="panoramic"] {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 20px 0;
}
.hp-swiper-container[data-layout="panoramic"] .swiper-slide {
    width: 60%;
    opacity: 0.5;
    filter: blur(4px);
    transition: opacity 0.4s, filter 0.4s, transform 0.4s;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.6);
    overflow: hidden;
}
.hp-swiper-container[data-layout="panoramic"] .swiper-slide-active {
    opacity: 1;
    filter: blur(0);
    transform: scale(1.05);
}

/* Fullscreen */
.hp-swiper-container[data-layout="fullscreen"] {
    border-radius: 0;
    border: none;
    box-shadow: none;
}

/* Ken Burns (Zoom slow) */
.hp-swiper-container[data-layout="ken_burns"] {
    border-radius: 8px;
    overflow: hidden;
}
.hp-swiper-container[data-layout="ken_burns"] .swiper-slide img {
    transition: transform 10s linear;
    transform: scale(1);
}
.hp-swiper-container[data-layout="ken_burns"] .swiper-slide-active img {
    transform: scale(1.15);
}

/* Fix mobile responsive sizes */
@media (max-width: 768px) {
    .hp-swiper-container {
        aspect-ratio: 16/10;
    }
    .hp-swiper-container[data-layout="coverflow"] .swiper-slide,
    .hp-swiper-container[data-layout="coverflow_3d"] .swiper-slide {
        width: 85%;
    }
    .hp-swiper-container[data-layout="panoramic"] .swiper-slide {
        width: 80%;
    }
    .hp-swiper-container[data-layout="card_fan"],
    .hp-swiper-container[data-layout="stack_3d"] {
        width: 260px;
        height: 350px;
    }
}

/* ===== FEATURE TABS ===== */
.hp-ftab-btn {
    padding: 8px 20px;
    border: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s;
    font-family: var(--font-sans);
    color: #aaa;
    background: transparent;
}

/* Pill style */
.hp-ftab-pill {
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hp-ftab-pill.active {
    background: linear-gradient(135deg, var(--gold-dark, #8A6327), var(--gold-primary, #D4AF37));
    color: #fff;
    border-color: var(--gold-primary);
    box-shadow: 0 4px 16px rgba(212, 175, 55, 0.3);
}

/* Underline style */
.hp-ftab-underline {
    border-bottom: 2px solid transparent;
    border-radius: 0;
    padding: 8px 16px;
}

.hp-ftab-underline.active {
    border-bottom-color: var(--gold-primary, #D4AF37);
    color: var(--gold-primary);
}

/* Boxed style */
.hp-ftab-boxed {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.3);
}

.hp-ftab-boxed.active {
    background: rgba(212, 175, 55, 0.15);
    border-color: var(--gold-primary);
    color: var(--gold-primary);
}

.hp-ftab-panel {
    animation: hpFadeIn 0.3s ease;
}

@keyframes hpFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

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

/* ===== GALLERY ===== */
.hp-gallery-grid {
    min-height: 100px;
}

.hp-gallery-item {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    transition: box-shadow 0.3s, transform 0.3s;
}

.hp-gallery-item:hover {
    box-shadow: 0 8px 32px rgba(212, 175, 55, 0.2);
}

/* ===== NOTICE ===== */
.hp-notice {
    transition: all 0.3s;
}

.hp-notice:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

/* ===== GENERAL ===== */
.hp-block {
    animation: hpBlockFadeIn 0.5s ease;
}

@keyframes hpBlockFadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

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

.hp-block:nth-child(2) {
    animation-delay: 0.1s;
}

.hp-block:nth-child(3) {
    animation-delay: 0.2s;
}

.hp-block:nth-child(4) {
    animation-delay: 0.3s;
}

.hp-block:nth-child(5) {
    animation-delay: 0.4s;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {

    /* Block header title: giảm từ 28px xuống cho mobile */
    .hp-block-header>div:first-child {
        font-size: 18px !important;
        letter-spacing: 1px !important;
    }

    .hp-block-header>div:last-child {
        font-size: 12px !important;
    }
}

/* ===== SLIDER LAYOUTS ===== */
/* ======================== */

/* 1. LAYOUT: COVERFLOW 3D */
/* Requires data-effect="slide" to work best */
.hp-slider-wrapper[data-layout="coverflow"],
.hp-slider-wrapper[data-layout="cards_carousel"] {
    background: transparent;
    border: none;
    box-shadow: none;
    overflow: visible;
    /* Let side cards bleed out a bit or keep hidden */
}

.hp-slider-wrapper[data-layout="coverflow"] {
    perspective: 1200px;
}

.hp-slider-wrapper[data-layout="coverflow"] .hp-slide {
    width: 60%;
    left: 20%;
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.6s, z-index 0s 0.3s;
    opacity: 0;
    z-index: 0;
}

/* Active (Center) */
.hp-slider-wrapper[data-layout="coverflow"] .hp-slide.active {
    transform: translateX(0) scale(1) translateZ(0);
    opacity: 1;
    z-index: 2;
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.6s, z-index 0s;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
}

/* Prev (Left) */
.hp-slider-wrapper[data-layout="coverflow"] .hp-slide.prev-slide {
    transform: translateX(-55%) scale(0.8) rotateY(25deg);
    opacity: 0.6;
    z-index: 1;
}

/* Next (Right) */
.hp-slider-wrapper[data-layout="coverflow"] .hp-slide.next-slide {
    transform: translateX(55%) scale(0.8) rotateY(-25deg);
    opacity: 0.6;
    z-index: 1;
}

/* 2. LAYOUT: CARDS CAROUSEL */
.hp-slider-wrapper[data-layout="cards_carousel"] .hp-slide {
    width: 33.333%;
    transition: transform 0.5s ease, opacity 0.5s;
    opacity: 0;
}

.hp-slider-wrapper[data-layout="cards_carousel"] .hp-slide.active {
    transform: translateX(100%);
    /* Center */
    opacity: 1;
    z-index: 2;
    transform-origin: center;
    transform: translateX(100%) scale(1.05);
    /* slightly bigger */
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.hp-slider-wrapper[data-layout="cards_carousel"] .hp-slide.prev-slide {
    transform: translateX(0%);
    /* Left */
    opacity: 0.5;
    z-index: 1;
}

.hp-slider-wrapper[data-layout="cards_carousel"] .hp-slide.next-slide {
    transform: translateX(200%);
    /* Right */
    opacity: 0.5;
    z-index: 1;
}

@media (max-width: 768px) {
    .hp-slider-wrapper[data-layout="cards_carousel"] .hp-slide {
        width: 70%;
        left: 15%;
    }

    .hp-slider-wrapper[data-layout="cards_carousel"] .hp-slide.active {
        transform: translateX(0) scale(1.1);
    }

    .hp-slider-wrapper[data-layout="cards_carousel"] .hp-slide.prev-slide {
        transform: translateX(-105%);
        opacity: 0.4;
    }

    .hp-slider-wrapper[data-layout="cards_carousel"] .hp-slide.next-slide {
        transform: translateX(105%);
        opacity: 0.4;
    }
}

/* 3. LAYOUT: HERO + PREVIEW */
.hp-slider-wrapper[data-layout="hero_preview"] .hp-slide {
    transition: all 0.5s ease;
}

.hp-slider-wrapper[data-layout="hero_preview"] .hp-slide.active {
    width: 75%;
    left: 0;
    opacity: 1;
    z-index: 2;
    transform: none !important;
}

/* Dùng class next-1, next-2 được JS gán */
.hp-slider-wrapper[data-layout="hero_preview"] .hp-slide.next-1 {
    width: 23%;
    height: 48%;
    left: 77%;
    top: 0;
    opacity: 0.8;
    z-index: 1;
    transform: none !important;
    border-radius: 4px;
}

.hp-slider-wrapper[data-layout="hero_preview"] .hp-slide.next-2 {
    width: 23%;
    height: 48%;
    left: 77%;
    top: 52%;
    opacity: 0.8;
    z-index: 1;
    transform: none !important;
    border-radius: 4px;
}

/* Ẩn caption trên ảnh nhỏ */
.hp-slider-wrapper[data-layout="hero_preview"] .hp-slide:not(.active) .hp-slide-caption {
    display: none;
}

/* ================================= */
/* ===== NEW NEWS LAYOUTS ========== */
/* ================================= */

/* --- 1. Grid Cards --- */
.news-layout-grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.nl-card {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.nl-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.5);
    border-color: rgba(212, 175, 55, 0.3);
}

.nl-thumb-wrap {
    position: relative;
    padding-top: 60%;
    overflow: hidden;
}

.nl-thumb {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s;
}

.nl-card:hover .nl-thumb {
    transform: scale(1.05);
}

.nl-cat-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(212, 175, 55, 0.9);
    color: #000;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    z-index: 2;
    text-transform: uppercase;
    max-width: calc(100% - 90px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nl-hot-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(220, 53, 69, 0.9);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    animation: pulse-hot 2s infinite;
    z-index: 2;
}



.nl-body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.nl-title {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px 0;
    line-height: 1.4;
    min-height: calc(1.4em * 2);
    /* Force 2 lines height */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.nl-card:hover .nl-title {
    color: var(--gold-primary, #D4AF37);
}

.nl-resume {
    font-size: 12px;
    /* reduced from 13px */
    color: #a3a3a3;
    margin: 0 0 12px 0;
    line-height: 1.5;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.nl-meta {
    font-size: 12px;
    color: #737373;
    font-weight: 500;
}

/* --- 2. Hero + List --- */
.news-layout-hero-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    height: auto;
    min-height: 400px;
}

.nl-hero {
    flex: 4;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    min-width: 300px;
    /* Force wrap if container < ~600px */
}

.nl-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s;
}

.nl-hero:hover .nl-hero-bg {
    transform: scale(1.05);
}

.nl-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.9) 100%);
}

.nl-hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px;
    z-index: 2;
}

.nl-hero-title {
    font-size: 26px;
    font-weight: 700;
    color: #fff;
    margin: 12px 0 8px 0;
    line-height: 1.3;
}

.nl-hero:hover .nl-hero-title {
    color: var(--gold-primary, #D4AF37);
}

.nl-hero-meta {
    font-size: 13px;
    color: #cbd5e1;
}

.nl-list-side {
    flex: 0 0 240px;
    width: 240px;
    display: flex;
    flex-direction: column;
    background: rgba(10, 10, 12, 0.85);
    border-radius: 12px;
    overflow: hidden;
    max-height: 400px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.nl-list-tabs {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(0, 0, 0, 0.2);
    overflow-x: auto;
    scrollbar-width: none;
}
.nl-list-tabs::-webkit-scrollbar {
    display: none;
}
.nl-list-tab-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}
.nl-list-tab-btn:hover {
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
}
.nl-list-tab-btn.active {
    background: var(--gold-primary, #D4AF37);
    color: #000;
    border-color: var(--gold-primary, #D4AF37);
}

.nl-list-scroll {
    overflow-y: auto;
    padding: 8px 0;
    height: 100%;
}

.nl-list-scroll::-webkit-scrollbar {
    width: 4px;
}

.nl-list-scroll::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.5);
    border-radius: 4px;
}

.nl-list-item {
    display: flex;
    gap: 16px;
    padding: 10px 16px;
    cursor: pointer;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
    transition: background 0.2s, padding-left 0.2s;
}

.nl-list-item:hover {
    background: rgba(212, 175, 55, 0.05);
    padding-left: 20px;
}

.nl-list-num {
    font-size: 20px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.2);
    line-height: 1.2;
    font-family: var(--font-cinzel, monospace);
    transition: color 0.3s, transform 0.3s;
}

.nl-list-item:hover .nl-list-num {
    color: var(--gold-primary, #D4AF37);
    transform: scale(1.1);
}

.nl-list-text {
    flex: 1;
}

.nl-list-title {
    font-size: 14px;
    font-weight: 700;
    color: #e2e8f0;
    margin: 0 0 4px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s;
}

.nl-list-item:hover .nl-list-title {
    color: #fff;
}

.nl-list-meta {
    font-size: 12px;
    color: #94a3b8;
}

.nl-hero-content .nl-hot-badge,
.nl-hero-content .nl-cat-badge {
    position: relative !important;
    display: inline-block !important;
    top: auto !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    margin: 0 !important;
    line-height: 1.5;
    vertical-align: middle;
}

/* --- 3. Simple List --- */
.news-layout-simple-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nl-simple-item {
    display: flex;
    align-items: center;
    background: rgba(10, 10, 12, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s, border-color 0.2s;
}

.nl-simple-item:hover {
    background: rgba(212, 175, 55, 0.08);
    border-color: rgba(212, 175, 55, 0.3);
    transform: translateY(-2px);
}

.nl-simple-body {
    flex: 1;
    padding-right: 20px;
}

.nl-simple-title {
    font-size: 17px;
    font-weight: 700;
    color: #e2e8f0;
    margin: 0 0 8px 0;
    line-height: 1.4;
    transition: color 0.2s;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.nl-simple-item:hover .nl-simple-title {
    color: var(--gold-primary, #D4AF37);
}

.nl-simple-meta {
    font-size: 12px;
    color: #94a3b8;
}

.nl-simple-thumb {
    width: 140px;
    height: 90px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    position: relative;
    flex-shrink: 0;
}

@media (max-width: 600px) {
    .nl-simple-item {
        flex-direction: column-reverse;
        align-items: flex-start;
        padding: 12px;
        gap: 12px;
    }
    .nl-simple-body {
        padding-right: 0;
        width: 100%;
    }
    .nl-simple-thumb {
        width: 100%;
        height: 160px;
    }
}

/* =======================================
   NHIỀU ẢNH (GALLERY) LAYOUTS (MỚI)
   ======================================= */
.hp-gallery-container {
    display: grid;
    gap: 12px;
}

.hp-gallery-item {
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    display: block;
    height: 100%;
    border: 1px solid rgba(212, 175, 55, 0.15);
}

.hp-gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.hp-gallery-item:hover .hp-gallery-image {
    transform: scale(1.08); /* Phóng ảnh mượt khi Hover */
}

/* 1. Grid Đều */
.hp-layout-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.hp-layout-grid .hp-gallery-item {
    aspect-ratio: 1 / 1;
}

/* 2. Masonry (Pinterest) */
.hp-layout-masonry {
    display: block; /* Trả quyền cho JS thả thả nổi Masonry hoặc dùng column css */
    column-count: 3;
    column-gap: 12px;
}
.hp-layout-masonry .hp-gallery-item {
    aspect-ratio: auto;
    margin-bottom: 12px;
    display: inline-block;
    width: 100%;
    height: auto;
}
.hp-layout-masonry .hp-gallery-image {
    height: auto;
}

/* 3. Mosaic A — 1 lớn + 2 nhỏ */
.hp-layout-mosaic_a {
    grid-template-columns: 2fr 1fr;
    grid-template-rows: repeat(2, 200px);
}
.hp-layout-mosaic_a .hp-gallery-item:first-child { grid-row: 1 / 3; } /* Cục to nhất kéo 2 dòng */

/* 4. Mosaic B — 1 lớn trên + 3 dưới */
.hp-layout-mosaic_b {
    grid-template-columns: repeat(3, 1fr);
}
.hp-layout-mosaic_b .hp-gallery-item {
    aspect-ratio: 1 / 1;
}
.hp-layout-mosaic_b .hp-gallery-item:first-child {
    grid-column: 1 / -1; /* Xoè ngang chiếm toàn bộ hàng trên */
    aspect-ratio: 21 / 9;
}

/* 5. Mosaic C — Xen kẽ */
.hp-layout-mosaic_c {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 150px;
    grid-auto-flow: dense;
}
.hp-layout-mosaic_c .hp-gallery-item:nth-child(4n + 1),
.hp-layout-mosaic_c .hp-gallery-item:nth-child(4n + 4) { 
    grid-column: span 2; 
    grid-row: span 2; 
}

/* 6. Featured + Grid */
.hp-layout-featured {
    grid-template-columns: 2.5fr 1fr 1fr;
    grid-auto-rows: 150px;
}
.hp-layout-featured .hp-gallery-item:first-child { grid-column: 1 / 2; grid-row: span 2; } 

/* 7. Bento Grid (Nhiều ô widget lạ) */
.hp-layout-bento {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 180px;
    grid-auto-flow: dense;
}
.hp-layout-bento .hp-gallery-item:nth-child(3n) {
    grid-column: span 2;
}
.hp-layout-bento .hp-gallery-item:nth-child(4n) {
    grid-row: span 2;
}

/* 8. Info Panel */
.hp-layout-info_panel {
    display: flex; /* Trải dài thành hàng giống thanh menu nằm ngang */
    gap: 8px;
    justify-content: center;
}
.hp-layout-info_panel .hp-gallery-item {
    flex: 1;
    aspect-ratio: 4 / 3;
    min-width: 180px;
}

/* 9. Collage */
.hp-layout-collage {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}
.hp-layout-collage .hp-gallery-item {
    border-radius: 50%; /* Collage hình tròn */
    width: 150px;
    height: 150px;
    flex-shrink: 0;
}

/* 10. Justified */
.hp-layout-justified {
    display: flex;
    flex-wrap: wrap;
}
.hp-layout-justified .hp-gallery-item {
    flex-grow: 1;
    height: 220px;
    aspect-ratio: auto; /* Xoá khung vuông */
}

/* MOBILE RESPONSIVE SỐ CỘT SỐ HOÁ CHUẨN */
@media (max-width: 768px) {
    .hp-layout-mosaic_a,
    .hp-layout-mosaic_b,
    .hp-layout-mosaic_c,
    .hp-layout-featured,
    .hp-layout-bento {
        grid-template-columns: repeat(2, 1fr); /* Ép về 2 cột trên điện thoại cho các Layout nâng cao */
        grid-auto-rows: auto;
    }
    
    .hp-layout-masonry {
        column-count: 2; /* 2 cột Pinterest */
    }

    /* Gỡ bỏ các thẻ span chéo chèn dòng trên mobile (Đưa về mặc định Grid 2 Cột Thẻ Vuông) */
    .hp-layout-mosaic_a .hp-gallery-item,
    .hp-layout-mosaic_b .hp-gallery-item,
    .hp-layout-mosaic_c .hp-gallery-item,
    .hp-layout-featured .hp-gallery-item,
    .hp-layout-bento .hp-gallery-item {
        grid-column: auto !important;
        grid-row: auto !important;
        aspect-ratio: 1 / 1; /* Reset tất cả về Ô vuông trên Mobile */
    }
    
    .hp-layout-info_panel { flex-wrap: wrap; }
    .hp-layout-info_panel .hp-gallery-item { min-width: 45%; }
}