:root {
  --yellow: #FFD12A;
  --black: #111;
  --gray-700: #4a4a4a;
  --gray-300: #e6e6e6;
  --bg: #ffffff;
  --container: 1180px;
}

/* Reset & base */
* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--black);
  font: 16px/1.55 ui-sans-serif, system-ui;
}

.container {
  max-width: var(--container);
  margin: 10px auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 24px;
  border-bottom: 1px solid var(--gray-300);
}

.brand-box {
  display: inline-grid;
  width: 100px;
  height: 100px;
  background: #000;
  color: #fff;
  font-weight: 800;
  text-align: center;
  padding: 0;                 
  place-items: center;      
  align-content: center;    
  gap: 8px;                  
}

.brand-box span {
  display: block;           
  font-size: 20px;
  line-height: 1;             
  margin: 0;                  
}

/* Top nav: no yellow fill; hover/active = black border only */
.site-nav {
  display: flex;
  gap: 22px;
  align-items: center;
  flex-wrap: wrap;
}

.site-nav a,
.site-nav .btn {
  text-decoration: none;
  color: var(--black);
  font-weight: 700;
  padding: 6px 10px;
  border: 1.5px solid transparent;
  border-radius: 999px;
  background: transparent;
}

.site-nav a:hover,
.site-nav a:focus,
.site-nav .btn:hover,
.site-nav .btn:focus,
.site-nav a[aria-current="page"],
.site-nav .btn.active {
  background: transparent;
  border-color: var(--black);
  color: var(--black);
}

/* Main grid + hero */
.main-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  
  align-items: start;
}

.hero-card .media-placeholder {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: linear-gradient(180deg, #f5f5f5, #ddd);
  border: 1px solid var(--gray-300);
  border-radius: 4px;
}

.feature-copy {
  align-self: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.feature-copy .eyebrow {
  text-decoration: none;
  color: var(--gray-700);
  font-weight: 700;
}

.display {
  margin: 12px 0;
  font-size: clamp(38px, 5vw, 66px);
  line-height: .95;
  font-weight: 900;
  letter-spacing: -1px;
}

.dek {
  color: var(--gray-700);
  max-width: 52ch;
}

.meta {
  margin: 12px 0 20px;
  color: #666;
}

/* Content CTA button: yellow fill, no border; hover lift */
.btn {
  display: inline-flex;
  align-items: center;
  background: var(--yellow);
  color: #000;
  font-weight: 700;
  font-size: 14px;
  padding: 10px 22px;
  border: none;
  border-radius: 40px;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, .2);
}

.feature-copy .btn {
  width: auto;
  max-width: max-content;
  align-self: flex-start;
  white-space: nowrap;
  margin-bottom: 12px;
}

.feature-copy .date {
  margin-top: 8px;
  display: block;
}

/* Sidebar Latest */
.sidebar {
  border-left: 1px solid var(--gray-300);
  padding-left: 24px;
}

.sidebar-title {
  font-size: 20px;
  margin: 0 0 14px;
}

.sidebar .latest {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--gray-300);
  align-items: stretch;
}

.sidebar .latest:last-child {
  border-bottom: none;
}

