/**
 * Theme Name: Asianux Developer
 * Theme URI: https://www.asianux.org.vn
 * Description: Theme hiện đại cho blog kỹ thuật Asianux Việt Nam. Tương thích WordPress 6.9+, PHP 7.4+.
 * Version: 1.0.0
 * Author: Asianux Team
 * Author URI: https://www.asianux.org.vn
 * License: GNU General Public License v3 or later
 * License URI: https://www.gnu.org/licenses/gpl-3.0.html
 * Text Domain: asianux-developer
 * Tags: blog, two-columns, right-sidebar, custom-menu, featured-images, threaded-comments
 */

/* === CSS Variables === */
:root {
    --primary: #1a7a3a;
    --primary-dark: #0f5c28;
    --primary-light: #e8f5ec;
    --accent: #2ecc71;
    --bg-body: #f0f2f5;
    --bg-card: #ffffff;
    --bg-header: linear-gradient(135deg, #0d3b1e 0%, #1a7a3a 50%, #0f5c28 100%);
    --text-primary: #1a1a2e;
    --text-secondary: #555;
    --text-muted: #888;
    --border: #e0e0e0;
    --border-hover: #1a7a3a;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --radius: 10px;
    --radius-sm: 6px;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    --max-width: 1200px;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-primary);
    background: var(--bg-body);
    -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { margin: 0.5em 0 1.5em; padding-left: 1.5em; }

/* === Layout === */
.site-wrapper { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }
.content-area { display: flex; gap: 30px; margin-top: 30px; align-items: flex-start; }
.main-content { flex: 1; min-width: 0; }
.sidebar { width: 320px; flex-shrink: 0; }

/* === Header === */
.site-header {
    background: var(--bg-header);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0,0,0,0.2);
}
.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}
.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 0 12px;
}
.site-branding { display: flex; align-items: center; gap: 14px; }
.site-logo {
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}
.site-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}
.site-title a { color: #fff; }
.site-title a:hover { color: rgba(255,255,255,0.9); text-decoration: none; }
.site-description {
    color: rgba(255,255,255,0.7);
    font-size: 0.85rem;
    margin-top: 2px;
    font-weight: 400;
}

/* Header search */
.header-search { position: relative; }
.header-search input[type="search"] {
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 25px;
    padding: 9px 18px 9px 40px;
    color: #fff;
    font-size: 0.9rem;
    width: 220px;
    transition: all var(--transition);
    backdrop-filter: blur(10px);
    font-family: var(--font-body);
}
.header-search input[type="search"]::placeholder { color: rgba(255,255,255,0.5); }
.header-search input[type="search"]:focus {
    outline: none;
    width: 280px;
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.4);
}
.header-search .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255,255,255,0.5);
    font-size: 0.9rem;
}

/* === Navigation === */
.main-nav {
    border-top: 1px solid rgba(255,255,255,0.1);
}
.main-nav ul {
    list-style: none;
    display: flex;
    gap: 0;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}
.main-nav > ul > li > a {
    display: block;
    padding: 12px 18px;
    color: rgba(255,255,255,0.85);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition);
    position: relative;
    letter-spacing: 0.01em;
}
.main-nav > ul > li > a:hover,
.main-nav > ul > li.current-menu-item > a,
.main-nav > ul > li.current_page_item > a {
    color: #fff;
    background: rgba(255,255,255,0.1);
    text-decoration: none;
}
.main-nav > ul > li > a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: all var(--transition);
    transform: translateX(-50%);
}
.main-nav > ul > li > a:hover::after,
.main-nav > ul > li.current-menu-item > a::after { width: 70%; }

/* Dropdown */
.main-nav ul ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 220px;
    box-shadow: var(--shadow-lg);
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    z-index: 999;
    padding: 6px 0;
}
.main-nav li { position: relative; }
.main-nav li:hover > ul { display: block; }
.main-nav ul ul li a {
    display: block;
    padding: 10px 20px;
    color: var(--text-primary);
    font-size: 0.88rem;
    transition: all var(--transition);
}
.main-nav ul ul li a:hover {
    background: var(--primary-light);
    color: var(--primary);
    text-decoration: none;
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    background: none;
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 1.2rem;
}

/* === Posts === */
.post-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    transition: all var(--transition);
    border: 1px solid var(--border);
}
.post-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--border-hover);
    transform: translateY(-2px);
}
.post-card-body { padding: 28px 30px; }
.post-card .post-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 14px;
    font-size: 0.82rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}
