/* ================= 9sty Frontend Styles ================= */
:root {
  --bg: #f7f8fb;
  --surface: #ffffff;
  --surface-2: #fafbfc;
  --border: #e8ebf0;
  --border-strong: #d4d9e3;
  --text: #0f172a;
  --text-muted: #64748b;
  --text-faint: #94a3b8;

  --brand: #f59e0b;
  --brand-600: #d97706;
  --brand-50: #fffbeb;
  --brand-100: #fef3c7;
  --brand-grad: linear-gradient(135deg, #fbbf24 0%, #f59e0b 55%, #d97706 100%);

  --navy: #1B3651;
  --navy-deep: #0b1220;
  --navy-soft: #2c537a;

  --success: #10b981;
  --success-50: #ecfdf5;
  --danger: #ef4444;
  --danger-50: #fef2f2;

  --radius: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 999px;

  --shadow-xs: 0 1px 2px rgba(15,23,42,.04);
  --shadow-sm: 0 1px 3px rgba(15,23,42,.06);
  --shadow: 0 4px 12px rgba(15,23,42,.06);
  --shadow-md: 0 8px 24px rgba(15,23,42,.08);
  --shadow-lg: 0 20px 40px -8px rgba(15,23,42,.15);
  --shadow-brand: 0 8px 20px -4px rgba(245,158,11,.35);

  --font-display: 'Outfit', 'Cairo', sans-serif;
  --font-body: 'Cairo', sans-serif;
  --container: 1200px;
}

*,*::before,*::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul, ol { list-style: none; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

.icon { flex-shrink: 0; display: inline-block; vertical-align: middle; }

.skip-link {
  position: absolute; top: -40px; right: 8px; z-index: 100;
  background: var(--navy); color: #fff; padding: 8px 14px; border-radius: 8px;
}
.skip-link:focus { top: 8px; }

/* ============ HEADER ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -.3px;
  color: var(--text);
}
.brand-mark {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--brand-grad);
  color: #0b1220;
  display: grid; place-items: center;
  box-shadow: var(--shadow-brand);
}
.brand-light { color: #fff; }
.brand-light .brand-mark { color: #0b1220; }

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.nav-link {
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-muted);
  transition: all .15s;
}
.nav-link:hover { background: var(--surface-2); color: var(--text); }
.nav-link.active {
  background: var(--brand-50);
  color: var(--brand-600);
}

.header-actions { display: flex; align-items: center; gap: 10px; }

.search-mini {
  display: flex;
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 4px 4px 4px 12px;
  transition: border-color .15s;
}
.search-mini:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(245,158,11,.15); }
.search-mini input {
  border: none; background: transparent; padding: 6px 8px;
  font-family: inherit; font-size: 13px;
  width: 160px; color: var(--text);
}
.search-mini input:focus { outline: none; }
.search-mini button {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--brand-grad);
  color: #fff;
  display: grid; place-items: center;
  box-shadow: var(--shadow-brand);
}

.icon-btn {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.icon-btn:hover { color: var(--brand-600); border-color: var(--brand-100); }
.menu-toggle { display: none; }

/* ============ MAIN LAYOUT ============ */
.site-main { flex: 1; padding: 24px 0 60px; }

.layout-with-sidebar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 32px;
  margin-top: 32px;
}
.posts-section { min-width: 0; }

/* ============ HERO (75% Slide + 25% 3 News) ============ */
.hero-grid {
  display: grid;
  grid-template-columns: 3fr 1fr;
  gap: 20px;
  margin-top: 24px;
}
.hero-main {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--navy);
  box-shadow: var(--shadow-md);
  display: flex;
  min-height: 380px;
}
.hero-main .hero-link {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 380px;
}
.hero-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}
.hero-main:hover img {
  transform: scale(1.03);
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(11,18,32,.95) 0%, rgba(11,18,32,.5) 45%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 30px;
  color: #fff;
}
.hero-cat {
  align-self: flex-start;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: var(--brand-grad);
  color: #0b1220;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 12px;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.8vw, 32px);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -.5px;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hero-excerpt {
  font-size: 13.5px;
  color: rgba(255,255,255,.82);
  max-width: 680px;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
}
.hero-meta {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: rgba(255,255,255,.75);
  font-weight: 600;
}
.hero-meta span { display: inline-flex; align-items: center; gap: 5px; }

