/* =========================================================
   WEBSITE: VÌ MỘT HÀNH TINH XANH
   Chủ đề: Bảo vệ môi trường
   Tệp: css/style.css
   ========================================================= */

/* ---------- 1. BIẾN MÀU & THIẾT LẬP CHUNG ---------- */
:root {
    --xanh-dam: #0b3d34;
    --xanh-chinh: #0f766e;
    --xanh-sang: #22c55e;
    --xanh-nhat: #ecfdf5;
    --vang: #f59e0b;
    --chu-dam: #0f2e28;
    --chu-nhat: #56706a;
    --trang: #ffffff;
    --vien: #e3efe9;
    --bong: 0 10px 30px rgba(11, 61, 52, 0.08);
    --bong-to: 0 18px 45px rgba(11, 61, 52, 0.14);
    --bo-goc: 16px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
    color: var(--chu-dam);
    line-height: 1.7;
    background-color: #f4faf7;
    -webkit-font-smoothing: antialiased;
}

img,
svg,
video,
iframe {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--xanh-chinh);
    transition: color 0.2s ease;
}

a:hover {
    color: var(--xanh-sang);
}

h1,
h2,
h3,
h4 {
    line-height: 1.3;
    margin: 0 0 12px;
    color: var(--xanh-dam);
}

h2 {
    font-size: 26px;
}

h3 {
    font-size: 19px;
}

p {
    margin: 0 0 14px;
}

/* Khung nội dung căn giữa — nới rộng để giảm khoảng trống 2 bên */
.khung {
    width: 94%;
    max-width: 1320px;
    margin: 0 auto;
}

/* ---------- 2. HEADER ---------- */
.dau-trang {
    position: relative;
    padding: 74px 0 62px;
    color: #fff;
    text-align: center;
    overflow: hidden;
    background:
        radial-gradient(900px 420px at 18% 0%, rgba(34, 197, 94, 0.45), transparent 60%),
        radial-gradient(800px 400px at 85% 110%, rgba(56, 189, 248, 0.35), transparent 60%),
        linear-gradient(135deg, #08231d 0%, #0d4d43 55%, #0f766e 100%);
}

/* Vòng trang trí trên header */
.dau-trang::before,
.dau-trang::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.dau-trang::before {
    width: 420px;
    height: 420px;
    top: -220px;
    right: -120px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.14), transparent 65%);
}

.dau-trang::after {
    width: 320px;
    height: 320px;
    bottom: -210px;
    left: -90px;
    background: radial-gradient(circle, rgba(34, 197, 94, 0.35), transparent 65%);
}

.dau-trang .khung {
    position: relative;
    z-index: 1;
}

/* Logo + tên website */
.logo-hang {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.logo-hang img {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.18);
}