.post-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}
.post-category {
    background: var(--primary-light);
    color: var(--primary);
    padding: 3px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.post-category:hover { background: var(--primary); color: #fff; text-decoration: none; }
.post-card .entry-title {
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 12px;
}
.post-card .entry-title a { color: var(--text-primary); }
.post-card .entry-title a:hover { color: var(--primary); text-decoration: none; }
.post-card .entry-excerpt {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 18px;
    font-size: 0.95rem;
}
.read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all var(--transition);
}
.read-more:hover { gap: 10px; text-decoration: none; }
.read-more .arrow { transition: transform var(--transition); }
.read-more:hover .arrow { transform: translateX(3px); }

/* Post thumbnail */
.post-thumbnail {
    overflow: hidden;
    max-height: 280px;
}
.post-thumbnail img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.post-card:hover .post-thumbnail img { transform: scale(1.03); }

/* === Single Post === */
.single-post-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}
.single-post-header .entry-title {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 16px;
    color: var(--text-primary);
}
.single-post-content .entry-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-primary);
}
.entry-content h2 { font-size: 1.6rem; margin: 1.8em 0 0.8em; font-weight: 700; color: var(--text-primary); }
.entry-content h3 { font-size: 1.3rem; margin: 1.5em 0 0.6em; font-weight: 700; }
.entry-content h4 { font-size: 1.1rem; margin: 1.3em 0 0.5em; font-weight: 600; }
.entry-content p { margin-bottom: 1.4em; }
.entry-content pre {
    background: #1a1a2e;
    color: #e8e8e8;
    padding: 20px 24px;
    border-radius: var(--radius-sm);
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 0.88rem;
    line-height: 1.6;
    margin: 1.5em 0;
    border: 1px solid #333;
}
.entry-content code {
    background: var(--primary-light);
    color: var(--primary-dark);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.88em;
}
.entry-content pre code { background: none; color: inherit; padding: 0; }
.entry-content blockquote {
    border-left: 4px solid var(--primary);
    padding: 16px 24px;
    margin: 1.5em 0;
    background: var(--primary-light);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-style: italic;
    color: var(--text-secondary);
}
.entry-content table { width: 100%; border-collapse: collapse; margin: 1.5em 0; }
.entry-content th, .entry-content td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
.entry-content th { background: var(--primary-light); font-weight: 600; color: var(--primary-dark); }
.entry-content tr:hover td { background: #fafafa; }
.entry-content img {
    border-radius: var(--radius-sm);
    margin: 1em auto;
}

/* Post navigation */
.post-navigation {
    display: flex;
    gap: 20px;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--border);
}
.post-navigation a {
    flex: 1;
    display: block;
    padding: 18px 22px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}
.post-navigation a:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
}
.post-navigation .nav-label { font-size: 0.78rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.post-navigation .nav-title { font-weight: 600; margin-top: 4px; color: var(--text-primary); }

/* === Sidebar === */
.sidebar .widget {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}
.sidebar .widget-title {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--primary);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary-light);
    position: relative;
}
.sidebar .widget-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--primary);
}
.sidebar .widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.sidebar .widget ul li {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}
.sidebar .widget ul li:last-child { border-bottom: none; }
.sidebar .widget ul li a {
    color: var(--text-secondary);
    font-size: 0.92rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all var(--transition);
}
.sidebar .widget ul li a:hover { color: var(--primary); padding-left: 6px; text-decoration: none; }

/* === Pagination === */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 40px 0 20px;
    flex-wrap: wrap;
}
.pagination a, .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all var(--transition);
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-secondary);
}
.pagination a:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.pagination .current {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* === Footer === */
.site-footer {
    background: linear-gradient(135deg, #0d3b1e, #1a1a2e);
    color: rgba(255,255,255,0.7);
    margin-top: 50px;
    padding: 40px 0 24px;
}
.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}
.footer-inner a { color: var(--accent); }
.footer-inner a:hover { color: #fff; }
.footer-copyright { font-size: 0.88rem; }
.footer-tagline {
    font-size: 0.82rem;
    margin-top: 6px;
    opacity: 0.6;
}

/* === Comments === */
.comments-area {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--border);
}
.comments-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 24px;
}
.comment-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.comment-body {
    padding: 20px;
    background: #fafafa;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    border: 1px solid #eee;
}
.comment-author { font-weight: 600; margin-bottom: 4px; }
.comment-meta { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 10px; }
.comment .children { margin-left: 30px; }
.comment-respond { margin-top: 30px; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.95rem;
    margin-top: 6px;
    transition: border var(--transition);
}
.comment-form input:focus,
.comment-form textarea:focus { outline: none; border-color: var(--primary); }
.comment-form label { font-weight: 600; font-size: 0.92rem; }
.comment-form .form-submit input[type="submit"] {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    font-family: var(--font-body);
}
.comment-form .form-submit input[type="submit"]:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* === 404 Page === */
.error-404 { text-align: center; padding: 60px 20px; }
.error-404 h1 { font-size: 5rem; font-weight: 800; color: var(--primary); margin-bottom: 10px; }
.error-404 p { font-size: 1.15rem; color: var(--text-secondary); margin-bottom: 30px; }
.error-404 .btn-home {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    padding: 14px 32px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1rem;
    transition: all var(--transition);
}
.error-404 .btn-home:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: var(--shadow-md); text-decoration: none; }