.sidebar .thumb {
  width: 96px;
  height: 96px;
  background: linear-gradient(180deg, #efefef, #dcdcdc);
  border: 1px solid var(--gray-300);
  border-radius: 4px;
  background-size: cover;
  background-position: center;
}

.sidebar .latest-copy {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 96px;
}

.sidebar .latest-title {
  margin: 0 0 6px;
  font-size: 15px;
  line-height: 1.3;
  font-weight: 400;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
}

.sidebar .latest time {
  display: block;
  margin-top: 8px;
  color: #777;
  font-size: 12px;
}

/* Footer */
.site-footer {
  padding: 40px 24px;
  border-top: 1px solid var(--gray-300);
  color: #555;
}

/* Responsive */
@media(max-width:900px) {
  .main-grid {
    grid-template-columns: 1.6fr 1.6fr 1fr;
  }
}

@media (max-width:900px) {
  .main-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .sidebar {
    border-left: none;
    padding-left: 0;
    border-top: 1px solid var(--gray-300);
    padding-top: 18px;
  }

  .site-header {
    padding: 20px 24px;
  }

  .brand-box {
    width: 84px;
    height: 84px;
  }
}

.home-news{padding:40px 0;border-top:1px solid var(--gray-300)}
.home-news-title{margin:0 0 16px;font-size:22px}
.home-news-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:22px}
.news-card{border:1px solid var(--gray-300);border-radius:8px;overflow:hidden;background:#fff;transition:transform .18s ease,box-shadow .18s ease}
.news-link{display:block;color:inherit;text-decoration:none}
.news-thumb{width:100%;aspect-ratio:16/9;background:linear-gradient(180deg,#efefef,#dcdcdc);background-size:cover;background-position:center}
.news-title{margin:10px 12px 6px 12px;font-size:18px;line-height:1.28;font-weight:700;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;white-space:normal}
.news-time{display:block;margin:0 12px 12px 12px;font-size:12px;color:#777}
.news-card:hover{transform:translateY(-2px);box-shadow:0 8px 18px rgba(0,0,0,.08)}


@media(max-width:900px){.home-news-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:700px){.home-news-grid{grid-template-columns:1fr}}


.news-module{padding:15px 0;background:#fff;color:#111}
/* === Align news-module with top 3-col grid === */

.nm-h{margin:0 0 14px;font-size:20px;font-weight:800}
.nm-left{background:#fff}
.nm-left .news-item{display:grid;grid-template-columns:120px 1fr;gap:16px;padding:16px 0;border-bottom:1px solid #eee;text-decoration:none;color:inherit;align-items:center}
.nm-left .news-item:last-child{border-bottom:none}
.nm-left .thumb{width:120px;height:84px;border-radius:8px;background:linear-gradient(180deg,#efefef,#dcdcdc);background-size:cover;background-position:center}
.nm-left .t{margin:0 0 6px;font-size:18px;line-height:1.25;font-weight:800}
.nm-left .m{margin:0;color:#666;font-size:13px}
.nm-right{background:#fff;border:1px solid #eee;border-radius:12px;padding:12px}
.nm-list{list-style:none;margin:0;padding:0}
.nm-list li+li{border-top:1px solid #eee}
.nm-list a{display:block;padding:14px 10px 14px 0px;position:relative;color:inherit;text-decoration:none}
.nm-list .rk{position:absolute;left:10px;top:14px;width:22px;height:22px;border-radius:50%;background:var(--yellow);color:#000;font-weight:800;display:grid;place-items:center;font-size:12px}
.nm-list .ttl{font-weight:800;line-height:1.25;margin:0 0 6px}
.nm-list .by{font-size:12px;color:#666}
@media(max-width:900px){/* === Align news-module with top 3-col grid === */
}


@media(max-width:900px){
  .nm-wrap{grid-template-columns:1fr}
  .nm-left{grid-column:auto}
  .nm-right{
    grid-column:auto;
    border-left:none;
    padding-left:0;
    border-top:1px solid var(--gray-300);
    padding-top:18px;
  }
}


/* === Force news-module to align with top sidebar (right col) === */


.news-module 
.nm-left{grid-column:1 / span 2}
.nm-right{grid-column:3;border:none;border-left:1px solid var(--gray-300);border-radius:0;padding:0 0 0 24px;background:transparent}

@media(max-width:900px){
  .nm-wrap{grid-template-columns:1fr}
  .nm-left,.nm-right{grid-column:auto}
  .nm-right{border-left:none;padding-left:0;border-top:1px solid var(--gray-300);padding-top:18px}
}


/* === More News grid === */
.more-news-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}
@media (max-width:1024px){.more-news-grid{grid-template-columns:repeat(2,1fr)}}
@media (max-width:640px){.more-news-grid{grid-template-columns:1fr}}

/* === Category Highlights === */
#category-highlights{padding:48px 0;border-top:1px solid #eee}
.cat-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}
@media (max-width:1024px){.cat-grid{grid-template-columns:repeat(2,1fr)}}
@media (max-width:640px){.cat-grid{grid-template-columns:1fr}}

/* === Topic chips === */
#topic-chips{padding:28px 0;border-top:1px solid #eee}
.chips{display:flex;gap:10px;flex-wrap:wrap}
.chip{display:inline-flex;align-items:center;padding:8px 14px;border:1px solid #ddd;border-radius:999px;text-decoration:none;color:var(--black)}
.chip:hover{border-color:var(--black)}

/* === Newsletter CTA === */
.section.cta{padding:42px 0;border-top:1px solid #eee}
.cta-inner{display:flex;gap:20px;align-items:center;flex-wrap:wrap;justify-content:space-between}
.cta-inner h3{margin:0}
.cta-form{display:flex;gap:10px}
.cta-form input{padding:10px 12px;border:1px solid #ddd;border-radius:10px;min-width:240px}

/* === Footer === */
.foot-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}
.foot-col h4{margin:0 0 8px 0}
.foot-col ul{list-style:none;margin:0;padding:0;display:grid;gap:8px}
.foot-col a{text-decoration:none;color:inherit}
.foot-col a:hover{color:var(--black)}


/* === Latest News big cards: only bottom divider === */
.news-card{
  display:grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
  padding: 24px 0;
  text-decoration:none;
  color: inherit;
  border-bottom: 1px solid #e5e5e5; /* ONLY bottom divider */
}
.news-card:first-of-type{
  border-top: none;
}
.card-thumb{
  width: 100%;
  aspect-ratio: 1/1; /* square */
  background: linear-gradient(180deg,#ededed,#dcdcdc);
}
.card-title{
  margin:0 0 8px 0;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.2;
}
.card-date{
  margin:0 0 8px 0;
  font-size: 14px;
  color:#777;
}
.card-excerpt{
  margin:0;
  color:#444;
  font-size: 16px;
  line-height:1.6;
  display:-webkit-box;
  -webkit-line-clamp:3;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
@media (max-width: 900px){
  .news-card{grid-template-columns: 1fr; gap: 12px}
}


/* === Rectangular thumb & author/date meta === */
.news-card{
  grid-template-columns: 360px 1fr;
}
.card-thumb{
  aspect-ratio: auto !important;
  height: 240px !important; /* 3:2 rectangle */
  background: linear-gradient(180deg,#ececec,#dcdcdc);
}
.card-title{
  font-size: 32px;
  line-height: 1.2;
  margin: 0 0 10px 0;
  text-decoration: underline; /* like reference */
  text-underline-offset: 3px;
}
.card-excerpt{ margin: 0 0 10px 0; }
.card-meta{
  margin: 0;
  color: #6c6c6c;
  font-size: 14px;
}
@media (max-width: 900px){
  .news-card{ grid-template-columns: 1fr; }
  .card-thumb{ height: 220px !important; }
  .card-title{ font-size: 26px; }
}


/* === Final tweaks per spec === */
.news-card{
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  border-bottom: 1px solid #e5e5e5 !important; /* only bottom divider */
  display: grid !important;
  grid-template-columns: 360px 1fr !important;
  gap: 28px !important;
  padding: 28px 0 !important;
  align-items: center !important; /* vertically center text */
}
.news-card:first-of-type{ border-top: none !important; }
.card-title{
  text-decoration: none !important; /* remove underline */
  margin: 0 0 10px 0 !important;
  font-size: 32px !important;
  line-height: 1.2 !important;
  font-weight: 800 !important;
}
.card-thumb{
  height: 240px !important; /* 3:2 */
  aspect-ratio: auto !important;
  background: linear-gradient(180deg,#ececec,#dcdcdc) !important;
  border-radius: 0 !important;
}
.card-excerpt{ margin: 0 0 10px 0 !important; }
.card-meta{ margin: 0 !important; color: #6c6c6c !important; font-size: 14px !important; }
@media (max-width: 900px){
  .news-card{ grid-template-columns: 1fr !important; gap: 14px !important; }
  .card-thumb{ height: 220px !important; }
  .card-title{ font-size: 26px !important; }
}


/* === Pager === */
.pager{display:flex;gap:10px;align-items:center;margin:24px 0 0}
.pager .pg-btn{display:inline-flex;align-items:center;justify-content:center;min-width:44px;height:36px;padding:0 12px;border:1px solid #111;border-radius:2px;text-decoration:none;color:#111;font-weight:700;cursor:pointer;background:#fff}
.pager .pg-btn.active{background:#111;color:#fff}
.pager .pg-btn.next{min-width:72px}

/* enforce hide for paginated items */
.nm-left .news-card.is-hidden{ display:none !important; }


/* Hide divider/line when not on first page */
.news-module.paginated hr,
.news-module.paginated .top-divider { display:none !important; }
.news-module.paginated,
.news-module.paginated .nm-wrap,
.news-module.paginated .nm-left,
.news-module.paginated .nm-right { border-top: 0 !important; }
.news-module.paginated .nm-left::before,
.news-module.paginated .nm-wrap::before,
.news-module.paginated .nm-right::before { content:none !important; display:none !important; }


/* Cursor pointer on logo area */
.logo, .logo a,
.site-logo, .site-logo a,
.brand, .brand a,
.cr-logo, .cr-logo a,
header .logo, header .logo a { cursor: pointer; }

#news-list article.latest{cursor:pointer}

.hero-card,.feature-copy,.news-card,.nm-right .nm-list a{cursor:pointer}


/* Hero Banner  */
.hero-banner {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  background: #eee;
  margin-bottom: 2rem;
}

.hero-banner img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.hero-meta {
  position: absolute;
  left: 24px;
  bottom: 24px;
  color: #fff;
  z-index: 1;
}

.hero-title {
  margin: 0 0 4px 0;
  font-size: clamp(18px, 2.5vw, 28px);
  line-height: 1.2;
  font-weight: 700;
}

.hero-date {
  font-size: 12px;
  opacity: .9;
}

.hero-title {
  margin: 0 0 6px 0;
  font-size: clamp(22px, 3.2vw, 42px);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: .2px;
}

.hero-date {
  font-size: 14px;
  opacity: .9;
}

@media (max-width: 768px){
  .hero-meta {
  position: absolute;
  left: 24px;
  bottom: 24px;
  color: #fff;
  z-index: 1;
}

.hero-title {
  margin: 0 0 4px 0;
  font-size: clamp(18px, 2.5vw, 28px);
  line-height: 1.2;
  font-weight: 700;
}

.hero-date {
  font-size: 12px;
  opacity: .9;
}
}


/* ===== HERO FEATURE (screenshot-like) ===== */
.hero-feature{
  position: relative;
  width: 100%;
  aspect-ratio: 21/9; /* ， */
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 2.5rem;
  background: #111;
}
/* （ CSS ）， */
.hero-feature::before{
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--hero-bg), linear-gradient(180deg, #444, #222);
  background-size: cover, 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  filter: none;
}

/* （） */
.hero-top-title{
  position: absolute;
  left: clamp(16px, 5vw, 48px);
  top: clamp(16px, 6vh, 56px);
  z-index: 2;
}
.hero-top-title-chip{
  display: inline-block;
  padding: clamp(10px, 1.2vw, 14px) clamp(14px, 1.6vw, 18px);
  background: #a13b1f; /*  */
  color: #fff;
  font-weight: 800;
  line-height: 1.2;
  font-size: clamp(22px, 3.8vw, 56px);
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
}

/* （，） */
.hero-bottom-meta{
  position: absolute;
  left: clamp(16px, 5vw, 48px);
  right: clamp(16px, 5vw, 48px);
  bottom: clamp(12px, 3vh, 28px);
  z-index: 2;
  color: #fff;
  padding-top: 40px;
  background: linear-gradient(to top, rgba(0,0,0,.6) 30%, rgba(0,0,0,0) 90%);
}

/*  */
.hero-cat-badge{
  display: inline-block;
  font-size: 12px;
  background: #a13b1f;
  color: #fff;
  border-radius: 6px;
  padding: 4px 8px;
  margin-bottom: 8px;
}

/* （） */
.hero-bottom-title{
  margin: 0 0 6px;
  font-size: clamp(18px, 1.6vw, 24px);
  font-weight: 700;
  text-shadow: 0 2px 6px rgba(0,0,0,.4);
}

/* （） */
.hero-meta-row{
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  opacity: .95;
}
.hero-clock{
  opacity: .9;
}

/* ： */
@media (max-width: 768px){
  .hero-feature{ aspect-ratio: 16/10; }
  .hero-bottom-meta{ padding-top: 24px; }
  .hero-top-title{ top: 18px; left: 14px; }
  .hero-top-title-chip{ font-size: clamp(20px, 6vw, 28px); }
}


/* ===== HERO FULL BANNER ===== */
.hero-full{
  position: relative;
  width: 100%;
  aspect-ratio: 21/9;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 2.5rem;
  background: #111;
}
.hero-full::before{
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--hero-bg);
  background-size: cover;
  background-position: center;
}
.hero-overlay{
  position: absolute;
  left: clamp(16px, 5vw, 48px);
  bottom: clamp(16px, 5vh, 48px);
  z-index: 2;
  color: #fff;
  background: rgba(0,0,0,.45);
  padding: 12px 18px;
  border-radius: 6px;
}
.hero-title{
  margin: 0 0 6px;
  font-size: clamp(24px, 4vw, 52px);
  font-weight: 800;
}
.hero-date{
  font-size: 14px;
  opacity: .9;
}


/* ，hero  */
.main-grid .hero-feature,
.main-grid .hero-banner{
  grid-column: 1 / -1;
}


/* clickable hero banner */
.hero-banner{
  display: block;
  text-decoration: none;
  color: inherit;
  position: relative;
}
.hero-banner:hover .hero-title{
  text-decoration: underline;
}



/* Sticky footer layout */
html, body {
  height: 100%;
  display: flex;
  flex-direction: column;
}
body > main {
  flex: 1;
}
.site-footer {
  margin-top: auto;
}

/* Sticky footer (flex) */

html, body { height: 100%; }
body { min-height: 100dvh; display: flex; flex-direction: column; }
.page-content { flex: 1 0 auto; }
.site-footer { margin-top: auto; }



.hero-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
@media (max-width: 768px){
  .hero-full,
  .hero-feature,
  .hero-banner {
    max-height: 240px;
    aspect-ratio: 16/7;
  }
}


.hero-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 0;
}

@media (max-width: 768px){
  .hero-full,
  .hero-feature,
  .hero-banner {
    aspect-ratio: 16/10;
    max-height: none;
    border-radius: 0;
  }
}

/* === Adjusted Hero Banner Height (slightly smaller, no border radius) === */
.hero-full,
.hero-feature,
.hero-banner {
  aspect-ratio: 16/7;   /* slightly smaller height ratio */
  max-height: none;
  border-radius: 0;
  overflow: hidden;
}

.hero-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 0;
}

@media (max-width: 768px){
  .hero-full,
  .hero-feature,
  .hero-banner {
    aspect-ratio: 16/9;
    max-height: none;
    border-radius: 0;
  }
}


/* === Detail page layout: top hero + two-column content === */
.detail-container{max-width:1100px;margin:0 auto;padding:0 16px;display:block;}
@media(max-width:900px){
  .detail-container{max-width:1100px;margin:0 auto;padding:0 16px;display:block;}
}
/* Top hero spans full width above the grid rows */
.detail-hero{
  grid-column:1 / -1;
}
.detail-hero img.cover{
  width:100%;
  height: clamp(220px, 32vw, 420px);
  object-fit: cover;
  display:block;
  border: 1px solid #e5e5e5;
  border-radius: 0; /* straight corners per requirement */
  background:#f0f0f0;
}
.detail-main h1{margin:16px 0 8px;font-size:32px;line-height:1.25}
.detail-main .meta{color:#666;font-size:14px;margin-bottom:16px}
.detail-body{font-size:16px;line-height:1.8;white-space:pre-wrap}
.sidebar{position:sticky;top:16px;height:fit-content;border-left:1px solid #eee;padding-left:16px}
.promo-card{border:1px solid #eee;border-radius:8px;padding:12px;margin-top:12px;background:#fafafa}
.promo-title{font-weight:700;margin-bottom:4px}
.back-link{display:inline-block;margin-top:8px;font-size:14px;text-decoration:none}


/* === Merged header.css content === */
/* header.css */
header {
  background: #fff;
  border-bottom: 1px solid #eee;
  padding: 10px 20px;
}

header .navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header .logo a {
  font-size: 20px;
  font-weight: bold;
  text-decoration: none;
  color: #333;
}

header .nav-links {
  list-style: none;
  display: flex;
  gap: 15px;
}

header .nav-links li a {
  text-decoration: none;
  color: #555;
  transition: color 0.3s;
}

header .nav-links li a:hover {
  color: #000;
}


/* === Merged footer.css content === */
/* footer.css */
footer {
  background: #f8f8f8;
  text-align: center;
  padding: 15px 0;
  border-top: 1px solid #eee;
  color: #666;
  font-size: 14px;
}

/* === Fix: normalize hero banner title size === */
.hero-banner .hero-title{font-size: clamp(22px, 3.2vw, 42px); line-height:1.15; font-weight:800;}
@media (min-width: 1400px){ .hero-banner .hero-title{font-size: 44px;} }

/* === Fix hero banner title style === */
.hero-banner .hero-title {
  font-size: 28px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  line-height: 1.3;
  display: inline-block;
}

.hero-banner .hero-title:hover {
  color: #ffcc00;
  text-decoration: none;
}

.hero-banner .hero-date {
  font-size: 14px;
  color: #ddd;
  margin-top: 8px;
  display: block;
}


/* ---- Detail hero sizing override (keep layout intact) ---- */
#detail-cover-hero,
#detail-cover,
.detail-hero .cover {
  width: 100%;
  height: auto;
  max-height: 420px;   /* adjust if you want smaller/larger */
  object-fit: cover;
  border-radius: 6px;
}

/* Fallback block when no image */
#detail-cover-fallback,
.detail-hero .cover-fallback {
  height: clamp(220px, 38vw, 380px);
  max-height: 420px;
  border-radius: 6px;
}


/* ===== CSS-only layout fixes (no HTML changes) ===== */

/* Sticky footer baseline */
html, body { height: 100%; }
body { min-height: 100vh; display: flex; flex-direction: column; }
.page-content { flex: 1 0 auto; }
#footer { margin-top: auto; }

/* Sidebar: consistent position on desktop */
#sidebar { width: 300px !important; flex-shrink: 0; position: sticky; top: 96px; align-self: flex-start; }
#sidebar .promo-card, #sidebar .card { width: 100%; }

/* Ensure the two-column container behaves consistently */
.content-with-sidebar { align-items: flex-start; gap: 24px; }

/* Responsive: natural stacking on narrow screens */
@media (max-width: 960px){
  .content-with-sidebar { display: block !important; }
  #sidebar { position: static !important; width: auto !important; margin-top: 20px; }
}

/* Small breathing between cover and title on detail */
#detail-cover-hero, #detail-cover-fallback { margin-bottom: 16px; }


/* === [Patch] Layout unify: head-body-foot vertical layout for all pages === */
html, body { height: 100%; }
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
#header, #footer { flex: 0 0 auto; }

/* Make the middle container flex:1 no matter its alias */
body > main,
body > .page,
body > .content,
body > .content-with-sidebar,
body > .page-content {
  flex: 1 1 auto;
  display: block;
  width: 100%;
}

/* Unify inner content width/margins */
body > main .content,
body > .page,
body > .content,
body > .content-with-sidebar,
body > .page-content {
  max-width: 1200px;
  margin: 10px auto;
  padding: 0 16px;
}

/* Two-column helper for pages that need sidebar on the right */
.with-sidebar {
  display: flex;
  align-items: flex-start;
  gap: 24px;
}
.with-sidebar .main  { flex: 1 1 auto; min-width: 0; }
.with-sidebar .aside { flex: 0 0 300px; }

/* Mobile stacking */
@media (max-width: 900px) {
  .with-sidebar { flex-direction: column; }
  .with-sidebar .aside { flex: 0 0 auto; width: 100%; }
}
/* === [End Patch] === */


/* ensure hero image visible */
.detail-hero img{width:100%;height:auto;display:block;}


/* ---------- Mobile spacing & readability improvements ---------- */
@media (max-width: 640px){
  :root{
    --container-pad: 16px;
    --gap-sm: 14px;
    --gap-md: 18px;
  }

  body{ line-height: 1.75; }

  .container, .page-content, .nm-wrap, .hero-wrap{
    padding-left: var(--container-pad) !important;
    padding-right: var(--container-pad) !important;
  }

  /* Header nav spacing */
  #header nav a{
    padding: 10px 10px;
    margin: 0 4px;
  }

  /* Hero section */
  .hero-banner, .detail-hero{
    display:block;
    margin: 12px 0 18px;
  }
  .hero-banner img,
  .detail-hero img{
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
  }
  .hero-meta{
    padding: 8px 2px 0;
  }
  .hero-title{
    font-size: 20px;
    line-height: 1.35;
    margin: 6px 0 4px;
  }
  .hero-date{
    font-size: 13px;
    opacity: .85;
  }

  /* Latest list spacing */
  .nm-h{
    margin: 10px 0 8px;
    font-size: 18px;
  }
  .news-card{
    gap: var(--gap-sm);
    padding: 10px 0 16px;
    border-bottom: 1px solid #eee;
  }
  .news-card img{
    width: 100%;
    height: auto;
    border-radius: 6px;
  }
  .news-card .card-title{
    font-size: 18px;
    line-height: 1.4;
    margin: 2px 0 6px;
  }
  .news-card .meta, .news-card .card-meta{
    font-size: 12.5px;
    opacity: .85;
    margin-bottom: 6px;
  }
  .card-excerpt{
    font-size: 14px;
    line-height: 1.6;
  }

  /* Detail page */
  .detail-container{
    padding: 0 var(--container-pad);
  }
  .detail-main h1{
    font-size: 22px;
    line-height: 1.35;
    margin: 10px 0 8px;
  }
  .meta{ font-size: 13px; margin-bottom: 10px; }
  .detail-body{ font-size: 15px; line-height: 1.75; }
  .back-link{ margin-top: 12px; }

  /* Cards with image-left layout (if exists) */
  .card{
    gap: var(--gap-sm);
  }
}

/* ---------- Tablet tuning ---------- */
@media (min-width: 641px) and (max-width: 900px){
  .container, .page-content, .nm-wrap, .hero-wrap{ padding-left:22px; padding-right:22px; }
  .hero-title{ font-size: 24px; }
  .detail-main h1{ font-size: 26px; }
  .detail-body{ font-size: 16px; line-height: 1.8; }
  .news-card .card-title{ font-size: 20px; }
}


/* ===== Responsive Header & Drawer ===== */
.site-header{
  display:flex; align-items:center; justify-content:space-between;
  gap:16px; padding:12px 0;
}
.site-nav a{ display:inline-block; padding:10px 12px; font-weight:600; }

/* hamburger */
.nav-toggle{ display:none; width:42px; height:36px; border:1px solid #e5e5e5; border-radius:8px; background:#fff; align-items:center; justify-content:center; gap:4px; }
.nav-toggle .bar{ display:block; width:20px; height:2px; background:#111; }
.nav-toggle .bar + .bar{ margin-top:4px; }

/* Drawer */
.nav-backdrop{ position:fixed; inset:0; background:rgba(0,0,0,.45); z-index:999; }
.mobile-drawer{
  position:fixed; top:0; right:0; width:78%; max-width:360px; height:100dvh;
  background:#121212; color:#f3f3f3; padding:18px; z-index:1000;
  transform:translateX(100%); transition:transform .28s ease;
  display:flex; flex-direction:column; gap:12px; box-shadow:-8px 0 24px rgba(0,0,0,.25);
}
.mobile-drawer[aria-hidden="false"]{ transform:translateX(0); }
.drawer-top{ display:flex; align-items:center; justify-content:space-between; margin-bottom:8px; }
.drawer-close{ background:transparent; border:0; color:#fff; font-size:28px; line-height:1; cursor:pointer; }
.drawer-nav a{ display:flex; align-items:center; justify-content:space-between; padding:14px 10px; border-bottom:1px solid rgba(255,255,255,.08); color:#f1f1f1; text-decoration:none; }
.drawer-nav a:hover{ background:rgba(255,255,255,.06); }
.drawer-social{ margin-top:auto; display:flex; gap:14px; opacity:.9; }

/* lock scroll when open */
.no-scroll{ overflow:hidden; }

/* Breakpoints */
@media (max-width: 768px){
  .site-nav{ display:none; }
  .nav-toggle{ display:flex; }
}


/* === Hamburger button: three bars === */
.nav-toggle{
  display:none;
  width:40px; height:32px;
  background:#fff;
  border:1px solid #e5e5e5;
  border-radius:6px;
  padding:6px;
  box-shadow:none;
  flex-direction:column;
  align-items:center; justify-content:center; gap:5px;
}
.nav-toggle .bar{
  display:block;
  width:22px; height:2px;
  background:#111;
  border-radius:2px;
}
@media (max-width: 768px){ .nav-toggle{ display:flex; } }


/* === Remove drawer shadow === */
.mobile-drawer{ box-shadow:none !important; }
.nav-backdrop{ background:rgba(0,0,0,.40); } /* keep backdrop, no edge shadow */


/* === Global horizontal padding for content === */
.container, .page-content, .nm-wrap, .hero-wrap{
  padding-left:20px;
  padding-right:20px;
}
@media (min-width: 1024px){
  .container, .page-content, .nm-wrap, .hero-wrap{
    padding-left:24px;
    padding-right:24px;
  }
}


/* === Hamburger bars (collision-safe) === */
.nav-toggle{
  display:none;
  width:40px; height:32px;
  background:#fff;
  border:1px solid #e5e5e5;
  border-radius:8px;
  padding:6px;
  box-shadow:none;
  flex-direction:column;
  align-items:center; justify-content:center;
  gap:6px;
}
.nav-toggle .hambar{
  display:block !important;
  width:22px !important;
  height:2px !important;
  background:#111 !important;
  border-radius:2px !important;
  opacity:1 !important;
}
@media (max-width: 768px){
  .nav-toggle{ display:flex !important; }
}


/* === IR Logo Fix (PC 88 / Tablet 70 / Mobile 55) === */
.brand-box{
  background: transparent !important;
}
.brand-box img{
  height: 88px !important;
  width: auto;
}
@media (max-width:1024px){
  .brand-box img{ height:70px !important; }
}
@media (max-width:600px){
  .brand-box img{ height:55px !important; }
}
/* === end === */


/* === Force remove padding for .main-grid === */
.main-grid {  }
/* === End === */


/* === Move drawer close button to right (minimal change) === */
.drawer-top{display:flex;justify-content:flex-end;align-items:center;}
.drawer-close{margin-left:auto;}


/* Clickable logo link */
.brand-link{display:inline-flex;align-items:center;text-decoration:none}
.brand-link img{display:block}


/* Prev/Next navigation (neutral) */
.detail-nav{display:flex;justify-content:space-between;margin-top:24px;border-top:1px solid #eee;padding-top:16px}
.detail-nav-link{background:#fff;border:1px solid #ddd;color:#333;padding:8px 14px;border-radius:6px;font-weight:500;text-decoration:none}
.detail-nav-link:hover{background:#f7f7f7;border-color:#ccc}

.news-module .nm-wrap{
  display:grid;
  
  gap:12px;
  align-items:start
}
@media(max-width:1100px){
  .news-module .nm-wrap{
}

/* homepage card-thumb square */
@media (min-width:901px) and (max-width:1200px){
  .news-module .card-thumb{
    width:240px !important;
    height:240px !important;
    aspect-ratio:1/1;
    object-fit:cover;
  }
}

/* homepage card layout align with 240px image */
@media (min-width:901px) and (max-width:1200px){
  .news-module .news-card{
    grid-template-columns:240px 1fr !important;
  }
}


/* === Desktop dropdown fallback === */
.site-nav .dropdown-menu{ border-radius:0 !important; list-style:none; }
.site-nav .dropdown-menu a:hover, .site-nav .dropdown-menu a:focus-visible{ background: var(--yellow) !important; color:#000 !important; }



/* === Mobile drawer overlay submenu (match About/Contact style; no yellow line; overlay on top) === */
@media (max-width: 640px){
  .drawer-nav a{
    display:block; padding:14px 0; color:#fff; text-decoration:none; font-weight:700;
    border-bottom:1px solid rgba(255,255,255,.16);
  }
  .drawer-nav .has-sub{ position: relative; }
  .drawer-nav .sub-toggle{
    width:100%; text-align:left; background:transparent; border:0; color:#fff;
    padding:14px 0; font-weight:700; border-bottom:1px solid rgba(255,255,255,.16);
  }
  .drawer-nav .sub-toggle .chev{ float:right; transition: transform .15s ease; }
  .drawer-nav .has-sub.open .sub-toggle .chev{ transform: rotate(180deg); }

  /* The yellow panel should overlay and NOT push layout */
  .drawer-nav .submenu{
    position:absolute; left:18px; right:18px;
    list-style:none; margin:0; padding:0;
    background: var(--yellow);
    box-shadow: 0 10px 24px rgba(0,0,0,.35);
    border-radius: 0;
    z-index: 10000;
    display: none;
  }
  .drawer-nav .has-sub.open .submenu{ display:block; }
  .drawer-nav .submenu li a{
    display:block; padding:12px 16px; color:#000; font-weight:800;
    border-bottom:1px solid rgba(0,0,0,.15);
    text-decoration:none;
  }
  .drawer-nav .submenu li:last-child a{ border-bottom:0; }
}



/* === Unify 'News' row style with About/Contact in mobile drawer === */
@media (max-width: 640px){
  .drawer-nav .has-sub{ margin:0; }
  .drawer-nav .sub-accent{ display:none !important; }
  .drawer-nav a,
  .drawer-nav .sub-toggle{
    display:block;
    width:100%;
    text-align:left;
    background:transparent;
    border:0;
    padding:14px 0;
    color:#fff;
    font-weight:700;
    border-bottom:1px solid rgba(255,255,255,.16);
    text-decoration:none;
    font: inherit;
    -webkit-appearance: none;
    appearance: none;
    line-height: inherit;
    cursor: pointer;
  }
}



/* === Mobile drawer: align 'News' with About/Contact === */
@media (max-width: 640px){
  .drawer-nav a,
  .drawer-nav .sub-toggle{
    padding: 14px 16px !important;   /* left/right 16px to match */
  }
  .drawer-nav .sub-toggle{
    position: relative;
  }
  .drawer-nav .sub-toggle .chev{
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    float: none; /* cancel float */
  }
  .drawer-nav .has-sub{ margin: 0 !important; }
}



/* === Fix: remove bullets in mobile submenu === */
@media (max-width: 640px){
  .drawer-nav .submenu{ list-style: none !important; padding-left: 0 !important; margin-left: 0 !important; }
  .drawer-nav .submenu li{ list-style: none !important; }
  .drawer-nav .submenu li::marker{ content: "" !important; }
  .drawer-nav .submenu li::before{ content: none !important; }
}



/* === Mobile drawer overlay: fig2 yellow panel + selected state === */
@media (max-width: 640px){

  /* each item is yellow by default */
  .drawer-nav .submenu li{ list-style:none !important; }
  .drawer-nav .submenu li a{
    display:block;
    background: var(--yellow);
    color:#000;
    padding: 12px 16px;
    font-weight: 800;
    text-decoration: none;
    border-bottom:1px solid rgba(0,0,0,.15);
  }
  .drawer-nav .submenu li:last-child a{ border-bottom:0; }

  /* selected / hover / active state: black with white text */
  .drawer-nav .submenu li a:hover,
  .drawer-nav .submenu li a:active,
  .drawer-nav .submenu li a:focus-visible{
    background:#000;
    color:#fff;
    outline:none;
  }

  /* remove any accidental markers */
  .drawer-nav .submenu li::marker{ content:"" !important; }
  .drawer-nav .submenu li::before{ content:none !important; }
}

}

