/* ═══════════════════════════════════════════════
   Theme: BongDa Classic — Traditional Vietnamese sports news
   ═══════════════════════════════════════════════ */

/* ── CSS Reset & Base ────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--body-font, 'Noto Sans', sans-serif);
  color: #d1d5db;
  background: #0b1120;
  line-height: 1.7;
}

a { color: var(--primary, #1a5276); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-hover, #154360); }

img { max-width: 100%; height: auto; display: block; }

.container { max-width: var(--content-width, 1200px); margin: 0 auto; padding: 0 20px; }

/* ── Header ──────────────────────────────────── */
.site-header {
  background: var(--header-bg, #1a1a2e);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.header-top .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 15px;
  padding-bottom: 15px;
}

.header-brand { display: flex; align-items: baseline; gap: 12px; }

.logo-text {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
}

.site-tagline {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
  display: none;
}

@media (min-width: 768px) {
  .site-tagline { display: inline; }
}

.header-search .search-input {
  padding: 8px 12px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 4px;
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-size: 0.85rem;
  width: 180px;
}

.header-search .search-input::placeholder { color: rgba(255,255,255,0.5); }
.header-search .search-btn {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 8px;
}

/* ── Nav ─────────────────────────────────────── */
.main-nav {
  background: rgba(0,0,0,0.15);
  border-top: 1px solid rgba(255,255,255,0.05);
}

.nav-menu {
  list-style: none;
  display: flex;
  gap: 0;
  overflow-x: auto;
}

.nav-item a {
  display: block;
  padding: 12px 18px;
  color: rgba(255,255,255,0.85);
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.nav-item a:hover,
.nav-item.active a {
  color: #fff;
  border-bottom-color: var(--accent, #e74c3c);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
}

/* ── Main Layout ────────────────────────────── */
.main-wrapper {
  min-height: 70vh;
  padding: 30px 0;
}

.layout-sidebar-left,
.layout-sidebar-right {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}

@media (min-width: 992px) {
  .layout-sidebar-left  { grid-template-columns: 300px 1fr; }
  .layout-sidebar-right { grid-template-columns: 1fr 300px; }
}

.content-area { min-width: 0; }

/* ── Page Header ────────────────────────────── */
.page-header {
  margin-bottom: 25px;
}

.page-title {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 700;
  color: #e8edf5;
  line-height: 1.3;
}

.page-subtitle {
  color: #6b7b9b;
  font-size: 1rem;
  margin-top: 5px;
}

/* ── Featured Section ───────────────────────── */
.featured-section {
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
  margin-bottom: 35px;
}

@media (min-width: 768px) {
  .featured-section { grid-template-columns: 2fr 1fr; }
}

.featured-card {
  position: relative;
  display: block;
  border-radius: var(--card-radius, 8px);
  overflow: hidden;
  height: 400px;
  color: #fff;
}

.featured-image {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
}

.featured-image-placeholder {
  background: linear-gradient(135deg, var(--primary, #1a5276), #2c3e50);
}

.featured-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 30px 20px;
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
}

.featured-category {
  display: inline-block;
  padding: 3px 10px;
  background: var(--accent, #e74c3c);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.featured-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 8px;
}

.featured-excerpt {
  font-size: 0.9rem;
  opacity: 0.85;
  margin-bottom: 8px;
}

.featured-meta {
  font-size: 0.8rem;
  opacity: 0.7;
}

.featured-side {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.featured-sm-card {
  display: block;
  background: linear-gradient(145deg, #151d30, #111a2a);
  border-radius: var(--card-radius, 8px);
  padding: 15px;
  border: 1px solid #1e2a45;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.featured-sm-card:hover {
  border-color: var(--accent, #e74c3c);
  box-shadow: 0 3px 10px rgba(0,0,0,0.3);
}

.featured-sm-cat {
  font-size: 0.7rem;
  color: var(--accent, #e74c3c);
  font-weight: 700;
  text-transform: uppercase;
}

.featured-sm-title {
  font-family: 'Playfair Display', serif;
  font-size: 0.95rem;
  margin: 5px 0;
  line-height: 1.4;
  color: #d1d5db;
}

.featured-sm-meta {
  font-size: 0.75rem;
  color: #5a6a8a;
}

/* ── Section Header ─────────────────────────── */
.section-header {
  margin-bottom: 20px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent, #e74c3c);
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: #e8edf5;
}

/* ── Article Cards (stadium dark) ────────────── */
.articles-section {
  background: linear-gradient(180deg, #0d1526 0%, #0b1120 100%);
  padding: 30px 0 40px;
}

.section-title {
  color: #e8edf5;
}

.articles-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 640px) {
  .articles-list { grid-template-columns: 1fr 1fr; gap: 20px; }
}
@media (min-width: 1024px) {
  .articles-list { grid-template-columns: 1fr 1fr 1fr; gap: 24px; }
}

.article-card {
  background: linear-gradient(145deg, #151d30, #111a2a);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  border: 1px solid #1e2a45;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s;
  display: flex;
  flex-direction: column;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 35px rgba(0,0,0,0.5);
  border-color: var(--accent, #e74c3c);
}

.card-link { display: block; color: inherit; flex: 1; display: flex; flex-direction: column; }

.card-image {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #0d1526;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.article-card:hover .card-image img { transform: scale(1.06); }

.card-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary, #1a5276), #2c3e50);
  color: rgba(255,255,255,0.6);
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 2px;
  position: relative;
}

.card-img-placeholder::after {
  content: '⚽';
  display: block;
  font-size: 2.5rem;
  margin-top: 6px;
  opacity: 0.3;
  position: absolute;
  bottom: 10px;
  right: 12px;
}

.card-body {
  flex: 1;
  padding: 18px 18px 16px;
  display: flex;
  flex-direction: column;
}

.card-category {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #fff;
  background: var(--accent, #e74c3c);
  padding: 2px 10px;
  border-radius: 3px;
  margin-bottom: 10px;
  align-self: flex-start;
}

.card-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.4;
  color: #e8edf5;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card:hover .card-title { color: var(--accent, #e74c3c); }

.card-excerpt {
  font-size: 0.85rem;
  color: #8892a8;
  line-height: 1.55;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #1e2a45;
  font-size: 0.78rem;
  color: #5a6a8a;
}

/* ── Single Article ─────────────────────────── */
.single-article {
  background: #fff;
  border-radius: var(--card-radius, 8px);
  padding: 30px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.breadcrumbs {
  font-size: 0.8rem;
  margin-bottom: 15px;
  color: #999;
}

.breadcrumbs a { color: var(--primary, #1a5276); }
.breadcrumbs .sep { margin: 0 8px; color: #ccc; }

.article-title {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.3;
  color: #222;
  margin-bottom: 10px;
}

.article-meta {
  font-size: 0.85rem;
  color: #888;
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.article-featured-image {
  margin: 0 -30px 25px;
  max-height: 450px;
  overflow: hidden;
}

.article-featured-image img {
  width: 100%;
  object-fit: cover;
}

.article-content {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #333;
}

.article-content p { margin-bottom: 1.2em; }
.article-content h2,
.article-content h3 { margin-top: 1.5em; margin-bottom: 0.5em; color: #222; }
.article-content ul,
.article-content ol { margin: 1em 0; padding-left: 1.5em; }
.article-content blockquote {
  border-left: 4px solid var(--primary, #1a5276);
  padding-left: 15px;
  margin: 1.5em 0;
  color: #555;
  font-style: italic;
}

.article-footer {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.tag {
  display: inline-block;
  padding: 3px 10px;
  background: #f0f0f0;
  border-radius: 3px;
  font-size: 0.8rem;
  margin: 2px;
}

.share-buttons a {
  display: inline-block;
  padding: 5px 12px;
  background: var(--primary, #1a5276);
  color: #fff;
  border-radius: 3px;
  font-size: 0.8rem;
  margin-left: 8px;
}

/* ── Article Navigation ─────────────────────── */
.article-nav {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 25px;
  background: #fff;
  border-radius: var(--card-radius, 8px);
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.nav-label {
  font-size: 0.75rem;
  color: #999;
  text-transform: uppercase;
  font-weight: 700;
}

.nav-prev, .nav-next { flex: 1; max-width: 48%; }
.nav-prev a, .nav-next a {
  display: block;
  font-weight: 600;
  margin-top: 4px;
  line-height: 1.4;
}
.nav-next { text-align: right; }

/* ── Related Articles ───────────────────────── */
.related-section {
  margin-top: 30px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
  margin-top: 15px;
}

.related-card {
  display: block;
  background: #fff;
  border-radius: var(--card-radius, 8px);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  transition: box-shadow 0.2s;
}

.related-card:hover { box-shadow: 0 3px 10px rgba(0,0,0,0.15); }

.related-image {
  height: 130px;
  background-size: cover;
  background-position: center;
}

.related-title {
  font-size: 0.9rem;
  font-weight: 600;
  padding: 12px;
  line-height: 1.4;
  color: #333;
}

.related-meta {
  display: block;
  padding: 0 12px 12px;
  font-size: 0.75rem;
  color: #999;
}

/* ── Pagination ─────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.85rem;
  color: #333;
  background: #fff;
  transition: all 0.2s;
}

.page-link:hover { border-color: var(--primary, #1a5276); color: var(--primary, #1a5276); }
.page-link.active { background: var(--primary, #1a5276); color: #fff; border-color: var(--primary, #1a5276); }
.page-dots { padding: 8px 4px; color: #999; }

/* ── Sidebar ────────────────────────────────── */
.sidebar-widget {
  background: #fff;
  border-radius: var(--card-radius, 8px);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.widget-title {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 700;
  color: #222;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent, #e74c3c);
}

.cat-list { list-style: none; }
.cat-list li {
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
}
.cat-list li:last-child { border-bottom: none; }
.cat-list a { display: block; font-size: 0.88rem; }

/* ── Footer ─────────────────────────────────── */
.site-footer {
  background: var(--footer-bg, #1a1a2e);
  color: rgba(255,255,255,0.75);
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  padding: 40px 0;
}

@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
}

.footer-heading {
  color: #fff;
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer-links { list-style: none; }
.footer-links li { margin-bottom: 6px; }
.footer-links a { color: rgba(255,255,255,0.6); font-size: 0.85rem; }
.footer-links a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 15px 0;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
}

/* ── Error Page ─────────────────────────────── */
.error-page {
  text-align: center;
  padding: 60px 20px;
}

.error-code {
  font-size: 5rem;
  font-weight: 800;
  color: var(--accent, #e74c3c);
  line-height: 1;
  margin-bottom: 10px;
}

.btn-home {
  display: inline-block;
  margin-top: 20px;
  padding: 10px 25px;
  background: var(--primary, #1a5276);
  color: #fff;
  border-radius: 4px;
  font-weight: 600;
}

/* ── Search ─────────────────────────────────── */
.search-form {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.search-form .search-input {
  flex: 1;
  padding: 10px 15px;
  border: 2px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
}

.search-form .search-btn {
  padding: 10px 25px;
  background: var(--primary, #1a5276);
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
}

.search-summary { margin-bottom: 20px; color: #666; }

/* ── Empty State ────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 40px;
  color: #999;
  font-size: 1rem;
}

/* ── Responsive ─────────────────────────────── */
@media (max-width: 767px) {
  .nav-toggle { display: flex; }

  .nav-menu {
    display: none;
    flex-direction: column;
    width: 100%;
  }

  .nav-menu.active { display: flex; }

  .header-search { display: none; }

  .featured-card { height: 250px; }
  .featured-title { font-size: 1.2rem; }

  .card-image { aspect-ratio: 4/3; }

  .article-title { font-size: 1.4rem; }

  .single-article { padding: 20px; }
  .article-featured-image { margin: 0 -20px 20px; }

  .footer-grid { grid-template-columns: 1fr; }
}
