/* ============================================================
   NEWS PAGE & NEWS SECTION — Dimensi Amanah Berhad
   ============================================================ */

/* ── Hero Banner (news.html) ── */
.news-hero {
  position: relative;
  background: url("../images/test1.jpg") no-repeat center center / cover;
  height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}
.news-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.58);
  z-index: 1;
}
.news-hero-div {
  position: relative;
  z-index: 2;
  padding: 0 20px;
}
.news-hero-title {
  font-family: "Times New Roman", Times, serif;
  font-size: 48px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #d0a852;
  margin-bottom: 10px;
  text-transform: uppercase;
  text-shadow: 0 3px 10px rgba(0,0,0,0.5);
  opacity: 0;
  animation: fadeSlideUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.3s forwards;
}
.news-hero-sub {
  font-size: 16px;
  color: rgba(255,255,255,0.85);
  font-style: italic;
  opacity: 0;
  animation: fadeSlideUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.8s forwards;
}
@keyframes fadeSlideUp {
  to { opacity: 1; transform: translateY(0); }
  from { opacity: 0; transform: translateY(22px); }
}

/* ── News Listing Page Layout ── */
.news-listing {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 24px 80px;
}
.news-listing-header {
  text-align: center;
  margin-bottom: 50px;
}
.news-listing-header .section-label {
  font-family: "Times New Roman", Times, serif;
  font-size: 13px;
  letter-spacing: 3px;
  color: #d0a852;
  font-weight: 700;
  text-transform: uppercase;
  display: block;
  margin-bottom: 10px;
}
.news-listing-header h2 {
  font-size: 40px;
  font-weight: 800;
  color: #140319;
  margin: 0;
  font-family: "Times New Roman", Times, serif;
}
.news-listing-header .underline-bar {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, #c6a15b, #e6c77b);
  margin: 14px auto 0;
  border-radius: 2px;
}

/* ── Featured Card (first / top article) ── */
.news-featured {
  display: flex;
  gap: 40px;
  background: linear-gradient(120deg, #00010a 0%, #140319 40%, #3a0c3c 60%, #140319 80%, #00010a 100%);
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 50px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.15);
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.news-featured.visible {
  opacity: 1;
  transform: translateY(0);
}
.news-featured-img {
  flex: 0 0 45%;
  max-width: 45%;
  overflow: hidden;
}
.news-featured-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}
.news-featured:hover .news-featured-img img {
  transform: scale(1.04);
}
.news-featured-body {
  flex: 1;
  padding: 40px 40px 40px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #fafafa;
}
.news-tag {
  display: inline-block;
  padding: 4px 12px;
  font-size: 11px;
  letter-spacing: 2px;
  font-weight: 700;
  text-transform: uppercase;
  color: #d0a852;
  border: 1px solid rgba(208,168,82,0.5);
  border-radius: 999px;
  margin-bottom: 14px;
  width: fit-content;
}
.news-featured-body h2 {
  font-family: "Times New Roman", Times, serif;
  font-size: 28px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 14px;
  line-height: 1.4;
}
.news-featured-body .news-date {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  margin-bottom: 14px;
  letter-spacing: 0.5px;
}
.news-featured-body p {
  font-size: 15px;
  line-height: 1.8;
  color: rgba(255,255,255,0.75);
  margin-bottom: 24px;
  flex-grow: 1;
}

/* ── Card Grid ── */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.news-card-item {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(0,0,0,0.07);
  border: 1px solid rgba(0,0,0,0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(30px);
}
.news-card-item.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s ease, transform 0.7s ease, box-shadow 0.3s ease;
}
.news-card-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 45px rgba(0,0,0,0.13);
}
.news-card-thumb {
  width: 100%;
  height: 200px;
  overflow: hidden;
}
.news-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}
.news-card-item:hover .news-card-thumb img {
  transform: scale(1.06);
}
.news-card-body {
  padding: 22px 22px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.news-card-body .news-tag {
  color: #3D0C3D;
  border-color: rgba(61,12,61,0.3);
  margin-bottom: 10px;
}
.news-card-body h3 {
  font-family: "Times New Roman", Times, serif;
  font-size: 18px;
  font-weight: 700;
  color: #140319;
  margin: 0 0 8px;
  line-height: 1.4;
}
.news-card-body .news-date {
  font-size: 12px;
  color: #999;
  margin-bottom: 10px;
  letter-spacing: 0.4px;
}
.news-card-body p {
  font-size: 14px;
  color: #555;
  line-height: 1.7;
  margin-bottom: 18px;
  flex-grow: 1;
}

/* ── Empty / Placeholder State ── */
.news-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: #aaa;
  font-size: 16px;
  font-style: italic;
}