/* Side 3 News (25%) */
.hero-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.hero-side-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px;
  display: flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow-xs);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  flex: 1;
}
.hero-side-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  border-color: var(--brand-300);
}
.hero-side-thumb {
  width: 96px;
  height: 80px;
  border-radius: var(--radius);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--surface-2);
}
.hero-side-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}
.hero-side-item:hover .hero-side-thumb img {
  transform: scale(1.06);
}
.hero-side-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.hero-side-cat {
  font-size: 11px;
  font-weight: 700;
  color: var(--cat-color, var(--brand-600));
}
.hero-side-title {
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hero-side-item:hover .hero-side-title {
  color: var(--brand-600);
}
.hero-side-time {
  font-size: 11px;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
}
/* ============ SECTION HEAD ============ */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
  flex-wrap: wrap;
}
.section-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.4px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 22px;
  background: var(--brand-grad);
  border-radius: 4px;
}
.section-count {
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 600;
}

/* ============ POST CARDS GRID ============ */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.posts-grid-3 {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s, border-color .2s;
  display: flex;
  flex-direction: column;
}
.post-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}
.post-card-image {
  display: block;
  aspect-ratio: 16/9;
  background: var(--surface-2);
  overflow: hidden;
}
.post-card-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .35s;
}
.post-card:hover .post-card-image img { transform: scale(1.04); }

.post-card-body { padding: 14px 16px 16px; flex: 1; display: flex; flex-direction: column; }

.post-card-cat {
  display: inline-flex;
  align-self: flex-start;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: color-mix(in srgb, var(--cat-color, #1B3651) 12%, transparent);
  color: var(--cat-color, #1B3651);
  font-size: 11.5px;
  font-weight: 700;
  margin-bottom: 10px;
}

.post-card-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -.2px;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card-title a:hover { color: var(--brand-600); }
.post-card-excerpt {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card-meta {
  display: flex;
  gap: 14px;
  margin-top: auto;
  font-size: 12px;
  color: var(--text-faint);
  font-weight: 600;
}
.post-card-meta span { display: inline-flex; align-items: center; gap: 5px; }

/* ============ SIDEBAR ============ */
.sidebar { display: flex; flex-direction: column; gap: 20px; }
.sidebar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-xs);
}
.sidebar-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.sidebar-title .icon { color: var(--brand-600); }

.sidebar-banner a { display: block; }
.sidebar-banner img { border-radius: var(--radius); width: 100%; }
.banner-info {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.banner-info strong { font-size: 13px; }
.banner-price {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--brand-600);
  font-size: 14px;
}
.banner-price s { color: var(--text-faint); font-size: 12px; margin-inline-start: 6px; }

.popular-list { display: flex; flex-direction: column; gap: 10px; }
.popular-list li a {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 8px;
  border-radius: 10px;
  transition: background .15s;
}
.popular-list li a:hover { background: var(--surface-2); }
.popular-rank {
  flex-shrink: 0;
  width: 24px; height: 24px;
  border-radius: 8px;
  background: var(--brand-grad);
  color: #0b1220;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 12px;
  display: grid; place-items: center;
}
.popular-title {
  display: block;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text);
}
.popular-list li a:hover .popular-title { color: var(--brand-600); }
.popular-meta { font-size: 11px; color: var(--text-faint); margin-top: 3px; display: block; }

.cat-list { display: flex; flex-direction: column; gap: 2px; }
.cat-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  transition: background .15s;
}
.cat-list a:hover { background: var(--surface-2); }
.cat-list a.active { background: var(--brand-50); color: var(--brand-600); }
.cat-list a .icon { color: var(--text-faint); margin-inline-start: auto; }
.cat-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--cat-color, var(--brand));
  flex-shrink: 0;
}

