/*
Theme Name: Tra Cứu Hotline Theme
Theme URI: http://tracuuhotline.online/
Author: Antigravity AI
Author URI: https://gemini.google.com/
Description: Giao diện WordPress danh bạ tra cứu số điện thoại khẩn cấp, cơ quan nhà nước và doanh nghiệp. Tối ưu SEO, giao diện sáng (Light-theme) trực quan, có bộ lọc TOC, Schema JSON-LD tích hợp số điện thoại, và thanh gọi nổi (Float Call Bar) trên PC & Mobile.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tracuuhotline-site
*/

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* --- Root Variables --- */
:root {
    --bg-body: #f8f9fa;
    --bg-card: #ffffff;
    --border-color: #e9ecef;
    --border-dark: #dee2e6;
    
    /* Brand Colors */
    --primary: #e03131; /* Đỏ khẩn cấp */
    --primary-hover: #c92a2a;
    --secondary: #0b2240; /* Navy dịch vụ công */
    --accent-green: #2b8a3e; /* Xanh lá hoạt động */
    
    /* Text Colors */
    --text-main: #212529;
    --text-muted: #495057;
    --text-white: #ffffff;
    
    /* Layout & Fonts */
    --max-width: 1140px;
    --font-sans: 'Be Vietnam Pro', sans-serif;
    --font-heading: 'Plus Jakarta Sans', sans-serif;
    --radius: 6px;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.03);
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.04);
}

/* --- Base Reset --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.6;
    font-size: 15px;
    overflow-x: hidden;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.2s ease-in-out;
}

a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--secondary);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 12px;
}

/* --- Layout Structure --- */
.site-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.header-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 800;
    color: var(--secondary);
}

.logo-badge {
    background: var(--primary);
    color: var(--text-white);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 700;
}

.main-navigation {
    display: flex;
    align-items: center;
    gap: 30px;
}

.menu-list {
    display: flex;
    list-style: none;
    gap: 24px;
}

.menu-list a {
    color: var(--secondary);
    font-weight: 600;
    font-size: 14px;
    padding: 6px 0;
}

.menu-list a:hover,
.menu-list .current-menu-item > a {
    color: var(--primary);
    text-decoration: none;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--secondary);
    font-size: 24px;
    cursor: pointer;
}

/* --- Container Main --- */
.site-main {
    max-width: var(--max-width);
    margin: 30px auto;
    padding: 0 20px;
}

/* --- Breadcrumbs --- */
.breadcrumbs-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 15px 20px 0;
}

.breadcrumbs {
    font-size: 13px;
    color: var(--text-muted);
    background: var(--bg-card);
    padding: 8px 16px;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    display: inline-block;
    box-shadow: var(--shadow-sm);
}

.breadcrumbs a {
    color: var(--secondary);
}

.breadcrumbs .separator {
    margin: 0 6px;
    color: #adb5bd;
}

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

/* --- Banner Hero (Light Directory Portal) --- */
.hero-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 40px 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
    text-align: center;
}

.hero-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 15px;
}

.hero-title span {
    color: var(--primary);
}

.hero-desc {
    font-size: 16px;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 25px;
}

.search-form-hero {
    max-width: 650px;
    margin: 0 auto;
    display: flex;
    gap: 8px;
}

.search-field-hero {
    flex-grow: 1;
    padding: 12px 16px;
    border: 1px solid var(--border-dark);
    border-radius: var(--radius);
    font-size: 15px;
    outline: none;
}

.search-field-hero:focus {
    border-color: var(--secondary);
}

.btn-search-hero {
    background: var(--secondary);
    color: var(--text-white);
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius);
    font-weight: 700;
    cursor: pointer;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-search-hero:hover {
    background: #06152a;
}

/* --- Emergency Quick Dial Grid --- */
.emergency-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 40px;
}

.emergency-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.emergency-card h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.emergency-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 12px;
}

.emergency-number {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
    font-family: var(--font-heading);
    margin-bottom: 12px;
}

.btn-call-quick {
    background: #fff5f5;
    color: var(--primary);
    border: 1px solid rgba(224, 49, 49, 0.2);
    border-radius: var(--radius);
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-call-quick:hover {
    background: var(--primary);
    color: var(--text-white);
    text-decoration: none;
}

/* --- Grid Content & Sidebar --- */
.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.section-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--secondary);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 8px;
    margin-bottom: 20px;
}

.posts-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

/* --- Directory Post Card --- */
.post-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.post-card-category {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--primary);
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.post-card-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 10px;
}

.post-card-title a {
    color: var(--secondary);
}

.post-card-title a:hover {
    color: var(--primary);
    text-decoration: none;
}

.post-card-excerpt {
    font-size: 13.5px;
    color: var(--text-muted);
    margin-bottom: 16px;
    flex-grow: 1;
}

/* Card Phone Widget */
.card-phone-widget {
    background: #f8f9fa;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.card-phone-number {
    font-size: 16px;
    font-weight: 800;
    color: var(--secondary);
    font-family: var(--font-heading);
}

.card-phone-btn {
    color: var(--primary);
    font-weight: 700;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* --- Sidebar Styling --- */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.widget {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.widget-title {
    font-size: 16px;
    font-weight: 800;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 8px;
    margin-bottom: 16px;
}

.widget ul {
    list-style: none;
}

.widget li {
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px dashed var(--border-color);
    font-size: 13.5px;
}

.widget li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.widget li a {
    color: var(--secondary);
}

.widget li a:hover {
    color: var(--primary);
    text-decoration: none;
}

/* --- Single Post Detail --- */
.single-post-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.post-header {
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
}

.post-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 10px;
}

.post-meta {
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    gap: 15px;
}

/* Prominent Hotline Card */
.prominent-hotline-card {
    background: #fff5f5;
    border: 2px solid rgba(224, 49, 49, 0.15);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
}

.hotline-info-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hotline-status-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--accent-green);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-green);
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(43, 138, 62, 0.4);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(43, 138, 62, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 8px rgba(43, 138, 62, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(43, 138, 62, 0);
    }
}

