/* --- Biến màu sắc chủ đạo --- */
:root {
    --tet-red: #D72638;       /* Đỏ rực rỡ truyền thống */
    --tet-red-dark: #A01A28;
    --tet-yellow: #FFD700;    /* Vàng hoa mai */
    --tet-green: #2E7D32;     /* Xanh lá đặc trưng bánh tét */
    --bg-light: #FFFDF5;      /* Nền trắng kem dịu mắt */
    --text-dark: #2F2F2F;
    --card-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

/* --- Thiết lập chung --- */
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Tahoma, sans-serif; }
html { scroll-behavior: smooth; }
body { background-color: var(--bg-light); color: var(--text-dark); line-height: 1.7; overflow-x: hidden; }

/* --- Thanh điều hướng --- */
header { 
    background: linear-gradient(135deg, var(--tet-red), var(--tet-red-dark)); 
    padding: 10px 0; 
    position: sticky; 
    top: 0; 
    z-index: 1000; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.15); 
}
nav { display: flex; justify-content: space-between; align-items: center; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.logo { 
    font-size: 1.6rem; font-weight: 800; color: var(--tet-yellow); 
    border: 2px solid var(--tet-yellow); padding: 5px 15px; border-radius: 8px;
    letter-spacing: 1px;
}
nav ul { list-style: none; display: flex; gap: 20px; }
nav ul li a { color: #fff; text-decoration: none; font-weight: 600; transition: 0.3s; padding: 5px 10px; border-radius: 5px; }
nav ul li a:hover { color: var(--tet-yellow); background: rgba(255,255,255,0.1); }

/* --- Banner (Hero Section) --- */
.hero {
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('./img/banner/banner.jpg');
    background-size: cover; background-position: center; height: 500px;
    display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; color: #fff;
}
.hero h1 { font-size: 4rem; text-shadow: 3px 3px 10px rgba(0,0,0,0.5); font-weight: 900; }
.hero p { background: var(--tet-green); padding: 10px 30px; border-radius: 50px; margin-top: 15px; font-size: 1.2rem; }

/* --- Cấu trúc Container --- */
.container { max-width: 1200px; margin: 60px auto; padding: 0 20px; }
.section-title { text-align: center; margin-bottom: 50px; }
.section-title h2 { 
    color: var(--tet-red); font-size: 2.5rem; 
    border-bottom: 4px solid var(--tet-yellow); 
    padding-bottom: 10px; display: inline-block;
}

/* --- Grid Hệ Thống (Mùng & Ẩm thực) --- */
.mung-grid, .cuisine-grid, .location-list { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 30px; 
}

.card, .mung-card, .location-card {
    background: #fff; border-radius: 20px; overflow: hidden;
    box-shadow: var(--card-shadow); transition: 0.4s ease;
    border: 1px solid rgba(0,0,0,0.05);
}
.card:hover, .mung-card:hover, .location-card:hover { transform: translateY(-10px); }

/* --- Album Ảnh --- */
.album-grid { 
    display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); 
    gap: 15px; margin-top: 30px; 
}
.album-item { border-radius: 12px; overflow: hidden; height: 250px; border: 4px solid #fff; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.album-item img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
.album-item:hover img { transform: scale(1.1); }

/* --- Bố cục Video (1 To - 2 Dọc) --- */
.video-layout { display: flex; gap: 20px; align-items: flex-start; margin-top: 30px; }
.main-video-wrapper { flex: 2; border-radius: 25px; overflow: hidden; border: 5px solid var(--tet-yellow); position: relative; background: #000; }
.video-container-16-9 { position: relative; padding-top: 56.25%; }
.video-container-16-9 iframe, .video-container-16-9 video { position: absolute; top:0; left:0; width:100%; height:100%; }

.tiktok-sidebar { flex: 1.2; display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.tiktok-card { background: #000; border-radius: 20px; overflow: hidden; border: 3px solid var(--tet-yellow); }
.tiktok-wrapper { position: relative; padding-top: 177.77%; } /* Tỉ lệ 9:16 cho video dọc */
.tiktok-wrapper video, .tiktok-wrapper iframe { position: absolute; top:0; left:0; width:100%; height:100%; object-fit: cover; }
.video-info { background: #000; color: var(--tet-yellow); text-align: center; padding: 12px; font-weight: bold; font-size: 0.9rem; }

/* --- Ẩm thực & Địa điểm --- */
.card img, .location-img img { width: 100%; height: 220px; object-fit: cover; }
.card-body, .location-content { padding: 25px; border-top: 5px solid var(--tet-red); }
.btn-map { 
    display: inline-block; margin-top: 15px; padding: 10px 20px; 
    background: var(--tet-green); color: white; border-radius: 8px; 
    text-decoration: none; font-weight: bold; transition: 0.3s;
}
.btn-map:hover { background: var(--tet-red); }

/* --- Lì xì Section --- */
.lixi-section {
    background: linear-gradient(rgba(215, 38, 56, 0.9), rgba(215, 38, 56, 0.9)), url('./img/lixi-bg.jpg');
    background-size: cover; color: white; padding: 60px 20px; 
    border-radius: 30px; margin-top: 50px; text-align: center;
    border: 4px dashed var(--tet-yellow);
}
.lixi-icon { font-size: 4rem; color: var(--tet-yellow); margin-bottom: 20px; animation: bounce 2s infinite; }

/* --- Footer --- */
footer { 
    background: #1a1a1a; color: #bbb; text-align: center; padding: 50px 20px; 
    margin-top: 80px; border-top: 8px solid var(--tet-yellow); 
}
footer strong { color: #fff; }

/* --- Hoa mai rơi --- */
.mai-petal { position: fixed; top: -20px; z-index: 9999; color: var(--tet-yellow); pointer-events: none; }

/* --- Mobile --- */
@media (max-width: 992px) {
    .video-layout { flex-direction: column; }
    .main-video-wrapper, .tiktok-sidebar { width: 100%; flex: none; }
    .hero h1 { font-size: 2.5rem; }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-20px);}
    60% {transform: translateY(-10px);}
}
/* Khung trò chơi chia đôi */
.game-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 30px;
}

.game-box {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid var(--tet-yellow);
    border-radius: 20px;
    padding: 20px;
    text-align: center;
    min-height: 400px;
    position: relative;
    transition: 0.3s;
}

/* Khu vực 10 bao lì xì */
.lixi-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-top: 20px;
}

.lixi-item {
    cursor: pointer;
    transition: 0.3s;
}

.lixi-item:hover { transform: scale(1.2) rotate(10deg); }

/* Khu vực Gieo Quẻ */
.que-container {
    margin-top: 20px;
}

.ong-xam {
    width: 120px;
    cursor: pointer;
    animation: swing 2s infinite ease-in-out;
}

@keyframes swing {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

.result-display {
    display: none;
    background: #fff;
    color: #333;
    padding: 15px;
    border-radius: 10px;
    margin-top: 15px;
    border-left: 5px solid var(--tet-red);
    animation: fadeIn 0.5s;
}

@keyframes fadeIn { from {opacity: 0;} to {opacity: 1;} }

@media (max-width: 768px) {
    .game-wrapper { grid-template-columns: 1fr; }
}
/* --- Bố cục lưới cho trang Liên hệ --- */
.contact-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr; /* Form rộng hơn phần thông tin một chút */
    gap: 40px;
    background: #fff;
    padding: 40px;
    border-radius: 25px;
    box-shadow: var(--card-shadow);
    border-top: 10px solid var(--tet-red); /* Viền đỏ đặc trưng Tết */
    margin-top: 20px;
}

/* --- Tùy chỉnh Form gửi tin --- */
#contactForm h3 {
    color: var(--tet-red);
    margin-bottom: 25px;
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

#contactForm label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-dark);
}

#contactForm input, 
#contactForm textarea {
    width: 100%;
    padding: 15px;
    margin-bottom: 25px;
    border: 2px solid #eee;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
    background: #fafafa;
}

/* Hiệu ứng khi người dùng nhập liệu */
#contactForm input:focus, 
#contactForm textarea:focus {
    border-color: var(--tet-green);
    background: #fff;
    box-shadow: 0 0 12px rgba(46, 125, 50, 0.15);
}

