html {
    scroll-behavior: smooth; /* Tạo hiệu ứng cuộn trượt mượt mà */
}

/* Khai báo các biến màu sắc tĩnh */
:root {
    --primary-green: #56ab2f; 
    --light-green: #a8e063;  
    --dark-green: #2d5a18;
    --bg-light: #f4fcf4;     
    --text-dark: #1a1a1a;
    --white: #ffffff;
}

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

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* --- CSS THUẦN VẼ LÁ CÂY --- */
.leaf {
    position: absolute;
    background: linear-gradient(135deg, var(--light-green) 0%, var(--primary-green) 100%);
    border-radius: 0 100% 0 100%; 
    box-shadow: 2px 5px 10px rgba(0,0,0,0.05);
    z-index: 0;
    opacity: 0.8;
    animation: float 6s ease-in-out infinite;
}

.leaf::after { 
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-bottom: 1px solid rgba(255,255,255,0.3);
    transform: rotate(-45deg);
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(15deg); }
    50% { transform: translateY(-20px) rotate(25deg); }
}
/* --------------------------- */

/* Header (Glassmorphism) */
header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    padding: 1rem 5%;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
}

nav { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}

.logo { 
    font-size: 1.8rem; 
    font-weight: 900; 
    color: var(--dark-green); 
    text-transform: uppercase; 
    text-decoration: none; /* BỔ SUNG: Xóa dấu gạch chân mặc định của thẻ liên kết */
}
.logo span { 
    color: var(--primary-green); 
}

nav ul { 
    display: flex; 
    list-style: none; 
}
nav ul li a {
    color: var(--text-dark);
    text-decoration: none;
    margin-left: 25px;
    font-weight: bold;
    transition: 0.3s;
}
nav ul li a:hover { 
    color: var(--primary-green); 
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 100px;
    position: relative;
    background: radial-gradient(circle at center, #ffffff 0%, var(--bg-light) 100%);
    overflow: hidden;
}

.hero-content {
    z-index: 1; 
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 0 20px;
}

.main-img {
    max-width: 700px;
    width: 100%;
    margin-bottom: 20px;
    filter: drop-shadow(0 15px 25px rgba(86, 171, 47, 0.2));
    transition: transform 0.3s ease;
}

.main-img:hover { 
    transform: scale(1.02); 
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 4rem);
    margin-bottom: 10px;
    color: var(--dark-green);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 30px;
    color: #555;
    font-weight: 500;
}

.btn-primary {
    background: linear-gradient(135deg, var(--light-green), var(--primary-green));
    color: white;
    padding: 15px 40px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px rgba(86, 171, 47, 0.3);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 25px rgba(86, 171, 47, 0.5);
}

/* Features */
.features {
    display: flex;
    justify-content: center;
    padding: 80px 5%;
    flex-wrap: wrap;
    gap: 30px;
    background: var(--white);
    position: relative;
}

.feature-card {
    background: var(--bg-light);
    padding: 40px 30px;
    border-radius: 20px;
    width: 100%;
    max-width: 350px;
    border: 1px solid rgba(86, 171, 47, 0.2);
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}

.feature-card h3 { 
    color: var(--dark-green); 
    margin-bottom: 15px; 
    font-size: 1.5rem; 
}

footer { 
    text-align: center; 
    padding: 30px; 
    background: var(--dark-green); 
    color: white; 
}

/* Định dạng cơ bản cho nút Hamburger (ẩn trên máy tính) */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    z-index: 1001; /* Đảm bảo nút luôn nằm trên cùng */
}

.menu-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: var(--dark-green);
    transition: all 0.3s ease-in-out;
    border-radius: 3px;
}

/* --- RESPONSIVE CHO ĐIỆN THOẠI (Dưới 768px) --- */
@media (max-width: 768px) { 
    /* 1. Hiện nút Hamburger */
    .menu-toggle {
        display: flex;
    }

    /* 2. Biến menu ngang thành menu trượt dọc */
    nav ul { 
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%; /* Nằm ngay dưới thanh header */
        right: -100%; /* Giấu menu sang tít bên phải màn hình */
        width: 250px;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        box-shadow: -5px 10px 20px rgba(0,0,0,0.1);
        border-radius: 0 0 0 15px;
        padding: 20px 0;
        transition: right 0.4s ease-in-out; /* Hiệu ứng trượt mượt mà */
    }

    /* Lớp class 'active' sẽ được JS thêm vào để kéo menu ra */
    nav ul.active {
        right: 0;
    }

    /* 3. Căn chỉnh lại khoảng cách các nút bấm trong menu */
    nav ul li {
        margin: 15px 0;
        text-align: center;
    }

    nav ul li a {
        margin-left: 0;
        display: inline-block;
        font-size: 1.2rem;
    }

    /* 4. Hiệu ứng biến nút 3 gạch thành dấu X khi mở menu */
    .menu-toggle.is-active .bar:nth-child(2) { opacity: 0; }
    .menu-toggle.is-active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .menu-toggle.is-active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
}

