/*
Theme Name: AI Tips
Theme URI: https://aitips.info.vn
Author: AI Tips Team
Description: Theme cho website chia sẻ thủ thuật và kiến thức AI
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: aitips
*/

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

:root {
  --primary: #1a73e8;
  --primary-dark: #1557b0;
  --primary-light: #e8f0fe;
  --purple: #7c3aed;
  --purple-light: #ede9fe;
  --green: #16a34a;
  --green-light: #dcfce7;
  --amber: #d97706;
  --amber-light: #fef3c7;
  --red: #dc2626;
  --red-light: #fee2e2;
  --text: #1a1a2e;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --border: #e2e8f0;
  --border-dark: #cbd5e1;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,.08);
  --transition: .18s ease;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

/* ===== LAYOUT ===== */
.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.grid-main { display: grid; grid-template-columns: 1fr 300px; gap: 32px; padding: 28px 0; }
@media (max-width: 900px) { .grid-main { grid-template-columns: 1fr; } }

/* ===== HEADER / NAV ===== */
#header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
  transition: box-shadow var(--transition);
}
#header.scrolled { box-shadow: var(--shadow-md); }

.nav-inner {
  display: flex; align-items: center;
  justify-content: space-between;
  height: 60px; gap: 16px;
}

.site-logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 17px; font-weight: 700; color: var(--text);
  flex-shrink: 0;
}
.site-logo .logo-icon {
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--primary); display: flex;
  align-items: center; justify-content: center;
  transition: transform var(--transition);
}
.site-logo:hover .logo-icon { transform: rotate(-8deg) scale(1.08); }
.site-logo .logo-icon svg { width: 18px; height: 18px; fill: #fff; }

.nav-menu { display: flex; align-items: center; gap: 2px; }
.nav-menu a {
  display: flex; align-items: center; gap: 5px;
  font-size: 13px; color: var(--text-muted);
  padding: 7px 12px; border-radius: var(--radius);
  border: 1px solid transparent;
  transition: all var(--transition); font-weight: 500;
}
.nav-menu a svg { width: 15px; height: 15px; transition: transform var(--transition); }
.nav-menu a:hover {
  color: var(--text); background: var(--surface-2);
  border-color: var(--border);
}
.nav-menu a:hover svg { transform: translateY(-2px); }
.nav-menu a.current-menu-item {
  color: var(--primary); background: var(--primary-light);
  border-color: #bfdbfe;
}

.nav-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.btn-search {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--text-muted);
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 7px 14px; cursor: pointer;
  transition: all var(--transition); font-family: inherit;
}
.btn-search svg { width: 15px; height: 15px; }
.btn-search:hover { border-color: var(--border-dark); color: var(--text); }

.btn-subscribe {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: #fff;
  background: var(--primary); border: none;
  border-radius: var(--radius); padding: 8px 16px; cursor: pointer;
  transition: all var(--transition); font-family: inherit;
}
.btn-subscribe:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-subscribe:active { transform: scale(.97); }

.lang-switcher { display: flex; align-items: center; gap: 4px; }
.lang-switcher button {
  font-size: 12px; font-weight: 600; padding: 4px 8px;
  border: 1px solid var(--border); border-radius: 6px;
  background: none; cursor: pointer; color: var(--text-muted);
  transition: all var(--transition); font-family: inherit;
}
.lang-switcher button.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.lang-switcher button:hover:not(.active) { border-color: var(--border-dark); color: var(--text); }

/* SEARCH OVERLAY */
.search-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.5); z-index: 999;
  align-items: flex-start; justify-content: center;
  padding-top: 80px;
}
.search-overlay.open { display: flex; }
.search-box {
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 20px; width: 100%; max-width: 560px;
  box-shadow: var(--shadow-md);
}
.search-box form { display: flex; gap: 10px; }
.search-box input {
  flex: 1; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 10px 16px; font-size: 15px; font-family: inherit;
  color: var(--text); background: var(--bg);
}
.search-box input:focus { outline: none; border-color: var(--primary); }
.search-box button {
  background: var(--primary); color: #fff; border: none;
  border-radius: var(--radius); padding: 10px 20px;
  font-size: 14px; font-weight: 600; cursor: pointer;
  font-family: inherit;
}