.hotline-label {
    font-size: 14px;
    color: var(--text-muted);
}

.hotline-phone-display {
    font-size: 32px;
    font-weight: 800;
    color: var(--primary);
    font-family: var(--font-heading);
}

.btn-hotline-call {
    background: var(--primary);
    color: var(--text-white) !important;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s ease;
    box-shadow: 0 4px 12px rgba(224, 49, 49, 0.2);
}

.btn-hotline-call:hover {
    background: var(--primary-hover);
    text-decoration: none;
}

/* Post Body */
.post-body {
    font-size: 15.5px;
    line-height: 1.8;
}

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

.post-body h2 {
    font-size: 22px;
    margin-top: 30px;
    margin-bottom: 14px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--border-color);
}

.post-body h3 {
    font-size: 18px;
    margin-top: 24px;
    margin-bottom: 12px;
}

.post-body ul, .post-body ol {
    margin-bottom: 18px;
    padding-left: 20px;
}

.post-body li {
    margin-bottom: 6px;
}

/* --- Table of Contents (TOC) --- */
.post-toc {
    background: #fdfdfd;
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--secondary);
    border-radius: var(--radius);
    padding: 20px;
    margin: 25px 0;
}

.toc-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

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

.toc-item {
    margin-bottom: 8px;
    line-height: 1.4;
}

.toc-item:last-child {
    margin-bottom: 0;
}

.toc-item a {
    color: var(--text-muted);
    font-size: 14px;
}

.toc-item a:hover {
    color: var(--primary);
    text-decoration: none;
}

.toc-level-2 {
    font-weight: 600;
}

.toc-level-3 {
    padding-left: 16px;
    font-size: 13.5px;
}

/* --- Floating Call Box (Desktop PC) --- */
.floating-desktop-call {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 280px;
    background: var(--bg-card);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 999;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.floating-desktop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

.floating-desktop-title {
    font-size: 13px;
    font-weight: 800;
    color: var(--secondary);
}

.btn-close-float {
    background: none;
    border: none;
    cursor: pointer;
    color: #adb5bd;
}

.btn-close-float:hover {
    color: var(--text-main);
}

.floating-desktop-body {
    display: flex;
    align-items: center;
    gap: 10px;
}

.floating-desktop-phone {
    font-size: 20px;
    font-weight: 800;
    color: var(--primary);
    font-family: var(--font-heading);
}

/* --- Floating Call Bar (Mobile Sticky Bottom) --- */
.floating-mobile-callbar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border-dark);
    box-shadow: 0 -4px 10px rgba(0,0,0,0.06);
    z-index: 9999;
    padding: 10px 16px;
}

.mobile-callbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.mobile-callbar-info {
    flex-grow: 1;
}

.mobile-callbar-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
}

.mobile-callbar-number {
    font-size: 18px;
    font-weight: 800;
    color: var(--primary);
    font-family: var(--font-heading);
}

.btn-mobile-call {
    background: var(--primary);
    color: var(--text-white) !important;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* --- Footer --- */
.site-footer {
    background: var(--secondary);
    color: #adb5bd;
    border-top: 4px solid var(--primary);
    padding: 50px 0 25px;
    margin-top: 60px;
}

.footer-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.footer-column h3 {
    font-size: 16px;
    color: var(--text-white);
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 2px solid rgba(255,255,255,0.08);
}

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

.footer-column li {
    margin-bottom: 10px;
    font-size: 13.5px;
}

.footer-column a {
    color: #adb5bd;
}

.footer-column a:hover {
    color: var(--text-white);
    text-decoration: none;
}

.footer-bottom {
    max-width: var(--max-width);
    margin: 40px auto 0;
    padding: 20px 20px 0;
    border-top: 1px solid rgba(255,255,255,0.08);
    text-align: center;
    font-size: 13px;
    color: #868e96;
}

/* --- Responsive Media Queries --- */
@media (max-width: 991px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .main-navigation {
        position: fixed;
        top: 61px;
        left: -100%;
        right: 0;
        bottom: 0;
        background: var(--bg-card);
        flex-direction: column;
        padding: 30px 20px;
        align-items: center;
        gap: 24px;
        transition: left 0.3s cubic-bezier(0.77, 0.2, 0.05, 1.0);
        z-index: 9999;
        width: 100%;
        box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    }
    
    .main-navigation.active {
        left: 0;
    }
    
    .menu-list {
        flex-direction: column;
        gap: 16px;
        width: 100%;
        text-align: center;
    }
    
    .menu-list a {
        font-size: 16px;
        display: block;
        padding: 8px 0;
        border-bottom: 1px solid var(--border-color);
    }
    
    .hero-title {
        font-size: 24px;
    }
    
    .hero-desc {
        font-size: 14px;
    }
    
    .floating-desktop-call {
        display: none !important; /* Mọc trên mobile */
    }
    
    .floating-mobile-callbar {
        display: block; /* Mọc trên mobile */
    }
    
    body {
        padding-bottom: 60px; /* Chừa khoảng trống cho Mobile bottom call bar */
    }
}