/* Bố cục khu vực Mạng xã hội & QR Code */
.social-links {
    display: flex;
    gap: 30px;
    margin-top: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.social-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.5);
    padding: 20px;
    border-radius: 15px;
    border: 1px solid rgba(86, 171, 47, 0.2);
}

/* Định dạng riêng cho mã QR */
.qr-img {
    width: 150px; /* Kích thước vừa đủ để quét */
    height: 150px;
    object-fit: cover;
    border-radius: 10px;
    border: 2px solid var(--primary-green);
    background: white;
    padding: 5px;
}

/* Tùy chỉnh màu nút Facebook cho khác biệt với Zalo */
.fb-btn {
    background: linear-gradient(135deg, #1877F2, #0e5a1f);
}

/* --- GALLERY HOẠT ĐỘNG --- */
.gallery {
    padding: 80px 5%;
    background-color: var(--bg-light); /* Màu nền khớp với tổng thể */
    text-align: center;
}

.gallery h2 {
    color: var(--dark-green);
    font-size: 2.2rem;
    margin-bottom: 40px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Sử dụng Grid để chia 3 cột bằng nhau */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 cột */
    gap: 30px; /* Khoảng cách giữa các ảnh */
    max-width: 1200px; /* Giới hạn độ rộng tối đa cho đẹp */
    margin: 0 auto; /* Căn giữa khung hình */
}

.gallery-img {
    width: 100%;
    height: 100%;
    aspect-ratio: 4 / 3; /* Cố định tỉ lệ ảnh để khung hình không bị xô lệch */
    object-fit: cover; /* Cắt ảnh lấp đầy khung mà không bị méo */
    border-radius: 20px; /* Bo góc 20px giống với feature-card */
    border: 1px solid rgba(86, 171, 47, 0.2);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05); /* Đổ bóng nhẹ */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

/* Hiệu ứng khi rê chuột vào ảnh */
.gallery-img:hover {
    transform: translateY(-8px) scale(1.02); /* Nổi lên và phóng to nhẹ */
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

/* Responsive cho thiết bị di động và tablet */
@media (max-width: 992px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr); /* Tablet hiển thị 2 ảnh 1 hàng */
    }
}

@media (max-width: 600px) {
    .gallery-grid {
        grid-template-columns: 1fr; /* Điện thoại hiển thị 1 ảnh 1 hàng */
    }
}

/* --- SECTION NHÀ TÀI TRỢ --- */
.sponsors {
    padding: 80px 5%;
    background: var(--white); /* Nền trắng để nổi bật thẻ xanh nhẹ */
    text-align: center;
}

.sponsors h2 {
    color: var(--dark-green);
    font-size: 2.2rem;
    margin-bottom: 50px;
    text-transform: uppercase;
}

.sponsors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Tự động chia cột theo màn hình */
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.sponsor-card {
    background: var(--bg-light);
    border-radius: 20px; /* Bo góc đồng bộ */
    padding: 30px;
    border: 1px solid rgba(86, 171, 47, 0.2);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.02);
}

.sponsor-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(86, 171, 47, 0.1);
    background: var(--white);
}

.sponsor-logo-wrapper {
    width: 120px;
    height: 120px;
    background: var(--white);
    border-radius: 50%; /* Logo hình tròn cho mềm mại */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    border: 2px solid var(--light-green);
    overflow: hidden;
}

.sponsor-logo {
    width: 80%;
    height: 80%;
    object-fit: contain;
    pointer-events: none; /* Bảo vệ ảnh */
}

.sponsor-info {
    text-align: left;
    width: 100%;
}

.sponsor-info h3 {
    color: var(--dark-green);
    margin-bottom: 15px;
    text-align: center;
    font-size: 1.3rem;
}

.sponsor-info p {
    font-size: 0.95rem;
    margin-bottom: 8px;
    color: #444;
}

.sponsor-amount {
    margin-top: 15px;
    background: var(--primary-green);
    color: white;
    padding: 8px 15px;
    border-radius: 50px;
    font-weight: bold;
    display: inline-block;
    font-size: 0.9rem;
    width: 100%;
    text-align: center;
}

/* --- NÚT XEM THÊM (OUTLINE BUTTON) --- */
.view-more-container {
    margin-top: 50px;
    text-align: center;
    width: 100%;
}

.btn-outline {
    display: inline-block;
    border: 2px solid var(--primary-green);
    color: var(--primary-green);
    padding: 12px 40px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    background: transparent;
    cursor: pointer;
}

.btn-outline:hover {
    background: var(--primary-green);
    color: var(--white);
    box-shadow: 0 10px 20px rgba(86, 171, 47, 0.2);
    transform: translateY(-3px);
}