/* Tên website luôn hiển thị trên header mọi trang */
.ten-web {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.6px;
    color: #fff;
    text-transform: uppercase;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.nhan {
    display: inline-block;
    padding: 6px 16px;
    margin: 0 0 14px;
    font-size: 12px;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

/* Nhãn phụ nằm chung hàng với tên web */
.nhan.phu {
    margin: 0;
}

/* Trang chủ: heading lớn hơn trang con nhưng không quá chênh lệch */
.dau-trang h1 {
    color: #fff;
    font-size: 40px;
    letter-spacing: 0.5px;
    margin: 0 0 12px;
    text-shadow: 0 4px 22px rgba(0, 0, 0, 0.25);
}

.khau-hieu {
    font-size: 18px;
    color: #d7f7e6;
    margin: 0 auto;
    max-width: 640px;
}

/* Header nhỏ cho các trang con */
.dau-trang.nho {
    padding: 52px 0 44px;
}

.dau-trang.nho h1 {
    font-size: 32px;
}

.dau-trang.nho .ten-web {
    font-size: 17px;
}

.dau-trang.nho .logo-hang img {
    width: 52px;
    height: 52px;
}

/* ---------- 3. NAVIGATION ---------- */
.thanh-menu {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(8, 41, 35, 0.92);
    backdrop-filter: blur(10px);
    box-shadow: 0 6px 24px rgba(8, 41, 35, 0.18);
}

.menu {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}

.menu a {
    position: relative;
    display: block;
    padding: 16px 18px;
    color: #d9f3e8;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.menu a::after {
    content: "";
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 10px;
    height: 2px;
    border-radius: 2px;
    background: var(--xanh-sang);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}

.menu a:hover,
.menu a.dang-o {
    color: #fff;
    background: rgba(34, 197, 94, 0.14);
}

.menu a:hover::after,
.menu a.dang-o::after {
    transform: scaleX(1);
}

/* ---------- 4. BỐ CỤC MAIN + SIDEBAR (GRID) ---------- */
.bo-cuc {
    display: grid;
    grid-template-columns: 2.2fr 1fr;
    gap: 26px;
    padding-top: 34px;
    padding-bottom: 46px;
    align-items: start;
}

.noi-dung,
.thanh-ben {
    background: var(--trang);
    border-radius: var(--bo-goc);
    box-shadow: var(--bong);
    padding: 30px;
}

.noi-dung > h2:first-child {
    margin-top: 0;
}

/* Thanh bên */
.thanh-ben {
    position: sticky;
    top: 84px;
    padding: 24px;
}

.thanh-ben h2 {
    font-size: 17px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    padding-bottom: 10px;
    margin-bottom: 14px;
    border-bottom: 2px solid var(--xanh-nhat);
}

.thanh-ben h2:not(:first-child) {
    margin-top: 26px;
}

.thanh-ben ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.thanh-ben ul li {
    padding: 9px 0 9px 24px;
    position: relative;
    border-bottom: 1px dashed var(--vien);
    font-size: 15px;
    color: var(--chu-nhat);
}

.thanh-ben ul li:last-child {
    border-bottom: none;
}

.thanh-ben ul li::before {
    content: "🌿";
    position: absolute;
    left: 0;
    top: 8px;
    font-size: 13px;
}

/* Ô số liệu nhanh trong sidebar */
.so-lieu {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.so-lieu .o {
    background: var(--xanh-nhat);
    border-radius: 12px;
    padding: 12px 14px;
    border-left: 4px solid var(--xanh-sang);
}

.so-lieu .so {
    display: block;
    font-size: 22px;
    font-weight: 800;
    color: var(--xanh-chinh);
    line-height: 1.2;
}

.so-lieu .ten {
    font-size: 13px;
    color: var(--chu-nhat);
}

/* ---------- 5. THÀNH PHẦN NỘI DUNG ---------- */
.mo-dau {
    font-size: 17px;
    color: var(--chu-nhat);
    border-left: 4px solid var(--xanh-sang);
    padding-left: 16px;
}

.anh-lon {
    width: 100%;
    max-height: 380px;
    object-fit: cover;
    border-radius: 14px;
    box-shadow: var(--bong);
    margin: 6px 0 30px;
}

/* Thẻ nội dung (flex) */
.the-noi-dung {
    display: flex;
    gap: 22px;
    align-items: center;
    padding: 18px;
    margin-bottom: 18px;
    border: 1px solid var(--vien);
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff, #f8fdfa);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.the-noi-dung:hover {
    transform: translateY(-3px);
    box-shadow: var(--bong-to);
}

.the-noi-dung img {
    width: 230px;
    flex-shrink: 0;
    border-radius: 11px;
    aspect-ratio: 7 / 5;
    object-fit: cover;
}

.the-noi-dung h3 {
    margin-top: 0;
}

/* Lưới thẻ (grid) */
.luoi-the {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 20px;
    margin: 22px 0 8px;
}

.o-the {
    background: var(--trang);
    border: 1px solid var(--vien);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.o-the:hover {
    transform: translateY(-5px);
    box-shadow: var(--bong-to);
}

.o-the img {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
}

.o-the .than-o {
    padding: 16px 18px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.o-the .than-o h3 {
    margin: 0 0 8px;
    font-size: 18px;
}

.o-the .than-o p {
    color: var(--chu-nhat);
    font-size: 15px;
    flex: 1;
}

/* Nút */
.nut {
    display: inline-block;
    padding: 10px 20px;
    color: #fff;
    background: linear-gradient(135deg, var(--xanh-chinh), var(--xanh-sang));
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(15, 118, 110, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.nut:hover {
    color: #fff;
    filter: brightness(1.06);
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(15, 118, 110, 0.35);
}

.nut.phu {
    background: #fff;
    color: var(--xanh-chinh);
    border: 2px solid var(--xanh-chinh);
    box-shadow: none;
}

.nut.phu:hover {
    color: #fff;
    background: var(--xanh-chinh);
}

/* Nhóm nút căn giữa */
.nhom-nut {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 22px 0;
}

/* Khung ghi chú / trích dẫn */
.hop-ghi-chu {
    background: var(--xanh-nhat);
    border-left: 5px solid var(--xanh-sang);
    border-radius: 0 12px 12px 0;
    padding: 18px 20px;
    margin: 22px 0;
    color: #12564a;
}

.hop-ghi-chu strong {
    color: var(--xanh-dam);
}

/* ---------- 6. BẢNG ---------- */
.bang-boc {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--vien);
    margin: 18px 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
    background: #fff;
}

caption {
    caption-side: top;
    text-align: left;
    font-weight: 700;
    color: var(--xanh-dam);
    padding: 0 0 10px;
    font-size: 15px;
}

th,
td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--vien);
    vertical-align: top;
}

thead th {
    background: var(--xanh-chinh);
    color: #fff;
    font-weight: 600;
    letter-spacing: 0.3px;
}

tbody tr:nth-child(even) {
    background: #f8fdfa;
}

tbody tr:hover {
    background: var(--xanh-nhat);
}

tbody tr:last-child td {
    border-bottom: none;
}

/* ---------- 7. BIỂU MẪU ---------- */
.bieu-mau .dong {
    margin-bottom: 16px;
}

.bieu-mau label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 14px;
    color: var(--xanh-dam);
}

.bieu-mau input,
.bieu-mau textarea,
.bieu-mau select {
    width: 100%;
    padding: 12px 14px;
    font-family: inherit;
    font-size: 15px;
    color: var(--chu-dam);
    background: #f9fdfb;
    border: 2px solid var(--vien);
    border-radius: 10px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.bieu-mau input:focus,
.bieu-mau textarea:focus,
.bieu-mau select:focus {
    outline: none;
    background: #fff;
    border-color: var(--xanh-sang);
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.15);
}

.bieu-mau textarea {
    resize: vertical;
    min-height: 130px;
}

.hang-doi {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Thông báo sau khi gửi form */
.thong-bao {
    display: none;
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 10px;
    font-weight: 600;
    background: var(--xanh-nhat);
    color: #0d6b4d;
    border: 1px solid #a7f3d0;
}

.thong-bao.hien {
    display: block;
    animation: truotXuong 0.35s ease;
}

@keyframes truotXuong {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---------- 8. TRÌNH CHIẾU ẢNH (SLIDESHOW) ---------- */
.trinh-chieu {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--bong-to);
    margin: 20px 0 28px;
    background: #0d2621;
}

.trinh-chieu .slide {
    display: none;
    position: relative;
}

.trinh-chieu .slide.dang-hien {
    display: block;
    animation: moDan 0.6s ease;
}

@keyframes moDan {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.trinh-chieu .slide img {
    width: 100%;
    aspect-ratio: 16 / 8;
    object-fit: cover;
}

.trinh-chieu .chu-thich {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 40px 24px 18px;
    color: #fff;
    font-weight: 600;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
    background: linear-gradient(transparent, rgba(6, 24, 20, 0.85));
}

.trinh-chieu .nut-slide {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
    color: var(--xanh-dam);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: background 0.2s ease, transform 0.2s ease;
}

.trinh-chieu .nut-slide:hover {
    background: #fff;
    transform: translateY(-50%) scale(1.08);
}

.trinh-chieu .truoc {
    left: 14px;
}

.trinh-chieu .sau {
    right: 14px;
}

/* Chấm điều hướng nằm đè lên đáy ảnh, không tách thành khối riêng */
.cham-slide {
    position: absolute;
    left: 50%;
    bottom: 14px;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(6, 24, 20, 0.45);
    backdrop-filter: blur(4px);
    z-index: 2;
}

.cham-slide button {
    width: 10px;
    height: 10px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: background 0.2s ease, width 0.25s ease;
}

.cham-slide button:hover {
    background: rgba(255, 255, 255, 0.75);
}

.cham-slide button.dang-hien {
    width: 28px;
    border-radius: 6px;
    background: var(--xanh-sang);
}

/* ---------- 9. VIDEO & IFRAME ---------- */
.khung-media {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--bong);
    margin: 18px 0;
    background: #06110f;
}

.khung-media iframe,
.khung-media video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ---------- 10. DÒNG THỜI GIAN ---------- */
.dong-thoi-gian {
    position: relative;
    list-style: none;
    margin: 26px 0;
    padding: 0 0 0 28px;
}

.dong-thoi-gian::before {
    content: "";
    position: absolute;
    left: 7px;
    top: 6px;
    bottom: 6px;
    width: 3px;
    border-radius: 3px;
    background: linear-gradient(var(--xanh-sang), var(--xanh-chinh));
}

.dong-thoi-gian li {
    position: relative;
    padding: 0 0 22px 6px;
}

.dong-thoi-gian li::before {
    content: "";
    position: absolute;
    left: -28px;
    top: 7px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--xanh-sang);
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.16);
}

.dong-thoi-gian .moc {
    display: block;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--xanh-chinh);
}

/* ---------- 11. ĐIỀU HƯỚNG TRANG ---------- */
.dieu-huong-cuoi {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--vien);
    font-weight: 600;
}

