/* ===========================================
   NEWS PAGE STYLING - FINAL PROFESSIONAL EDITION
   Works with dstyle.css and bjstyle.css
=========================================== */

/* ===== Base Layout ===== */
.news-grid {
  display: grid;
  grid-template-columns: 2fr 1fr; /* Left: stories | Right: featured */
  gap: 32px;
  padding: 40px 20px;
  max-width: 1250px;
  margin: 0 auto;
  align-items: start;
  box-sizing: border-box;
}

/* ===========================================
   HERO STORY
=========================================== */
.hero-story {
  grid-column: 1 / -1;
  position: relative;
  height: 440px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.1);
}
.hero-story img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* ===== HERO OVERLAY FIX (Responsive Improvement) ===== */
.hero-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  padding: 30px;
  width: 100%;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-sizing: border-box;
}

/* Make overlay more readable and properly positioned on smaller screens */
@media (max-width: 600px) {
  .hero-overlay {
    justify-content: center;        /* center text vertically */
    text-align: center;             /* center-align text */
    padding: 20px 16px 35px;        /* extra bottom padding for balance */
    background: linear-gradient(
      rgba(0, 0, 0, 0.4),
      rgba(0, 0, 0, 0.85)
    ); /* more contrast for text */
  }

  .hero-overlay h2 {
    font-size: 1.3rem;
    line-height: 1.35;
    margin-bottom: 8px;
  }

  .hero-overlay p {
    font-size: 0.95rem;
    line-height: 1.4;
    margin-bottom: 10px;
  }

  .hero-overlay .read-more {
    font-size: 0.85rem;
    padding: 8px 14px;
    align-self: center;
  }
}

/* ===========================================
   LEFT COLUMN CONTENT
=========================================== */
.top-stories,
.sidebar {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  padding: 22px 24px;
  margin-top: 25px;
}

/* ===== Top Stories ===== */
.top-stories h3 {
  font-size: 1.4rem;
  margin-bottom: 18px;
  border-bottom: 3px solid var(--primary);
  padding-bottom: 6px;
}
.top-stories article {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  border-bottom: 1px solid #e6e6e6;
  padding-bottom: 12px;
}
.top-stories img {
  width: 130px;
  height: 95px;
  border-radius: 8px;
  object-fit: cover;
}
.top-stories h4 {
  margin: 0 0 5px;
  font-size: 1.1rem;
  line-height: 1.35;
}
.top-stories a {
  color: #111;
  text-decoration: none;
  font-weight: 600;
}
.top-stories a:hover {
  color: var(--primary);
}

/* ===============================
   SIDEBAR LINK STYLING
================================ */

