* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #fff;
  color: #20242a;
}

img {
  max-width: 100%;
}

.container {
  width: min(1200px, calc(100% - 40px));
  margin: auto;
}

.breaking-bar {
  background: #c82032;
  color: #fff;
  font-size: 14px;
}

.breaking-bar .container {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 10px 0;
}

.breaking-label {
  background: #fff;
  color: #c82032;
  padding: 5px 10px;
  font-weight: bold;
  font-size: 12px;
}

.breaking-bar a {
  color: #fff;
  font-weight: bold;
  text-decoration: none;
}

.header {
  background: #fff;
  border-bottom: 1px solid #e5e5e5;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 25px 0;
  gap: 20px;
}

.logo {
  font-size: 42px;
  font-weight: 900;
  letter-spacing: -2px;
  line-height: 1;
}

.logo a {
  color: #20242a;
  text-decoration: none;
  display: inline-block;
}

.logo small {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  color: #777;
  letter-spacing: 0;
  font-weight: normal;
}

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

.header-actions .icon-btn {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  border: 1px solid #ddd;
  background: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #20242a;
  padding: 0;
  transition: all 0.2s;
}

.header-actions .icon-btn:hover {
  border-color: #c82032;
  color: #c82032;
}

.header-actions #search-toggle {
  display: inline-flex;
}

.header-actions #menu-toggle {
  display: none;
}

.header-actions .icon-btn svg {
  display: block;
  width: 20px;
  height: 20px;
  pointer-events: none;
}

.search-bar {
  display: none;
  background: #fafafa;
  border-bottom: 1px solid #e5e5e5;
  position: relative;
  z-index: 20;
}

.search-bar.open {
  display: block;
}

.search-bar form {
  display: flex;
  gap: 10px;
  padding: 15px 0;
}

.search-bar input {
  flex: 1;
  padding: 12px;
  border: 1px solid #ccc;
  font-size: 15px;
}

.search-bar button {
  padding: 12px 28px;
  background: #c82032;
  color: #fff;
  border: 0;
  cursor: pointer;
  font-size: 15px;
}

.main-menu {
  border-bottom: 1px solid #ddd;
}

.main-menu ul {
  display: flex;
  gap: 28px;
  list-style: none;
  padding: 18px 0;
  margin: 0;
  overflow: auto;
}

.main-menu li {
  white-space: nowrap;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
}

.main-menu a {
  text-decoration: none;
  color: #20242a;
}

.main-menu li:hover a {
  color: #c82032;
}

.main-menu .active a {
  color: #c82032;
}

.hero-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 25px;
  margin-top: 35px;
}

.fake-image {
  height: 100%;
  min-height: 300px;
  background: linear-gradient(135deg, #555, #222);
}

.hero-main {
  position: relative;
  height: 480px;
  overflow: hidden;
  background: #111;
}

.hero-main img,
.hero-main .fake-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-main:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
}

.hero-content {
  position: absolute;
  bottom: 0;
  z-index: 2;
  padding: 35px;
  color: #fff;
}

.hero-content h1 {
  font-size: 40px;
  margin: 15px 0;
}

.hero-content h1 a {
  color: #fff;
  text-decoration: none;
}

.hero-content p {
  font-size: 16px;
}

.category {
  color: #c82032;
  font-size: 12px;
  font-weight: bold;
  text-transform: uppercase;
}

.category a {
  color: #c82032;
  text-decoration: none;
}

.hero-content .category {
  background: #c82032;
  color: #fff;
  padding: 6px 10px;
  display: inline-block;
}

