/* ========================================
   CHO THUE TIVI — Main Stylesheet
   Navy #1a237e / Orange #ff6f00 / Clean white
   ======================================== */

:root {
    --navy: #1a237e;
    --navy-light: #283593;
    --navy-dark: #0d1451;
    --orange: #ff6f00;
    --orange-light: #ff8f00;
    --orange-dark: #e65100;
    --white: #ffffff;
    --gray-50: #f8f9fa;
    --gray-100: #f1f3f5;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #868e96;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
    --text: #2c3e50;
    --text-light: #6c757d;
    --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
    --shadow: 0 2px 8px rgba(0,0,0,.1);
    --shadow-lg: 0 8px 30px rgba(0,0,0,.12);
    --shadow-hover: 0 12px 40px rgba(0,0,0,.15);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: .25s cubic-bezier(.4,0,.2,1);
    --max-width: 1200px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: var(--text);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--orange); }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }

/* ── HEADER ── */
.site-header {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    position: relative;
    z-index: 100;
}

.header-top {
    background: transparent;
    color: rgba(255,255,255,.85);
    font-size: .85rem;
    padding: 8px 20px;
}

.header-top .container {
    background: var(--navy);
    border-radius: var(--radius-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 8px 24px;
}

.header-top a { color: rgba(255,255,255,.85); }
.header-top a:hover { color: var(--orange-light); }

.header-top-left, .header-top-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-top svg { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; }

.topbar-zalo {
    background: rgba(255,255,255,.15);
    padding: 3px 10px;
    border-radius: 4px;
    font-weight: 500;
}
.topbar-zalo:hover { background: rgba(255,255,255,.25); }

.header-main {
    padding: 16px 0;
}

.header-main .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.logo img {
    height: 44px;
    width: auto;
    display: block;
}

.nav-main {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-main a {
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: .95rem;
    color: var(--gray-700);
    transition: all var(--transition);
}

.nav-main a:hover,
.nav-main a.active {
    color: var(--navy);
    background: var(--gray-100);
}

.nav-main a.active { font-weight: 600; }

.nav-cta {
    background: var(--orange) !important;
    color: var(--white) !important;
    font-weight: 600 !important;
    padding: 10px 24px !important;
    border-radius: 50px !important;
}

.nav-cta:hover {
    background: var(--orange-dark) !important;
    transform: translateY(-1px);
}

/* Mobile menu */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--navy);
    margin: 6px 0;
    transition: var(--transition);
    border-radius: 2px;
}

/* ── HERO BANNER ── */
.hero-banner {
    padding: 0 20px 0;
}

.hero-banner a {
    display: block;
    border-radius: var(--radius);
    overflow: hidden;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-banner img {
    width: 100%;
    height: auto;
    display: block;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all var(--transition);
}

.btn-primary {
    background: var(--orange);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--orange-dark);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255,111,0,.35);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255,255,255,.4);
}

.btn-outline:hover {
    border-color: var(--white);
    color: var(--white);
    background: rgba(255,255,255,.1);
}

/* ── SECTIONS ── */
.section {
    padding: 40px 0;
}

.page-header + .section,
.hero-banner + .section {
    padding-top: 32px;
}

.section-alt { background: transparent; }
.section-alt > .container {
    background: var(--gray-50);
    border-radius: var(--radius);
    padding: 40px 32px;
}

.section-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 6px;
}

.section-subtitle {
    color: var(--text-light);
    font-size: 1.05rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--gray-200);
}

.section-header > div {
    flex: 1;
}

.section-header .view-all {
    color: var(--orange);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 24px;
    border: 2px solid var(--orange);
    border-radius: 50px;
    font-size: .95rem;
    transition: all var(--transition);
    white-space: nowrap;
    flex-shrink: 0;
}

.section-header .view-all:hover {
    background: var(--orange);
    color: var(--white);
    gap: 10px;
}

/* ── CARDS ── */
.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
}

.card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-4px);
}

.card-thumb {
    position: relative;
    padding-top: 60%;
    overflow: hidden;
    background: var(--gray-100);
}

.card-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}

.card:hover .card-thumb img { transform: scale(1.05); }

.card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--orange);
    color: var(--white);
    font-size: .75rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 50px;
    z-index: 1;
}

.card-body {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: .82rem;
    color: var(--text-light);
    margin-bottom: 10px;
}

.card-meta svg { width: 14px; height: 14px; opacity: .6; }

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: 10px;
    color: var(--gray-800);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-title a { color: inherit; }
.card-title a:hover { color: var(--orange); }

.card-excerpt {
    font-size: .9rem;
    color: var(--text-light);
    line-height: 1.7;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 16px;
}

.card-link {
    color: var(--orange);
    font-weight: 600;
    font-size: .9rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
}

.card-link:hover { gap: 10px; }

/* ── POST DETAIL ── */
.post-detail {
    max-width: 820px;
    margin: 0 auto;
    padding: 20px 20px 60px;
}

.post-detail .breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .82rem;
    color: var(--text-light);
    margin-bottom: 10px;
}

