/**
 * HỆ THỐNG THIẾT KẾ & CÁC TOKEN CỐT LÕI
 * Định nghĩa bảng màu hiện đại, hài hòa và các hiệu ứng chuyển cảnh mượt mà.
 */
:root {
    --primary: #e74c3c;
    /* Màu đỏ thương hiệu cho tập thể 12A1 */
    --dark: #2c3e50;
    /* Màu văn bản độ tương phản cao */
    --light: #f8f9fa;
    /* Màu nền trung tính để làm nổi bật nội dung */
    --transition: all 0.3s ease;
    /* Tốc độ chuyển cảnh tiêu chuẩn */
}

/* Hiệu ứng cuộn mượt mà toàn trang */
html {
    scroll-behavior: smooth;
}

/* --- PHẦN THÂN TRANG & CONTAINER CHÍNH --- */
body {
    background-color: #f4f7f6;
    /* Màu nền trung tính dịu mắt */
    color: #1a202c;
    /* Màu chữ đậm sắc nét hơn (Darker for better contrast) */
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 60px 20px;
    box-sizing: border-box;
    /* Đảm bảo padding không làm vỡ chiều rộng trên mobile */
}

/* ĐIỀU CHỈNH KHOẢNG CÁCH TRÊN DI ĐỘNG: Thu hẹp khoảng cách để tối ưu không gian hiển thị */
@media (max-width: 768px) {
    .container {
        padding: 40px 15px;
    }
}

/* --- CÁC THÀNH PHẦN GIAO DIỆN: THẺ HIỆN ĐẠI (MODERN CARDS) --- */
section {
    background: #ffffff;
    padding: 40px;
    margin-bottom: 50px;
    border-radius: 24px;
    /* Bo góc lớn tạo cảm giác thân thiện, hiện đại */
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.04);
    /* Đổ bóng mịn màng */
    transition: transform 0.3s ease;
}

/* Tương tác vi mô: Nổi lên nhẹ khi di chuột */
section:hover {
    transform: translateY(-5px);
}

/* Kiểu dáng riêng cho phần lưới ảnh */
.gallery-section {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* --- CHÂN TRANG: DARK MODE CAO CẤP --- */
footer {
    background: #1a202c;
    /* Màu xanh đen sâu thẳm tạo sự tinh tế */
    color: #a0aec0;
    padding: 80px 20px 40px;
    margin-top: 100px;
    position: relative;
    border-top: 4px solid var(--primary);
    /* Điểm nhấn màu sắc của lớp */
}

/* Hiệu ứng chuyển cảnh tinh tế giữa thân trang và chân trang */
footer::before {
    content: "";
    position: absolute;
    top: -20px;
    left: 0;
    width: 100%;
    height: 20px;
    background: linear-gradient(to top, #1a202c, transparent);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    /* Lưới không đối xứng tạo phân cấp thị giác */
    gap: 60px;
    max-width: 1100px;
    margin: 0 auto;
    text-align: left;
}

/* Chân trang di động: Chuyển lưới thành một cột duy nhất */
@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }

    .group-info {
        text-align: left;
    }
}

.group-info {
    background: rgba(255, 255, 255, 0.03);
    /* Lớp phủ mờ trong suốt */
    padding: 25px;
    border-left: 3px solid var(--primary);
    border-radius: 12px;
}

.group-info strong {
    color: #fff;
    display: block;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.footer-bottom {
    margin-top: 60px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 0.85rem;
}

/* --- BỐ CỤC PHÍA DƯỚI: FLEXBOX ĐỘNG --- 
   Xử lý Video & Lưu bút nằm cạnh nhau trên PC, xếp chồng trên Mobile.
*/
.bottom-layout {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 40px;
}

.video-box {
    flex: 1.2;
}

.comment-section {
    flex: 0.8;
}

@media (max-width: 900px) {
    .bottom-layout {
        flex-direction: column;
        /* Đổi sang dạng cột cho màn hình hẹp */
    }

    .video-box,
    .comment-section {
        width: 100%;
        /* Chiếm trọn chiều ngang khi xếp chồng */
    }
}

/* --- THANH ĐIỀU HƯỚNG: HIỆU ỨNG THỦY TINH (GLASSMORPHISM) --- */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    /* Hiệu ứng làm mờ hiện đại */
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 25px;
    margin: 0;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary);
}