/* === Page === */
.page-content {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}
.page-content .entry-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 24px;
    color: var(--text-primary);
}

/* === WordPress Standard === */
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { display: block; margin: 1em auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 0.85rem; color: var(--text-muted); text-align: center; padding: 8px 0; }
.gallery { display: flex; flex-wrap: wrap; gap: 8px; }
.gallery-item { flex: 1 1 calc(33% - 8px); }
.screen-reader-text { clip: rect(1px,1px,1px,1px); height: 1px; overflow: hidden; position: absolute; width: 1px; }
.sticky .post-card { border-left: 4px solid var(--primary); }


/* ============================================
   ENHANCED RESPONSIVE - Mobile First Optimized
   ============================================ */

/* === Tablet landscape (max 1024px) === */
@media (max-width: 1024px) {
    .sidebar { width: 280px; }
    .post-card-body { padding: 24px; }
    .entry-content pre { padding: 16px; font-size: 0.82rem; }
}

/* === Tablet + Mobile (max 900px) - Improved === */
@media (max-width: 900px) {
    /* Layout */
    .content-area { flex-direction: column; gap: 24px; margin-top: 20px; }
    .sidebar { width: 100%; }
    .site-wrapper { padding: 0 16px; }

    /* Header */
    .header-top {
        flex-wrap: wrap;
        gap: 12px;
        padding: 14px 0 10px;
    }
    .site-branding { flex: 1; min-width: 0; }
    .header-search {
        order: 3;
        width: 100%;
    }
    .header-search input[type="search"] {
        width: 100%;
        padding: 10px 18px 10px 40px;
    }
    .header-search input[type="search"]:focus { width: 100%; }

    /* Mobile nav */
    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 8px 0;
        padding: 10px 18px;
        min-height: 44px;
        font-size: 1.3rem;
    }
    .main-nav > ul { display: none; }
    .main-nav.active > ul {
        display: flex;
        flex-direction: column;
        padding-bottom: 10px;
        animation: slideDown 0.3s ease;
    }
    .main-nav.active > ul > li > a {
        padding: 14px 18px;
        border-bottom: 1px solid rgba(255,255,255,0.06);
        min-height: 48px;
        display: flex;
        align-items: center;
    }
    /* Mobile dropdown submenu */
    .main-nav ul ul {
        position: static;
        box-shadow: none;
        background: rgba(0,0,0,0.15);
        border-radius: 0;
        padding: 0;
    }
    .main-nav li:hover > ul { display: block; }
    .main-nav ul ul li a {
        padding: 12px 18px 12px 36px;
        color: rgba(255,255,255,0.75);
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    .main-nav ul ul li a:hover {
        background: rgba(255,255,255,0.1);
        color: #fff;
    }

    /* Post cards */
    .post-card { border-radius: 8px; margin-bottom: 16px; }
    .post-card-body { padding: 20px; }
    .post-card .entry-title { font-size: 1.2rem; }
    .post-card .entry-excerpt { font-size: 0.9rem; margin-bottom: 14px; }
    .post-thumbnail { max-height: 200px; }
    .post-thumbnail img { height: 200px; }

    /* Single post */
    .single-post-header .entry-title { font-size: 1.5rem; }
    .single-post-content .entry-content { font-size: 1rem; }

    /* Page */
    .page-content { padding: 24px; border-radius: 8px; }
    .page-content .entry-title { font-size: 1.5rem; }

    /* Footer */
    .site-footer { margin-top: 30px; padding: 30px 0 20px; }

    /* Comments */
    .comment .children { margin-left: 16px; }
}

