/*
Theme Name: AN NINH.ORG
Theme URI: https://vdg.vn
Description: Giao diện chuyên sâu về an ninh dân sự, bảo mật số, review thiết bị và thu lead giải pháp. Thiết kế theo nhận diện thương hiệu Vimido (Vàng - Đỏ - Đen), chuẩn SEO, mobile-first và tốc độ cao.
Author: VDG Media
Author URI: https://vdg.vn
Template: astra
Version: 1.0.0
Text Domain: anninh-theme
*/

/* ==========================================================================
   CSS VARIABLES & DESIGN TOKENS (BẢNG MÀU VIMIDO)
   ========================================================================== */
:root {
    --ano-black: #171717;        /* Đen than: Header, Footer, Khối thương hiệu */
    --ano-gold: #D4A62A;         /* Vàng kim: Logo, Icon, Điểm nhấn */
    --ano-gold-hover: #b88d1d;
    --ano-gold-light: #F9F3E5;
    --ano-red: #C62828;          /* Đỏ: CTA chính, Hành động chuyển đổi */
    --ano-red-hover: #a71d1d;
    --ano-ivory: #FAF8F3;        /* Trắng ngà: Nền phụ, Khối tương phản */
    --ano-white: #FFFFFF;        /* Trắng: Nền bài viết, Card */
    --ano-text: #252525;         /* Chữ chính: Dễ đọc trên nền sáng */
    --ano-text-muted: #555555;
    --ano-border: #E0DFDB;
    --ano-border-dark: #333333;
    
    --ano-font: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    --ano-max-width: 1200px;
    --ano-reading-width: 800px;
    --ano-radius-sm: 4px;
    --ano-radius-md: 8px;
    --ano-radius-lg: 12px;
    
    --ano-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --ano-shadow-md: 0 6px 18px rgba(0, 0, 0, 0.08);
    --ano-shadow-lg: 0 12px 28px rgba(0, 0, 0, 0.12);
}

/* ==========================================================================
   BASE & TYPOGRAPHY
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    font-family: var(--ano-font);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--ano-text);
    background-color: var(--ano-white);
    overflow-x: hidden;
    min-width: 360px;
}

a {
    color: var(--ano-black);
    text-decoration: none;
    transition: color 0.2s ease, border-color 0.2s ease;
}

a:hover {
    color: var(--ano-red);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--ano-black);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.75rem;
}

h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.2rem; }

p {
    margin-bottom: 1.25rem;
}

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

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

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */
.ano-site-header {
    background-color: var(--ano-black);
    color: var(--ano-white);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 2px solid var(--ano-gold);
    box-shadow: var(--ano-shadow-md);
}

.ano-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

/* Brand / Logo */
.ano-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.ano-brand-logo-text {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: var(--ano-white);
}

.ano-brand-logo-text span {
    color: var(--ano-gold);
}

.ano-brand-tagline {
    font-size: 0.7rem;
    color: #AAAAAA;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin-top: -3px;
}

/* Desktop Navigation */
.ano-desktop-nav {
    display: none;
}

@media (min-width: 992px) {
    .ano-desktop-nav {
        display: flex;
        align-items: center;
        gap: 24px;
    }
}

.ano-nav-list {
    display: flex;
    list-style: none;
    gap: 20px;
    margin: 0;
    padding: 0;
}

.ano-nav-item {
    position: relative;
}

.ano-nav-link {
    color: var(--ano-white);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 10px 4px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.ano-nav-link:hover,
.ano-nav-item:hover > .ano-nav-link {
    color: var(--ano-gold);
}

/* Dropdown */
.ano-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--ano-black);
    border: 1px solid var(--ano-border-dark);
    border-top: 2px solid var(--ano-gold);
    border-radius: 0 0 var(--ano-radius-md) var(--ano-radius-md);
    min-width: 230px;
    list-style: none;
    padding: 8px 0;
    margin: 0;
    box-shadow: var(--ano-shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease;
}

.ano-nav-item:hover .ano-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.ano-dropdown-link {
    display: block;
    padding: 9px 18px;
    color: #DDDDDD;
    font-size: 0.9rem;
    font-weight: 500;
}