/* ── INDEX.HTML — News Section Teaser ── */
.news-section-home {
  padding: 70px 5%;
  background: #f8f7f4;
}
.news-section-home .news-home-header {
  text-align: center;
  margin-bottom: 48px;
}
.news-home-header .section-label {
  font-family: "Times New Roman", Times, serif;
  font-size: 13px;
  letter-spacing: 3px;
  color: #d0a852;
  font-weight: 700;
  text-transform: uppercase;
  display: block;
  margin-bottom: 10px;
}
.news-home-header h2 {
  font-family: "Times New Roman", Times, serif;
  font-size: 42px;
  font-weight: 800;
  color: #140319;
  margin: 0 0 4px;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.news-home-header h2.show {
  opacity: 1;
  transform: translateY(0);
}
.news-home-header .underline-bar {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, #c6a15b, #e6c77b);
  margin: 14px auto 0;
  border-radius: 2px;
}

/* Home teaser: 1 article → single wide card; 2+ → grid */
.news-home-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  max-width: 1200px;
  margin: 0 auto 40px;
}
.news-home-grid.single {
  grid-template-columns: 1fr;
  max-width: 780px;
}
.news-home-grid.two {
  grid-template-columns: repeat(2, 1fr);
  max-width: 860px;
}

/* Home card: same base as listing card */
.news-home-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(0,0,0,0.07);
  border: 1px solid rgba(0,0,0,0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(28px);
}
.news-home-card.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s ease, transform 0.7s ease, box-shadow 0.3s ease;
}
.news-home-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 45px rgba(0,0,0,0.13);
}
/* Single-article layout: image left, text right */
.news-home-grid.single .news-home-card {
  flex-direction: row;
  min-height: 280px;
}
.news-home-grid.single .news-card-thumb {
  flex: 0 0 42%;
  max-width: 42%;
  height: auto;
}
.news-home-grid.single .news-card-body {
  padding: 32px 32px 32px 28px;
}
.news-home-grid.single .news-card-body h3 {
  font-size: 22px;
}

.news-home-footer {
  text-align: center;
  margin-top: 8px;
}

/* ── Article Detail Page (news/YYYYMMDD_news.html) ── */
.article-hero {
  position: relative;
  height: 420px;
  overflow: hidden;
}
.article-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.article-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.25), rgba(0,0,0,0.65));
  z-index: 1;
}
.article-hero-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 40px 5%;
  max-width: 900px;
}
.article-hero-content .news-tag {
  margin-bottom: 12px;
}
.article-hero-content h1 {
  font-family: "Times New Roman", Times, serif;
  font-size: 38px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 10px;
  line-height: 1.35;
  text-shadow: 0 2px 10px rgba(0,0,0,0.4);
}
.article-meta {
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.5px;
}

.article-container {
  max-width: 860px;
  margin: 0 auto;
  padding: 60px 24px 80px;
}
.article-body {
  font-size: 17px;
  line-height: 1.9;
  color: #333;
  font-family: "Georgia", serif;
}
.article-body h2 {
  font-family: "Times New Roman", Times, serif;
  font-size: 26px;
  font-weight: 700;
  color: #140319;
  margin: 40px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(208,168,82,0.35);
}
.article-body h3 {
  font-family: "Times New Roman", Times, serif;
  font-size: 20px;
  color: #3D0C3D;
  margin: 28px 0 12px;
}
.article-body p {
  margin: 0 0 20px;
}
.article-body ul, .article-body ol {
  padding-left: 22px;
  margin-bottom: 20px;
}
.article-body li {
  margin-bottom: 8px;
}
.article-body img {
  width: 100%;
  border-radius: 12px;
  margin: 28px 0;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.article-body blockquote {
  border-left: 4px solid #d0a852;
  margin: 28px 0;
  padding: 16px 24px;
  background: #fdf9f0;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: #555;
}

.article-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 36px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: #3D0C3D;
  text-decoration: none;
  transition: gap 0.2s ease;
}
.article-back:hover {
  gap: 12px;
  color: #d0a852;
}
.article-back svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.article-divider {
  border: none;
  border-top: 1px solid #e5e5e5;
  margin: 50px 0 40px;
}

/* Related articles row */
.related-articles {
  margin-top: 10px;
}
.related-articles h3 {
  font-family: "Times New Roman", Times, serif;
  font-size: 22px;
  font-weight: 700;
  color: #140319;
  margin-bottom: 24px;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .news-hero-title { font-size: 34px; }
  .news-hero { height: 280px; }

  .news-featured {
    flex-direction: column;
  }
  .news-featured-img {
    flex: none;
    max-width: 100%;
    height: 220px;
  }
  .news-featured-body {
    padding: 28px 24px;
  }
  .news-featured-body h2 { font-size: 22px; }

  .news-grid {
    grid-template-columns: 1fr;
  }
  .news-listing-header h2 { font-size: 30px; }

  .news-home-header h2 { font-size: 30px; }
  .news-home-grid,
  .news-home-grid.two {
    grid-template-columns: 1fr;
    max-width: 100%;
  }
  .news-home-grid.single .news-home-card {
    flex-direction: column;
  }
  .news-home-grid.single .news-card-thumb {
    flex: none;
    max-width: 100%;
    height: 220px;
  }
  .news-home-grid.single .news-card-body {
    padding: 22px;
  }
  .news-home-grid.single .news-card-body h3 {
    font-size: 18px;
  }

  .article-hero { height: 280px; }
  .article-hero-content h1 { font-size: 26px; }
  .article-container { padding: 40px 20px 60px; }
  .article-body { font-size: 16px; }
  .related-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .news-hero-title { font-size: 26px; }
  .news-listing { padding: 40px 16px 60px; }
  .news-featured-body h2 { font-size: 20px; }
  .news-card-body h3 { font-size: 16px; }
}
