﻿@tailwind base;
@tailwind components;
@tailwind utilities;

/* =========================
GLOBAL
========================= */

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background: #f8fafc;
    color: #1e293b;
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
}

input,
textarea,
select {
    outline: none;
}

/* =========================
CONTAINER
========================= */

.container-site {
    max-width: 1400px;
    margin: auto;
    padding: 0 20px;
}

/* =========================
COLORS
========================= */

.bg-primary {
    background: #0f172a;
}

.bg-secondary {
    background: #1e293b;
}

.text-primary {
    color: #0f172a;
}

.text-accent {
    color: #dc2626;
}

.text-light {
    color: #cbd5e1;
}

/* =========================
TYPOGRAPHY
========================= */

.section-title {
    font-size: 34px;
    font-weight: 800;
    line-height: 42px;
    color: #0f172a;
}

.section-subtitle {
    font-size: 16px;
    color: #64748b;
    margin-top: 10px;
}

.article-title {
    font-size: 42px;
    font-weight: 800;
    line-height: 54px;
}

.article-content h2 {
    font-size: 30px;
    font-weight: 700;
    margin-top: 40px;
    margin-bottom: 20px;
}

.article-content h3 {
    font-size: 24px;
    font-weight: 700;
    margin-top: 30px;
    margin-bottom: 15px;
}

.article-content p {
    margin-bottom: 18px;
    line-height: 1.9;
    color: #334155;
}

.article-content ul {
    margin: 20px 0;
    padding-left: 25px;
}

.article-content li {
    margin-bottom: 10px;
}

/* =========================
MENU
========================= */

.menu-link {
    color: #475569;
    font-weight: 500;
    transition: .25s;
}

    .menu-link:hover {
        color: #dc2626;
    }

/* =========================
BUTTONS
========================= */

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #dc2626;
    color: white;
    padding: 14px 26px;
    border-radius: 14px;
    font-weight: 600;
    transition: .25s;
}

    .btn-primary:hover {
        background: #b91c1c;
    }

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 26px;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    font-weight: 600;
    background: white;
    transition: .25s;
}

    .btn-outline:hover {
        border-color: #dc2626;
        color: #dc2626;
    }

/* =========================
CARD
========================= */

.card {
    background: white;
    border-radius: 24px;
    border: 1px solid #e2e8f0;
    transition: .3s;
}

    .card:hover {
        transform: translateY(-4px);
        box-shadow: 0 10px 25px rgba(15,23,42,.08);
    }

.rounded-card {
    border-radius: 28px;
    overflow: hidden;
}

.shadow-card {
    box-shadow: 0 10px 30px rgba(15,23,42,.08);
}

/* =========================
CATEGORY CARD
========================= */

.category-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    padding: 28px;
    text-align: center;
    transition: .25s;
    cursor: pointer;
}

    .category-card:hover {
        border-color: #dc2626;
        transform: translateY(-4px);
    }

    .category-card .icon {
        font-size: 40px;
    }

/* =========================
HSK CARD
========================= */

.hsk-card {
    background: white;
    border-radius: 24px;
    padding: 24px;
    text-align: center;
    border: 1px solid #e2e8f0;
    transition: .25s;
}

    .hsk-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 10px 20px rgba(15,23,42,.08);
    }

.hsk-title {
    font-size: 28px;
    font-weight: 800;
}

.hsk-desc {
    margin-top: 8px;
    color: #64748b;
    font-size: 14px;
}

/* =========================
POST CARD
========================= */

.post-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    overflow: hidden;
    transition: .25s;
}

    .post-card:hover {
        transform: translateY(-4px);
    }

    .post-card img {
        width: 100%;
        height: 220px;
        object-fit: cover;
    }

.post-card-body {
    padding: 24px;
}

.post-card-title {
    font-size: 20px;
    font-weight: 700;
    line-height: 30px;
}

.post-card-desc {
    margin-top: 12px;
    color: #64748b;
    line-height: 1.8;
}

/* =========================
SIDEBAR
========================= */

.sidebar-box {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    padding: 24px;
}

.sidebar-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
}

/* =========================
HERO
========================= */

.hero-title {
    font-size: 64px;
    line-height: 76px;
    font-weight: 900;
}

.hero-desc {
    font-size: 18px;
    line-height: 34px;
    color: #cbd5e1;
}

/* =========================
CTA BLOCK
========================= */

.cta-blue {
    background: linear-gradient( 135deg, #0f172a, #1e3a8a );
}

.cta-green {
    background: linear-gradient( 135deg, #14532d, #166534 );
}

/* =========================
TABLE OF CONTENT
========================= */

.toc-box {
    position: sticky;
    top: 100px;
    background: white;
    border-radius: 24px;
    border: 1px solid #e2e8f0;
    padding: 24px;
}

    .toc-box ul li {
        margin-bottom: 12px;
    }

    .toc-box a {
        color: #475569;
    }

        .toc-box a:hover {
            color: #dc2626;
        }

/* =========================
FOOTER
========================= */

.footer-link {
    color: #94a3b8;
    transition: .25s;
}

    .footer-link:hover {
        color: white;
    }

/* =========================
RESPONSIVE
========================= */

@media (max-width: 1024px) {

    .hero-title {
        font-size: 42px;
        line-height: 56px;
    }

    .article-title {
        font-size: 34px;
        line-height: 44px;
    }

    .section-title {
        font-size: 28px;
        line-height: 38px;
    }

}

@media (max-width: 768px) {

    .hero-title {
        font-size: 34px;
        line-height: 46px;
    }

    .container-site {
        padding-left: 16px;
        padding-right: 16px;
    }

}

/* =========================
   MENU
========================= */

.menu-link {
    display: block;
    padding: 14px 12px;
    font-weight: 500;
    transition: .2s;
}

    .menu-link:hover {
        color: #dc2626;
    }

.menu-item {
    position: relative;
}

.submenu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 240px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,.08);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all .25s;
    z-index: 9999;
}

.menu-item:hover > .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.submenu a,
.submenu span {
    display: block;
    padding: 12px 16px;
    cursor: pointer;
    white-space: nowrap;
}

    .submenu a:hover,
    .submenu span:hover {
        background: #f8fafc;
        color: #dc2626;
    }

/* =========================
   CẤP 3
========================= */

.submenu-item {
    position: relative;
}

.submenu-level-3 {
    position: absolute;
    left: 100%;
    top: 0;
    min-width: 240px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,.08);
    opacity: 0;
    visibility: hidden;
    transition: .25s;
    z-index: 9999;
}

.submenu-item:hover .submenu-level-3 {
    opacity: 1;
    visibility: visible;
}

.post-card {
    overflow: hidden;
}

    .post-card img {
        width: 100%;
        transition: .4s;
    }

    .post-card:hover img {
        transform: scale(1.05);
    }

.rounded-card img {
    width: 100%;
    display: block;
}