/* =========================================================
   Muslims Guardian — Homepage layout CSS
   Styles the front-page.php markup: breaking-news ticker,
   hero story, "সর্বশেষ খবর" grid, "বিশেষ প্রতিবেদন" grid,
   and the "জনপ্রিয় খবর" sidebar list.
   ========================================================= */

/* Desktop main-menu one-line fix lives in style.css (targets the real
   #site-navigation > ul markup this theme actually outputs — the
   ul.mobile_nav selector previously here matched nothing and did
   nothing, so it has been removed rather than left as dead weight). */

/* ---- Breaking news ticker ---- */
.mg-breaking-wrap {
  display: flex;
  align-items: center;
  width: 100%;
  overflow: hidden;
  position: relative;
  z-index: 10;
  background-color: #0b6e2f;
}
.mg-breaking-label {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: #ffe600;
  font-weight: 700;
  font-size: 14px;
  padding: 10px 18px;
  white-space: nowrap;
  text-transform: capitalize;
}
.mg-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffe600;
  animation: mg-pulse 1.4s infinite;
}
@keyframes mg-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .3; }
}
.mg-breaking-ticker {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  position: relative;
  height: 42px;
  display: flex;
  align-items: center;
}
.mg-ticker-track {
  display: flex;
  align-items: center;
  gap: 40px;
  white-space: nowrap;
  padding-left: 20px;
  width: max-content;
  animation: mg-ticker-scroll 35s linear infinite;
  will-change: transform;
}
.mg-breaking-wrap:hover .mg-ticker-track {
  animation-play-state: paused;
}
.mg-ticker-track a {
  color: #ffe600;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  flex: 0 0 auto;
}
.mg-ticker-track a:hover {
  color: #fff6b0;
}
@keyframes mg-ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Underline override for the homepage blocks — the theme's global
   .contentsecwrap a { text-decoration: underline; } rule would
   otherwise underline every card/title link here. */
a.mg-hero-main,
a.mg-latest-card,
a.mg-featured-card,
a.mg-side-story {
  text-decoration: none;
}

/* ---- Section headings ---- */
.mg-section-heading {
  font-size: 24px;
  margin: 30px 0 18px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--first-theme-color);
  display: inline-block;
}
.mg-badge {
  display: inline-block;
  background: var(--first-theme-color);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 20px;
  text-transform: capitalize;
}
.mg-badge-alt {
  background: #303030;
}

/* ---- Hero ---- */
.mg-hero {
  margin-bottom: 30px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0 4px #cfcfcf;
}
.mg-hero-main {
  position: relative;
  display: block;
}
.mg-hero-image {
  width: 100%;
  height: 420px;
  object-fit: cover;
  object-position: top;
  background: #f4f4f4;
  display: block;
}
.mg-hero-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 30px;
  background: linear-gradient(to top, rgba(0,0,0,.85), rgba(0,0,0,0));
}
.mg-hero-title {
  color: #fff;
  font-size: 28px;
  margin: 10px 0;
}
.mg-hero-excerpt {
  color: #e6e6e6;
  font-size: 15px;
  margin: 0;
}

/* সর্বশেষ খবর (Latest Stories) and বিশেষ প্রতিবেদন (Featured News) grid,
   card, image and title styling all live in style.css now — that file
   owns the 4-column / 2-column layout with !important so it can't be
   silently overridden again. Kept only here: sidebar list + hero +
   badges + section headings, which style.css doesn't touch. */

/* ---- জনপ্রিয় খবর — sidebar list ---- */
.mg-side-stories {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 0 4px #cfcfcf;
  border-bottom: 3px solid var(--first-theme-color);
  padding: 20px;
  margin-bottom: 30px;
}
.mg-side-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.mg-side-list li {
  border-bottom: 1px solid #eee;
  padding: 12px 0;
}
.mg-side-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.mg-side-list li:first-child {
  padding-top: 0;
}
.mg-side-story {
  display: flex;
  align-items: center;
  gap: 12px;
}
.mg-side-thumb {
  width: 70px;
  height: 70px;
  object-fit: contain;
  background: #f4f4f4;
  border-radius: 8px;
  flex: 0 0 auto;
}
.mg-side-title {
  font-size: 14px;
  font-weight: 500;
  color: #303030;
  line-height: 1.4;
}
.mg-side-story:hover .mg-side-title {
  color: var(--first-theme-color);
}

/* ---- Responsive ---- */
@media screen and (max-width: 767px) {
  .mg-hero-image {
    height: 240px;
  }
  .mg-hero-title {
    font-size: 20px;
  }
  .mg-hero-overlay {
    padding: 18px;
  }
  .mg-breaking-label {
    padding: 8px 12px;
    font-size: 12px;
  }
  .mg-ticker-track a {
    font-size: 13px;
  }
}