/* ===== HERO ===== */
.hero {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.hero-inner {
  display: grid; grid-template-columns: 1fr 380px;
  min-height: 220px;
}
@media (max-width: 860px) { .hero-inner { grid-template-columns: 1fr; } .hero-right { display: none; } }

.hero-left { padding: 32px 28px 32px 0; display: flex; flex-direction: column; justify-content: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--primary-light); color: var(--primary);
  font-size: 12px; font-weight: 600; padding: 4px 12px;
  border-radius: 20px; margin-bottom: 14px; width: fit-content;
}
.hero-left h1 { font-size: 26px; font-weight: 700; line-height: 1.3; margin-bottom: 10px; }
.hero-left p { font-size: 14px; color: var(--text-muted); line-height: 1.65; margin-bottom: 20px; max-width: none; }
.hero-search { display: flex; gap: 8px; max-width: 440px; }
.hero-search input {
  flex: 1; border: 1px solid var(--border-dark);
  border-radius: var(--radius); padding: 10px 16px;
  font-size: 14px; font-family: inherit; color: var(--text);
  background: var(--bg);
}
.hero-search input:focus { outline: none; border-color: var(--primary); }
.hero-search button {
  background: var(--primary); color: #fff; border: none;
  border-radius: var(--radius); padding: 10px 18px;
  font-size: 13px; font-weight: 600; cursor: pointer;
  font-family: inherit; transition: all var(--transition);
}
.hero-search button:hover { background: var(--primary-dark); }

.hero-right {
  background: var(--surface-2); border-left: 1px solid var(--border);
  padding: 24px; display: flex; align-items: center;
}
.ai-tool-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
.ai-tool-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 14px 12px;
  display: flex; flex-direction: column; align-items: center;
  gap: 6px; text-align: center; cursor: pointer;
  transition: all var(--transition);
}
.ai-tool-card:hover { border-color: var(--border-dark); transform: translateY(-2px); box-shadow: var(--shadow); }
.ai-tool-icon { width: 42px; height: 42px; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.ai-tool-icon svg { width: 22px; height: 22px; }
.ai-tool-name { font-size: 12px; font-weight: 600; }
.ai-tool-count { font-size: 11px; color: var(--text-muted); }
.icon-blue { background: var(--primary-light); color: var(--primary); }
.icon-purple { background: var(--purple-light); color: var(--purple); }
.icon-green { background: var(--green-light); color: var(--green); }
.icon-amber { background: var(--amber-light); color: var(--amber); }

/* ===== CATEGORY BAR ===== */
.cat-bar {
  background: var(--surface); border-bottom: 1px solid var(--border);
}
.cat-bar-inner {
  display: flex; gap: 6px; padding: 12px 0;
  overflow-x: auto; scrollbar-width: none;
}
.cat-bar-inner::-webkit-scrollbar { display: none; }
.cat-pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 500; padding: 5px 14px;
  border-radius: 20px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text-muted);
  white-space: nowrap; cursor: pointer; text-decoration: none;
  transition: all var(--transition);
}
.cat-pill svg { width: 13px; height: 13px; }
.cat-pill:hover { border-color: var(--border-dark); color: var(--text); transform: translateY(-1px); }
.cat-pill.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ===== SECTION TITLE ===== */
.sec-title {
  font-size: 11px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .08em;
  display: flex; align-items: center; gap: 10px; margin-bottom: 16px;
}
.sec-title::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ===== FEATURED CARDS ===== */
.featured-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 32px; }
@media (max-width: none) { .featured-grid { grid-template-columns: 1fr; } }