.sidebar-social {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}
.sidebar-social a {
  aspect-ratio: 1;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  display: grid; place-items: center;
  transition: all .15s;
}
.sidebar-social a:hover {
  background: var(--brand-50);
  border-color: var(--brand-100);
  color: var(--brand-600);
  transform: translateY(-2px);
}

.sidebar-ad { padding: 0; overflow: hidden; background: transparent; border: none; box-shadow: none; }

/* ============ SINGLE POST ============ */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 8px;
  font-weight: 600;
  flex-wrap: wrap;
}
.breadcrumb a:hover { color: var(--brand-600); }
.breadcrumb .sep { color: var(--text-faint); }

.article {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: var(--shadow-xs);
}
.article-cat {
  display: inline-flex;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: color-mix(in srgb, var(--cat-color, #1B3651) 12%, transparent);
  color: var(--cat-color, #1B3651);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 16px;
}
.article-title {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.5vw, 36px);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -.5px;
  margin-bottom: 16px;
  color: var(--text);
}
.article-meta {
  display: flex;
  gap: 20px;
  font-size: 13px;
  color: var(--text-muted);
  padding-bottom: 20px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  font-weight: 600;
}
.article-meta span { display: inline-flex; align-items: center; gap: 6px; }

.article-cover {
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 24px;
  background: var(--surface-2);
}
.article-cover img { width: 100%; display: block; }

.article-lead {
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-muted);
  font-weight: 500;
  padding: 16px 20px;
  border-inline-start: 3px solid var(--brand);
  background: var(--brand-50);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-bottom: 24px;
}
html[dir="rtl"] .article-lead { border-radius: var(--radius) 0 0 var(--radius); }

.article-content {
  font-size: 16px;
  line-height: 1.9;
  color: var(--text);
  word-wrap: break-word;
}
.article-content a { color: var(--brand-600); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }

.article-share {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px;
  margin-top: 28px;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--border);
  flex-wrap: wrap;
  font-weight: 700;
  font-size: 13px;
}
.article-share > span { color: var(--text-muted); margin-inline-end: 4px; }
.article-share a, .share-copy {
  width: 34px; height: 34px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
}
.article-share a:hover, .share-copy:hover {
  background: var(--brand-50); color: var(--brand-600); border-color: var(--brand-100);
}

.related { margin-top: 40px; }
.related .section-title { margin-bottom: 20px; }

/* ============ COMMENTS ============ */
.comments {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.comments .section-title { margin-bottom: 20px; }

.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
}
.alert-success { background: var(--success-50); color: var(--success); }
.alert-danger  { background: var(--danger-50); color: var(--danger); }

.comment-form {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 24px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
.form-field { margin-bottom: 12px; }
.form-field label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  margin-bottom: 6px;
}
.form-field input, .form-field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  font-family: inherit;
  font-size: 13.5px;
  color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.form-field input:focus, .form-field textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(245,158,11,.15);
}
.form-field textarea { resize: vertical; min-height: 90px; line-height: 1.6; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s;
  font-family: inherit;
  border: none;
}
.btn-primary {
  background: var(--brand-grad);
  color: #fff;
  box-shadow: var(--shadow-brand);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 26px -6px rgba(245,158,11,.45); }

.comment-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.comment-item {
  display: flex;
  gap: 12px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.comment-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--brand-grad);
  color: #0b1220;
  font-family: var(--font-display);
  font-weight: 800;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.comment-body { flex: 1; min-width: 0; }
.comment-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.comment-head strong { font-size: 14px; color: var(--text); }
.comment-time { font-size: 11.5px; color: var(--text-faint); }
.comment-body p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
  white-space: pre-wrap;
  word-wrap: break-word;
}

.comment-pagination {
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============ PAGINATION ============ */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 24px 0 4px;
  margin-top: 32px;
  flex-wrap: wrap;
}
.pg-btn {
  min-width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: inherit;
  font-weight: 700;
  font-size: 13.5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  transition: all .15s;
}
.pg-btn:hover:not(.disabled):not(.active) {
  border-color: var(--brand);
  color: var(--brand-600);
}
.pg-btn.active {
  background: var(--brand-grad);
  color: #fff;
  border-color: transparent;
  box-shadow: var(--shadow-brand);
  cursor: default;
}
.pg-btn.disabled { opacity: .35; cursor: not-allowed; }
.pg-dots { color: var(--text-faint); padding: 0 4px; font-weight: 700; user-select: none; }

