:root {
  --primary-color: #2c3e50;
  --secondary-color: #e74c3c;
  --accent-color: #3498db;
  --text-color: #2c3e50;
  --background-color: #f9f9f9;
}

/* Reset and Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background: var(--background-color);
}
.main-nav a {
  color: #effefb; /* Change this to any color you want */
  text-decoration: none;
  margin-right: 1rem;
  font-size: 1.5rem;
}

.main-nav a:hover {
  color: #00ff88; /* Color on hover (optional) */
}

.nav-item {
  color: red;
}
/* Header */
.main-header {
  background: #fff;

  padding: 1rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: #41737c;
  color: #f1e9d4;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-title {
  font-size: 2rem;
  font-weight: bold;
  color: #23495c;
}

.main-nav {
  display: flex;
  gap: 1.5rem;
}

.nav-link {
  /* color: var(--text-color); */
  background-color: #f1e9d4;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

a:-webkit-any-link {
  /* color: -webkit-link; */
  cursor: pointer;
  text-decoration: none;
}

.nav-link:hover {
  color: var(--secondary-color);
}

.search-bar {
  display: flex;
  align-items: center;
  flex-grow: 1;
  max-width: 400px;
}

.search-input {
  padding: 0.8rem;
  border: 2px solid #ddd;
  border-radius: 25px;
  width: 100%;
  font-size: 1rem;
}

.hamburger {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #e1f7a3;
}

/* Section Titles */
.section-title {
  font-size: 1.8rem;
  margin-bottom: 2rem;
  color: var(--primary-color);
  position: relative;
  padding-left: 1rem;
}

.section-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--secondary-color);
}

/* News Grid */
.news-section {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
}

.news-item {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s;
  display: flex;
  flex-direction: column;
  height: 400px;
}

.news-item:hover {
  transform: translateY(-5px);
}

.news-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.news-content {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
}

.news-category {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  background-color: #23495c;
  color: #f1e9d4;

  border-radius: 20px;
  width: 7rem;
  font-size: 0.8rem;
  margin-bottom: 0.8rem;
}

.news-title {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
  line-height: 1.3em;
  height: 2.6em;
  overflow: hidden;
  text-overflow: ellipsis;
}

.news-excerpt {
  color: #666;
  font-size: 0.95rem;
  line-height: 1.4em;
  height: 4.2em;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Sports Section */
/* Sports Section */
.sports-section {
  padding: 3rem 1rem;
  background: #0d0d0d;
  color: #fff;
}

.sports-section .section-title {
  color: #00ff88;
  text-align: center;
  border-bottom: 2px solid #00ff88;
  display: inline-block;
}

.sports-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

/* ✨ Limit height and improve structure */
.sports-card {
  background: #1a1a1a;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 255, 136, 0.2);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 430px; /* 👈 Limit total height */
}

.sports-card:hover {
  transform: scale(1.02);
}

/* ✨ Make sure both video and image behave the same */
.sports-video,
.sports-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-bottom: 1px solid #00ff88;
}

/* Content Padding */
.sports-content {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-grow: 1;
}

.sports-category {
  font-size: 0.75rem;
  color: #00ff88;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

/* ✨ Title size reduced slightly to save space */
.sports-title {
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
}

/* ✨ Clamp excerpt text to prevent overflow */
.sports-excerpt {
  font-size: 0.9rem;
  color: #ccc;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.5rem;
}

.sports-link {
  margin-top: auto;
  color: #00ff88;
  text-decoration: underline;
  font-size: 0.85rem;
  align-self: flex-start;
}

/* Crypto Section */
.crypto-news {
  background: #0d0d0d;
  padding: 40px 20px;
  color: #fff;
}

.crypto-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
}

.crypto-item .crypto-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  overflow: hidden;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.3s ease;
}

.crypto-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 10px #00ffcc;
}

.crypto-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.crypto-content {
  padding: 20px;
}

.crypto-category {
  background: #00ffcc;
  color: #000;
  padding: 5px 10px;
  border-radius: 30px;
  font-size: 0.8rem;
  margin-bottom: 10px;
}

.crypto-title {
  font-size: 1.2rem;
  margin: 10px 0;
}

.crypto-excerpt {
  font-size: 0.95rem;
  opacity: 0.8;
}

.crypto-link {
  color: #00ffcc;
  text-decoration: none;
  font-weight: bold;
  margin-top: 15px;
  display: inline-block;
}

.crypto-link:hover {
  text-decoration: underline;
}

/* Footer */
.main-footer {
  background: var(--primary-color);
  color: white;
  padding: 3rem 1rem;
  margin-top: 4rem;
}

.site-footer {
  background: #f4f4f4;
  color: #333;
  padding: 60px 20px 30px;
  border-top: 1px solid #ddd;
}

