/* ================= GLOBAL ================= */

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", sans-serif;
  background: #f2f4f8;
  color: #111;
  overflow-x: hidden;
}

/* ================= LAYOUT ================= */
.container {
  display: grid;
  grid-template-columns: 22fr 54fr 24fr;
  gap: 20px;
  padding: 20px;
}

/* ================= CARDS (NO BLUR) ================= */
aside,
main {
  background: #ffffff;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
}

/* ================= STICKY SIDEBARS ================= */
aside {
  position: sticky;
  top: 20px;
  height: fit-content;
}

/* ================= LINKS ================= */
a {
  text-decoration: none;
  color: #111;
}

a:hover {
  color: #e60000;
}

/* ================= TRENDING ================= */
.trending-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.trending-header h3 {
  font-size: 20px;
  font-weight: 900;
}

.trending-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.trending-list li {
  margin-bottom: 12px;
}

.trending-list a {
  display: flex;
  gap: 10px;
  align-items: center;
}

.trend-thumb {
  width: 64px;
  height: 50px;
  border-radius: 10px;
  object-fit: cover;
}

.trend-title {
  font-size: 14px;
  font-weight: 600;
}

.trend-count {
  background: #af1414;
  color: #fff;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 6px;
}

.hot-badge {
  background: #e60000;
  color: #fff;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 6px;
}

/* ================= HERO / LEAD NEWS ================= */
.lead-news {
  margin-bottom: 24px;
}

.lead-news img {
  width: 100%;
  height: 320px;
  border-radius: 18px;
  object-fit: cover;
}

.lead-news h2 {
  font-size: 28px;
  margin: 12px 0 6px;
}

.breaking-time {
  color: #e60000;
  font-weight: 700;
}

.small {
  font-size: 14px;
  color: #555;
}

/* ================= NEWS CARDS ================= */
.news-row {
  background: #fafafa;
  border-radius: 14px;
  padding: 10px;
  margin-bottom: 14px;
  display: flex;
  gap: 12px;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.news-row:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.news-row img {
  width: 120px;
  height: 82px;
  border-radius: 12px;
  object-fit: cover;
}

.news-row strong {
  font-size: 20px;
}

/* ================= CATEGORY ================= */
.category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 24px 0 12px;
}

.category-header h3 {
  font-size: 20px;
  font-weight: 900;
  border-left: 4px solid #e60000;
  padding-left: 8px;
}

.view-all-link {
  font-size: 13px;
  font-weight: 700;
  color: #e60000;
}

/* ================= RIGHT SIDE ================= */
.topstories-box {
  position: sticky;
  top: 20px;
}

.youtube-box iframe {
  width: 100%;
  height: 160px;
  border-radius: 14px;
  margin-bottom: 14px;
}

.topstories-box h3 {
  font-size: 21px;
  font-weight: 800;
  margin-bottom: 12px;
}

/* ================= ADVERTISEMENT BOX ================= */
.ad-box {
  margin-top: 20px;
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  border: 2px dashed #dee2e6;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  color: #6c757d;
  font-weight: 600;
}

.ad-box .ad-icon {
  font-size: 48px;
  margin-bottom: 10px;
  opacity: 0.5;
}

.ad-box p {
  margin: 0;
  font-size: 14px;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 1024px) {
  .container {
    grid-template-columns: 1fr;
  }
}

/* ================= TRENDING CARD ================= */
.trending-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
}

/* HEADER */
.trending-header {
  border-bottom: 2px solid #e60000;
  margin-bottom: 12px;
}

.trending-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
}

/* LIST */
.trending-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.trending-list li {
  margin-bottom: 12px;
}

.trending-list a {
  display: flex;
  gap: 10px;
  align-items: center;
  text-decoration: none;
  color: #111;
}

/* THUMB */
.trend-thumb {
  width: 64px;
  height: 48px;
  object-fit: cover;
  border-radius: 10px;
}

/* TEXT */
.trend-text-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.trend-count {
  background: #111;
  color: #fff;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 6px;
}

.hot-badge {
  background: #e60000;
  color: #fff;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 6px;
}

.trend-title {
  display: block;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
}

