/* KHAI BÁO FONT CHỮ */
@font-face { font-family: "MJ-Kedanty"; src: url("../font/MJ Kedanty.ttf"); }
@font-face { font-family: "DancingScript"; src: url("../font/DancingScript.ttf"); }
@font-face { font-family: "UTM-Adriane-Swash"; src: url("../font/UTM-Adriane-Swash.ttf"); }
@font-face { font-family: "UTM-Thu-Phap-Thien-An"; src: url("../font/UTM-Thu-Phap-Thien-An.ttf"); }
@font-face { font-family: "TP Frauen Script"; src: url("../font/TP Frauen Script.ttf"); }
@font-face { font-family: "Bangers-Regular"; src: url("../font/Bangers-Regular.ttf"); }

/* BIẾN CSS TOÀN CỤC */
:root {
    --menu-height: 90px;
    --mau-chu-dao: #211ecd;
    --mau-xanh-dam: #004d99;
}

/* RESET & THIẾT LẬP CHUNG */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f6f9;
    color: #333;
}

h2 {
    font-family: "Bangers-Regular";
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

p {
    font-family: "UTM-Adriane-Swash";
}

/* BỐ CỤC TRANG */
.container {
    display: flex;
    max-width: 1200px;
    margin: 20px auto;
    gap: 30px;
    padding: 0 20px;
}

#noi-dung-chinh {
    flex: 1;
}

/* HEADER */
#header {
    position: relative;

    /* Nền */
    background-color: var(--mau-chu-dao);
    background-image: url("../img/header.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    /* Kích thước & căn chỉnh */
    padding: 20px 20px;
    min-height: 160px;
    text-align: center;

    /* Chữ */
    color: white;

    /* Trang trí */
    border-bottom: 5px solid #d32f2f;

    /* Hạn chế tương tác */
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
}

/* Lớp phủ chặn tương tác ảnh nền */
#header::before {
    content: "";
    position: absolute;
    inset: 0;
    background: transparent;
    pointer-events: all;
    z-index: 1;
}

.header-title {
    position: relative;
    z-index: 2;

    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 12px;
}

/* Logo */
.header-title img {
    padding-left: 20px;
    padding: 10px;
    margin-top: 20px;
    width: 6em;
    height: auto;

    pointer-events: none;
}

/* Tiêu đề */
.header-title h1 {
    margin: 0;
    padding: 10px;

    font-size: 5em;
    font-family: "TP Frauen Script", cursive;
    color: #ffd859;

    line-height: 1.1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
}

#header p {
    font-size: 2em;
}

/* MENU ĐIỀU HƯỚNG */
#navigation_menu {
    background-color: var(--mau-xanh-dam);
    border-radius: 10px;
    margin: 10px;
    padding: 10px 0;
    position: sticky;
    top: 10px;
    z-index: 1000;
}

#navigation_menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
}

#navigation_menu li {
    margin: 0 20px;
}

#navigation_menu a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}

#navigation_menu a:hover {
    color: #ffcc00;
}

/* SIDEBAR */
#sidebar {
    width: 250px;
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    position: sticky;
    top: 100px;
    height: fit-content;
}

#sidebar h3 {
    color: #00529c;
    border-bottom: 2px solid #d32f2f;
    padding-bottom: 10px;
    margin-top: 0;
}

.link-menu {
    display: block;
    text-decoration: none;
    color: #333;
    padding: 10px 0;
    font-weight: bold;
    border-bottom: 1px dashed #ccc;
    transition: all 0.3s;
}

.link-menu:hover {
    color: #d32f2f;
    padding-left: 10px;
    background-color: #fff5f5;
}

/* BÀI VIẾT & HIỆU ỨNG */
.bai-viet {
    background-color: white;
    padding: 25px;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    opacity: 0;
    transform: translate(40px, 30px);
    animation: revealRight 0.6s ease forwards;
    animation-timeline: view();
    animation-range: entry 80% cover 45%;
    scroll-margin-top: var(--menu-height);
}

@keyframes revealRight {
    to {
        opacity: 1;
        transform: translate(0, 0);
    }
}

/* LƯỚI HÌNH ẢNH */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.image-grid img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    transition: transform 0.3s ease;
}

.image-grid img:hover {
    transform: scale(1.05);
}

/* VIDEO */
.video-box {
    margin: 20px 0;
    display: flex;
    justify-content: center;
}

.video-box video {
    width: 100%;
    max-width: 900px;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 10px;
    box-shadow: 0 6px 15px rgba(0,0,0,0.2);
}

/* FORM BÌNH LUẬN */
.form-binh-luan {
    display: flex;
    flex-direction: column;
    gap: 15px;
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.form-binh-luan input,
.form-binh-luan textarea {
    padding: 12px 15px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-binh-luan textarea {
    min-height: 100px;
    resize: vertical;
}

.form-binh-luan input:focus,
.form-binh-luan textarea:focus {
    outline: none;
    border-color: #00529c;
    box-shadow: 0 0 0 3px rgba(0, 82, 156, 0.15);
}

.nut-gui {
    padding: 12px 25px;
    background-color: #00529c;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    align-self: flex-start;
}

.nut-gui:hover {
    background-color: #d32f2f;
    transform: translateY(-2px);
}

/* FOOTER */
#footer {
    background-color: var(--mau-xanh-dam);
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    font-size: 0.9em;
}