/* ============ PAGE HEADER (category / search) ============ */
.page-header {
  padding: 32px 0 0;
  text-align: center;
}
.page-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: var(--brand-50);
  color: var(--brand-600);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 12px;
}
.page-title {
  font-family: var(--font-display);
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -.5px;
  color: var(--text);
  margin-bottom: 8px;
}
.page-desc {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 8px;
}
.page-count { font-size: 13px; color: var(--text-faint); font-weight: 600; }

/* ============ EMPTY STATE ============ */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
}
.empty-state.small { padding: 32px 20px; margin-top: 16px; }
.empty-state .icon { color: var(--text-faint); opacity: .6; margin-bottom: 12px; }
.empty-state p { font-size: 14px; font-weight: 500; }

/* ============ 404 ============ */
.error-page {
  text-align: center;
  padding: 80px 20px;
  max-width: 500px;
  margin: 0 auto;
}
.error-code {
  font-family: var(--font-display);
  font-size: 120px;
  font-weight: 800;
  background: var(--brand-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
  margin-bottom: 12px;
}
.error-page h1 { font-family: var(--font-display); font-size: 26px; margin-bottom: 12px; }
.error-page p { color: var(--text-muted); margin-bottom: 24px; }

/* ============ FOOTER ============ */
.site-footer {
  background: var(--navy-deep);
  color: rgba(255,255,255,.75);
  margin-top: 60px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding: 48px 20px;
}
.footer-brand p { font-size: 13.5px; line-height: 1.7; margin-top: 14px; max-width: 340px; }
.footer-col h4 {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 14px;
  letter-spacing: -.2px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 8px; }
.footer-col a {
  font-size: 13px;
  font-weight: 500;
  transition: color .15s;
}
.footer-col a:hover { color: var(--brand); }

.footer-social { display: flex; gap: 8px; flex-wrap: wrap; }
.footer-social a {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  color: rgba(255,255,255,.75);
  display: grid; place-items: center;
  transition: all .15s;
}
.footer-social a:hover {
  background: var(--brand);
  color: #0b1220;
  border-color: var(--brand);
  transform: translateY(-2px);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.06);
  padding: 20px 0;
  text-align: center;
  font-size: 12.5px;
  color: rgba(255,255,255,.55);
}

/* ============ BACK TO TOP ============ */
.back-to-top {
  position: fixed;
  bottom: 20px;
  inset-inline-start: 20px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--brand-grad);
  color: #fff;
  box-shadow: var(--shadow-brand);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 60;
  transition: transform .15s;
}
.back-to-top:hover { transform: translateY(-2px); }
.back-to-top.show { display: inline-flex; }

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .hero-side {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }
  .hero-side-item {
    flex-direction: column;
    align-items: flex-start;
  }
  .hero-side-thumb {
    width: 100%;
    height: 110px;
  }
  .posts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .layout-with-sidebar {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav { display: none; }
  .nav.mobile-open {
    display: flex;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    z-index: 49;
  }
  .menu-toggle { display: inline-flex; }
  .search-mini input { width: 120px; }

  .posts-grid { grid-template-columns: 1fr; }
  .posts-grid-3 { grid-template-columns: 1fr; }
  .hero-link { aspect-ratio: 4/3; }
  .hero-overlay { padding: 20px; }
  .article { padding: 20px; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; padding: 32px 20px; }
  .sidebar-social { grid-template-columns: repeat(6, 1fr); }
  .brand-name { font-size: 17px; }
}

@media (max-width: 480px) {
  .search-mini { display: none; }
  .article-meta { gap: 12px; font-size: 12px; }
  .pg-btn { min-width: 34px; height: 34px; font-size: 12.5px; }
}