.footer-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  max-width: 1200px;
  margin: auto;
  gap: 30px;
  border-bottom: 1px solid #ccc;
  padding-bottom: 40px;
}

.footer-brand h2 {
  font-size: 28px;
  margin-bottom: 10px;
  color: #222;
}

.footer-brand p {
  font-size: 15px;
  color: #666;
  line-height: 1.6;
}

.footer-links h4,
.footer-social h4 {
  color: #222;
  margin-bottom: 12px;
  font-size: 18px;
}

.footer-links ul {
  list-style: none;
  padding: 0;
}

.footer-links a {
  color: #555;
  text-decoration: none;
  font-size: 15px;
}

.footer-links a:hover {
  color: #000;
}

.social-icons {
  display: flex;
  gap: 15px;
}

.social-icons a img {
  width: 28px;
  height: 28px;
  opacity: 0.7;
}

.social-icons a img:hover {
  opacity: 1;
}

.footer-bottom {
  text-align: center;
  margin-top: 40px;
  font-size: 14px;
  color: #666;
}

.footer-bottom a {
  color: #555;
  text-decoration: none;
}

.footer-bottom a:hover {
  color: #000;
}

/* Sticky Categories & General Sticky */
.sticky,
.category-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.category-header {
  padding: 1rem;
  text-align: center;
  top: 70px;
  background: #f9f9f9;
  border-bottom: 1px solid #ddd;
}

/* === Responsive === */
@media (max-width: 768px) {
  .hamburger {
    display: block;
  }

  .main-nav {
    display: none;
    flex-direction: column;
    background: white;
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    padding: 1rem;
    z-index: 1000;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  }

  .main-nav.show-nav {
    display: flex;
  }

  .news-image {
    height: 200px;
  }
}

@media (min-width: 769px) {
  .main-nav {
    display: flex !important;
    gap: 1rem;
  }

  .hamburger {
    display: none;
  }
}
/* Sticky social icons on small screens */
.sticky-social {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(255, 255, 255, 0.9);
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.sticky-social a img {
  width: 24px;
  height: 24px;
}

@media (min-width: 768px) {
  .sticky-social {
    display: none; /* Only show on small screens */
  }
}

.back-home {
  color: rgb(247, 252, 188);
  background: #de456b;
  padding: 8px 12px;
  text-decoration: none;
  border-radius: 4px;
  font-weight: bold;
  font-size: 0.9rem;
  margin-right: 15px;
  border-radius: 2rem;
}

@media (max-width: 768px) {
  .main-header .hamburger {
    display: block;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1001;
    color: rgb(11, 8, 8);
  }
  .main-nav {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #0c1515;
    z-index: 9999;
    font-size: 1.5rem;
    gap: 1.5rem;
    transition: all 0.3s ease-in-out;
    padding: 2rem;
  }

  .main-nav.show-nav {
    display: flex;
  }

  .close-nav {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 2rem;
    color: white;
    cursor: pointer;
    z-index: 10000;
  }

  .header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    color: red;
  }

  .back-home {
    position: absolute;
    left: 10px;
    top: 12px;
    background: #222;
    color: #fff;
    z-index: 1002;
    font-size: 0.85rem;
  }
}
.comment-item {
  background-color: #f3f3f3;
  padding: 10px;
  margin-bottom: 12px;
  border-radius: 6px;
}

#headline-news {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  padding: 10px;
}

.headline-card {
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.headline-card img {
  width: 100%;
  height: 100px;
  object-fit: cover;
}

.headline-title {
  font-size: 14px;
  margin: 5px 8px;
  font-weight: bold;
}

.headline-tag {
  display: inline-block;
  margin: 0 8px 8px;
  font-size: 11px;
  background: #f2f2f2;
  padding: 3px 6px;
  border-radius: 3px;
  text-transform: uppercase;
}

.headline-card {
  opacity: 0;
  transform: translateY(20px);
  animation: slideIn 0.5s ease forwards;
  animation-delay: calc(var(--order) * 0.1s);
}

@keyframes slideIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.sports-title {
  font-size: 1.1rem;
  margin-bottom: 0.4rem;

  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;

  line-height: 1.3em;
  height: calc(1.3em  *  2);
}
/* === Search Page Result Cards: Side-by-Side Layout (Only for search.html) === */
body.search-page .news-title a {
  text-decoration: none;
  color: var(--primary-color);
  transition: color 0.2s ease;
}

body.search-page .news-title a:hover {
  color: var(--secondary-color);
}

/* Hide these links on large screens */
@media (min-width: 768px) {
  .mobile-only {
    display: none !important;
  }
}

.site-title {
  color: #c2f2f2;
}

.site-logo {
  height: 45px;
  width: 50px;
  background-color: #00ffcc;
  border-radius: 55%;
}