.ano-dropdown-link:hover {
    color: var(--ano-gold);
    background-color: #222222;
    padding-left: 22px;
}

/* Header Actions */
.ano-header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.ano-hotline-badge {
    display: none;
    color: var(--ano-gold);
    font-weight: 700;
    font-size: 0.9rem;
}

@media (min-width: 1100px) {
    .ano-hotline-badge {
        display: flex;
        align-items: center;
        gap: 6px;
    }
}

.ano-btn-header-cta {
    background-color: var(--ano-red);
    color: var(--ano-white) !important;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 8px 18px;
    border-radius: var(--ano-radius-sm);
    transition: background 0.2s;
    white-space: nowrap;
}

.ano-btn-header-cta:hover {
    background-color: var(--ano-red-hover);
}

/* Mobile Toggle */
.ano-mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--ano-white);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 6px;
}

@media (min-width: 992px) {
    .ano-mobile-toggle {
        display: none;
    }
}

/* Mobile Drawer */
.ano-mobile-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 360px;
    height: 100vh;
    background: var(--ano-black);
    z-index: 10000;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.5);
    overflow-y: auto;
    padding: 24px;
}

.ano-mobile-drawer.is-open {
    right: 0;
}

.ano-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.ano-drawer-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.ano-drawer-close {
    background: transparent;
    border: none;
    color: var(--ano-gold);
    font-size: 1.75rem;
    cursor: pointer;
    float: right;
}

.ano-mobile-nav-list {
    list-style: none;
    margin-top: 40px;
}

.ano-mobile-nav-link {
    display: block;
    color: var(--ano-white);
    font-size: 1.1rem;
    font-weight: 600;
    padding: 12px 0;
    border-bottom: 1px solid var(--ano-border-dark);
}

.ano-mobile-nav-link:hover {
    color: var(--ano-gold);
}

/* ==========================================================================
   HOMEPAGE 9 BLOCKS
   ========================================================================== */
/* Block 1: Hero */
.ano-hero-section {
    background: linear-gradient(135deg, #171717 0%, #242424 100%);
    color: var(--ano-white);
    padding: 60px 0 70px;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid #333;
}

.ano-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(212, 166, 42, 0.15);
    border: 1px solid var(--ano-gold);
    color: var(--ano-gold);
    font-size: 0.85rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 20px;
    margin-bottom: 20px;
}

.ano-hero-title {
    color: var(--ano-white);
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 18px;
}

.ano-hero-desc {
    color: #CCCCCC;
    font-size: clamp(1rem, 2vw, 1.2rem);
    max-width: 680px;
    margin-bottom: 30px;
    line-height: 1.6;
}

.ano-hero-cta-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 35px;
}

.ano-hero-search {
    max-width: 600px;
    position: relative;
}

.ano-search-form {
    display: flex;
    background: var(--ano-white);
    border-radius: var(--ano-radius-md);
    overflow: hidden;
    box-shadow: var(--ano-shadow-lg);
}

.ano-search-input {
    flex: 1;
    border: none;
    padding: 14px 18px;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--ano-text);
    outline: none;
}

.ano-search-btn {
    background-color: var(--ano-gold);
    color: var(--ano-black);
    font-weight: 700;
    border: none;
    padding: 0 24px;
    cursor: pointer;
    transition: background 0.2s;
    font-family: inherit;
}

.ano-search-btn:hover {
    background-color: var(--ano-gold-hover);
}

/* Block 2: Giải pháp theo nhu cầu */
.ano-section {
    padding: 60px 0;
}

.ano-section-ivory {
    background-color: var(--ano-ivory);
}

.ano-section-header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 45px;
}

.ano-section-tag {
    color: var(--ano-gold);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 8px;
    display: block;
}

.ano-section-title {
    font-size: clamp(1.6rem, 3.5vw, 2.2rem);
    font-weight: 800;
    color: var(--ano-black);
}

.ano-section-subtitle {
    color: var(--ano-text-muted);
    font-size: 1rem;
    margin-top: 10px;
}