/* === Mobile (max 600px) === */
@media (max-width: 600px) {
    /* Typography scale down */
    body { font-size: 15px; }
    .site-title { font-size: 1.2rem; }
    .site-description { font-size: 0.78rem; }
    .site-logo { width: 40px; height: 40px; font-size: 20px; border-radius: 10px; }
    .site-branding { gap: 10px; }

    /* Search */
    .header-search input[type="search"] { font-size: 16px; /* prevent iOS zoom */ }

    /* Post cards */
    .post-card-body { padding: 16px; }
    .post-card .entry-title { font-size: 1.1rem; line-height: 1.4; }
    .post-card .entry-excerpt { font-size: 0.88rem; line-height: 1.6; }
    .post-meta { gap: 8px; font-size: 0.78rem; }
    .post-category { padding: 2px 10px; font-size: 0.72rem; }
    .read-more { font-size: 0.85rem; }
    .post-thumbnail { max-height: 180px; }
    .post-thumbnail img { height: 180px; }

    /* Single post mobile */
    .single-post-header .entry-title { font-size: 1.3rem; }
    .single-post-header { margin-bottom: 20px; padding-bottom: 16px; }
    .entry-content h2 { font-size: 1.3rem; }
    .entry-content h3 { font-size: 1.1rem; }
    .entry-content h4 { font-size: 1rem; }

    /* Code blocks: horizontal scroll on mobile */
    .entry-content pre {
        padding: 14px 16px;
        font-size: 0.8rem;
        border-radius: 6px;
        -webkit-overflow-scrolling: touch;
    }
    .entry-content code { font-size: 0.82em; padding: 1px 6px; }

    /* Tables: horizontal scroll wrapper */
    .entry-content table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }
    .entry-content th, .entry-content td { padding: 8px 12px; font-size: 0.88rem; }

    /* Blockquote */
    .entry-content blockquote { padding: 12px 16px; margin: 1em 0; }

    /* Post navigation */
    .post-navigation { flex-direction: column; gap: 12px; margin-top: 30px; }
    .post-navigation a { padding: 14px 16px; }
    .post-navigation .nav-title { font-size: 0.9rem; }

    /* Sidebar mobile */
    .sidebar .widget { padding: 18px; border-radius: 8px; }
    .sidebar .widget-title { font-size: 0.85rem; }

    /* Pagination */
    .pagination { gap: 4px; margin: 30px 0 16px; }
    .pagination a, .pagination span {
        min-width: 38px;
        height: 38px;
        padding: 0 10px;
        font-size: 0.85rem;
    }

    /* Page content */
    .page-content { padding: 18px; }
    .page-content .entry-title { font-size: 1.3rem; }

    /* 404 */
    .error-404 { padding: 40px 16px; }
    .error-404 h1 { font-size: 3.5rem; }
    .error-404 p { font-size: 1rem; }

    /* Footer */
    .site-footer { padding: 24px 0 16px; }
    .footer-copyright { font-size: 0.82rem; }

    /* Comments */
    .comment-body { padding: 14px; }
    .comment .children { margin-left: 10px; }
    .comment-form input[type="text"],
    .comment-form input[type="email"],
    .comment-form textarea { font-size: 16px; /* prevent iOS zoom */ }
}

/* === Small mobile (max 380px) === */
@media (max-width: 380px) {
    .site-wrapper { padding: 0 12px; }
    .header-inner { padding: 0 12px; }
    .site-title { font-size: 1.05rem; }
    .post-card-body { padding: 14px; }
    .post-card .entry-title { font-size: 1rem; }
    .post-meta { gap: 6px; }
    .post-meta-item { font-size: 0.72rem; }
}

/* === Touch targets & UX === */
@media (hover: none) and (pointer: coarse) {
    /* Disable hover effects on touch devices */
    .post-card:hover { transform: none; }
    .post-card:hover .post-thumbnail img { transform: none; }

    /* Larger touch targets */
    .main-nav > ul > li > a { min-height: 48px; }
    .read-more { min-height: 44px; display: inline-flex; align-items: center; }
    .pagination a, .pagination span { min-height: 44px; min-width: 44px; }
    .sidebar .widget ul li { padding: 10px 0; }
    .sidebar .widget ul li a { min-height: 44px; }
}

/* === Animation === */
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* === Safe area for notch devices === */
@supports (padding: env(safe-area-inset-left)) {
    .site-header { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
    .site-footer { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
}