/* Điều chỉnh thanh điều hướng trên mobile */
@media (max-width: 768px) {
    .nav-links {
        gap: 15px;
    }

    .nav-links a {
        font-size: 0.8rem;
    }

    .logo {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .nav-links {
        display: none;
    }

    /* Tối giản hóa cho màn hình cực nhỏ */
}

/* --- PHẦN ĐẦU TRANG (HERO HEADER) --- */
header {
    height: 70vh;
    min-height: 400px;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
        url('https://picsum.photos/id/13/1920/1080');
    /* Ảnh nền mang phong cách kỷ niệm */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    /* Hiệu ứng Parallax khi cuộn trên PC */
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    padding: 0 20px;
}

@media (max-width: 768px) {
    header {
        height: 60vh;
        background-attachment: scroll;
        /* Sửa lỗi hiệu năng cuộn trên mobile */
    }
}

header h1 {
    font-family: 'Playfair Display', serif;
    /* Cỡ chữ đáp ứng linh hoạt bằng hàm clamp() */
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    margin-bottom: 10px;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    animation: fadeInDown 1s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- HIỆU ỨNG XUẤT HIỆN KHI CUỘN --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* --- HỆ THỐNG LƯỚI ẢNH: TỐI ƯU HIỆU NĂNG --- */
.photo-grid {
    display: grid;
    /* Tự động điền số cột dựa trên chiều rộng phần tử */
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 10px 0;
}

/* Lưới ảnh riêng cho di động */
@media (max-width: 600px) {
    .photo-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 10px;
    }
}

.photo-grid img {
    width: 100%;
    aspect-ratio: 1/1;
    /* Duy trì tỷ lệ khung hình vuông chuẩn */
    object-fit: cover;
    border-radius: 12px;
    cursor: zoom-in;
    transition: var(--transition);
}

.photo-grid img:hover {
    transform: scale(1.03);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* --- LIGHTBOX (TRÌNH XEM ẢNH) --- */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    /* Nền đen sâu để tập trung vào nội dung */
}

.lightbox-content {
    display: block;
    margin: auto;
    max-width: 80%;
    max-height: 80%;
    border-radius: 10px;
}

.close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: white;
    font-size: 40px;
    cursor: pointer;
}

/* Hoạt ảnh trượt xuống mượt mà */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- GIAO DIỆN LƯU BÚT (GUESTBOOK) --- */
.comment-section {
    background: linear-gradient(145deg, #ffffff, #f0f4f8);
    position: relative;
    overflow: hidden;
}

/* Hình mờ trang trí tạo dấu ấn riêng */
.comment-section::after {
    content: "❤";
    position: absolute;
    bottom: -20px;
    right: 20px;
    font-size: 100px;
    color: rgba(231, 76, 60, 0.05);
    /* Hình mờ trái tim cực kỳ nhẹ nhàng */
    z-index: 0;
}

.comment-form {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Định dạng các ô nhập liệu hiện đại */
.comment-form input,
.comment-form textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid transparent;
    border-bottom: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 15px 20px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: #2d3748;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    background: #fff;
    border-color: var(--primary);
    box-shadow: 0 10px 25px rgba(231, 76, 60, 0.1);
    transform: translateY(-2px);
}

/* Nút bấm Gradient cao cấp */
.btn-submit {
    align-self: flex-start;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    border: none;
    padding: 16px 45px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(231, 76, 60, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-submit:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 30px rgba(231, 76, 60, 0.4);
}

.btn-submit:active {
    transform: translateY(0);
}

::placeholder {
    color: #a0aec0;
    font-style: italic;
    opacity: 0.7;
}

/* THẺ BÌNH LUẬN (COMMENT CARDS) */
.comments-container {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #e2e8f0;
}

.comment-card {
    background: #fff;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    border-left: 4px solid var(--primary);
    animation: fadeIn 0.5s ease;
    /* Hiệu ứng hiện dần cho tin nhắn mới */
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.comment-name {
    font-weight: 700;
    color: var(--dark);
    font-size: 1.1rem;
}

.comment-time {
    font-size: 0.8rem;
    color: #a0aec0;
}

.comment-text {
    line-height: 1.6;
    color: #4a5568;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}