/* ==================================
   BIẾN ĐỊNH HƯỚNG & THIẾT LẬP CHUNG
================================== */
:root {
    --red-gradient: linear-gradient(135deg, #A80010 0%, #66000A 100%);
    --gold: #D4AF37;
    --gold-light: rgba(212, 175, 55, 0.2);
    --gold-gradient: linear-gradient(135deg, #FFEAA7 0%, #D4AF37 100%);
    --glass: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.15);
    --dark: #1f1f1f;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'DM Sans', sans-serif;
    background-color: #f7f4eb;
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ==================================
   LOADING SCREEN & MUSIC BUTTON
================================== */
#loader {
    position: fixed;
    inset: 0;
    background: #540008;
    z-index: 100000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #fff;
    transition: opacity 0.6s ease;
}
.lotus-loader {
    width: 70px;
    height: 70px;
    border: 4px solid var(--gold-light);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 1s infinite linear;
    margin-bottom: 20px;
}
@keyframes spin { to { transform: rotate(360deg); } }

#musicBtn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 55px;
    height: 55px;
    border: 2px solid var(--gold);
    border-radius: 50%;
    background: var(--red-gradient);
    color: var(--gold);
    cursor: pointer;
    z-index: 9999;
    font-size: 1.1rem;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}
#musicBtn:hover { transform: scale(1.1); box-shadow: 0 8px 30px var(--gold); }

/* ==================================
   THANH ĐIỀU HƯỚNG HIỆN ĐẠI (NAVBAR)
================================== */
/* ==================================
   FIX HEADER KHÔNG BỊ RỚT CHỮ DOWN DÒNG
================================== */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 4%; /* Giảm bớt padding hai bên để tăng không gian trống */
    background: rgba(158, 2, 18, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid #D4AF37;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 9999;
}

.navbar .logo {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.4rem;
    font-weight: bold;
    color: #D4AF37;
    white-space: nowrap; /* Không cho logo rớt dòng */
    margin-right: 20px;
}

