/* ===========================
   Base
=========================== */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #fff;
  color: #111;
  line-height: 1.6;
  font-display: swap;
  box-sizing: border-box;
}

/* ===========================
   Navbar
=========================== */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: #fff;
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: #e74c3c;
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

#joinBtn {
  background-color: #e74c3c;
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}

#userInitial {
  background: #333;
  color: #fff;
  border-radius: 50%;
  padding: 8px 12px;
  font-weight: bold;
  display: none;
}

/* Language Dropdown */
.lang-dropdown {
  position: relative;
}

.lang-toggle-btn {
  background-color: #f4f4f4;
  border: 1px solid #ccc;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
}

.lang-options {
  display: none;
  position: absolute;
  top: 40px;
  left: 0;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1);
  z-index: 10;
}

.lang-options button {
  display: block;
  width: 100%;
  padding: 8px 12px;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
}

.lang-options button:hover {
  background: #f8f8f8;
}

.lang-options.show {
  display: block;
}

.highlight {
  color: #e74c3c;
  font-weight: bold;
}

/* ===========================
   News Section
=========================== */
.news-section {
  padding: 40px 20px;
  
}

.news-section h1 {
  text-align: center;
  font-size: 2rem;
  font-weight: bold;
  color: #222;
  margin-bottom: 40px;
}

.news-container {
  max-width: 900px;
  margin: 0 auto;
}

/* News Cards */
.news-card {
  background: #f7f7f7;
  margin: 15px 0;
  padding: 20px;
  border-radius: 8px;
  display: flex;
  align-items: flex-start;
  min-height: 200px;
  transition: transform 0.3s;
  will-change: transform;
}
.news-card:hover {
  transform: translateY(-3px);
}
.news-image {
  width: 30%;
  height: auto;
  object-fit: cover;
  border-radius: 5px;
  margin-right: 15px;
  min-height: 120px;
  opacity: 0;
}
.news-image.loaded {
  opacity: 1;
  transition: opacity 0.5s ease-in;
}
.news-content {
  width: 70%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.news-card h3 {
  margin: 0;
  font-size: 20px;
}
.news-card h3 a {
  text-decoration: none;
  color: #e74c3c;
}
.news-card p {
  margin: 8px 0;
  text-align: left;
}
.news-card .source {
  font-size: 14px;
  color: #555;
}
.news-card .source strong {
  font-weight: bold;
}
.timestamp {
  font-size: 0.85em;
  color: #555;
  font-style: italic;
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.share-btn {
  cursor: pointer;
  color: #e74c3c;
  font-weight: bold;
}
.share-btn:hover {
  text-decoration: underline;
}

/* Load More Button */
.load-more {
  padding: 10px 20px;
  background: #e74c3c;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
  transition: background 0.3s, transform 0.3s;
  will-change: transform, background;
}
.load-more:hover {
  background: #c0392b;
  transform: scale(1.05);
}

/* ===========================
   Footer
=========================== */
footer::before {
  content: "";
  display: block;
  width: 100%;
  height: 1px;
  background-color: #e74c3c;
  margin-bottom: 20px;
}

.footer-sources a {
  color: #e74c3c;
  text-decoration: none;
  margin: 0 5px;
  transition: color 0.3s;
}
.footer-sources a:hover {
  color: #c0392b;
  text-decoration: underline;
}
.footer-sources p {
  margin: 5px 0;
}

.footer-columns {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 60px;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-columns div {
  flex: 0 0 220px;
}

.footer-columns h3 {
  color: #e74c3c;
  font-size: 18px;
  margin-bottom: 12px;
  font-weight: bold;
  text-transform: uppercase;
}

.footer-columns p {
  margin: 6px 0;
  font-size: 14px;
}

.footer-columns a {
  color: #111;
  text-decoration: none;
  transition: color 0.3s ease, text-decoration 0.3s ease;
}

.footer-columns a:hover {
  color: #e74c3c;
  text-decoration: underline;
}

/* Footer Branding & Disclaimer */
footer .branding {
  font-size: 22px;
  font-weight: bold;
  color: #e74c3c;
  text-align: center;
  margin-top: 20px;
}

footer .disclaimer {
  font-size: 12px;
  color: #555;
  text-align: center;
  margin: 2px 0;
  line-height: 1.5;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

/* ===========================
   RESPONSIVE DESIGN
=========================== */

/* Tablets (992px and below) */
@media (max-width: 992px) {
  .navbar {
    padding: 10px 15px;
  }
  .logo {
    font-size: 1.3rem;
  }
  .lang-toggle-btn,
  #joinBtn {
    padding: 6px 10px;
    font-size: 14px;
  }

  .news-card {
    flex-direction: column;
    padding: 15px;
  }
  .news-image {
    width: 100%;
    margin-bottom: 12px;
  }
  .news-content {
    width: 100%;
  }
  .footer-columns {
    flex-wrap: wrap;
    gap: 40px;
  }
  .footer-columns div {
    flex: 1 1 200px;
  }
}

/* Mobile (768px and below) */
@media (max-width: 768px) {
  .navbar {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
  }
  .tagline {
    font-size: 14px;
  }
  .navbar-right {
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
  }
  .lang-toggle-btn,
  #joinBtn {
    font-size: 13px;
    padding: 6px 10px;
  }
  .news-card {
    padding: 15px;
  }
  .news-image {
    width: 100%;
    margin-bottom: 12px;
  }
  .news-content {
    width: 100%;
  }
  .load-more {
    font-size: 14px;
    padding: 8px 16px;
  }
   .footer-columns {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

/* Extra Small Devices (480px and below) */
@media (max-width: 480px) {
  .navbar {
    padding: 8px 10px;
  }
  .logo {
    font-size: 1.1rem;
  }
  .lang-toggle-btn,
  #joinBtn {
    font-size: 12px;
    padding: 5px 8px;
  }
  .news-section h1 {
    font-size: 1.5rem;
  }
  .news-card h3 {
    font-size: 18px;
  }
  .footer-columns h3 {
    font-size: 16px;
  }
}