.ano-solution-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.ano-solution-card {
    background: var(--ano-white);
    border: 1px solid var(--ano-border);
    border-radius: var(--ano-radius-md);
    padding: 24px 20px;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--ano-text);
}

.ano-solution-card:hover {
    border-color: var(--ano-gold);
    transform: translateY(-4px);
    box-shadow: var(--ano-shadow-md);
}

.ano-solution-icon {
    font-size: 2.2rem;
    margin-bottom: 15px;
    color: var(--ano-gold);
}

.ano-solution-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--ano-black);
}

.ano-solution-desc {
    font-size: 0.9rem;
    color: var(--ano-text-muted);
    margin-bottom: 15px;
    flex: 1;
}

.ano-solution-link {
    color: var(--ano-red);
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Block 3: Thiết bị đề xuất */
.ano-devices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 24px;
}

.ano-device-card {
    background: var(--ano-white);
    border: 1px solid var(--ano-border);
    border-radius: var(--ano-radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.25s ease;
}

.ano-device-card:hover {
    box-shadow: var(--ano-shadow-md);
    border-color: var(--ano-gold);
}

.ano-device-thumb {
    position: relative;
    height: 190px;
    background: #f5f5f5;
    overflow: hidden;
}

.ano-device-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.ano-device-card:hover .ano-device-thumb img {
    transform: scale(1.04);
}

.ano-device-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--ano-black);
    color: var(--ano-gold);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
}

.ano-device-body {
    padding: 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.ano-device-category {
    font-size: 0.75rem;
    color: var(--ano-text-muted);
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 4px;
}

.ano-device-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.4;
}

.ano-device-target {
    font-size: 0.85rem;
    color: #444;
    background: var(--ano-ivory);
    padding: 6px 10px;
    border-radius: 4px;
    margin-bottom: 12px;
}

.ano-device-price {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--ano-red);
    margin-bottom: 15px;
}

.ano-device-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: auto;
}

