/* ══════════════════════════════════════════════════════════
   Public News Site CSS  — v2 (fixed styles + mobile menu)
   ══════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue:     #2563eb;
  --blue-d:   #1d4ed8;
  --gray-50:  #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-700: #334155;
  --gray-900: #0f172a;
  --radius:   10px;
}

body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; font-size: 15px; color: var(--gray-700); background: var(--gray-50); line-height: 1.6; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container { max-width: 1140px; margin: 0 auto; padding: 0 20px; }

/* ══ HEADER ════════════════════════════════════════════════ */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--gray-200);
  position: sticky; top: 0; z-index: 200;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.header-inner {
  display: flex; align-items: center; height: 62px; gap: 16px;
}
.site-logo {
  display: flex; align-items: center; gap: 9px;
  font-size: 19px; font-weight: 800; color: var(--gray-900);
  flex-shrink: 0; white-space: nowrap;
}
.site-logo svg { flex-shrink: 0; }

/* Desktop nav */
.site-nav {
  display: flex; gap: 2px; flex: 1;
  overflow-x: auto; scrollbar-width: none;
}
.site-nav::-webkit-scrollbar { display: none; }
.nav-link {
  padding: 6px 13px; border-radius: 7px;
  font-size: 13px; font-weight: 500; color: var(--gray-500);
  white-space: nowrap; transition: all .15s;
}
.nav-link:hover { background: var(--gray-100); color: var(--gray-900); }

/* Header right */
.header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.search-form { display: flex; align-items: center; gap: 6px; }
.search-input {
  padding: 6px 14px; border: 1.5px solid var(--gray-200);
  border-radius: 999px; font-size: 13px; outline: none; width: 170px;
  transition: border .15s;
}
.search-input:focus { border-color: var(--blue); }
.search-btn { background: none; border: none; cursor: pointer; font-size: 17px; line-height: 1; }

.lang-switch { display: flex; gap: 4px; }
.lang-switch a {
  padding: 4px 11px; border-radius: 7px;
  font-size: 12px; font-weight: 700; color: var(--gray-500);
  border: 1.5px solid var(--gray-200); transition: all .15s;
}
.lang-switch a.active { background: var(--blue); color: #fff; border-color: var(--blue); }
.lang-switch a:hover:not(.active) { border-color: var(--blue); color: var(--blue); }

/* Burger button (hidden on desktop) */
.burger {
  display: none; background: none; border: none;
  cursor: pointer; padding: 6px; border-radius: 7px;
  color: var(--gray-700); flex-shrink: 0;
}
.burger:hover { background: var(--gray-100); }
.burger svg { display: block; }

/* Mobile nav drawer */
.mobile-nav {
  display: none; flex-direction: column;
  background: #fff; border-top: 1px solid var(--gray-200);
  padding: 12px 16px 16px;
  position: absolute; top: 100%; left: 0; right: 0;
  box-shadow: 0 8px 20px rgba(0,0,0,.1); z-index: 199;
}
.mobile-nav.open { display: flex; }
.mobile-nav .nav-link {
  padding: 10px 12px; font-size: 15px; border-radius: 8px;
  color: var(--gray-700);
}
.mobile-nav .nav-link:hover { background: var(--gray-100); }
.mobile-search {
  display: flex; gap: 8px; margin-top: 10px;
  padding-top: 10px; border-top: 1px solid var(--gray-100);
}
.mobile-search input {
  flex: 1; padding: 9px 14px;
  border: 1.5px solid var(--gray-200); border-radius: 8px;
  font-size: 14px; outline: none;
}
.mobile-search input:focus { border-color: var(--blue); }
.mobile-search button {
  padding: 9px 16px; background: var(--blue); color: #fff;
  border: none; border-radius: 8px; cursor: pointer; font-weight: 600;
}

/* ══ BREAKING BAR ══════════════════════════════════════════ */
.breaking-bar {
  background: #991b1b; color: #fff;
  display: flex; align-items: center; overflow: hidden; height: 38px;
}
.breaking-label {
  background: #7f1d1d; padding: 0 16px;
  font-size: 11px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .08em; height: 100%;
  display: flex; align-items: center; white-space: nowrap; flex-shrink: 0;
}
.breaking-ticker {
  display: flex; align-items: center; padding: 0 16px; gap: 16px;
  overflow-x: auto; white-space: nowrap; scrollbar-width: none;
}
.breaking-ticker::-webkit-scrollbar { display: none; }
.breaking-ticker a { color: #fff; font-size: 13px; font-weight: 500; }
.breaking-ticker a:hover { text-decoration: underline; }

/* ══ ARTICLES GRID ════════════════════════════════════════ */
.main-layout { padding: 28px 0; }

.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

/* Featured (first) card spans full width */
.article-card-featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 3fr 2fr;
}
.article-card-featured .card-img-link { aspect-ratio: unset; height: 100%; max-height: 220px; overflow: hidden; }
.article-card-featured .card-title    { font-size: 22px; }
.article-card-featured .card-body { display: flex; flex-direction: column; justify-content: center; padding: 20px 24px; }

.article-card {
  background: #fff; border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.05);
  transition: box-shadow .2s, transform .2s;
}
.article-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.11); transform: translateY(-2px); }

.card-img-link { display: block; overflow: hidden; aspect-ratio: 16/9; }
.card-img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.article-card:hover .card-img { transform: scale(1.04); }

