/* assets/css/single.css - FINAL MERGED VERSION */

/* =========================================================
   1. LAYOUT & SIDEBAR FIX (CHỐNG RỚT DÒNG)
   ========================================================= */
.row-flex {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: flex-start;
}

.content-area {
    width: calc(70% - 20px);
    float: none;
}

.sidebar-right {
    width: calc(30% - 20px);
    float: none;
    position: sticky;
    top: 20px;
}

/* Mobile Responsive Layout */
@media (max-width: 900px) {
    .row-flex { flex-direction: column; gap: 30px; }
    .content-area, .sidebar-right { width: 100%; }
    .sidebar-right { position: static; }
}


/* =========================================================
   2. HERO HEADER CHUNG & HUY HIỆU
   ========================================================= */
.single-hero-header {
    position: relative; height: 50vh; min-height: 400px;
    display: flex; align-items: center; justify-content: center;
    text-align: center; color: #fff; margin-bottom: 50px; overflow: hidden;
}
.hero-image-wrapper { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; }
.hero-img { 
    width: 100%; height: 100%; object-fit: cover; 
    transition: transform 10s ease;
}
.single-hero-header:hover .hero-img { transform: scale(1.05); }

.hero-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(15,76,58,0.3), rgba(15,76,58,0.8));
}
.hero-content { position: relative; z-index: 2; max-width: 800px; }

.entry-title {
    font-family: 'Playfair Display', serif; font-size: 3.5rem; font-weight: 700;
    margin-bottom: 20px; text-shadow: 0 5px 15px rgba(0,0,0,0.3); line-height: 1.2;
}

/* HUY HIỆU SỐ & MÀU (LUCKY BADGES) */
.lucky-badges { display: flex; justify-content: center; gap: 20px; margin-bottom: 20px; }
.badge-item {
    background: rgba(255,255,255,0.1); backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.3); border-radius: 50px;
    padding: 8px 25px; display: flex; flex-direction: column; align-items: center;
    min-width: 120px; transition: 0.3s;
}
.badge-item:hover { background: #fff; transform: translateY(-5px); box-shadow: 0 10px 20px rgba(212, 175, 55, 0.4); }
.badge-item .lbl { font-size: 0.75rem; text-transform: uppercase; color: rgba(255,255,255,0.8); }
.badge-item:hover .lbl { color: #666; }
.badge-item .val { font-family: var(--title-font); font-size: 1.4rem; font-weight: 700; color: var(--gold-color); }
.badge-item:hover .val { color: var(--bg-dark); }


/* =========================================================
   3. STYLE: ĐÁ PHONG THỦY (GEMSTONE)
   ========================================================= */
.style-gemstone { background-color: #fdfcf8; }

.gemstone-info-box {
    background: #fff; border: 1px solid var(--gold-color); padding: 30px; margin-bottom: 40px; position: relative;
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.1);
}
.gemstone-info-box::after {
    content: ""; position: absolute; top: 5px; left: 5px; right: 5px; bottom: 5px;
    border: 1px solid rgba(212, 175, 55, 0.3); pointer-events: none;
}
.gemstone-info-box .box-title {
    font-family: var(--title-font); text-align: center; color: var(--bg-dark);
    font-size: 1.8rem; margin-top: 0; border-bottom: 2px solid #eee; padding-bottom: 15px;
}
.info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }

.style-gemstone .entry-content {
    font-family: 'Cormorant Garamond', serif; font-size: 1.3rem; color: #444; line-height: 1.9;
}
.style-gemstone .entry-content p:first-of-type::first-letter {
    font-size: 4rem; float: left; line-height: 0.8; padding-right: 10px; color: var(--gold-color); font-family: 'Playfair Display', serif;
}
.style-gemstone .entry-content img {
    width: 110%; margin-left: -5%; border-radius: 4px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1); margin: 40px 0;
}
.style-gemstone .entry-content h2 {
    text-align: center; color: var(--bg-dark); font-family: 'Playfair Display', serif;
    background-image: linear-gradient(to right, transparent, rgba(212, 175, 55, 0.2), transparent);
    padding: 10px 0; margin-top: 50px;
}


/* =========================================================
   4. STYLE: TẠP CHÍ (EDITORIAL)
   ========================================================= */