.feat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden; cursor: pointer;
  transition: all var(--transition);
}
.feat-card:hover { border-color: var(--border-dark); transform: translateY(-3px); box-shadow: var(--shadow-md); }

.feat-thumb {
  height: 140px; display: flex; align-items: center;
  justify-content: center; position: relative; overflow: hidden;
}
.feat-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.feat-card:hover .feat-thumb img { transform: scale(1.05); }
.feat-thumb-placeholder {
  width: 100%; height: 100%; display: flex;
  flex-direction: column; align-items: center; justify-content: center; gap: 8px;
}
.feat-thumb-placeholder svg { width: 44px; height: 44px; transition: transform var(--transition); }
.feat-card:hover .feat-thumb-placeholder svg { transform: scale(1.15); }
.feat-tag-overlay {
  position: absolute; bottom: 10px; left: 10px;
  font-size: 10px; font-weight: 600; padding: 3px 10px;
  border-radius: 20px; background: rgba(255,255,255,.88); backdrop-filter: blur(4px);
}

.feat-body { padding: 14px; }
.feat-cat { font-size: 11px; font-weight: 700; color: var(--primary); margin-bottom: 5px; }
.feat-title { font-size: 14px; font-weight: 600; line-height: 1.45; margin-bottom: 8px; }
.feat-meta { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--text-muted); }
.feat-meta svg { width: 12px; height: 12px; }

/* ===== POST LIST ===== */
.post-list { display: flex; flex-direction: column; }
.post-card {
  display: flex; gap: 14px; padding: 16px 10px;
  border-bottom: 1px solid var(--border); cursor: pointer;
  border-radius: var(--radius); transition: background var(--transition);
  margin: 0 -10px;
}
.post-card:last-child { border-bottom: none; }
.post-card:hover { background: var(--surface); }

.post-thumb {
  width: 96px; height: 68px; border-radius: 10px;
  overflow: hidden; flex-shrink: 0; transition: transform var(--transition);
}
.post-card:hover .post-thumb { transform: scale(1.04); }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-thumb-placeholder {
  width: 100%; height: 100%; display: flex;
  align-items: center; justify-content: center;
}
.post-thumb-placeholder svg { width: 28px; height: 28px; }

.post-body { flex: 1; }
.post-cat { font-size: 11px; font-weight: 700; color: var(--primary); margin-bottom: 3px; }
.post-title { font-size: 14px; font-weight: 600; line-height: 1.45; margin-bottom: 5px; }
.post-excerpt { font-size: 12px; color: var(--text-muted); line-height: 1.5; margin-bottom: 6px; }
.post-meta { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--text-light); flex-wrap: wrap; }
.post-meta svg { width: 12px; height: 12px; }

.badge {
  font-size: 10px; font-weight: 700; padding: 2px 8px;
  border-radius: 20px; letter-spacing: .02em;
}
.badge-new { background: var(--green-light); color: var(--green); }
.badge-hot { background: var(--red-light); color: var(--red); }

/* ===== SIDEBAR ===== */
.sidebar { display: flex; flex-direction: column; gap: 24px; }
.widget { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.widget-header { padding: 14px 18px; border-bottom: 1px solid var(--border); }
.widget-title-text { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--text-muted); }
.widget-body { padding: 16px 18px; }