.post-detail .breadcrumb a {
    color: var(--navy);
    font-weight: 500;
}

.post-detail .breadcrumb a:hover { color: var(--orange); }

.post-detail h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--navy);
    margin-bottom: 10px;
}

.post-meta-bar {
    display: flex;
    align-items: center;
    gap: 20px;
    color: var(--text-light);
    font-size: .85rem;
    padding-bottom: 12px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--gray-200);
}

.post-meta-bar svg { width: 16px; height: 16px; opacity: .5; vertical-align: -3px; margin-right: 4px; }

.post-thumbnail {
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 36px;
}

.post-thumbnail img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
}

.post-content {
    font-size: 1.05rem;
    line-height: 1.85;
    color: var(--gray-800);
}

.post-content h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--navy);
    margin: 40px 0 16px;
}

.post-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-800);
    margin: 32px 0 12px;
}

.post-content p { margin-bottom: 18px; }

.post-content img {
    border-radius: var(--radius-sm);
    margin: 24px 0;
}

.post-content ul, .post-content ol {
    margin: 16px 0;
    padding-left: 28px;
}

.post-content li { margin-bottom: 8px; }

.post-content blockquote {
    border-left: 4px solid var(--orange);
    padding: 16px 24px;
    margin: 24px 0;
    background: var(--gray-50);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-style: italic;
    color: var(--gray-700);
}

.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
}

.post-content th, .post-content td {
    padding: 12px 16px;
    border: 1px solid var(--gray-200);
    text-align: left;
}

.post-content th {
    background: var(--navy);
    color: var(--white);
    font-weight: 600;
}

/* ── RELATED POSTS ── */
.related-posts {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--gray-200);
}

.related-posts h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 28px;
}

/* ── CATEGORY FILTER ── */
.category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 40px;
}

.category-filter a {
    padding: 8px 20px;
    border-radius: 50px;
    font-size: .9rem;
    font-weight: 500;
    color: var(--gray-600);
    background: var(--gray-100);
    transition: all var(--transition);
}

.category-filter a:hover,
.category-filter a.active {
    background: var(--navy);
    color: var(--white);
}

/* ── PAGE HEADER ── */
.page-header {
    background: transparent;
    padding: 0 20px 12px;
}

.page-header .container {
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.page-header h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--navy);
    margin: 0;
    white-space: nowrap;
}

.page-header .breadcrumb {
    font-size: .82rem;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-light);
}

.page-header .breadcrumb a { color: var(--text-light); }
.page-header .breadcrumb a:hover { color: var(--orange); }

.breadcrumb-sep { opacity: .5; font-size: .75rem; }

/* ── PAGINATION ── */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 48px;
}

.pagination a, .pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    border-radius: var(--radius-sm);
    font-size: .9rem;
    font-weight: 500;
    transition: all var(--transition);
}

.pagination a {
    color: var(--gray-700);
    background: var(--gray-100);
}

.pagination a:hover {
    background: var(--navy);
    color: var(--white);
}

.pagination .current {
    background: var(--navy);
    color: var(--white);
    font-weight: 600;
}

/* ── CONTACT ── */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    margin-top: 40px;
}

.contact-info-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 24px;
    background: var(--gray-50);
    border-radius: var(--radius);
    margin-bottom: 16px;
}

.contact-info-card .icon {
    flex: 0 0 48px;
    height: 48px;
    background: var(--navy);
    color: var(--white);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-info-card h4 {
    font-size: .85rem;
    color: var(--text-light);
    font-weight: 500;
    margin-bottom: 4px;
}

.contact-info-card p {
    font-weight: 600;
    color: var(--gray-800);
}

.contact-form label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--gray-700);
    font-size: .9rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-size: .95rem;
    font-family: inherit;
    transition: border-color var(--transition);
    margin-bottom: 20px;
    background: var(--white);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(26,35,126,.1);
}

.contact-form textarea { min-height: 140px; resize: vertical; }

/* ── FOOTER ── */
.site-footer {
    background: transparent;
    color: rgba(255,255,255,.7);
    padding: 0 20px;
}

.site-footer > .container {
    background: var(--navy-dark);
    border-radius: var(--radius) var(--radius) 0 0;
    padding: 64px 40px 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.2fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-brand h3 {
    color: var(--white);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.footer-brand h3 span { color: var(--orange); }

.footer-brand p {
    font-size: .9rem;
    line-height: 1.7;
    margin-bottom: 20px;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,.1);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    transition: all var(--transition);
}

.footer-social a:hover {
    background: var(--orange);
    transform: translateY(-2px);
}

.footer-col h4 {
    color: var(--white);
    font-size: .95rem;
    font-weight: 600;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 12px;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 32px;
    height: 2px;
    background: var(--orange);
}

.footer-col ul { list-style: none; }

.footer-col li { margin-bottom: 10px; }

.footer-col a {
    color: rgba(255,255,255,.7);
    font-size: .9rem;
    transition: all var(--transition);
}

.footer-col a:hover {
    color: var(--orange);
    padding-left: 4px;
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: .9rem;
}

.footer-contact svg {
    width: 16px;
    height: 16px;
    margin-top: 4px;
    flex-shrink: 0;
    opacity: .6;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.1);
    padding: 20px 0;
    text-align: center;
    font-size: .85rem;
}