/* Light mode sidebar links */
.sidebar ul li a {
  color: var(--sidebar-link, #007bff); /* Change to your desired color */
  text-decoration: underline;          /* Adds underline */
  transition: color 0.2s ease, text-decoration 0.2s ease;
}

.sidebar ul li a:hover {
  color: var(--sidebar-link-hover, #0056b3); /* Hover color */
  text-decoration: underline;               /* Keep underline on hover */
}

/* Dark mode sidebar links */
body.dark-mode .sidebar ul li a {
  color: var(--sidebar-link-dark, #80c0ff); /* Light blue for dark mode */
  text-decoration: underline;
}

body.dark-mode .sidebar ul li a:hover {
  color: var(--sidebar-link-hover-dark, #cce6ff); /* Hover color in dark mode */
  text-decoration: underline;
}

.socials {
  display: flex;
  gap: 14px;
  margin-top: 10px;
}
.socials a {
  color: var(--primary);
  font-size: 1.3rem;
  transition: color 0.25s ease, transform 0.25s ease;
}
.socials a:hover {
  color: var(--primary-dark);
  transform: scale(1.08);
}

/* ===========================================
   FEATURED SECTION (Right Column)
=========================================== */
.featured {
  background: #fff;
  border-radius: 10px;
  padding: 22px 24px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}
.featured h3 {
  font-size: 1.4rem;
  border-bottom: 3px solid var(--primary);
  padding-bottom: 6px;
  margin-bottom: 16px;
}
.featured-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
.feature-card {
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}
.feature-card img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  display: block;
}
.feature-card h4 {
  font-size: 1rem;
  margin: 10px 12px 14px;
}
.feature-card a {
  text-decoration: none;
  color: #111;
  font-weight: 600;
}
.feature-card a:hover {
  color: var(--primary);
}

/* ===========================================
   RESPONSIVE DESIGN
=========================================== */
@media (max-width: 950px) {
  .news-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .featured {
    order: 3;
  }

  .hero-story {
    height: 340px;
  }
}

@media (max-width: 600px) {
  .hero-overlay h2 {
    font-size: 1.4rem;
  }
  .hero-overlay p {
    font-size: 0.95rem;
  }
  .top-stories img {
    width: 100px;
    height: 72px;
  }
}

/* ===========================================
   SECTION BACKGROUND (for visual contrast)
=========================================== */
body {
  background: #f8f9fb;
}
body.dark-mode {
  background: var(--dark-bg);
}
body.dark-mode .top-stories,
body.dark-mode .sidebar,
body.dark-mode .featured {
  background: var(--dark-card);
  color: var(--dark-text);
  box-shadow: 0 2px 10px rgba(255, 255, 255, 0.05);
}/* ======================================
   ACCORDION STYLING (Reusable Component)
====================================== */
.accordion-section h3 {
  color: var(--primary);
  margin: 30px 0 15px;
  font-size: 1.4rem;
  border-bottom: 3px solid var(--primary);
  padding-bottom: 6px;
}

.accordion-header {
  width: 100%;
  text-align: left;
  padding: 12px 15px;
  background: var(--primary);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 6px;
  transition: background 0.3s ease;
  margin-top: 10px;
}
.accordion-header.active {
  background: var(--secondary);
}

.accordion-body {
  display: none;
  padding: 15px;
  background: #fff;
  border-radius: 0 0 6px 6px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  margin-bottom: 10px;
  line-height: 1.5;
}

/* Dark mode compatibility */
body.dark-mode .accordion-body {
  background: var(--dark-card);
  color: var(--dark-text);
  box-shadow: 0 2px 5px rgba(255, 255, 255, 0.05);
}

/* Responsive */
@media (max-width: 600px) {
  .accordion-header {
    font-size: 0.95rem;
    padding: 10px 12px;
  }
}
/* ===========================================
   DARK MODE FIXES — SIDEBAR VISIBILITY
=========================================== */
body.dark-mode .sidebar,
body.dark-mode .top-stories,
body.dark-mode .featured {
  background: var(--dark-card);
  color: var(--dark-text);
  box-shadow: 0 2px 10px rgba(255, 255, 255, 0.05);
}

/* Sidebar Text and Links */
body.dark-mode .sidebar h3,
body.dark-mode .top-stories h3,
body.dark-mode .featured h3 {
  color: var(--primary-light, #4da3ff);
}

body.dark-mode .sidebar ul li a,
body.dark-mode .top-stories a,
body.dark-mode .feature-card a {
  color: #ddd;
}

body.dark-mode .sidebar ul li a:hover,
body.dark-mode .top-stories a:hover,
body.dark-mode .feature-card a:hover {
  color: var(--primary-light, #4da3ff);
}

/* Social icons */
body.dark-mode .socials a {
  color: var(--primary-light, #4da3ff);
}
body.dark-mode .socials a:hover {
  color: #fff;
  transform: scale(1.08);
}

/* Feature cards readability */
body.dark-mode .feature-card {
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 2px 8px rgba(255, 255, 255, 0.05);
}
body.dark-mode .feature-card h4 {
  color: #eaeaea;
}