#contactForm button {
    background: linear-gradient(135deg, var(--tet-red), var(--tet-red-dark));
    color: white;
    padding: 18px;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: 0.4s ease;
    text-transform: uppercase;
    box-shadow: 0 5px 15px rgba(215, 38, 56, 0.3);
}

#contactForm button:hover {
    background: var(--tet-green);
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(46, 125, 50, 0.4);
}

/* --- Khối thông tin tác giả và Bản đồ --- */
.info-box {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.info-box h3 {
    color: var(--tet-green);
    border-left: 5px solid var(--tet-yellow);
    padding-left: 15px;
}

.author-details {
    background: var(--bg-cream);
    padding: 25px;
    border-radius: 15px;
    border: 1px dashed var(--tet-red);
}

.author-details p {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-details i {
    color: var(--tet-red);
    width: 20px;
}

/* Cấu trúc cho bản đồ nhúng */
.map-box {
    border-radius: 20px;
    overflow: hidden;
    border: 4px solid #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    height: 350px;
}

.map-box iframe {
    width: 100%;
    height: 100%;
    filter: grayscale(10%) contrast(110%); /* Tạo màu sắc bản đồ nghệ thuật hơn */
}

/* --- Phản hồi trên di động --- */
@media (max-width: 992px) {
    .contact-grid {
        grid-template-columns: 1fr; /* Chuyển thành 1 cột trên điện thoại */
        padding: 25px;
    }
    
    .map-box {
        height: 300px;
    }
}