/* Reset & Variables */
:root {
  --primary-color: #dc143c;
  --secondary-color: #f8f9fa;
  --text-dark: #2c3e50;
  --text-light: #6c757d;
  --border-color: #e9ecef;
  --success-color: #28a745;
  --warning-color: #ffc107;
  --info-color: #17a2b8;
  --shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
  --border-radius: 12px;
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: #ffffff;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.header {
  background: white;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 20px;
}

.logo h1 {
  color: var(--primary-color);
  font-size: 1.8rem;
  font-weight: 700;
}

.logo i {
  margin-right: 0.5rem;
}

.nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav a {
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.nav a:hover,
.nav a.active {
  color: var(--primary-color);
}

.nav a.active::after {
  content: "";
  position: absolute;
  bottom: -0.5rem;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--primary-color);
}

.header-actions {
  display: flex;
  gap: 1rem;
}

.search-btn,
.menu-btn {
  background: none;
  border: none;
  font-size: 1.2rem;
  color: var(--text-dark);
  cursor: pointer;
  transition: var(--transition);
}

.search-btn:hover,
.menu-btn:hover {
  color: var(--primary-color);
}

.menu-btn {
  display: none;
}

/* Hero Section */
.hero {
  padding: 2rem 0;
  background: var(--secondary-color);
}

.hero-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
}