/* ---------- 12. FOOTER ---------- */
.chan-trang {
    color: #c7e6da;
    background: linear-gradient(160deg, #08231d, #0b3d34);
    padding: 44px 0 22px;
    margin-top: 10px;
}

.chan-trang .luoi-chan {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr;
    gap: 34px;
}

.chan-trang h3 {
    color: #fff;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 14px;
}

.chan-trang p,
.chan-trang li {
    font-size: 14.5px;
    color: #b4d6c9;
}

.chan-trang ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.chan-trang ul li {
    margin-bottom: 8px;
}

.chan-trang a {
    color: #c7e6da;
    text-decoration: none;
}

.chan-trang a:hover {
    color: var(--xanh-sang);
}

.mang-xa-hoi {
    display: flex;
    gap: 10px;
    margin-top: 14px;
}

.mang-xa-hoi a {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-size: 17px;
    background: rgba(255, 255, 255, 0.08);
    transition: background 0.2s ease, transform 0.2s ease;
}

.mang-xa-hoi a:hover {
    background: var(--xanh-sang);
    transform: translateY(-3px);
}

.ban-quyen {
    margin-top: 34px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 13.5px;
    color: #8fb8aa;
}

/* ---------- 13. NÚT QUAY VỀ ĐẦU TRANG ---------- */
.len-dau {
    position: fixed;
    right: 22px;
    bottom: 22px;
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, var(--xanh-chinh), var(--xanh-sang));
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(15, 118, 110, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(14px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
    z-index: 60;
}

.len-dau.hien {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.len-dau:hover {
    filter: brightness(1.1);
}

/* ---------- 14. HIỆU ỨNG XUẤT HIỆN ---------- */
.hien-dan {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.hien-dan.da-hien {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- 15. RESPONSIVE ---------- */
@media (max-width: 900px) {
    .bo-cuc {
        grid-template-columns: 1fr;
    }

    .thanh-ben {
        position: static;
    }

    .chan-trang .luoi-chan {
        grid-template-columns: 1fr 1fr;
    }

    .dau-trang h1,
    .dau-trang.nho h1 {
        font-size: 30px;
    }

    .ten-web {
        font-size: 16px;
    }
}

@media (max-width: 700px) {
    .dau-trang {
        padding: 52px 0 44px;
    }

    .dau-trang h1,
    .dau-trang.nho h1 {
        font-size: 25px;
    }

    .logo-hang {
        gap: 10px;
    }

    .ten-web,
    .dau-trang.nho .ten-web {
        font-size: 15px;
        letter-spacing: 0.3px;
    }

    .nhan.phu {
        display: none;
    }

    .khau-hieu {
        font-size: 16px;
    }

    .menu {
        justify-content: flex-start;
        gap: 0;
    }

    .menu a {
        padding: 13px 14px;
        font-size: 14px;
    }

    .noi-dung,
    .thanh-ben {
        padding: 20px;
    }

    .the-noi-dung {
        flex-direction: column;
        align-items: stretch;
    }

    .the-noi-dung img {
        width: 100%;
    }

    .hang-doi {
        grid-template-columns: 1fr;
    }

    .chan-trang .luoi-chan {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    h2 {
        font-size: 22px;
    }

    .trinh-chieu .nut-slide {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }

    .cham-slide {
        bottom: 10px;
        gap: 6px;
        padding: 6px 10px;
    }
}

/* ---------- 16. IN ẤN ---------- */
@media print {

    .thanh-menu,
    .len-dau,
    .nut-slide,
    .cham-slide {
        display: none !important;
    }
}