.style-editorial { background-color: #fff; }
.style-editorial .entry-content {
    font-family: var(--reading-font); font-size: 1.1rem; color: #333; line-height: 1.7;
}
.style-editorial .entry-content h2 {
    font-family: var(--title-font); font-size: 2rem; color: #000;
    border-left: 5px solid var(--gold-color); padding-left: 15px; margin-top: 40px;
}
.style-editorial .entry-content img {
    border-radius: 8px; width: 100%; height: auto; margin: 20px 0;
}


/* =========================================================
   5. STYLE: TỬ VI MÂY (CLOUD TRADITIONAL) - CÁI BẠN ĐANG THIẾU
   ========================================================= */
.style-cloud_traditional { background-color: #fcf8e3; }

/* Header Mây Gradient */
.cloud-hero-section {
    position: relative; padding: 80px 0 60px; text-align: center;
    background: linear-gradient(90deg, #2e8b73 0%, #f9eac4 50%, #2e8b73 100%);
    margin-bottom: 20px; overflow: hidden;
}
.cloud-bg::before, .cloud-bg::after {
    content: ""; position: absolute; bottom: -50px; 
    width: 300px; height: 150px; background: #fcf8e3; 
    border-radius: 50%; opacity: 0.8;
}
.cloud-bg::before { left: -50px; }
.cloud-bg::after { right: -50px; }

.cloud-hero-content { position: relative; z-index: 2; }
.cloud-title {
    font-family: 'Playfair Display', serif; font-size: 3.5rem; color: #0f4c3a; font-weight: 700;
    text-transform: uppercase; margin: 10px 0; text-shadow: 0 2px 0 rgba(255,255,255,0.5);
}
.cloud-hero-content .sub-title {
    font-family: 'Lato', sans-serif; font-size: 0.9rem; color: #0f4c3a; letter-spacing: 2px; text-transform: uppercase;
}
.cloud-breadcrumb {
    text-align: center; font-size: 0.85rem; color: #666; text-transform: uppercase; margin-bottom: 40px; letter-spacing: 1px;
}

/* Layout Giấy Trắng */
.style-cloud_traditional .content-area {
    background: #fff; padding: 40px; border-radius: 15px 15px 0 0;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.05); border-top: 4px solid var(--gold-color);
}
.cloud-featured-image img { width: 100%; height: auto; border-radius: 8px; margin-bottom: 30px; }

.style-cloud_traditional .entry-content h2 {
    font-family: 'Playfair Display', serif; font-size: 1.8rem; color: #0f4c3a;
    border-bottom: 1px solid #eee; padding-bottom: 10px; margin-top: 40px;
}
.style-cloud_traditional .entry-content p {
    font-family: 'Merriweather', serif; font-size: 1.1rem; line-height: 1.8; color: #333;
}

/* Sidebar Mục Lục */
.toc-widget { background: #fff; border: 1px solid #e0e0e0; padding: 25px; border-radius: 8px; }
.sticky-toc { position: sticky; top: 20px; }
.toc-title {
    font-family: var(--title-font); font-size: 1.2rem; border-bottom: 2px solid var(--gold-color); 
    display: inline-block; margin-bottom: 15px; padding-bottom: 5px;
}
#auto-toc-list { list-style: none; padding: 0; margin: 0; }
#auto-toc-list li { margin-bottom: 10px; }
#auto-toc-list li a { 
    text-decoration: none; color: #555; font-size: 0.95rem; transition: 0.3s; font-family: 'Lato', sans-serif;
}
#auto-toc-list li a:hover { color: var(--gold-color); padding-left: 5px; }
.toc-sub-item { margin-left: 15px; font-size: 0.9rem; border-left: 2px solid #eee; padding-left: 10px; }

/* RESPONSIVE CHUNG */
@media (max-width: 768px) {
    .single-hero-header { height: 40vh; }
    .entry-title, .cloud-title { font-size: 2.2rem; }
    .style-gemstone .entry-content img { width: 100%; margin-left: 0; }
    .info-grid { grid-template-columns: 1fr; }
    .style-cloud_traditional .content-area { padding: 20px; }
}

/* --- CSS CHO MỤC LỤC TRONG BÀI VIẾT --- */

.in-post-toc {
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 15px 20px;
    margin: 30px 0 40px;
    width: 100%;
    max-width: 600px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.toc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 700;
}

.toc-heading {
    font-family: var(--title-font, serif);
    font-size: 1.1rem;
    color: #333;
    text-transform: uppercase;
}

.toc-toggle {
    font-size: 0.9rem;
    color: #0073aa;
    font-family: sans-serif;
}

/* DANH SÁCH MỤC LỤC */
.toc-list {
    margin: 15px 0 0 0 !important;
    padding-left: 0 !important;
    list-style: none !important; /* Xóa dấu chấm */
    
    /* Hiệu ứng trượt */
    max-height: 2000px;
    opacity: 1;
    overflow: hidden;
    transition: all 0.5s ease;
}

/* Xóa dấu chấm cho từng dòng */
.toc-list li {
    list-style-type: none !important;
    margin-bottom: 8px;
}

.toc-list li a {
    text-decoration: none;
    color: #333;
    font-size: 0.95rem;
    border-bottom: 1px dashed #ccc;
}
.toc-list li a:hover { color: #d4af37; border-color: #d4af37; }

/* Thụt đầu dòng cho thẻ H3 */
.toc-sub { margin-left: 20px !important; }

/* TRẠNG THÁI ĐÓNG (COLLAPSED) */
.in-post-toc.collapsed .toc-list {
    max-height: 0;
    margin-top: 0 !important;
    opacity: 0;
    visibility: hidden;
}