.hero-main {
  position: relative;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.hero-main img {
  width: 100%;
  height: 400px;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  padding: 2rem;
  color: white;
}

.hero-overlay .category {
  background: var(--primary-color);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
}

.hero-overlay h2 {
  font-size: 1.8rem;
  margin: 1rem 0 0.5rem;
  line-height: 1.3;
}

.hero-overlay p {
  font-size: 1rem;
  margin-bottom: 1rem;
  opacity: 0.9;
}

.meta {
  display: flex;
  gap: 1rem;
  font-size: 0.9rem;
  opacity: 0.8;
}

.hero-sidebar h3 {
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.trending-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 1rem;
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.trending-item:hover {
  transform: translateY(-2px);
}

.trending-item img {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
}

.trending-item h4 {
  font-size: 0.9rem;
  line-height: 1.4;
  margin-bottom: 0.3rem;
}

.trending-item .time {
  font-size: 0.8rem;
  color: var(--text-light);
}

/* Breaking News Ticker */
.breaking-news {
  background: var(--primary-color);
  color: white;
  padding: 0.8rem 0;
  overflow: hidden;
}

.breaking-news .container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.breaking-label {
  background: rgba(255, 255, 255, 0.2);
  padding: 0.3rem 0.8rem;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
}

.ticker-content {
  overflow: hidden;
}

.ticker-content p {
  animation: ticker 30s linear infinite;
  white-space: nowrap;
}

@keyframes ticker {
  0% {
    transform: translateX(100%);
  }
  100% {
    transform: translateX(-100%);
  }
}

/* Main Content */
.main-content {
  padding: 3rem 0;
}

/* Categories Section */
.categories-section {
  margin-bottom: 4rem;
}

.categories-section h2 {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 2.2rem;
  color: var(--text-dark);
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.category-card {
  background: white;
  padding: 2rem;
  border-radius: var(--border-radius);
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 3px solid transparent;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.category-card.politics {
  border-color: #007bff;
}
.category-card.economy {
  border-color: #28a745;
}
.category-card.culture {
  border-color: #dc3545;
}
.category-card.sports {
  border-color: #fd7e14;
}

.category-card i {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.category-card h3 {
  margin-bottom: 0.5rem;
  font-size: 1.3rem;
}

/* News Section */
.news-section {
  margin-bottom: 3rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.section-header h2 {
  font-size: 2rem;
  color: var(--text-dark);
}

.filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.5rem 1rem;
  border: 2px solid var(--border-color);
  background: white;
  color: var(--text-dark);
  border-radius: 25px;
  cursor: pointer;
  transition: var(--transition);
  font-weight: 500;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

/* News Grid */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.news-card {
  background: white;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.news-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.news-card.featured {
  grid-column: span 2;
}

.news-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.news-card.featured img {
  height: 300px;
}

.news-content {
  padding: 1.5rem;
}

.category {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 0.8rem;
}

.category.politics {
  background: #e3f2fd;
  color: #1976d2;
}
.category.economy {
  background: #e8f5e8;
  color: #388e3c;
}
.category.culture {
  background: #fce4ec;
  color: #c2185b;
}
.category.sport {
  background: #fff3e0;
  color: #f57c00;
}
.category.tech {
  background: #f3e5f5;
  color: #7b1fa2;
}
.category.environment {
  background: #e0f2f1;
  color: #00796b;
}

.news-content h2 {
  font-size: 1.2rem;
  line-height: 1.4;
  margin-bottom: 0.8rem;
  color: var(--text-dark);
}

.news-card.featured .news-content h2 {
  font-size: 1.5rem;
}

.news-content p {
  color: var(--text-light);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.news-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-light);
  flex-wrap: wrap;
}

.author-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
}

.read-time i {
  margin-right: 0.3rem;
}

/* Load More */
.load-more {
  text-align: center;
}

.load-more-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.load-more-btn:hover {
  background: #b91c3c;
  transform: translateY(-2px);
}

/* Weather Widget */
.weather-section {
  margin: 3rem 0;
}

.weather-widget {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

.weather-widget h3 {
  text-align: center;
  margin-bottom: 1.5rem;
  font-size: 1.3rem;
}

.weather-cities {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}

.weather-item {
  background: rgba(255, 255, 255, 0.1);
  padding: 1rem;
  border-radius: 8px;
  text-align: center;
  backdrop-filter: blur(10px);
}

.weather-item .city {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.weather-item .temp {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  display: block;
}

.weather-item i {
  font-size: 1.2rem;
}

/* Newsletter */
.newsletter {
  background: var(--secondary-color);
  padding: 3rem 0;
}

.newsletter-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.newsletter-text h2 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
}

.newsletter-form {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.newsletter-form input {
  padding: 1rem;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  font-size: 1rem;
  min-width: 300px;
}

.newsletter-form button {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.newsletter-form button:hover {
  background: #b91c3c;
}

/* Footer */
.footer {
  background: var(--text-dark);
  color: white;
  padding: 3rem 0 1rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
  margin-bottom: 1rem;
  color: white;
}

.footer-section h3 {
  font-size: 1.3rem;
}

.footer-section p {
  color: #bbb;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section a {
  color: #bbb;
  text-decoration: none;
  transition: var(--transition);
}

.footer-section a:hover {
  color: white;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--primary-color);
  border-radius: 50%;
  color: white;
  font-size: 1.2rem;
  transition: var(--transition);
}

.social-links a:hover {
  background: #b91c3c;
  transform: translateY(-2px);
}

.footer-bottom {
  border-top: 1px solid #444;
  padding-top: 1rem;
  text-align: center;
  color: #bbb;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .menu-btn {
    display: block;
  }

  .nav {
    display: none;
  }

  .hero-content {
    grid-template-columns: 1fr;
  }

  .news-card.featured {
    grid-column: span 1;
  }

  .section-header {
    flex-direction: column;
    align-items: stretch;
  }

  .newsletter-content {
    flex-direction: column;
    text-align: center;
  }

  .newsletter-form {
    justify-content: center;
  }

  .newsletter-form input {
    min-width: 250px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .categories-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }

  .weather-cities {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }

  .hero-overlay h2 {
    font-size: 1.4rem;
  }

  .categories-section h2 {
    font-size: 1.8rem;
  }

  .section-header h2 {
    font-size: 1.6rem;
  }

  .newsletter-form input {
    min-width: 200px;
  }

  .weather-cities {
    grid-template-columns: 1fr;
  }
}
