/*
Theme Name: Sửa Máy Giặt Tech Theme
Theme URI: http://suamaygiat.local/
Author: Antigravity AI
Author URI: https://gemini.google.com/
Description: Theme WordPress tối ưu SEO, siêu nhẹ, thiết kế High-tech tối tím than kết hợp gradient. Hỗ trợ tốt di động, tích hợp sẵn Breadcrumb và Schema.
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: suamaygiat-tech
*/

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

/* --- Root Variables --- */
:root {
    --bg-dark: #0a0814;
    --bg-card: rgba(22, 17, 39, 0.65);
    --border-color: rgba(255, 255, 255, 0.07);
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    --text-white: #ffffff;
    
    /* Gradients & Accent Colors */
    --primary-grad: linear-gradient(135deg, #a855f7 0%, #06b6d4 100%);
    --purple-neon: #a855f7;
    --cyan-neon: #06b6d4;
    --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --glow-shadow: 0 0 20px rgba(168, 85, 247, 0.25);
    
    /* Layout */
    --max-width: 1200px;
    --font-sans: 'Be Vietnam Pro', sans-serif;
    --font-heading: 'Be Vietnam Pro', sans-serif;
}

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

body {
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(at 10% 20%, rgba(124, 58, 237, 0.15) 0px, transparent 50%),
        radial-gradient(at 90% 80%, rgba(6, 182, 212, 0.12) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.6;
    font-size: 16px;
    overflow-x: hidden;
}

a {
    color: var(--cyan-neon);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--purple-neon);
    text-shadow: 0 0 8px rgba(168, 85, 247, 0.5);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-white);
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 0.5em;
}

/* --- Typography Utilities --- */
.gradient-text {
    background: var(--primary-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* --- Glassmorphism Card Style --- */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    padding: 24px;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-4px);
    border-color: rgba(6, 182, 212, 0.3);
    box-shadow: 0 10px 40px 0 rgba(0, 0, 0, 0.5), var(--glow-shadow);
}

/* --- Header & Nav --- */
.site-header {
    background: rgba(10, 8, 20, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: var(--primary-grad);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    font-weight: bold;
    box-shadow: var(--glow-shadow);
}

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

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

.menu-list a {
    color: var(--text-main);
    font-weight: 500;
    font-size: 15px;
}

.menu-list a:hover,
.menu-list .current-menu-item > a {
    color: var(--cyan-neon);
}

/* Nút CTA ở Header */
.btn-cta {
    background: var(--primary-grad);
    color: var(--text-white) !important;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 14px;
    box-shadow: var(--glow-shadow);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-cta:hover {
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(6, 182, 212, 0.6);
    text-shadow: none;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-white);
    font-size: 24px;
    cursor: pointer;
}

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

.breadcrumbs {
    font-size: 14px;
    color: var(--text-muted);
    background: rgba(22, 17, 39, 0.3);
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    display: inline-block;
}

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

.breadcrumbs .separator {
    margin: 0 8px;
    color: rgba(255, 255, 255, 0.2);
}

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

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

/* --- Hero Section (Trang chủ) --- */
.hero-section {
    text-align: center;
    padding: 60px 20px;
    margin-bottom: 40px;
    position: relative;
}

.hero-tag {
    background: rgba(168, 85, 247, 0.15);
    color: var(--purple-neon);
    border: 1px solid rgba(168, 85, 247, 0.3);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 20px;
}

.hero-title {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.hero-desc {
    font-size: 18px;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 30px;
}

.hero-btns {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-white);
    border: 1px solid var(--border-color);
    padding: 10px 24px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-muted);
}

/* --- Features Grid --- */
.section-title {
    text-align: center;
    font-size: 32px;
    margin-bottom: 30px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--primary-grad);
    margin: 10px auto 0;
    border-radius: 2px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 60px;
}

.feature-item {
    text-align: center;
}

.feature-icon {
    font-size: 40px;
    margin-bottom: 15px;
    display: inline-block;
}

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

.posts-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.post-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 24px;
}

.post-card-thumb {
    width: 240px;
    height: 160px;
    background: #1a172e;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.post-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.post-card-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.post-card-category {
    font-size: 12px;
    text-transform: uppercase;
    color: var(--cyan-neon);
    font-weight: 700;
    margin-bottom: 8px;
}

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

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

.post-card-meta {
    font-size: 12px;
    color: var(--text-muted);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 12px;
}

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

.widget {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
}

.widget-title {
    font-size: 18px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.widget ul {
    list-style: none;
}

.widget li {
    margin-bottom: 12px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.03);
    padding-bottom: 8px;
}

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

/* Hotline Widget (Đặt dịch vụ) */
.widget-hotline {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.15) 0%, rgba(6, 182, 212, 0.15) 100%);
    border: 1px solid rgba(6, 182, 212, 0.2);
    text-align: center;
}

.widget-hotline-title {
    color: var(--cyan-neon);
}

.hotline-number {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-white);
    margin: 15px 0;
    display: block;
    text-shadow: 0 0 10px rgba(6, 182, 212, 0.5);
}

/* --- Single Post Detail --- */
.single-container {
    max-width: 900px;
    margin: 0 auto;
}

.post-header {
    margin-bottom: 30px;
    text-align: center;
}

.post-category-tag {
    color: var(--cyan-neon);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 14px;
    margin-bottom: 10px;
    display: block;
}

.post-main-title {
    font-size: 38px;
    font-weight: 800;
    margin-bottom: 15px;
}