.navbar nav {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.navbar ul {
    display: flex;
    list-style: none;
    gap: 8px; /* Giảm khoảng cách giữa các mục menu */
    align-items: center;
    margin: 0;
    padding: 0;
}

.navbar a {
    text-decoration: none;
    color: #ffffff;
    font-size: 0.85rem; /* Thu nhỏ chữ lại một chút để vừa khít màn hình máy tính */
    font-weight: 500;
    padding: 6px 10px;
    border-radius: 4px;
    transition: all 0.3s ease;
    white-space: nowrap; /* Ép chữ luôn nằm trên một dòng duy nhất */
}

.navbar a:hover {
    color: #D4AF37;
    background: rgba(255, 255, 255, 0.08);
}

/* ==================================
   HERO SECTION & ĐỊNH VỊ TÂM HOA SEN CHUẨN XÁC
================================== */
#hero {
    min-height: 100vh;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(rgba(74, 0, 8, 0.8), rgba(41, 0, 4, 0.9)), url("images/hero-bg.jpg") center/cover;
    padding-top: 50px;
    overflow: hidden;
}
.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1250px;
    padding: 0 40px;
    z-index: 5;
    gap: 60px;
}
.hero-content { color: white; flex: 1; max-width: 550px; }
.hero-content h1 { font-size: 4.8rem; font-family: 'Cormorant Garamond', serif; color: var(--gold); line-height: 1.1;white-space: nowrap; }
.hero-content h2 { color: #ffffff; font-size: 1.8rem; letter-spacing: 2px; margin: 15px 0; font-weight: 400; }
.hero-content p { font-size: 1.2rem; font-style: italic; color: #f0f0f0; margin-bottom: 35px; min-height: 40px; border-left: 3px solid var(--gold); padding-left: 15px; }

/* ===================================================
   KHUNG NÚT BẮT ĐẦU HÀNH TRÌNH ĐỘC BẢN SANG TRỌNG
=================================================== */
.btn-start-journey {
    position: relative;
    display: inline-block;
    padding: 14px 38px;
    color: #FFFFFF;
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    background: rgba(84, 0, 8, 0.6); /* Nền đỏ thẫm trong suốt quý phái */
    backdrop-filter: blur(5px);
    border-radius: 30px; /* Bo góc mượt mà */
    overflow: hidden;
    transition: all 0.4s ease;
    border: 1px solid rgba(212, 175, 55, 0.4); /* Viền vàng gold tinh tế nhạt */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Hiệu ứng viền phát sáng nhẹ quanh khung nút */
.btn-start-journey::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.2), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

/* Tương tác khi di chuột vào nút */
.btn-start-journey:hover {
    color: #540008;
    background: linear-gradient(135deg, #FFEAA7 0%, #D4AF37 100%); /* Đổi sang nền vàng hoàng gia */
    border-color: #D4AF37;
    box-shadow: 0 6px 25px rgba(212, 175, 55, 0.5);
    transform: translateY(-3px);
}

.btn-start-journey:hover ::before {
    transform: translateX(100%);
}

.btn-start-journey i {
    margin-left: 8px;
    font-size: 0.95rem;
    transition: transform 0.3s ease;
}
.btn-start-journey:hover i {
    transform: translateX(5px); /* Mũi tên dịch chuyển động */
}

.quote-text {
    /* Đảm bảo không có thuộc tính letter-spacing âm */
    letter-spacing: normal; 
    
    /* Đảm bảo từ ngữ được phép xuống dòng nếu khung quá hẹp */
    white-space: normal;
    
    /* Khoảng cách giữa các từ */
    word-spacing: 2px; 
    
    /* Đảm bảo văn bản hiển thị bình thường */
    display: block; 
}
/* ===================================================
   KIẾN TRÚC BÔNG HOA NGUYÊN KHỐI XOAY TÂM CHUẨN MỸ THUẬT
=================================================== */
.lotus-menu-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 580px;
    position: relative;
}

/* Khung tròn giữ móng cho hoa */
.lotus-menu {
    position: relative;
    width: 480px;
    height: 480px;
}
/* Thêm hiệu ứng nở và hiện dần cho khung chứa hoa sen */
.lotus-menu {
    position: relative;
    width: 500px;
    height: 500px;
    
    /* Gọi hiệu ứng tên là "hoaSenNo", kéo dài trong 2.5 giây, chuyển động mượt mà */
    animation: hoaSenNo 2.5s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
    opacity: 0; /* Ban đầu ẩn đi để nở dần lên */
}

/* Kịch bản chuyển động: Từ nhỏ ẩn chuyển sang nở to rực rỡ */
@keyframes hoaSenNo {
    0% {
        transform: scale(0.3) rotate(-15deg); /* Thu nhỏ bằng 30% và hơi nghiêng nhẹ */
        opacity: 0;                          /* Ẩn hoàn toàn */
        filter: blur(5px);                   /* Hơi mờ mộng mị */
    }
    50% {
        opacity: 0.5;
    }
    100% {
        transform: scale(1) rotate(0deg);    /* Nở về đúng kích thước chuẩn 100% */
        opacity: 1;                          /* Hiện rõ hoàn toàn */
        filter: blur(0);                     /* Sắc nét tuyệt đối */
    }
}

/* ẢNH BÁC HÌNH OVAL CHÍNH TÂM TRÊN CÙNG ĐÈ LÊN CHÂN CÁNH HOA */
.center-oval-avatar {
    position: absolute;
    width: 180px;
    height: 130px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #D4AF37;
    z-index: 50; /* Đè lên các chân cánh hoa */
    box-shadow: 0 0 35px rgba(212, 175, 55, 0.7);
    background: #fff;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
.center-oval-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ĐỊNH PHOM CHUNG CHO TẤT CẢ 8 CÁNH HOA SEN (ĐỒNG DẠNG TUYỆT ĐỐI) */
.lotus-petal {
    position: absolute;
    width: 125px;
    height: 185px; /* Chiều dài thon để đâm sâu chân vào tâm */
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: filter 0.3s ease, transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    
    /* GỐC CỐT LÕI: Ép toàn bộ cánh hoa quy chung một điểm gốc ở chính giữa đáy */
    transform-origin: center 100%;
    
    /* Đặt tất cả nằm chồng khít lên nhau ở giữa tâm trước khi xoay phát tán */
    top: 50%;
    left: 50%;
    margin-top: -185px; /* Kéo trục lên bằng đúng chiều cao cánh */
    margin-left: -62.5px; /* Kéo trục sang bằng nửa chiều rộng cánh */
}

/* Đồ họa đường cong của cánh hoa */
.lotus-petal svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* CHỮ TRÊN CÁNH HOA: LUÔN THẲNG ĐỨNG, PHẲNG LẶNG ĐÁP ỨNG MẮT NHÌN */
.lotus-petal span {
    position: absolute;
    font-weight: bold;
    font-size: 0.95rem;
    color: #ffffff;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.9);
    text-align: center;
    white-space: nowrap;
    z-index: 60;
    width: 100%;
    left: 0;
    top: 60px; /* Nằm ngay trung tâm phần bầu của cánh hoa */
}

/* MÀU SẮC LỚP CÁNH TRƯỚC (Nổi bật, viền vàng óng) */
.front-layer { z-index: 30; }
.front-layer svg path {
    fill: rgba(255, 150, 170, 0.8); /* Màu hồng sen tươi trong suốt nhẹ */
    stroke: #D4AF37;
    stroke-width: 2;
}

/* MÀU SẮC LỚP CÁNH SAU (Hơi thẫm và to nhẹ, xếp so le đằng sau tạo chiều sâu) */
.back-layer { z-index: 20; }
.back-layer svg path {
    fill: rgba(200, 80, 100, 0.75); /* Hồng đậm hơn để tạo khối đổ bóng */
    stroke: rgba(212, 175, 55, 0.6);
    stroke-width: 1.5;
}

/* HIỆU ỨNG DI CHUỘT: Cánh hoa rực lên màu đỏ nhung cung đình */
.lotus-petal:hover {
    z-index: 100 !important;
}
.lotus-petal:hover svg path {
    fill: linear-gradient(to top, #540008, #A80010);
    stroke: #FFEAA7;
    stroke-width: 2.5;
    filter: drop-shadow(0 0 12px rgba(212, 175, 55, 0.9));
}
.lotus-petal:hover span {
    color: #FFEAA7;
}


/* ===================================================
   HỆ THỐNG PHÂN BỔ GÓC XOAY 360 ĐỘ KHÔNG LỆCH 1 LI
=================================================== */

/* --- Nhóm cánh trước (Thẳng góc) --- */
.petal-1 { transform: rotate(0deg); }
.petal-1 span { transform: rotate(0deg); }

.petal-3 { transform: rotate(90deg); }
.petal-3 span { transform: rotate(-90deg); } /* Lật ngược góc cánh để chữ đứng thẳng */

.petal-5 { transform: rotate(180deg); }
.petal-5 span { transform: rotate(-180deg); }

.petal-7 { transform: rotate(270deg); }
.petal-7 span { transform: rotate(-270deg); }


/* --- Nhóm cánh sau (Góc chéo so le lấp kín khoảng trống) --- */
/* Cánh lớp sau nhân tỉ lệ scale(1.15) để nhô cao, dàn trải to rõ ràng hơn cánh trước */
.petal-2 { transform: rotate(45deg) scale(1.15); }
.petal-2 span { transform: rotate(-45deg) scale(0.87); }

.petal-4 { transform: rotate(135deg) scale(1.15); }
.petal-4 span { transform: rotate(-135deg) scale(0.87); }

.petal-6 { transform: rotate(225deg) scale(1.15); }
.petal-6 span { transform: rotate(-225deg) scale(0.87); }

.petal-8 { transform: rotate(315deg) scale(1.15); }
.petal-8 span { transform: rotate(-315deg) scale(0.87); }


/* --- HOVER ANIMATION: Giữ nguyên trục xoay gốc, phóng nhẹ cánh hoa lên mượt mà --- */
.petal-1:hover { transform: rotate(0deg) scale(1.1); }
.petal-3:hover { transform: rotate(90deg) scale(1.1); }
.petal-5:hover { transform: rotate(180deg) scale(1.1); }
.petal-7:hover { transform: rotate(270deg) scale(1.1); }

.petal-2:hover { transform: rotate(45deg) scale(1.22); }
.petal-4:hover { transform: rotate(135deg) scale(1.22); }
.petal-6:hover { transform: rotate(225deg) scale(1.22); }
.petal-8:hover { transform: rotate(315deg) scale(1.22); }

/* ẢNH BÁC HÌNH BẦU DỤC (OVAL) NẰM GIỮA TRUNG TÂM ĐÈ LÊN HOA SEN */
.center-oval-avatar {
    position: absolute;
    width: 190px;
    height: 135px; /* Chiều rộng lớn hơn chiều cao tạo hình bầu dục chuẩn mắt */
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #D4AF37;
    z-index: 80; /* Nằm trên các cánh nhưng dưới cánh đang được hover */
    box-shadow: 0 0 35px rgba(212, 175, 55, 0.7);
    background: #fff;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
.center-oval-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ==================================
   CÁC PHÂN ĐOẠN NỘI DUNG (SECTIONS)
================================== */
section { padding: 50px 10%; }
.section-title { text-align: center; margin-bottom: 50px; }
.section-title h2 { font-size: 2.5rem; color: #540008; font-family: 'Cormorant Garamond', serif; font-weight: 700; }
.section-title h2::after { content: ''; width: 80px; height: 3px; background: var(--gold); display: block; margin: 12px auto 0; }

/* TIMELINE (DANH MỤC 1) */
.timeline-container { position: relative; max-width: 900px; margin: auto; }
.timeline-container::before { content: ''; position: absolute; left: 50%; width: 2px; height: 100%; background: var(--gold); transform: translateX(-50%); }
.timeline-item { width: 45%; background: white; padding: 25px; margin-bottom: 35px; border-radius: 12px; box-shadow: 0 5px 20px rgba(0,0,0,0.04); position: relative; cursor: pointer; transition: 0.3s; border-top: 3px solid #540008; }
.timeline-item:hover { transform: translateY(-5px); box-shadow: 0 8px 25px rgba(84,0,8,0.1); }
.timeline-item:nth-child(even) { margin-left: auto; }
.timeline-item::after { content: ''; position: absolute; width: 14px; height: 14px; border-radius: 50%; background: var(--gold); border: 3px solid white; top: 28px; z-index: 2; }
.timeline-item:nth-child(odd)::after { right: -31px; }
.timeline-item:nth-child(even)::after { left: -31px; }

/* GRID BỐ CỤC PANEL CHUNG */
.card-grid, .gallery, .letters, .map-container, .quiz-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 25px; }
.card, .gallery-item, .letter-card, .map-point, .quiz-card { background: white; padding: 30px 20px; border-radius: 12px; text-align: center; box-shadow: 0 6px 20px rgba(0,0,0,0.03); transition: 0.3s; cursor: pointer; border: 1px solid #eaeaea; }
.card:hover, .letter-card:hover, .map-point:hover, .quiz-card:hover, .gallery-item:hover { transform: translateY(-8px); border-color: var(--gold); box-shadow: 0 12px 25px rgba(84,0,8,0.08); }
.card i, .letter-card i { font-size: 2.2rem; color: #540008; margin-bottom: 15px; }

/* TÁC GIẢ PHỤ TRÁCH KHU VỰC (ROLE FOOTER) */
.role-author-tag { margin-top: 25px; text-align: right; font-size: 0.85rem; font-weight: bold; color: #777; border-top: 1px dashed #ddd; padding-top: 10px; text-transform: uppercase; letter-spacing: 0.5px; }

/* CÁNH SEN DANH MỤC 3 */
.lotus-legacy { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; }
.petal { background: white; border: 2px solid #540008; padding: 35px 25px; text-align: center; border-radius: 40px 0 40px 0; font-weight: bold; color: #540008; cursor: pointer; transition: 0.3s; min-width: 160px; }
.petal:hover { background: var(--red-gradient); color: var(--gold); border-color: var(--gold); transform: scale(1.05); }

/* THƯ VIỆN ẢNH TƯ LIỆU */
.gallery-item img { width: 100%; border-radius: 8px; margin-bottom: 12px; height: 160px; object-fit: cover; }
.gallery-item p { font-weight: 600; color: #540008; font-size: 0.95rem; }

/* BẢN ĐỒ & TRÒ CHƠI */
.map-point, .quiz-card { font-weight: bold; color: #540008; display: flex; justify-content: center; align-items: center; min-height: 100px; }
.map-point:hover, .quiz-card:hover { background: var(--red-gradient); color: white; }
/* TƯ LIỆU */
.gallery-item {
    background: white;
    padding: 35px 20px;
    border-radius: 14px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0,0,0,0.03);
    cursor: pointer;
    border: 1px solid #eaeaea;
    border-top: 4px solid #540008; /* Vạch đỏ sang trọng ở đỉnh ô */
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.gallery-item {
    /* Bo góc chéo: góc trên bên trái và dưới bên phải bo tròn sâu */
    border-radius: 35px 0 35px 0; 
    border: 2px solid #540008;
    background: #ffffff;
}
.gallery-item:hover {
    border-radius: 0 35px 0 35px; /* Đảo ngược góc bo khi hover tạo độ uyển chuyển */
    background: #fffbf2; /* Nền ngả vàng nhẹ quý phái */
}
.gallery-item {
    background: white;
    padding: 35px 20px;
    border-radius: 12px;
    border: 1px solid #D4AF37; /* Viền vàng mảnh sang trọng sẵn */
    transition: all 0.3s ease;
}

.gallery-item:hover {
    background: var(--red-gradient); /* Đổi sang màu đỏ gradient của bạn */
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.3);
    border-color: var(--gold);
}

/* Đổi màu toàn bộ chữ và icon bên trong sang vàng hoàng gia khi hover */
.gallery-item:hover h3,
.gallery-item:hover .gallery-icon i,
.gallery-item:hover .explore-txt {
    color: var(--gold) !important;
}
/* Hiệu ứng khi di chuột vào ô */
.gallery-item:hover {
    transform: translateY(-10px);
    border-color: var(--gold);
    box-shadow: 0 15px 30px rgba(84,0,8,0.12);
}

.gallery-icon i {
    font-size: 2.4rem;
    color: #540008;
    margin-bottom: 15px;
    transition: transform 0.3s ease, color 0.3s ease;
}

.gallery-item:hover .gallery-icon i {
    transform: scale(1.15) rotate(5deg);
    color: var(--gold); /* Đổi icon sang màu vàng khi hover */
}

.gallery-item h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: #540008;
    margin-bottom: 12px;
}

/* Chữ "Khám phá" ẩn đi, xuất hiện mượt mà khi di chuột */
.gallery-item .explore-txt {
    font-size: 0.75rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.gallery-item:hover .explore-txt {
    opacity: 1;
    transform: translateY(0);
    color: var(--gold);
}
.gallery {
    display: grid;
    /* Chia làm 3 cột bằng nhau, mỗi cột chiếm 1 phần không gian */
    grid-template-columns: repeat(3, 1fr); 
    /* Khoảng cách giữa các ô */
    gap: 20px; 
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Đảm bảo các item con trong gallery đều nhau */
.gallery-item {
    background: #fdfdfd;
    border: 1px solid #D4AF37;
    padding: 20px;
    text-align: center;
    border-radius: 10px;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
/* Bọc toàn bộ header để đảm bảo thứ tự từ trên xuống */
.site-header {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Đảm bảo navbar chiếm đúng không gian */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #990000; /* Màu nền đỏ của bạn */
    padding: 15px 20px;
    width: 100%;
    position: relative; /* Đổi từ fixed/absolute sang relative */
}

/* Khối trải nghiệm số nằm ngay dưới */
.experience-header {
    width: 100%;
    background-color: #fcf8e3; /* Màu nền nhạt */
    padding: 20px 0;
    margin-top: 0; /* Đảm bảo không bị âm margin */
}
/*Tùy chỉnh cho bản đồ */
/* Làm bản đồ luôn tràn viền khung chứa */
.map-wrapper svg {
    width: 100%;
    height: auto;
    display: block;
}

/* Hiệu ứng khi di chuột vào các vùng trên bản đồ */
.map-region {
    fill: #dcdcdc; /* Màu mặc định */
    stroke: #fff;  /* Màu đường viền */
    stroke-width: 1;
    transition: all 0.3s ease;
    cursor: pointer;
}

.map-region:hover {
    fill: #D4AF37; /* Màu vàng Gold khi di chuột vào */
}
/* Tùy chỉnh cho điện thoại (tự động chuyển về 1 hoặc 2 cột) */
@media (max-width: 768px) {
    .gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}
/* ==================================
   HỘP THOẠI POPUP (MODAL WINDOW)
================================== */
.modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.65); z-index: 99999; backdrop-filter: blur(4px); }
.modal-content { width: 90%; max-width: 600px; background: white; margin: 8% auto; padding: 35px; border-radius: 16px; position: relative; box-shadow: 0 15px 40px rgba(0,0,0,0.2); animation: modalShow 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
@keyframes modalShow { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
.close-modal { position: absolute; right: 20px; top: 15px; font-size: 1.8rem; cursor: pointer; color: #999; }
.close-modal:hover { color: #540008; }
.modal-content h2 { color: #540008; border-bottom: 2px solid var(--gold); padding-bottom: 10px; margin-bottom: 20px; font-family: 'Cormorant Garamond', serif; font-size: 1.8rem; }
.modal-inner-desc { font-size: 1.05rem; color: #444; line-height: 1.7; }
/* Cấu hình vùng chứa video để có thanh cuộn */
#modalVideo {
    max-height: 400px; /* Chiều cao tối đa của vùng chứa video */
    overflow-y: auto;  /* Tự động hiện thanh cuộn dọc nếu nội dung dài hơn 400px */
    padding: 10px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
}
/* 1. Modal Content: Chỉ để overflow-y: auto ở đây để toàn bộ nội dung cuộn */
.modal-content {
    background: white;
    padding: 20px;
    width: 90%; 
    max-width: 700px;
    max-height: 80vh; /* Giới hạn chiều cao tổng thể */
    overflow-y: auto; /* Thanh cuộn duy nhất nằm ở đây */
    border-radius: 10px;
    position: relative;
    margin: 5% auto;
}

/* 2. Các container con: Bỏ overflow và để chiều cao tự động theo nội dung */
#videoContainer, #pdfContainer {
    width: 100%;
    margin-top: 15px;
    display: block; /* Đảm bảo luôn hiển thị khi cần */
}

/* 3. Iframe: Để tự động theo tỷ lệ hoặc kích thước cố định */
iframe {
    width: 100%;
    height: 350px; 
    border: none;
    display: block;
}
/* Đảm bảo vùng chứa video không tự tạo thanh cuộn */
#modalVideo {
    display: block; /* Hoặc flex */
    width: 100%;
    margin-top: 15px;
    overflow: visible !important; /* Quan trọng: Ghi đè bất kỳ thuộc tính overflow nào trước đó */
    max-height: none !important;  /* Quan trọng: Bỏ giới hạn chiều cao cho vùng video */
}

/* Đảm bảo iframe không gây ra thanh cuộn thừa */
#modalVideo iframe {
    display: block;
    width: 100%;
    margin-bottom: 15px;
    border: none;
}
/*DẤU CHÂN NGƯỜI */
.video-hero-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05); /* Hiệu ứng kính mờ nhẹ */
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* Tỉ lệ 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: 10px;
}

.video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-description {
    text-align: center;
    margin-top: 15px;
    font-family: 'Cormorant Garamond', serif;
    color: #e0d0a0; /* Màu vàng kim loại */
    font-size: 1.2rem;
    font-style: italic;
}
/*HỒN THIÊNG DÂN TỘC */
/* Modal Glassmorphism */
.modal {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.85); z-index: 9999;
    backdrop-filter: blur(5px);
    justify-content: center; align-items: center;
}
.modal-content {
    background: #fdfaf6; width: 90%; max-width: 800px;
    padding: 30px; border-radius: 20px;
    position: relative; border: 2px solid #D4AF37;
}
.close-btn { 
    position: absolute; right: 20px; top: 10px; 
    font-size: 30px; cursor: pointer; color: #A80010; 
}
.modal-body video { width: 100%; border-radius: 10px; margin-bottom: 15px; }
.btn-pdf { 
    display: inline-block; padding: 12px 25px; background: #A80010; 
    color: white; text-decoration: none; border-radius: 5px; margin-top: 10px;
}

/* TRẮC NGHIỆM FORM */
.quiz-question { margin-bottom: 18px; }
.quiz-question h3 { color: #540008; margin-bottom: 8px; font-size: 1rem; }
.quiz-question label { display: block; margin: 6px 0; cursor: pointer; font-size: 0.95rem; background: #f9f9f9; padding: 8px 12px; border-radius: 6px; border: 1px solid #eee; transition: 0.2s; }
.quiz-question label:hover { background: #fff6f7; border-color: rgba(84,0,8,0.2); }
#submitQuiz { background: var(--red-gradient); color: white; border: none; padding: 12px 35px; border-radius: 25px; cursor: pointer; font-weight: bold; margin-top: 15px; width: 100%; box-shadow: 0 4px 15px rgba(84,0,8,0.2); }

/* HIỆU ỨNG ĐỘNG */
.fade-up { opacity: 0; transform: translateY(30px); transition: all 0.5s ease-out; }
.fade-up.show { opacity: 1; transform: translateY(0); }

/* CHÂN TRANG */
footer { background: #3a0005; color: rgba(255,255,255,0.8); text-align: center; padding: 45px 20px; border-top: 3px solid var(--gold); }
footer h3 { color: var(--gold); font-family: 'Cormorant Garamond', serif; font-size: 1.6rem; margin-bottom: 5px; }
footer .team-summary { max-width: 800px; margin: 15px auto 0; font-size: 0.85rem; color: #ccc; line-height: 1.6; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 15px; }

/* ==================================
   THIẾT BỊ DI ĐỘNG & MÁY TÍNH BẢNG
================================== */
@media(max-width: 992px) {
    .hero-container { flex-direction: column; text-align: center; gap: 40px; }
    .hero-content { text-align: center; }
    .hero-content p { border-left: none; padding-left: 0; }
    .lotus-menu-wrapper { min-height: 450px; }
    .lotus-menu { width: 400px; height: 400px; }
    .center-circle { width: 120px; height: 120px; }
    .lotus-petal { width: 95px; height: 95px; font-size: 0.75rem; padding: 8px; }
    .petal1 { transform: rotate(0deg) translate(145px) rotate(-45deg); }
    .petal2 { transform: rotate(45deg) translate(145px) rotate(-45deg); }
    .petal3 { transform: rotate(90deg) translate(145px) rotate(-45deg); }
    .petal4 { transform: rotate(135deg) translate(145px) rotate(-45deg); }
    .petal5 { transform: rotate(180deg) translate(145px) rotate(-45deg); }
    .petal6 { transform: rotate(225deg) translate(145px) rotate(-45deg); }
    .petal7 { transform: rotate(270deg) translate(145px) rotate(-45deg); }
    .petal8 { transform: rotate(315deg) translate(145px) rotate(-45deg); }
}

@media(max-width: 768px) {
    .navbar { flex-direction: column; padding: 12px; gap: 8px; }
    .navbar ul { gap: 5px; flex-wrap: wrap; justify-content: center; }
    .navbar a { font-size: 0.8rem; padding: 4px 8px; }
    .timeline-container::before { display: none; }
    .timeline-item { width: 100%; margin-left: 0 !important; }
    .timeline-item::after { display: none; }
    .hero-content h1 { font-size: 3.2rem; }
    section { padding: 60px 5%; }
}