/* ================= PREMIUM PHOTO OF THE DAY ================= */
.photo-day-box {
  margin-top: 26px;
  padding: 18px;
  background: linear-gradient(180deg, #ffffff, #f7f9fc);
  border-radius: 20px;
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* subtle glow line */
.photo-day-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #e60000, #ff9800);
}

/* TITLE */
.photo-day-box h3 {
  margin: 6px 0 14px;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.3px;
  color: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* IMAGE */
.photo-day-box img {
  width: 100%;
  height: 300px;
  /* BIGGER IMAGE */
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 12px;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
  transition: transform 0.3s ease;
}

.photo-day-box img:hover {
  transform: scale(1.03);
}

/* TEXT */
.photo-day-box p {
  font-size: 15px;
  line-height: 1.4;
  color: #333;
  font-weight: 700;
  padding: 0 8px;
}

/* OPTIONAL BADGE */
.photo-day-badge {
  display: inline-block;
  margin-top: 10px;
  background: #e60000;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: 30px;
  letter-spacing: 0.3px;
}

/* ================= MAGAZINE SECTION ================= */
.magazine-section {
  margin-top: 26px;
  padding: 24px;
  background: linear-gradient(180deg, #ffffff, #f7f9fc);
  border-radius: 20px;
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.magazine-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #e60000, #ff9800);
}

.magazine-section h3 {
  margin: 6px 0 14px;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.3px;
  color: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.magazine-images {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.magazine-images img {
  width: 120%;
  height: 200px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease;
}

.magazine-images img:hover {
  transform: scale(1.05);
}

.magazine-item {
  position: relative;
  display: inline-block;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #fff;
  color: #000;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 20px;
  opacity: 0;
  transition: opacity 0.3s;
}

.magazine-item:hover .close-btn {
  opacity: 1;
}

.magazine-item.expanded::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 999;
}

.magazine-item.expanded img {
  width: 80%;
  height: auto;
  max-height: 80vh;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1000;
}

.magazine-item.expanded .close-btn {
  opacity: 1;
  z-index: 1001;
}

/* Mobile */
@media (max-width: 1024px) {
  .container {
    grid-template-columns: 1fr;
  }

  /* 🔥 IMPORTANT FIX */
  aside {
    position: relative;
    /* sticky hata do */
    top: auto;
  }

  .topstories-box {
    position: relative;
    /* right sidebar bhi normal ho */
    top: auto;
  }
}

/* ================= MOBILE TEXT ENHANCEMENT ================= */
@media (max-width: 600px) {
  /* LEAD NEWS */
  .lead-news h2 {
    font-size: 29px;
    line-height: 1.3;
  }

  .lead-news .small {
    font-size: 15px;
    line-height: 1.6;
  }

  /* LATEST + CATEGORY NEWS */
  .news-row strong {
    font-size: 22px;
    line-height: 1.4;
    display: block;
  }

  .news-row .small {
    font-size: 14px;
    line-height: 1.6;
  }

  .news-date {
    font-size: 13px;
  }

  /* TRENDING */
  .trend-title {
    font-size: 15px;
    line-height: 1.4;
  }

  /* CATEGORY HEADERS */
  .category-header h3 {
    font-size: 19px;
  }

  /* SECTION HEADINGS */
  main h3,
  aside h3 {
    font-size: 20px;
  }
}

/* ================= PHOTO MODAL ================= */
.photo-modal {
  display: none;
  position: fixed;
  z-index: 999999 !important;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
}

.photo-modal img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  animation: zoomIn 0.35s ease;
}

.photo-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #fff;
  font-size: 40px;
  font-weight: 800;
  cursor: pointer;
  transition: 0.2s;
}

.photo-close:hover {
  color: #ff4d4d;
}

@keyframes zoomIn {
  from {
    transform: scale(0.85);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Mobile */
@media (max-width: 600px) {
  .photo-modal img {
    max-width: 95%;
    max-height: 80%;
  }
}

.news-row a {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.news-row a:has(img),
.news-row a:has(video) {
  align-items: flex-start;
}

.news-row a:not(:has(img)):not(:has(video)) {
  display: block;
}

.news-row a {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  width: 100%;
}

.news-row .content {
  flex: 1;
}