.ano-btn-review {
    background: #f0f0f0;
    color: var(--ano-black);
    font-weight: 600;
    font-size: 0.85rem;
    text-align: center;
    padding: 9px 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.ano-btn-review:hover {
    background: #e0e0e0;
    color: var(--ano-black);
}

.ano-btn-partner {
    background: var(--ano-red);
    color: var(--ano-white) !important;
    font-weight: 700;
    font-size: 0.85rem;
    text-align: center;
    padding: 9px 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.ano-btn-partner:hover {
    background: var(--ano-red-hover);
}

/* Block 4: Review & So sánh nổi bật */
.ano-comparisons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.ano-comp-card {
    background: var(--ano-white);
    border: 1px solid var(--ano-border);
    border-left: 4px solid var(--ano-gold);
    border-radius: var(--ano-radius-md);
    padding: 20px;
    box-shadow: var(--ano-shadow-sm);
}

/* Block 6: Kiến thức an ninh */
.ano-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.ano-post-card {
    background: var(--ano-white);
    border: 1px solid var(--ano-border);
    border-radius: var(--ano-radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.25s ease;
}

.ano-post-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--ano-shadow-md);
    border-color: var(--ano-gold);
}

.ano-post-thumb {
    height: 180px;
    background: #f5f5f5;
    overflow: hidden;
}

.ano-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.ano-post-card:hover .ano-post-thumb img {
    transform: scale(1.04);
}

.ano-post-body {
    padding: 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.ano-post-meta {
    font-size: 0.8rem;
    color: var(--ano-text-muted);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ano-post-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.ano-post-title {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 10px;
}

.ano-post-title a:hover {
    color: var(--ano-red);
}

.ano-post-excerpt {
    font-size: 0.9rem;
    color: var(--ano-text-muted);
    line-height: 1.5;
    margin-bottom: 15px;
    flex: 1;
}

/* Block 7: Quy trình 4 bước */
.ano-process-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.ano-process-step {
    background: var(--ano-white);
    border: 1px solid var(--ano-border);
    border-radius: var(--ano-radius-md);
    padding: 24px 20px;
    text-align: center;
    position: relative;
}

.ano-step-number {
    width: 44px;
    height: 44px;
    background: var(--ano-black);
    color: var(--ano-gold);
    font-weight: 800;
    font-size: 1.2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    border: 2px solid var(--ano-gold);
}

.ano-step-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.ano-step-desc {
    font-size: 0.85rem;
    color: var(--ano-text-muted);
    margin: 0;
}

/* Block 8: Thông tin tạo niềm tin */
.ano-trust-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.ano-trust-card {
    background: var(--ano-ivory);
    border-left: 3px solid var(--ano-gold);
    padding: 20px;
    border-radius: 0 var(--ano-radius-md) var(--ano-radius-md) 0;
}

.ano-trust-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ano-trust-desc {
    font-size: 0.88rem;
    color: var(--ano-text-muted);
    margin: 0;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.ano-site-footer {
    background: var(--ano-black);
    color: #CCCCCC;
    padding: 60px 0 25px;
    border-top: 3px solid var(--ano-gold);
}

.ano-footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.ano-footer-col h4 {
    color: var(--ano-gold);
    font-size: 1.1rem;
    margin-bottom: 18px;
    position: relative;
    padding-bottom: 8px;
}

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

.ano-footer-links {
    list-style: none;
}

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

.ano-footer-links a {
    color: #BBBBBB;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.ano-footer-links a:hover {
    color: var(--ano-gold);
    padding-left: 4px;
}

.ano-footer-notice-box {
    background: #222222;
    border: 1px solid var(--ano-border-dark);
    border-left: 4px solid var(--ano-red);
    padding: 15px 20px;
    border-radius: var(--ano-radius-sm);
    margin-bottom: 30px;
    font-size: 0.85rem;
    line-height: 1.5;
    color: #DDD;
}

.ano-footer-bottom {
    border-top: 1px solid var(--ano-border-dark);
    padding-top: 25px;
    text-align: center;
    font-size: 0.85rem;
    color: #888888;
}

/* ==========================================================================
   SINGLE POST & READING TOC
   ========================================================================== */
.ano-post-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--ano-border);
}

.ano-breadcrumbs {
    font-size: 0.85rem;
    color: var(--ano-text-muted);
    margin-bottom: 15px;
}

.ano-breadcrumbs a {
    color: var(--ano-text-muted);
}

.ano-breadcrumbs a:hover {
    color: var(--ano-red);
}

.ano-toc-box {
    background: var(--ano-ivory);
    border: 1px solid var(--ano-border);
    border-left: 4px solid var(--ano-gold);
    border-radius: var(--ano-radius-md);
    padding: 20px;
    margin: 25px 0;
}

.ano-toc-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ano-black);
}

.ano-toc-list {
    list-style: none;
    margin: 0;
    padding-left: 0;
}

.ano-toc-list li {
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.ano-toc-list li.toc-h3 {
    padding-left: 18px;
    font-size: 0.9rem;
}

.ano-toc-list a {
    color: var(--ano-text);
}

.ano-toc-list a:hover {
    color: var(--ano-red);
}

.ano-article-content {
    font-size: 1.08rem;
    line-height: 1.8;
    color: var(--ano-text);
}

.ano-article-content h2 {
    margin-top: 2rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--ano-border);
}

.ano-article-content h3 {
    margin-top: 1.5rem;
}

.ano-article-content img {
    border-radius: var(--ano-radius-md);
    margin: 25px auto;
}

/* Mobile Sticky Bar */
.ano-mobile-bottom-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--ano-black);
    border-top: 2px solid var(--ano-gold);
    padding: 10px 16px;
    z-index: 999;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
    .ano-mobile-bottom-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }
}

.ano-mobile-bar-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px;
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: var(--ano-radius-sm);
    text-decoration: none;
}

.ano-mobile-bar-btn.btn-call {
    background: var(--ano-gold);
    color: var(--ano-black) !important;
}

.ano-mobile-bar-btn.btn-zalo {
    background: #0068FF;
    color: var(--ano-white) !important;
}

.ano-mobile-bar-btn.btn-lead {
    background: var(--ano-red);
    color: var(--ano-white) !important;
}