.hero-side {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.small-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.small-card img,
.small-card .fake-image {
  height: 190px;
  min-height: 0;
  width: 100%;
  object-fit: cover;
  display: block;
}

.small-card h3 {
  margin: 0;
  font-size: 20px;
}

.small-card h3 a {
  text-decoration: none;
  color: inherit;
}

.small-card h3 a:hover {
  color: #c82032;
}

.content-layout {
  display: grid;
  grid-template-columns: 1fr 330px;
  gap: 40px;
  margin-top: 50px;
}

.section-title {
  border-bottom: 3px solid #20242a;
  margin-bottom: 25px;
}

.section-title h2 {
  margin-bottom: 10px;
}

.news-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 25px;
  padding: 25px 0;
  border-bottom: 1px solid #ddd;
  align-items: start;
}

.news-card.no-image {
  grid-template-columns: 1fr;
}

.news-image {
  display: block;
  width: 100%;
  height: 170px;
  overflow: hidden;
  border-radius: 8px;
  background: #e5e7eb;
}

.news-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.news-image:empty {
  display: none;
}

.news-card h3 {
  font-size: 23px;
  margin: 10px 0;
}

.news-card h3 a {
  text-decoration: none;
  color: inherit;
}

.news-card h3 a:hover {
  color: #c82032;
}

.news-card p {
  color: #666;
  margin: 0 0 10px;
}

.news-card small {
  color: #999;
}

.sidebar-box {
  border-top: 3px solid #20242a;
}

.sidebar-box h2 {
  margin-top: 15px;
}

.popular-item {
  display: flex;
  gap: 15px;
  border-bottom: 1px solid #ddd;
  padding: 15px 0;
  text-decoration: none;
  color: inherit;
}

.popular-item b {
  font-size: 30px;
  color: #c82032;
}

.popular-item p {
  margin: 5px 0;
}

.empty {
  color: #888;
  padding: 25px 0;
}

.pagination {
  display: flex;
  gap: 8px;
  margin: 30px 0;
  flex-wrap: wrap;
}

.pagination a {
  padding: 8px 14px;
  border: 1px solid #ddd;
  text-decoration: none;
  font-size: 14px;
}

.pagination a.current {
  background: #c82032;
  color: #fff;
  border-color: #c82032;
}

.pagination .dots {
  padding: 8px 4px;
  color: #999;
}

.article-page {
  max-width: 820px;
  margin: 40px auto;
}

.article-page h1 {
  font-size: 34px;
  margin: 12px 0;
}

.article-meta {
  color: #888;
  font-size: 14px;
  margin-bottom: 20px;
}

.article-image {
  width: 100%;
  max-height: 460px;
  object-fit: cover;
  margin: 20px 0;
  display: block;
}

.article-text {
  font-size: 17px;
  line-height: 1.7;
  white-space: pre-line;
}

.source-link {
  color: #c82032;
  font-weight: bold;
}

.footer {
  margin-top: 60px;
  background: #20242a;
  color: #fff;
  padding: 45px 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 40px;
}

.footer-logo {
  font-size: 24px;
  font-weight: 900;
  margin-bottom: 10px;
}

.footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer li {
  margin: 8px 0;
}

.footer a {
  color: #cfd4da;
  text-decoration: none;
}

.footer a:hover {
  color: #fff;
}

.flash {
  background: #fff3cd;
  border: 1px solid #ffe08a;
  padding: 12px 16px;
  border-radius: 6px;
  margin: 15px 0;
}

.flash.error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}

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

  .content-layout {
    grid-template-columns: 1fr;
  }

  .hero-content h1 {
    font-size: 28px;
  }

  .sidebar {
    order: 2;
  }
}

@media (max-width: 600px) {
  .header-actions #menu-toggle {
    display: inline-flex;
  }

  .main-menu ul {
    display: none;
  }

  .main-menu.open ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .container {
    width: calc(100% - 25px);
  }

  .logo {
    font-size: 30px;
  }

  .header-inner {
    padding: 18px 0;
  }

  .hero-main {
    height: 360px;
  }

  .hero-content {
    padding: 20px;
  }

  .news-card {
    grid-template-columns: 1fr;
  }

  .news-image {
    height: 200px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}
