/* ===================================================
   Fxstrategylife — Main Stylesheet
   =================================================== */

/* Force font-display: swap on Font Awesome to prevent invisible text */
@font-face {
  font-family: 'Font Awesome 6 Free';
  font-style: normal; font-weight: 900; font-display: swap;
  src: url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/webfonts/fa-solid-900.woff2') format('woff2');
}
@font-face {
  font-family: 'Font Awesome 6 Free';
  font-style: normal; font-weight: 400; font-display: swap;
  src: url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/webfonts/fa-regular-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Font Awesome 6 Brands';
  font-style: normal; font-weight: 400; font-display: swap;
  src: url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/webfonts/fa-brands-400.woff2') format('woff2');
}

:root {
  --primary:      #0055c4;
  --primary-dark: #003d8f;
  --primary-grad: linear-gradient(135deg, #0055a6 0%, #377dff 100%);
  --accent:       #ff9900;
  --accent-dark:  #e68900;
  --dark:         #1a1a2e;
  --text:         #3d3d3d;
  --text-light:   #777;
  --border:       #e2e8f0;
  --bg:           #f0f4f8;
  --white:        #ffffff;
  --shadow-sm:    0 1px 4px rgba(0,0,0,.08);
  --shadow:       0 4px 20px rgba(0,0,0,.1);
  --shadow-lg:    0 8px 40px rgba(0,0,0,.14);
  --radius:       10px;
  --radius-sm:    6px;
  --transition:   .2s ease;
}

/* ─── Reset ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
}
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
button { cursor: pointer; border: none; font-family: inherit; }

/* ─── Containers ─────────────────────────────────────── */
.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ─── Buttons ────────────────────────────────────────── */
.btn-primary, .btn-secondary, .btn-accent, .btn-full, .read-more-btn, .download-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  transition: all var(--transition);
  cursor: pointer;
}
.btn-primary  { background: var(--primary); color: #fff; }
.btn-primary:hover  { background: var(--primary-dark); color: #fff; transform: translateY(-1px); }
.btn-secondary { background: #eef2ff; color: var(--primary); border: 1px solid #c7d2fe; }
.btn-secondary:hover { background: var(--primary); color: #fff; }
.btn-accent   { background: var(--accent); color: #fff; }
.btn-accent:hover   { background: var(--accent-dark); color: #fff; transform: translateY(-1px); }
.btn-full     { background: var(--primary); color: #fff; width: 100%; justify-content: center; padding: 12px; font-size: 15px; border-radius: var(--radius-sm); }
.btn-full:hover { background: var(--primary-dark); }

/* ─── Header ─────────────────────────────────────────── */
#site-header { background: var(--white); box-shadow: var(--shadow-sm); position: sticky; top: 0; z-index: 100; }

.header-top { padding: 12px 0; border-bottom: 1px solid var(--border); }
.header-top .container { display: flex; align-items: center; justify-content: space-between; gap: 20px; }

.site-logo { display: flex; flex-direction: column; }
.logo-text {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.1;
  letter-spacing: -0.5px;
}
.logo-tagline { font-size: 11px; color: var(--text-light); font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; }
.logo-img { max-height: 48px; width: auto; }
.header-ad { flex: 1; text-align: right; }

/* Nav */
.main-nav { background: var(--primary-grad); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 48px; }
.nav-menu  { display: flex; align-items: center; gap: 4px; }
.nav-menu a {
  color: rgba(255,255,255,.88);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .4px;
  padding: 14px 14px;
  transition: color var(--transition);
  display: block;
}
.nav-menu a:hover, .nav-menu a.active { color: var(--accent); }

/* Dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle { cursor: pointer; display: flex; align-items: center; gap: 5px; }
.nav-dropdown-toggle .fa-chevron-down { font-size: 10px; transition: transform var(--transition); }
.nav-dropdown:hover .fa-chevron-down { transform: rotate(180deg); }
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: var(--white);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  min-width: 180px;
  z-index: 200;
  flex-direction: column;
  overflow: hidden;
}
.nav-dropdown:hover .nav-dropdown-menu { display: flex; }
.nav-dropdown-menu li { list-style: none; }
.nav-dropdown-menu a {
  display: block;
  padding: 10px 16px;
  color: var(--dark) !important;
  font-size: 13px;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}
.nav-dropdown-menu li:last-child a { border-bottom: none; }
.nav-dropdown-menu a:hover { background: var(--bg); color: var(--primary) !important; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: 8px; background: transparent; }
.nav-toggle span { width: 24px; height: 2px; background: #fff; border-radius: 2px; transition: all var(--transition); }

/* ─── Layout ─────────────────────────────────────────── */
.page-wrap { padding: 30px 0 50px; }
.content-area { display: grid; grid-template-columns: 1fr 340px; gap: 30px; align-items: start; }
.main-content { min-width: 0; }

/* ─── Hero Banner ────────────────────────────────────── */
.hero-banner {
  background: var(--primary-grad);
  border-radius: var(--radius);
  padding: 44px 40px;
  margin-bottom: 30px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.hero-banner::before {
  content: '';
  position: absolute; top: -40px; right: -40px;
  width: 200px; height: 200px;
  background: rgba(255,255,255,.07);
  border-radius: 50%;
}
.hero-banner h1 { font-size: 28px; font-weight: 800; margin-bottom: 10px; line-height: 1.25; }
.hero-banner p  { font-size: 15px; opacity: .85; margin-bottom: 22px; }

/* ─── Post Cards ─────────────────────────────────────── */
.posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

.post-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

.post-card-image {
  display: block;
  position: relative;
  overflow: hidden;
  height: 140px;
  background: #e2e8f0;
}
.post-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.post-card:hover .post-card-image img { transform: scale(1.05); }

.post-card-cat {
  position: absolute; top: 12px; left: 12px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 4px 10px;
  border-radius: 20px;
}

.post-card-body { padding: 14px; flex: 1; display: flex; flex-direction: column; }
.post-card-title { font-size: 14px; font-weight: 700; line-height: 1.4; margin-bottom: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.post-card-title a { color: var(--dark); }
.post-card-title a:hover { color: var(--primary); }
.post-card-meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--text-light); margin-bottom: 10px; }
.post-card-meta a { color: var(--text-light); }
.post-card-meta a:hover { color: var(--accent); }
.post-card-excerpt { font-size: 13px; color: var(--text-light); line-height: 1.6; margin-bottom: 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.read-more-btn {
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  background: transparent;
  margin-top: auto;
}
.read-more-btn:hover { color: var(--accent); }

/* Post card footer row */
.post-card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.post-read-time { font-size: 11px; color: var(--text-light); display: flex; align-items: center; gap: 4px; }

/* ─── Back to top ────────────────────────────────────── */
#back-to-top {
  position: fixed; bottom: 28px; right: 24px;
  width: 42px; height: 42px;
  background: var(--primary); color: #fff;
  border-radius: 50%; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  box-shadow: 0 4px 14px rgba(0,0,0,.2);
  opacity: 0; transform: translateY(10px);
  transition: opacity .3s, transform .3s;
  z-index: 999;
}
#back-to-top.visible { opacity: 1; transform: translateY(0); }
#back-to-top:hover { background: var(--accent); }

/* ─── Sitemap page ───────────────────────────────────── */
.sitemap-hero { background: var(--primary-grad); border-radius: var(--radius); padding: 32px; margin-bottom: 28px; color: #fff; }
.sitemap-hero h1 { font-size: 24px; font-weight: 800; margin-bottom: 4px; }
.sitemap-hero p { font-size: 14px; opacity: .85; }
.sitemap-section { background: var(--white); border-radius: var(--radius); padding: 20px 24px; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.sitemap-cat-title { font-size: 15px; font-weight: 700; color: var(--primary); display: flex; align-items: center; gap: 8px; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 2px solid var(--bg); }
.sitemap-cat-title a { color: var(--primary); }
.sitemap-cat-title a:hover { color: var(--accent); }
.sitemap-count { background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 20px; margin-left: auto; }
.sitemap-list { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.sitemap-list li a { font-size: 13px; color: var(--text); display: flex; align-items: baseline; gap: 6px; padding: 4px 0; transition: color var(--transition); }
.sitemap-list li a i { font-size: 9px; color: var(--primary); flex-shrink: 0; }
.sitemap-list li a:hover { color: var(--primary); }
.sitemap-posts { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 680px) {
  .sitemap-list { grid-template-columns: 1fr; }
}

/* ─── Search hero ────────────────────────────────────── */
.search-hero { background: var(--primary-grad); border-radius: var(--radius); padding: 36px 32px; margin-bottom: 28px; color: #fff; text-align: center; }
.search-hero h1 { font-size: 26px; font-weight: 800; margin-bottom: 6px; }
.search-hero p { font-size: 14px; opacity: .85; margin-bottom: 20px; }
.search-form-main { max-width: 560px; margin: 0 auto; }
.search-input-wrap { display: flex; align-items: center; background: #fff; border-radius: 50px; overflow: hidden; padding: 4px 4px 4px 16px; box-shadow: 0 4px 20px rgba(0,0,0,.15); }
.search-icon { color: var(--text-light); margin-right: 8px; }
.search-input-wrap input { flex: 1; border: none; outline: none; font-size: 14px; font-family: inherit; background: transparent; color: var(--dark); }
.search-input-wrap button { background: var(--primary); color: #fff; border: none; padding: 10px 20px; border-radius: 50px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; }
.search-input-wrap button:hover { background: var(--accent); }
.results-count { font-size: 13px; color: var(--text-light); margin-bottom: 18px; }
.search-suggestions { text-align: center; padding: 30px 0; }
.search-suggestions h2 { font-size: 18px; margin-bottom: 16px; color: var(--dark); }
.empty-suggestions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 16px; }
.suggestion-chip { background: var(--bg); border: 1px solid var(--border); border-radius: 50px; padding: 8px 18px; font-size: 13px; font-weight: 600; color: var(--primary); transition: all var(--transition); }
.suggestion-chip:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ─── Pagination ─────────────────────────────────────── */
.pagination { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-top: 30px; }
.page-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  background: var(--white);
  transition: all var(--transition);
  text-decoration: none;
}
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.page-btn.dots { border: none; background: transparent; cursor: default; }

/* ─── Single Post ────────────────────────────────────── */
.single-post { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.static-page .post-header { border-bottom: 1px solid var(--border); }

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--text-light); }
.breadcrumb a:hover { color: var(--primary); }
.bc-current { color: var(--text); font-weight: 500; }

.post-header { padding: 30px 36px 24px; }
.post-category-badge {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 14px;
}
.post-title {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.3;
  color: var(--dark);
  margin-bottom: 14px;
}
.post-meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--text-light); }
.post-meta a { color: var(--text-light); }
.post-meta .tag-link { color: var(--primary); }
.post-meta .tag-link:hover { color: var(--accent); }

.post-featured-image { margin: 0; overflow: hidden; max-height: 460px; }
.post-featured-image img { width: 100%; object-fit: cover; }

.in-content-ad { padding: 20px 36px 0; }

.post-body {
  padding: 28px 36px;
  font-size: 15px;
  line-height: 1.85;
  color: #444;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.post-body h1, .post-body h2, .post-body h3 { color: var(--dark); font-weight: 700; margin: 24px 0 12px; line-height: 1.3; }
.post-body h2 { font-size: 22px; }
.post-body h3 { font-size: 18px; }
.post-body p  { margin-bottom: 16px; }
.post-body a  { color: var(--primary); text-decoration: underline; }
.post-body a:hover { color: var(--accent); }
.post-body ul, .post-body ol { padding-left: 24px; margin-bottom: 16px; }
.post-body li { margin-bottom: 6px; list-style: disc; }
.post-body ol li { list-style: decimal; }
.post-body blockquote {
  border-left: 4px solid var(--accent);
  margin: 20px 0;
  padding: 12px 20px;
  background: #fffbf0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: #555;
  font-style: italic;
}
.post-body img { border-radius: var(--radius-sm); margin: 16px auto; }
.post-body table { width: 100%; border-collapse: collapse; margin-bottom: 16px; }
.post-body th, .post-body td { border: 1px solid var(--border); padding: 8px 12px; }
.post-body th { background: var(--bg); font-weight: 600; }
.post-body pre { background: #1e293b; color: #e2e8f0; padding: 16px; border-radius: var(--radius-sm); overflow-x: auto; margin-bottom: 16px; font-size: 13px; }
.post-body code { background: #f1f5f9; padding: 2px 6px; border-radius: 3px; font-size: 13px; }
.post-body pre code { background: transparent; padding: 0; }
.post-body * { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important; }

/* ─── Download Section ───────────────────────────────── */
.download-section { padding: 0 36px 20px; }
.download-box {
  display: flex;
  align-items: center;
  gap: 20px;
  background: linear-gradient(135deg, #fff7e6, #fff3d4);
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.download-box > .fas { font-size: 36px; color: var(--accent); flex-shrink: 0; }
.download-box > div { flex: 1; }
.download-box h3 { font-size: 16px; font-weight: 700; color: var(--dark); margin-bottom: 4px; }
.download-box p  { font-size: 13px; color: var(--text-light); margin: 0; }
.download-btn {
  background: var(--accent);
  color: #fff;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition);
}
.download-btn:hover { background: var(--accent-dark); color: #fff; transform: translateY(-2px); box-shadow: 0 4px 16px rgba(255,153,0,.4); }
.download-disclaimer { font-size: 12px; color: var(--text-light); }

/* ─── Tags ───────────────────────────────────────────── */
.post-tags { padding: 0 36px 20px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tag-chip {
  background: #eef2ff;
  color: var(--primary);
  border: 1px solid #c7d2fe;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  transition: all var(--transition);
}
.tag-chip:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ─── Share Buttons ──────────────────────────────────── */
.share-section { padding: 20px 36px 30px; border-top: 1px solid var(--border); margin-top: 10px; }
.share-title { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 14px; text-transform: uppercase; letter-spacing: .5px; }
.share-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  transition: all var(--transition);
}
.share-btn:hover { transform: translateY(-2px); opacity: .9; color: #fff; }
.share-btn.facebook  { background: #1877f2; }
.share-btn.twitter   { background: #000; }
.share-btn.whatsapp  { background: #25d366; }
.share-btn.linkedin  { background: #0a66c2; }
.share-btn.pinterest { background: #e60023; }
.share-btn.email     { background: #6b7280; }

/* ─── Related Posts ──────────────────────────────────── */
.related-posts { margin-top: 30px; }
.section-title { font-size: 20px; font-weight: 800; color: var(--dark); margin-bottom: 18px; padding-bottom: 10px; border-bottom: 3px solid var(--accent); display: inline-block; }
.related-grid { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 768px) { .related-grid { grid-template-columns: repeat(4, 1fr); } }

/* ─── Sidebar ────────────────────────────────────────── */
.sidebar { display: flex; flex-direction: column; gap: 22px; }
.sidebar-widget { background: var(--white); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.widget-title {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--dark);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--accent);
  display: flex;
  align-items: center;
  gap: 8px;
}
.sidebar-search { display: flex; gap: 0; }
.sidebar-search input {
  flex: 1;
  border: 1px solid var(--border);
  border-right: none;
  padding: 9px 12px;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  font-size: 13px;
  outline: none;
  color: var(--text);
}
.sidebar-search input:focus { border-color: var(--primary); }
.sidebar-search button {
  background: var(--primary);
  color: #fff;
  border: 1px solid var(--primary);
  padding: 9px 14px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 13px;
  transition: background var(--transition);
}
.sidebar-search button:hover { background: var(--primary-dark); }

.recent-posts-list { display: flex; flex-direction: column; gap: 14px; }
.recent-posts-list li { display: flex; gap: 12px; align-items: flex-start; }
.rp-thumb { width: 68px; height: 52px; flex-shrink: 0; border-radius: var(--radius-sm); overflow: hidden; background: var(--bg); display: block; }
.rp-thumb img { width: 100%; height: 100%; object-fit: cover; }
.rp-info { flex: 1; }
.rp-title { font-size: 13px; font-weight: 600; color: var(--dark); line-height: 1.4; display: block; margin-bottom: 4px; }
.rp-title:hover { color: var(--primary); }
.rp-date { font-size: 11px; color: var(--text-light); }

.category-list { display: flex; flex-direction: column; gap: 6px; }
.category-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text);
  transition: all var(--transition);
  gap: 8px;
}
.category-list a:hover { background: #eef2ff; color: var(--primary); }
.category-list a i { color: var(--accent); font-size: 12px; }
.cat-count { background: var(--bg); padding: 2px 8px; border-radius: 20px; font-size: 11px; font-weight: 600; color: var(--text-light); }

.disclaimer-widget { background: #fffbf0; border: 1px solid #fde68a; }
.disclaimer-widget .widget-title { color: #92400e; border-color: var(--accent); }
.disclaimer-widget p { font-size: 12px; color: #78350f; line-height: 1.6; }

.ad-widget { background: #f9fafb; border: 1px dashed #cbd5e1; text-align: center; }

/* ─── Page title bar ─────────────────────────────────── */
.page-title-bar { margin-bottom: 24px; }
.page-title-bar h1 { font-size: 24px; font-weight: 800; color: var(--dark); }
.page-title-bar p  { font-size: 14px; color: var(--text-light); margin-top: 4px; }
.search-query { color: var(--accent); }

/* ─── Search form ────────────────────────────────────── */
.search-form-main { margin-bottom: 24px; }
.search-input-wrap { display: flex; gap: 0; }
.search-input-wrap input {
  flex: 1;
  border: 2px solid var(--border);
  border-right: none;
  padding: 12px 16px;
  font-size: 15px;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  outline: none;
  color: var(--text);
}
.search-input-wrap input:focus { border-color: var(--primary); }
.search-input-wrap button {
  background: var(--primary);
  color: #fff;
  border: 2px solid var(--primary);
  padding: 12px 22px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background var(--transition);
}
.search-input-wrap button:hover { background: var(--primary-dark); }
.results-count { font-size: 13px; color: var(--text-light); margin-bottom: 18px; }

/* ─── Empty state ────────────────────────────────────── */
.empty-state { text-align: center; padding: 60px 20px; background: var(--white); border-radius: var(--radius); }
.empty-state i  { font-size: 56px; color: var(--border); display: block; margin-bottom: 20px; }
.empty-state h2 { font-size: 20px; color: var(--dark); margin-bottom: 8px; }
.empty-state p  { color: var(--text-light); }

/* ─── Footer ─────────────────────────────────────────── */
.footer-ad-wrap { background: var(--bg); border-top: 1px solid var(--border); padding: 20px 0; text-align: center; }

#site-footer { background: var(--dark); color: #aab; padding: 50px 0 0; }
.footer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; padding-bottom: 36px; }
.footer-col h3 { font-size: 15px; font-weight: 700; color: #fff; margin-bottom: 14px; }
.footer-col p  { font-size: 13px; line-height: 1.7; }
.footer-col ul { display: flex; flex-direction: column; gap: 8px; }
.footer-col ul a { font-size: 13px; color: #aab; transition: color var(--transition); }
.footer-col ul a:hover { color: var(--accent); }
.footer-social { display: flex; gap: 10px; margin-top: 14px; }
.footer-social a {
  width: 36px; height: 36px;
  background: rgba(255,255,255,.08);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  transition: all var(--transition);
}
.footer-social a:hover { background: var(--accent); color: #fff; transform: translateY(-2px); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 18px 0; text-align: center; font-size: 12px; }

/* ─── Error pages ────────────────────────────────────── */
.error-page { padding: 60px 20px; }
.error-code { font-size: 100px; font-weight: 900; color: var(--primary); opacity: .15; line-height: 1; margin-bottom: -10px; }
.error-page h1 { font-size: 32px; color: var(--dark); margin-bottom: 12px; }
.error-page p  { color: var(--text-light); margin-bottom: 24px; }

/* ══════════════════════════════════════════════════
   ADMIN PANEL
══════════════════════════════════════════════════ */
.admin-body { background: #f1f5f9; }

/* Admin nav */
.admin-nav { background: var(--dark); padding: 0 24px; position: sticky; top: 0; z-index: 200; box-shadow: 0 2px 12px rgba(0,0,0,.3); }
.admin-nav-inner { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.admin-brand { color: var(--accent); font-size: 16px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.admin-brand:hover { color: var(--accent); }
.admin-brand i { font-size: 18px; }
.admin-nav-menu { display: flex; gap: 2px; }
.admin-nav-menu a {
  color: rgba(255,255,255,.7);
  font-size: 13px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition);
}
.admin-nav-menu a:hover { background: rgba(255,255,255,.1); color: #fff; }

/* Admin layout */
.admin-wrap { padding: 28px 20px 60px; }
.admin-container { max-width: 1100px; margin: 0 auto; }
.admin-page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.admin-page-header h1 { font-size: 22px; font-weight: 800; color: var(--dark); display: flex; align-items: center; gap: 10px; }

/* Stats */
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }
.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--primary);
}
.stat-card.published { border-color: #10b981; }
.stat-card.draft     { border-color: #f59e0b; }
.stat-card i { font-size: 28px; color: var(--primary); }
.stat-card.published i { color: #10b981; }
.stat-card.draft i     { color: #f59e0b; }
.stat-num   { display: block; font-size: 30px; font-weight: 800; color: var(--dark); line-height: 1; }
.stat-label { font-size: 12px; color: var(--text-light); font-weight: 500; text-transform: uppercase; letter-spacing: .4px; }

/* Cards */
.admin-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; margin-bottom: 20px; }
.admin-card-header { padding: 16px 22px; border-bottom: 1px solid var(--border); }
.admin-card-header h2 { font-size: 15px; font-weight: 700; color: var(--dark); display: flex; align-items: center; gap: 8px; }
.admin-card-body { padding: 22px; }

/* Table */
.table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th { background: #f8fafc; padding: 12px 16px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--text-light); text-align: left; border-bottom: 2px solid var(--border); }
.admin-table td { padding: 14px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; font-size: 14px; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: #fafbff; }
.actions-cell { white-space: nowrap; }
.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  background: transparent;
  font-family: inherit;
}
.edit-btn   { color: var(--primary); border: 1px solid var(--primary); }
.edit-btn:hover   { background: var(--primary); color: #fff; }
.view-btn   { color: #10b981; border: 1px solid #10b981; }
.view-btn:hover   { background: #10b981; color: #fff; }
.delete-btn { color: #ef4444; border: 1px solid #ef4444; }
.delete-btn:hover { background: #ef4444; color: #fff; }

/* Status badges */
.status-badge { padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; }
.status-pub   { background: #dcfce7; color: #15803d; }
.status-draft { background: #fef3c7; color: #92400e; }

/* Form grid */
.form-grid { display: grid; grid-template-columns: 1fr 300px; gap: 20px; align-items: start; }
.form-group { margin-bottom: 18px; }
.form-group:last-child { margin-bottom: 0; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--dark); margin-bottom: 7px; }
.form-group label small { font-weight: 400; color: var(--text-light); }
.form-group small { display: block; font-size: 12px; color: var(--text-light); margin-top: 5px; }
.required { color: #ef4444; }
.form-group input[type="text"],
.form-group input[type="url"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 13px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  outline: none;
  transition: border-color var(--transition);
  background: #fff;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,85,196,.08); }
.form-group textarea { resize: vertical; }
.form-group input[type="file"] { border: 1px dashed var(--border); background: var(--bg); padding: 10px; }

/* Image preview */
.current-image, #image-preview { max-width: 100%; border-radius: var(--radius-sm); margin-bottom: 10px; }
.current-image img { width: 100%; border-radius: var(--radius-sm); }
.image-placeholder {
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 30px;
  text-align: center;
  color: var(--text-light);
  margin-bottom: 10px;
}
.image-placeholder i { font-size: 32px; display: block; margin-bottom: 8px; }

/* Alerts */
.alert { padding: 14px 18px; border-radius: var(--radius-sm); margin-bottom: 20px; font-size: 14px; display: flex; align-items: center; gap: 10px; }
.alert-error   { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }

/* Login page */
.admin-login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #0a1628 0%, #0055a6 100%); padding: 20px; }
.login-card { background: var(--white); border-radius: 16px; padding: 44px; width: 100%; max-width: 400px; box-shadow: var(--shadow-lg); }
.login-logo { text-align: center; margin-bottom: 30px; }
.login-logo i   { font-size: 42px; color: var(--primary); display: block; margin-bottom: 10px; }
.login-logo h1  { font-size: 22px; font-weight: 800; color: var(--dark); }
.login-logo p   { font-size: 13px; color: var(--text-light); }

/* Quill editor */
.ql-editor { min-height: 300px; font-size: 15px; font-family: inherit; line-height: 1.7; }
.ql-container.ql-snow { border-radius: 0 0 var(--radius-sm) var(--radius-sm); }
.ql-toolbar.ql-snow   { border-radius: var(--radius-sm) var(--radius-sm) 0 0; }

/* ─── Responsive ─────────────────────────────────────── */
@media (max-width: 1024px) {
  .content-area { grid-template-columns: 1fr 300px; }
  .posts-grid   { grid-template-columns: repeat(3, 1fr); }
}


@media (max-width: 900px) {
  .content-area { grid-template-columns: 1fr; }
  .sidebar      { display: grid; grid-template-columns: 1fr 1fr; }
  .form-grid    { grid-template-columns: 1fr; }
  .footer-grid  { grid-template-columns: 1fr 1fr; }
  .stats-grid   { grid-template-columns: 1fr 1fr; }
  .related-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

@media (max-width: 680px) {
  .posts-grid   { grid-template-columns: 1fr; gap: 10px; }

  /* Hide posts 10-12 on mobile — desktop shows 12, mobile shows 9 */
  .post-card:nth-child(n+10) { display: none; }

  /* Horizontal cards with rounded corners on mobile */
  .post-card { flex-direction: row; align-items: center; border-radius: 16px; padding: 8px; gap: 0; }
  .post-card-image { width: 90px; min-width: 90px; height: 90px; border-radius: 10px; flex-shrink: 0; }
  .post-card-body { padding: 0 14px 0 12px; }
  .post-card-title { font-size: 13px; margin-bottom: 4px; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .post-card-excerpt { display: none; }
  .read-more-btn { font-size: 11px; }
  .sidebar      { grid-template-columns: 1fr; }
  .post-header  { padding: 20px; }
  .post-body    { padding: 20px; }
  .in-content-ad { padding: 16px 20px 0; }
  .download-section { padding: 0 20px 20px; }
  .download-box { flex-direction: column; text-align: center; }
  .post-tags    { padding: 0 20px 20px; }
  .share-section { padding: 16px 20px 24px; }
  .post-title   { font-size: 22px; }
  .hero-banner  { padding: 30px 22px; }
  .hero-banner h1 { font-size: 22px; }
  .footer-grid  { grid-template-columns: 1fr; }
  .admin-nav-menu a span { display: none; }
  .admin-nav-menu { gap: 0; }
  .stats-grid   { grid-template-columns: 1fr; }
  .share-btn span { display: none; }
}

@media (max-width: 480px) {
  .nav-toggle { display: flex; }
  .nav-menu   { display: none; flex-direction: column; position: absolute; top: 48px; left: 0; right: 0; background: var(--primary-dark); padding: 8px 0; z-index: 99; }
  .nav-menu.open { display: flex; }
  .nav-menu a { padding: 12px 20px; }
  .main-nav   { position: relative; }
  .nav-dropdown-menu { position: static; box-shadow: none; border-radius: 0; background: rgba(0,0,0,.2); min-width: 100%; }
  .nav-dropdown-menu a { color: rgba(255,255,255,.8) !important; border-color: rgba(255,255,255,.1); padding: 10px 32px; }
  .nav-dropdown-menu a:hover { background: rgba(255,255,255,.08); color: var(--accent) !important; }
  .nav-dropdown:hover .nav-dropdown-menu { display: none; }
  .nav-dropdown-menu.open { display: flex; }
  .admin-nav-menu a { padding: 8px 8px; font-size: 11px; }
  .admin-brand span { display: none; }
}