.card-body { padding: 16px; }
.card-cat {
  display: inline-flex; margin-bottom: 7px;
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--blue);
}
.card-title {
  font-size: 15px; font-weight: 700; color: var(--gray-900);
  line-height: 1.4; margin-bottom: 8px;
}
.card-title a:hover { color: var(--blue); }
.card-announce { font-size: 13px; color: var(--gray-500); line-height: 1.55; margin-bottom: 10px; }
.card-meta { font-size: 12px; color: var(--gray-400); }

.empty-state {
  grid-column: 1 / -1; text-align: center;
  padding: 80px 20px; color: var(--gray-400); font-size: 16px;
}

/* ══ PAGINATION ════════════════════════════════════════════ */
.pagination {
  display: flex; align-items: center; justify-content: center;
  gap: 16px; padding: 32px 0;
}
.page-btn {
  padding: 8px 20px; background: #fff;
  border: 1.5px solid var(--gray-200); border-radius: 8px;
  font-weight: 600; color: var(--gray-700); transition: all .15s;
}
.page-btn:hover { border-color: var(--blue); color: var(--blue); }

/* ══ ARTICLE FULL ══════════════════════════════════════════ */
.article-layout { max-width: 820px; margin: 0 auto; padding: 32px 20px; }

.article-breadcrumb { font-size: 13px; color: var(--gray-400); margin-bottom: 16px; }
.article-breadcrumb a { color: var(--blue); }
.article-breadcrumb a:hover { text-decoration: underline; }

.article-title {
  font-size: 32px; font-weight: 800; color: var(--gray-900);
  line-height: 1.3; margin-bottom: 16px;
}
.article-meta { display: flex; gap: 16px; font-size: 13px; color: var(--gray-500); margin-bottom: 22px; }
.meta-author { font-weight: 600; }

.article-cover { border-radius: var(--radius); overflow: hidden; margin-bottom: 28px; }
.article-cover img { width: 100%; max-height: 480px; object-fit: cover; }

.article-body { font-size: 16px; line-height: 1.8; color: var(--gray-700); }
.article-body h2 { font-size: 22px; font-weight: 700; margin: 30px 0 12px; color: var(--gray-900); }
.article-body h3 { font-size: 19px; font-weight: 700; margin: 24px 0 10px; color: var(--gray-900); }
.article-body p  { margin-bottom: 16px; }
.article-body ul, .article-body ol { padding-left: 24px; margin-bottom: 16px; }
.article-body li { margin-bottom: 6px; }
.article-body a  { color: var(--blue); text-decoration: underline; }
.article-body img { border-radius: 8px; margin: 16px 0; max-width: 100%; }
.article-body blockquote {
  border-left: 4px solid var(--blue); padding: 12px 20px;
  background: var(--gray-50); border-radius: 0 8px 8px 0;
  margin: 20px 0; color: var(--gray-500); font-style: italic;
}

/* ══ RELATED ═══════════════════════════════════════════════ */
.related-section { margin-top: 48px; border-top: 1px solid var(--gray-200); padding-top: 32px; }
.related-section h3 { font-size: 18px; font-weight: 700; margin-bottom: 16px; }
.related-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.related-card {
  display: flex; flex-direction: column; gap: 8px;
  border-radius: 8px; overflow: hidden;
  border: 1px solid var(--gray-200); transition: box-shadow .15s;
}
.related-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,.1); }
.related-card img { aspect-ratio: 16/9; object-fit: cover; width: 100%; }
.related-card span { font-size: 12px; font-weight: 600; color: var(--gray-700); padding: 0 10px 10px; line-height: 1.4; }

/* ══ PAGE TITLE ════════════════════════════════════════════ */
.page-title { font-size: 26px; font-weight: 800; color: var(--gray-900); margin: 28px 0 20px; }

/* ══ FOOTER ════════════════════════════════════════════════ */
.site-footer {
  background: var(--gray-900); color: var(--gray-500);
  padding: 28px 0; text-align: center; font-size: 13px;
}
.site-footer a { color: var(--gray-400); transition: color .15s; }
.site-footer a:hover { color: #fff; }

/* ══ RESPONSIVE ════════════════════════════════════════════ */

/* Tablet */
@media (max-width: 960px) {
  .articles-grid { grid-template-columns: repeat(2, 1fr); }
  .article-card-featured { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 2fr; align-items: stretch; }
  .article-card-featured .card-img-link { min-height: unset; aspect-ratio: 16/9; }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
  .search-form { display: none; }
}

/* Mobile */
@media (max-width: 640px) {
  .articles-grid { grid-template-columns: 1fr; gap: 14px; }
  .article-card-featured { grid-template-columns: 1fr; }
  .article-card-featured .card-title { font-size: 17px; }
  .article-title { font-size: 24px; }
  .related-grid { grid-template-columns: 1fr 1fr; }

  /* Show burger, hide desktop nav */
  .burger { display: flex; }
  .site-nav { display: none; }
  .header-actions .search-form,
  .header-actions .lang-switch { display: none; }

  .header-inner { gap: 8px; }
  .site-logo span { font-size: 16px; }

  .container { padding: 0 12px; }
  .main-layout { padding: 16px 0; }
  .card-body { padding: 12px; }
  .card-title { font-size: 14px; }
}

@media (max-width: 400px) {
  .related-grid { grid-template-columns: 1fr; }
}

html, body {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}