:root {
  --primary: #8a0c25;
  --dark: #121212;
  --light: #F8F9FA;
  --gray: #333;
  --border: #E0E0E0;
}
* { box-sizing: border-box; }
body {
  font-family: 'Inter', 'Cairo', sans-serif;
  margin: 0; padding: 0;
  background: var(--light);
  color: var(--gray);
  line-height: 1.7;
  transition: background 0.3s, color 0.3s;
}
body.dark-mode { background: #0d0d0d; color: #e0e0e0; }

/* HEADER */
header {
  background: var(--dark);
  color: #fff;
  padding: 0.8rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  border-bottom: 4px solid var(--primary);
}
.logo img { height: 50px; }
nav { display: flex; gap: 0; align-items: center; }
nav a {
  color: #ccc;
  text-decoration: none;
  padding: 0.5rem 1rem;
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.2s, border-bottom 0.2s;
  border-bottom: 3px solid transparent;
}
nav a:hover { color: #fff; border-bottom: 3px solid var(--primary); }
.header-actions { display: flex; align-items: center; gap: 0.8rem; }
.search-form { display: flex; }
.search-form input {
  padding: 0.4rem 0.8rem;
  border: none;
  border-radius: 4px 0 0 4px;
  font-size: 0.9rem;
  width: 140px;
}
.search-form button {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 0 4px 4px 0;
  padding: 0.4rem 0.6rem;
  cursor: pointer;
}
.dm-toggle {
  background: transparent;
  color: #ccc;
  border: 1px solid #555;
  padding: 0.3rem 0.8rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
}
.dm-toggle:hover { border-color: var(--primary); color: #fff; }
.lang-toggle {
  color: #fff;
  font-weight: bold;
  background: var(--primary);
  padding: 0.4rem 1rem;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.9rem;
}

/* TICKER */
.ticker {
  background: var(--primary);
  color: #fff;
  padding: 0.6rem;
  font-weight: bold;
  text-align: center;
  font-size: 0.95rem;
}

/* MAIN */
main {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

/* HERO */
.hero-section {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 2.5rem;
  min-height: 450px;
  display: flex;
  align-items: flex-end;
}
.hero-section img {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 1;
}
.hero-content {
  position: relative;
  padding: 3rem 2rem;
  color: #fff;
  z-index: 2;
  background: linear-gradient(0deg, rgba(0,0,0,0.85) 0%, transparent 100%);
  width: 100%;
}
.hero-content h2 { margin: 0; }
.hero-content h2 a { color: #fff; text-decoration: none; font-size: 2rem; }

/* CATEGORY BADGE */
.category-badge {
  background: var(--primary);
  color: #fff;
  padding: 0.3rem 0.7rem;
  font-size: 0.8rem;
  font-weight: bold;
  display: inline-block;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  border-radius: 3px;
  letter-spacing: 0.5px;
}

/* NEWS GRID */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}
.news-card {
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform 0.3s, box-shadow 0.3s;
}
body.dark-mode .news-card { background: #1a1a1a; border-color: #333; }
.news-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.12); }
.news-card img { width: 100%; height: 220px; object-fit: cover; display: block; }
.news-card-content { padding: 1.2rem 1.5rem; }
.news-card h3 { margin: 0.5rem 0 0; }
.news-card h3 a { text-decoration: none; color: var(--dark); font-size: 1.1rem; line-height: 1.5; }
body.dark-mode .news-card h3 a { color: #e0e0e0; }
.news-card h3 a:hover { color: var(--primary); }

/* ARTICLE */
article img, main > img { width: 100%; height: auto; max-height: 500px; object-fit: cover; border-radius: 6px; margin: 1.5rem 0; }
main p { font-size: 1.1rem; line-height: 1.9; margin-bottom: 1.2rem; }

/* FOOTER */
footer {
  background: var(--dark);
  color: #aaa;
  padding: 3rem 2rem 1.5rem;
  margin-top: 4rem;
  border-top: 5px solid var(--primary);
}
.footer-grid {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}
.footer-links ul { list-style: none; padding: 0; line-height: 2.2; }
.footer-links a { color: #ddd; text-decoration: none; }
.footer-links a:hover { color: var(--primary); }
.footer-links h4, .footer-social h4 { color: #fff; margin-bottom: 1rem; }
.footer-social a { font-size: 1.4rem; margin: 0 0.5rem; text-decoration: none; }
.footer-bottom {
  border-top: 1px solid #333;
  padding-top: 1.5rem;
  margin-top: 2rem;
  text-align: center;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  color: #888;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  header { flex-direction: column; }
  nav { flex-wrap: wrap; justify-content: center; }
  .header-actions { flex-wrap: wrap; justify-content: center; }
  .news-grid { grid-template-columns: 1fr; }
  .hero-section { min-height: 300px; }
  .footer-grid { flex-direction: column; }
}