/* ── 404 ── */
.error-page {
    text-align: center;
    padding: 120px 20px;
}

.error-page h1 {
    font-size: 6rem;
    font-weight: 800;
    color: var(--navy);
    line-height: 1;
    margin-bottom: 16px;
}

.error-page p {
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 32px;
}

/* ── ABOUT ── */
.about-section { padding: 60px 0; }

.about-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.05rem;
    line-height: 1.85;
}

.about-content h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    color: var(--navy);
    margin: 36px 0 16px;
}

.about-content p { margin-bottom: 18px; }

.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin: 48px 0;
}

.stat-item {
    text-align: center;
    padding: 32px 16px;
    background: var(--gray-50);
    border-radius: var(--radius);
}

.stat-item .number {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--orange);
    display: block;
}

.stat-item .label {
    font-size: .9rem;
    color: var(--text-light);
    margin-top: 4px;
}

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
    .card-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .hide-mobile { display: none !important; }

    .header-top { padding: 6px 12px; }
    .header-top .container { padding: 6px 16px; justify-content: center; }
    .header-top-left { gap: 12px; font-size: .8rem; }

    .menu-toggle { display: block; }

    .nav-main {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 16px;
        box-shadow: var(--shadow-lg);
        border-top: 1px solid var(--gray-200);
    }

    .nav-main.active { display: flex; }
    .nav-main a { width: 100%; padding: 12px 16px; }

    .hero-banner { padding: 0 12px; }

    .section { padding: 32px 0; }
    .section-title { font-size: 1.15rem; margin-bottom: 2px; }
    .section-subtitle { font-size: .78rem; }
    .section-header .view-all { padding: 6px 12px; font-size: .75rem; }
    .section-header { margin-bottom: 16px; padding-bottom: 12px; gap: 8px; }

    .card-grid { grid-template-columns: 1fr; gap: 20px; }

    .contact-grid { grid-template-columns: 1fr; }

    .footer-grid { grid-template-columns: 1fr; gap: 32px; }

    .post-detail h1 { font-size: 1.6rem; }
    .post-meta-bar { flex-wrap: wrap; gap: 12px; }

    .related-posts .card-grid { grid-template-columns: repeat(2, 1fr); }

    .pagination a, .pagination span {
        min-width: 36px;
        height: 36px;
        font-size: .85rem;
    }
}

@media (max-width: 480px) {
    .related-posts .card-grid { grid-template-columns: 1fr; }
    .stats-row { grid-template-columns: 1fr 1fr; }
}

/* ── SEO H1 (visible but styled) ── */
.seo-h1 {
    text-align: center;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--navy);
    margin: 0;
    padding: 24px 16px 8px;
    line-height: 1.4;
}

@media (max-width: 768px) {
    .seo-h1 { font-size: 1.2rem; padding: 16px 12px 4px; }
}

/* ── UTILITIES ── */
.text-center { text-align: center; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

/* Lazy load fade */
.lazy { opacity: 0; transition: opacity .4s ease; }
.lazy.loaded { opacity: 1; }

/* No thumbnail placeholder */
.no-thumb {
    background: linear-gradient(135deg, var(--gray-100), var(--gray-200));
    display: flex;
    align-items: center;
    justify-content: center;
}

.no-thumb svg { width: 48px; height: 48px; opacity: .3; }

/* ── FLOATING CTA ── */
.floating-cta {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 90;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.float-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    box-shadow: 0 4px 20px rgba(0,0,0,.25);
    transition: all .3s ease;
    position: relative;
}

.float-btn:hover {
    transform: scale(1.1);
    color: var(--white);
}

.float-phone {
    background: var(--orange);
    animation: phone-ring 2s ease-in-out infinite;
}

.float-zalo {
    background: #0068ff;
}

.float-label {
    position: absolute;
    right: 64px;
    background: var(--gray-800);
    color: var(--white);
    padding: 6px 14px;
    border-radius: 6px;
    font-size: .8rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
}

.float-btn:hover .float-label { opacity: 1; }

.float-label::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    border: 3px solid transparent;
    border-left-color: var(--gray-800);
}

@keyframes phone-ring {
    0%, 100% { box-shadow: 0 4px 20px rgba(255,111,0,.3); }
    50% { box-shadow: 0 4px 30px rgba(255,111,0,.6), 0 0 0 8px rgba(255,111,0,.15); }
}

/* ── BACK TO TOP ── */
.back-to-top {
    position: fixed;
    bottom: 24px;
    left: 24px;
    width: 44px;
    height: 44px;
    background: var(--navy);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all .3s ease;
    z-index: 90;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--orange);
    transform: translateY(-2px);
}


@media (max-width: 768px) {
    .floating-cta { bottom: 16px; right: 16px; gap: 10px; }
    .float-btn { width: 50px; height: 50px; }
    .float-label { display: none; }
    .back-to-top { bottom: 16px; left: 16px; width: 40px; height: 40px; }
}