.post-meta-details {
    color: var(--text-muted);
    font-size: 14px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.post-featured-image {
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
}

.post-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

.post-body-content {
    font-size: 17px;
    line-height: 1.8;
}

.post-body-content img,
.post-body-content figure,
.post-body-content iframe,
.post-body-content video {
    max-width: 100% !important;
    height: auto !important;
    box-sizing: border-box;
}

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

.post-body-content h2 {
    font-size: 26px;
    margin-top: 40px;
    margin-bottom: 15px;
    border-left: 4px solid var(--cyan-neon);
    padding-left: 12px;
}

.post-body-content h3 {
    font-size: 20px;
    margin-top: 30px;
    margin-bottom: 10px;
}

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

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

.post-body-content blockquote {
    background: rgba(168, 85, 247, 0.05);
    border-left: 4px solid var(--purple-neon);
    padding: 15px 20px;
    margin: 25px 0;
    font-style: italic;
    border-radius: 0 12px 12px 0;
}

/* --- Footer --- */
.site-footer {
    background: #05040a;
    border-top: 1px solid var(--border-color);
    padding: 60px 0 30px;
    margin-top: 80px;
}

.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: 40px;
}

.footer-column h3 {
    font-size: 18px;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 8px;
}

.footer-column h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--primary-grad);
}

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

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

.footer-column a {
    color: var(--text-muted);
}

.footer-column a:hover {
    color: var(--cyan-neon);
}

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

/* --- Mobile Floating calling bar --- */
.mobile-call-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(10, 8, 20, 0.9);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--border-color);
    padding: 12px 20px;
    display: none;
    justify-content: space-between;
    align-items: center;
    z-index: 999;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.5);
}

.mobile-call-btn {
    background: var(--primary-grad);
    color: var(--text-white);
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 14px;
    width: 100%;
    text-align: center;
    box-shadow: var(--glow-shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

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

@media (max-width: 768px) {
    /* Prevent horizontal page overflow globally */
    html, body {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100% !important;
        position: relative;
    }

    .site-header {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background: #0a0814 !important;
    }

    .mobile-menu-toggle {
        display: block;
    }
    
    .main-navigation {
        position: fixed;
        top: 73px;
        left: -100%;
        right: 0;
        bottom: 0;
        background: #0a0814;
        flex-direction: column;
        padding: 40px 24px;
        align-items: center;
        gap: 30px;
        transition: left 0.3s cubic-bezier(0.77, 0.2, 0.05, 1.0);
        z-index: 9999;
        width: 100%;
        box-shadow: 0 10px 30px rgba(0,0,0,0.9);
        border: none;
    }
    
    .main-navigation.active {
        left: 0;
    }
    
    .menu-list {
        flex-direction: column;
        gap: 24px;
        width: 100%;
        text-align: center;
    }
    
    .menu-list a {
        font-size: 20px;
        display: block;
        width: 100%;
        padding: 10px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    }
    
    .hero-title {
        font-size: 28px !important;
    }
    
    .hero-desc {
        font-size: 15px;
    }
    
    .single-nav {
        display: none;
    }

    /* Force Grid to Flex on Mobile to prevent grid stretching bug */
    .content-grid {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        max-width: 100% !important;
        gap: 20px !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Stack Horizontal Cards on Mobile */
    .post-card {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 16px !important;
    }

    .post-card-thumb {
        width: 100% !important;
        height: 180px !important;
    }

    /* Breadcrumbs mobile wrap fix */
    .breadcrumbs-container {
        padding: 15px 16px 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }

    .breadcrumbs {
        display: block !important;
        width: 100% !important;
        box-sizing: border-box;
        word-wrap: break-word !important;
        word-break: break-word !important;
        white-space: normal !important;
    }

    /* Single Post Card Containment */
    .single-container {
        padding: 16px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .post-main-title {
        font-size: 22px !important;
        word-wrap: break-word !important;
        word-break: break-word !important;
        line-height: 1.3 !important;
        white-space: normal !important;
    }

    .post-featured-image {
        margin-bottom: 20px !important;
        border-radius: 8px !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Content Images Containment */
    .post-body-content img,
    .post-body-content figure,
    .post-body-content iframe,
    .post-body-content video {
        max-width: 100% !important;
        height: auto !important;
        box-sizing: border-box !important;
    }
}

/* --- Table of Contents (TOC) --- */
.post-toc {
    margin: 30px 0;
    padding: 24px;
    background: rgba(22, 17, 39, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: var(--card-shadow);
}

.toc-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-white);
    display: flex;
    align-items: center;
    gap: 8px;
}

.toc-title::before {
    content: '📊';
    font-size: 16px;
}

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

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

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

.toc-item a {
    color: var(--text-main);
    font-size: 15px;
    transition: all 0.2s ease;
}

.toc-item a:hover {
    color: var(--cyan-neon);
    padding-left: 4px;
}

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

.toc-level-3 {
    padding-left: 20px;
    font-size: 14px;
    font-weight: 400;
}

.toc-level-3 a {
    color: var(--text-muted);
}

/* --- Related Posts Grid --- */
.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.related-post-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 16px;
}

.related-post-thumb {
    width: 100%;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border-color);
    transition: border-color 0.3s ease;
}

.related-post-card:hover .related-post-thumb {
    border-color: rgba(6, 182, 212, 0.3);
}

@media (max-width: 576px) {
    .related-posts-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
}