/* Newsletter widget */
.newsletter-widget { background: var(--primary-light); border-color: #bfdbfe; text-align: center; }
.newsletter-icon {
  width: 48px; height: 48px; border-radius: 12px; background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 12px; transition: all var(--transition);
}
.newsletter-widget:hover .newsletter-icon { transform: scale(1.08) rotate(-5deg); }
.newsletter-icon svg { width: 24px; height: 24px; fill: #fff; }
.newsletter-widget h3 { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.newsletter-widget p { font-size: 13px; color: var(--text-muted); margin-bottom: 14px; line-height: 1.5; }
.newsletter-form { display: flex; flex-direction: column; gap: 8px; }
.newsletter-form input {
  width: 100%; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 9px 14px; font-size: 13px; font-family: inherit;
  color: var(--text); background: var(--surface);
}
.newsletter-form input:focus { outline: none; border-color: var(--primary); }
.newsletter-form button {
  width: 100%; background: var(--primary); color: #fff;
  border: none; border-radius: var(--radius); padding: 10px;
  font-size: 13px; font-weight: 700; cursor: pointer;
  font-family: inherit; transition: all var(--transition);
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.newsletter-form button svg { width: 15px; height: 15px; fill: #fff; }
.newsletter-form button:hover { background: var(--primary-dark); transform: translateY(-1px); }

/* Tool grid widget */
.tool-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tool-item {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px 8px;
  display: flex; flex-direction: column; align-items: center;
  gap: 5px; cursor: pointer; text-align: center;
  transition: all var(--transition); text-decoration: none; color: inherit;
}
.tool-item:hover { border-color: var(--border-dark); transform: translateY(-2px); }
.tool-item-icon { width: 34px; height: 34px; border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.tool-item-icon svg { width: 18px; height: 18px; }
.tool-item-name { font-size: 11px; font-weight: 700; }
.tool-item-count { font-size: 10px; color: var(--text-muted); }

/* Trending widget */
.trending-list { display: flex; flex-direction: column; }
.trending-item {
  display: flex; gap: 10px; padding: 10px 10px;
  border-bottom: 1px solid var(--border); align-items: flex-start;
  cursor: pointer; border-radius: var(--radius);
  transition: background var(--transition); margin: 0 -10px;
  text-decoration: none; color: inherit;
}
.trending-item:last-child { border-bottom: none; }
.trending-item:hover { background: var(--surface-2); }
.trend-num { font-size: 16px; font-weight: 800; color: var(--text-light); min-width: 20px; margin-top: 1px; }
.trend-num.top { color: var(--primary); }
.trend-content { flex: 1; }
.trend-title { font-size: 13px; font-weight: 500; line-height: 1.4; margin-bottom: 3px; }
.trend-cat { font-size: 11px; color: var(--primary); font-weight: 600; }

/* ===== SINGLE POST ===== */
.single-hero { background: var(--surface); border-bottom: 1px solid var(--border); padding: 32px 0; }
.single-cat { font-size: 12px; font-weight: 700; color: var(--primary); margin-bottom: 10px; text-transform: uppercase; letter-spacing: .05em; }
.single-title { font-size: 28px; font-weight: 800; line-height: 1.3; margin-bottom: 14px; }
.single-meta { display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--text-muted); flex-wrap: wrap; }
.single-meta svg { width: 14px; height: 14px; }
.single-source { margin-top: 12px; font-size: 12px; color: var(--text-muted); }
.single-source a { color: var(--primary); }
.single-thumb { margin: 24px 0; border-radius: var(--radius-lg); overflow: hidden; max-height: 420px; width: 100%; max-width: 100%; }
.single-thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-content { font-size: 16px; line-height: 1.75; color: var(--text); }
.post-content h2 { font-size: 20px; font-weight: 700; margin: 28px 0 12px; }
.post-content h3 { font-size: 17px; font-weight: 700; margin: 22px 0 10px; }
.post-content p { margin-bottom: 16px; }
.post-content ul, .post-content ol { margin: 0 0 16px 24px; }
.post-content li { margin-bottom: 6px; }
.post-content blockquote { border-left: 3px solid var(--primary); padding: 12px 20px; background: var(--primary-light); border-radius: 0 8px 8px 0; margin: 20px 0; font-style: italic; }
.post-content code { background: var(--surface-2); border: 1px solid var(--border); border-radius: 4px; padding: 2px 6px; font-size: 14px; }
.post-content pre { background: #1e293b; color: #e2e8f0; border-radius: var(--radius); padding: 20px; overflow-x: auto; margin: 20px 0; max-width: 100%; white-space: pre-wrap; word-wrap: break-word; }
.post-content pre code { background: none; border: none; padding: 0; color: inherit; }
.post-content a { color: var(--primary); text-decoration: underline; }
.post-content img { border-radius: var(--radius); margin: 20px 0; }

/* Tags */
.post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border); }
.post-tag {
  font-size: 12px; font-weight: 500; padding: 5px 14px;
  border-radius: 20px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text-muted);
  transition: all var(--transition); text-decoration: none;
}
.post-tag:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }

/* Share */
.post-share { display: flex; align-items: center; gap: 10px; margin-top: 20px; }
.post-share span { font-size: 13px; font-weight: 600; color: var(--text-muted); }
.share-btn {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; padding: 8px 16px;
  border-radius: var(--radius); border: none; cursor: pointer;
  font-family: inherit; transition: all var(--transition);
}
.share-fb { background: #1877f2; color: #fff; }
.share-fb:hover { background: #166fe5; }

/* ===== FOOTER ===== */
#footer {
  background: var(--surface); border-top: 1px solid var(--border);
  margin-top: 40px;
}
.footer-inner {
  display: flex; align-items: center;
  justify-content: space-between; padding: 18px 0;
  gap: 16px; flex-wrap: wrap;
}
.footer-copy { font-size: 13px; color: var(--text-muted); }
.footer-links { display: flex; gap: 20px; }
.footer-links a {
  font-size: 13px; color: var(--text-muted);
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--text); }

/* ===== PAGINATION ===== */
.pagination { display: flex; gap: 6px; justify-content: center; padding: 24px 0; }
.pagination a, .pagination span {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: var(--radius);
  font-size: 14px; font-weight: 600; border: 1px solid var(--border);
  color: var(--text-muted); transition: all var(--transition);
}
.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination .current { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ===== LANGUAGE ===== */
[data-vi], [data-en] { transition: opacity .15s; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .nav-menu { display: none; }
  .hero-left h1 { font-size: 20px; }
  .single-title { font-size: 22px; }
  .grid-main { grid-template-columns: 1fr; }
}

/* Logo */
.site-logo .custom-logo { height: 38px; width: auto; border-radius: 0; }

/* Banner full width */
.hero { position: relative; }
.hero-inner { position: relative; z-index: 1; }
.hero-right { display: none; }
.site-banner {
  width: 100%;
  display: block;
  border-bottom: 1px solid var(--border);
  line-height: 0;
}
.site-banner img {
  display: block;
  width: 100%;
  max-width: 1180px;
  height: auto;
  max-height: 260px;
  object-fit: cover;
  margin: 0 auto;
}

/* Logo - Exo 2 gradient */
@import url('https://fonts.googleapis.com/css2?family=Exo+2:wght@800&display=swap');

.site-logo span {
  font-family: 'Exo 2', sans-serif !important;
  font-size: 20px !important;
  font-weight: 800 !important;
  background: linear-gradient(90deg, #1a73e8, #7c3aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0 !important;
  text-shadow: none !important;
}

.site-logo:hover span {
  background: linear-gradient(90deg, #7c3aed, #1a73e8);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: all 0.4s ease;
}

/* ===== RESPONSIVE ĐẦY ĐỦ ===== */

/* Desktop lớn > 1280px */
@media (min-width: 1280px) {
  .container { max-width: 1200px; }
  .hero-left h1 { font-size: 28px; }
  .grid-main { grid-template-columns: 1fr 320px; }
}

/* Laptop 1024px - 1280px */
@media (max-width: 1280px) and (min-width: 1025px) {
  .container { max-width: 960px; }
  .hero-inner { grid-template-columns: 1fr 300px; }
  .grid-main { grid-template-columns: 1fr 280px; gap: 24px; }
  .hero-left h1 { font-size: 24px; }
}

/* Tablet ngang 768px - 1024px */
@media (max-width: 1024px) and (min-width: 769px) {
  .container { padding: 0 16px; }
  .nav-menu a span { display: none; }
  .nav-menu a { padding: 7px 8px; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-right { display: none; }
  .hero-left { padding: 24px 0; }
  .hero-left h1 { font-size: 26px; }
  .grid-main { grid-template-columns: 1fr 240px; gap: 20px; }
  .featured-grid { grid-template-columns: 1fr 1fr; }
  .tool-grid { grid-template-columns: 1fr 1fr; }
  .btn-subscribe span { display: none; }
}

/* Mobile L 480px - 768px */
@media (max-width: 768px) {
  .container { padding: 0 14px; }
  .nav-menu { display: none; }
  .nav-inner { height: 54px; }
  .site-logo span { font-size: 16px !important; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-right { display: none; }
  .hero-left { padding: 20px 0; }
  .hero-left h1 { font-size: 22px; line-height: 1.3; }
  .hero-left p { font-size: 13px; }
  .hero-search { flex-direction: row; }
  .grid-main { grid-template-columns: 1fr; gap: 0; }
  .sidebar { padding: 16px 0; }
  .featured-grid { grid-template-columns: 1fr; gap: 10px; }
  .feat-thumb { height: 160px; }
  .post-card { padding: 12px 6px; }
  .post-thumb { width: 80px; height: 58px; }
  .post-title { font-size: 13px; }
  .post-excerpt { display: none; }
  .tool-grid { grid-template-columns: 1fr 1fr; }
  .cat-bar-inner { gap: 6px; padding: 10px 0; }
  .cat-pill { font-size: 11px; padding: 4px 10px; }
  .btn-subscribe span { display: none; }
  .lang-switcher button { padding: 3px 6px; font-size: 11px; }
  .footer-inner { flex-direction: column; gap: 10px; text-align: center; }
  .footer-links { flex-wrap: wrap; justify-content: center; gap: 12px; }
  .single-title { font-size: 20px; }
  .post-content { font-size: 15px; }
  .site-banner img { max-width: 100%; }
}

/* Mobile S < 480px - iPhone SE, nhỏ */
@media (max-width: 480px) {
  .container { padding: 0 12px; }
  .nav-inner { height: 50px; }
  .site-logo gap { gap: 6px; }
  .site-logo .logo-icon { width: 28px; height: 28px; }
  .site-logo span { font-size: 14px !important; }
  .hero-left h1 { font-size: 19px; }
  .hero-search { gap: 6px; }
  .hero-search input { padding: 8px 12px; font-size: 12px; }
  .hero-search button { padding: 8px 12px; font-size: 12px; }
  .featured-grid { grid-template-columns: 1fr; }
  .feat-thumb { height: 140px; }
  .post-thumb { width: 72px; height: 52px; border-radius: 8px; }
  .post-title { font-size: 12px; }
  .post-cat { font-size: 10px; }
  .post-meta { font-size: 10px; }
  .tool-grid { grid-template-columns: 1fr 1fr; gap: 6px; }
  .tool-item { padding: 8px 6px; }
  .tool-item-name { font-size: 10px; }
  .newsletter-widget h3 { font-size: 13px; }
  .single-title { font-size: 18px; }
  .grid-main { padding: 16px 0; }
  .nav-right { gap: 6px; }
  .btn-search { padding: 5px 8px; font-size: 12px; }
  .btn-subscribe { padding: 6px 8px; }
}

/* Hamburger menu mobile */
@media (max-width: 1024px) {
  .nav-toggle {
    display: flex !important;
    align-items: center;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 6px 10px;
    cursor: pointer;
    color: var(--text-muted);
  }
  .nav-toggle svg { width: 18px; height: 18px; }
}

/* Mobile menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: 54px; left: 0; right: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  z-index: 99;
  padding: 8px 0;
  box-shadow: var(--shadow-md);
}
.mobile-menu.open { display: block; }
.mobile-menu a {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 20px; font-size: 14px;
  color: var(--text); border-bottom: 1px solid var(--border);
  transition: background var(--transition);
  text-decoration: none;
}
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu a:hover { background: var(--surface-2); }
