@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ======================================================================
   NEWS PAGE — rebuilt CSS to match /guides look & spacing
   Keeps your current news.ejs + news.js intact
   ====================================================================== */

/* ========== 0) Root & Resets (copied style from guides.css) ========== */
:root{
  --nt-bg: #121212;
  --nt-panel: rgba(35,36,58,0.97);
  --nt-text: #f0f0f0;
  --nt-muted: #a0a8b8;
  --nt-muted-2: #cbd1e1;
  --nt-primary: #7709FF;
  --nt-shadow: rgba(0,0,0,0.18);
}

*, *::before, *::after{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }

body{
  font-family:'Inter',system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,sans-serif;
  background:#121212;
  color:#e8e8e8;
  line-height:1.55;
  min-height:100vh;
  display:flex;
  flex-direction:column;
}

/* Match guides page container spacing */
.content{
  width:100%;
  margin:0;
  padding:32px var(--page-gutter, 24px) 64px;
  flex:1;
}
/* ========== Background image layer (same behavior as Guides) ========== */
.page-bg-img{
  position: absolute;
  inset: 0 auto auto 0;
  right: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.page-bg-img img{
  width: 100%;
  height: auto;
  display: block;
}
.page-bg-img::after{
  content:"";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: clamp(200px, 28vw, 460px);
  background: linear-gradient(to bottom,
    rgba(18,18,18,0) 0%,
    rgba(18,18,18,0.06) 28%,
    rgba(18,18,18,0.16) 48%,
    rgba(18,18,18,0.32) 66%,
    rgba(18,18,18,0.56) 82%,
    #121212 100%);
  pointer-events: none;
}

header, main, footer{ position: relative; z-index: 1; }

/* ========== 1) Page grid like guides-top-grid ======================== */
.nt-news__top{
  display:grid;
  grid-template-columns: 2.2fr 0.8fr; /* same proportion as guides top grid */
  gap:18px;
  align-items:stretch;
  margin-top:10px;
  grid-auto-rows: clamp(520px, 56vh, 660px);
}

@media (max-width:1000px){
  .nt-news__top{ grid-template-columns: 1fr; }
}

/* ========== 2) Card shell (match guides side blocks) ================= */
.nt-card{
  border-radius:14px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
  padding:14px;
  display:flex;
  flex-direction:column;
  min-height:0;
  overflow:hidden;
}

.nt-card--nohead{
  padding:0; /* hot news slider uses full-bleed */
  background: rgba(255,255,255,.03);
  height: 100%;
  display: flex;
  flex-direction: column  
}

/* Head (same vibe as guides side header) */
.nt-card__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:4px 2px 12px;
  flex:0 0 auto;
}

.nt-card__title{
  font-weight:800;
  letter-spacing:.4px;
  text-transform:uppercase;
  font-size:14px;
  color:#fff;
  opacity:.95;
}

.nt-card__link{
  display:inline-flex;
  align-items:center;
  gap:8px;
  text-decoration:none;
  font-weight:700;
  font-size:13px;
  color:rgba(255,255,255,.75);
}
.nt-card__link:hover{ color:#fff; }

/* Head alignment like on guides */
.nt-news__guides .nt-card__head{
  justify-content:flex-start;
}

/* Button styles copied from guides.css */
.guides-news-link{
  display:inline-flex;
  align-items:center;
  gap:10px;
  text-decoration:none;
  color:#fff;
  font-weight:800;
  padding:4px 10px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(119,9,255,.14);
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.guides-news-link:hover{
  background: rgba(119,9,255,.22);
  border-color: rgba(119,9,255,.35);
  transform: translateY(-1px);
}
.guides-news-link-icon{
  width:18px; height:18px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  opacity:.95;
}
.guides-news-link-icon svg{ width:18px; height:18px; display:block; }


/* ========== 3) Swiper sizing — DO NOT force heights ================== */
.nt-swiper{
  width:100%;
  position:relative;
}
.nt-swiper .swiper-wrapper,
.nt-swiper .swiper-slide{
  height:auto !important; /* critical to prevent disappearing body */
}

/* Hot News must fill the fixed row height */
.nt-card--nohead .nt-news__hot{
  flex: 1 1 auto;
  display: flex;
  min-height: 0;
  padding: 14px;
}
.nt-card--nohead .nt-swiper{
  flex: 1 1 auto;
  display: flex;
  min-height: 0;
}
.nt-card--nohead .swiper-wrapper{
  flex: 1 1 auto;
}
.nt-card--nohead .swiper-slide{
  height: 100% !important;
}
.nt-card--nohead .nt-slide{
  height: 100%;
}

/* ========== 4) Shared media + badge ================================= */
.nt-slide{
  position:relative;
  display:block;
  cursor:pointer;
  outline:none;
}

/* Default media (Hot News) — crop image, stable ratio */
.nt-slide__media{
  position:relative;
  width:100%;
  aspect-ratio: 16 / 7;
  background: rgba(0,0,0,.28);
  overflow:hidden;
  border-radius:14px; /* match guides */
}

.nt-card--nohead .nt-slide__media{
  height: 100%;
  aspect-ratio: auto; /* use height from parent (fixed row), not ratio */
}

.nt-card--nohead .nt-slide__media{
  border-radius:14px; /* keep rounded even in full-bleed card */
}
.nt-slide__media img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.nt-media-fallback{
  width:100%;
  height:100%;
  background: radial-gradient(circle at 20% 20%, rgba(119,9,255,0.22), rgba(0,0,0,0.55));
}

.nt-badge{
  position:absolute;
  left:12px;
  top:12px;
  z-index:3;
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:800;
  background: rgba(119,9,255,0.85);
  border:1px solid rgba(255,255,255,0.16);
  color:#fff;
}
.nt-badge--guides{
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.14);
}

/* ========== 5) Hot News overlay — title/meta always visible ========== */
.nt-news__hot{
  flex: 1 1 auto;
  display: flex;
  min-height: 0;
}

/* Hot News: make swiper/slide/media fill the full stretched height */
.nt-card--nohead .nt-swiper{
  flex: 1 1 auto;
  display: flex;
  min-height: 0;
}
.nt-card--nohead .swiper-wrapper{
  flex: 1 1 auto;
}
.nt-card--nohead .swiper-slide{
  height: 100% !important;
}
.nt-card--nohead .nt-slide{
  height: 100%;
}
.nt-card--nohead .nt-slide__media{
  height: 100%;
  aspect-ratio: auto; /* override ratio because we fill by height */
}
.nt-card--nohead .nt-slide__media img{
  height: 100%;
}

/* Hot news slide gets full-bleed look within padded card */
.nt-news__hot .nt-slide__media{
  border-radius:14px;
}

/* Text overlay */
.nt-news__hot .nt-slide__body{
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  z-index:4;
  padding:16px 18px 16px;
  border-radius: 0 0 14px 14px;

  background: linear-gradient(
    180deg,
    rgba(0,0,0,0) 0%,
    rgba(0,0,0,0.40) 35%,
    rgba(0,0,0,0.78) 100%
  );
}

/* Ensure overlay is above everything */
.nt-news__hot .nt-slide__body *{ position:relative; z-index:5; }

.nt-slide__title{
  font-size: 22px;
  font-weight:900;
  letter-spacing:-0.3px;
  line-height:1.12;
  margin:0 0 8px;
  text-shadow: 0 10px 26px rgba(0,0,0,0.55);
}

.nt-news__hot .nt-slide__desc{
  color: rgba(255,255,255,0.78);
  font-size: 14px;
  line-height:1.45;
  margin:0 0 10px;

  /* News can be clamped for stability */
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp: 3;
  overflow:hidden;
  text-shadow: 0 10px 26px rgba(0,0,0,0.50);
}

/* Meta chips like guides */
.nt-meta{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.nt-meta__item{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:5px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.22);
  color: rgba(255,255,255,0.78);
  font-size:12px;
  font-weight:700;
}

.nt-rt img{
  width:14px;
  height:14px;
  opacity:0.9;
}

/* Hot news arrows */
.nt-nav{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  z-index:6;
  width:44px;
  height:44px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.18);
  background: rgba(0,0,0,0.35);
  cursor:pointer;
  display:grid;
  place-items:center;
}
.nt-nav--prev{ left:10px; }
.nt-nav--next{ right:10px; }

.nt-nav::before{
  content:"";
  width:10px;
  height:10px;
  border-right:2px solid rgba(255,255,255,0.9);
  border-bottom:2px solid rgba(255,255,255,0.9);
  transform: rotate(135deg);
}
.nt-nav--next::before{ transform: rotate(-45deg); }

.nt-nav:hover{
  border-color: rgba(119,9,255,0.55);
  background: rgba(119,9,255,0.18);
}

/* ========== 6) Hot Guides — ALWAYS show description + nav ============ */
.nt-news__guides{
  /* keep same panel look */
}

.nt-swiper--guides{
  padding: 0; /* keep clean */
}
/* Make guides swiper fill the fixed top-row height */
.nt-news__guides{
  height: 100%;
  min-height: 0;
}
.nt-news__guides .nt-swiper--guides{
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.nt-news__guides .nt-swiper--guides .swiper-wrapper{
  flex: 1 1 auto;
  min-height: 0;
}
.nt-news__guides .nt-swiper--guides .swiper-slide{
  height: 100% !important;
}

/* IMPORTANT: avoid grid/1fr layout that can collapse text */
.nt-slide--compact{
  display:flex;
  flex-direction:column;
  height:100%;
  min-height:0;
}

/* Guides media: crop image, stable ratio */
.nt-slide__media--compact{
  aspect-ratio: 16 / 9;
  border-radius:14px;
}

/* Guides body: NOT absolute, NOT clipped */
.nt-slide__body--compact{
  padding: 14px 2px 0;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden; /* enables stable clamp so arrows never disappear */
}

/* Guides desc must never be clamped */
.nt-news__guides .nt-slide__desc{
  color: var(--nt-muted);
  font-size: 14px;
  line-height:1.55;
  margin: 0 0 10px;

  display:-webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow:hidden;
}
.nt-news__guides .nt-slide__desc p{
  margin:0 0 10px;
}
.nt-news__guides .nt-slide__desc p:last-child{ margin-bottom:0; }

/* Guides footer nav — always visible, in flow */
.nt-guides-foot{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  margin-top: auto;
}

/* Prevent huge guide image on medium screens (so text is always visible) */
.nt-news__guides .nt-slide__media--compact{
  max-height: clamp(170px, 22vh, 240px);
  overflow: hidden;
}
.nt-news__guides .nt-slide__media--compact img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* A bit more text on very wide screens */
@media (min-width: 1400px){
  .nt-news__guides .nt-slide__desc{
    -webkit-line-clamp: 5;
  }
}

.nt-mini{
  width:40px;
  height:40px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,0.18);
  background: rgba(0,0,0,0.32);
  cursor:pointer;
  display:grid;
  place-items:center;
  padding:0;
}
.nt-mini svg{
  width:18px;
  height:18px;
  color: rgba(255,255,255,0.90);
}
.nt-mini:hover{
  border-color: rgba(119,9,255,0.55);
  background: rgba(119,9,255,0.18);
}

/* ========== 7) Latest News list (your existing classes) ============== */
.nt-news__feed{
  margin-top: 22px;
}

.nt-feed-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:14px;
  margin: 12px 0 16px;
}

.nt-feed-title{
  margin:0;
  font-size: 2.0rem;
  font-weight:900;
  letter-spacing:-0.2px;
  color:#fff;
}

.nt-feed-controls{
  display:flex;
  justify-content:flex-end;
  gap:12px;
}

/* Filter like guides styling */
.nt-filter{
  display:flex;
  flex-direction:column;
  gap:6px;
  min-width: 260px;
  position: relative;
}
.nt-filter__label{
  font-size:12px;
  color: rgba(255,255,255,0.65);
  font-weight:700;
}
.nt-filter__select{
  height:44px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color: #fff;
  padding: 0 42px 0 12px;
  outline:none;
  cursor: pointer;
  color-scheme: dark;

  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;

  background:
    linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03)),
    rgba(255,255,255,0.04);  
}
.nt-filter__select option,
.nt-filter__select optgroup{
  background-color: #151624;
  color: #fff;
}
.nt-filter__select:focus{
  border-color: rgba(119,9,255,0.55);
  box-shadow: 0 0 0 3px rgba(119,9,255,0.18);
}

/* Select arrow */
.nt-filter::after{
  content:"";
  position:absolute;
  right: 14px;
  bottom: 14px; /* aligns with 44px height */
  width: 8px;
  height: 8px;
  border-right: 2px solid rgba(255,255,255,0.75);
  border-bottom: 2px solid rgba(255,255,255,0.75);
  transform: rotate(45deg);
  pointer-events: none;
  opacity: .9;
}

/* List items */
.nt-list{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.nt-item{
  display:grid;
  grid-template-columns: 240px 1fr;
  gap:14px;
  padding:14px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
  cursor:pointer;
  min-width:0;
  transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.nt-item__media{
  border-radius:12px;
  overflow:hidden;
  aspect-ratio: 16 / 10;
  background: rgba(0,0,0,0.28);
}
.nt-item__media img{
  width:100%;
  height:100%;
  object-fit:cover;
  transition: transform .28s ease;
}

.nt-item__body{ min-width:0; }
.nt-item__title{
  font-size:18px;
  font-weight:900;
  letter-spacing:-0.2px;
  line-height:1.18;
  margin:0 0 8px;
}
.nt-item__desc{
  color: var(--nt-muted);
  font-size:14px;
  line-height:1.55;
  margin:0 0 10px;

  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp: 3;
  overflow:hidden;
}

.nt-item:hover{
  transform: translateY(-3px);
  border-color: rgba(119, 9, 255, 0.35);
  background: rgba(255,255,255,0.045);
  box-shadow: 0 16px 60px rgba(0,0,0,0.35);
}
.nt-item:hover .nt-item__media img{
  transform: scale(1.04);
}

.nt-meta--bottom{ margin-top: 10px; }

/* Show more */
.nt-more{
  margin-top: 14px;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:8px;
}
.nt-more__btn{
  height:46px;
  border-radius:14px;
  border:1px solid rgba(119,9,255,0.55);
  background: rgba(119,9,255,0.18);
  color:#fff;
  font-weight:900;
  padding:0 18px;
  cursor:pointer;
}
.nt-more__btn:disabled{
  opacity:0.55;
  cursor:not-allowed;
}
.nt-more__hint{
  color: rgba(255,255,255,0.60);
  font-size:12px;
}

.nt-empty{
  padding: 14px;
  color: rgba(255,255,255,0.72);
}

/* ========== 8) Responsive =========================================== */
@media (max-width: 1000px){
  .nt-filter{ min-width: 220px; }
}

@media (max-width: 780px){
  /* Crop images more so overlay text stays comfy */
  .nt-slide__media{ aspect-ratio: 16 / 9; }

  .nt-slide__title{ font-size: 18px; }
  .nt-news__hot .nt-slide__desc{ -webkit-line-clamp: 2; }

  .nt-feed-head{
    flex-direction:column;
    align-items:stretch;
  }
  .nt-feed-controls{ justify-content:flex-start; }
  .nt-filter{ width:100%; min-width:0; }

  .nt-item{
    grid-template-columns: 120px 1fr;
  }
  .nt-item__media{ aspect-ratio: 1 / 1; }
}

@media (max-width: 420px){
  .nt-news__hot .nt-slide__body{ padding: 14px 14px 14px; }
  .nt-nav{ width:42px; height:42px; }
}

/* --- SEO headings (News page) --- */
.nt-news__hero{
  margin: 18px 0 14px;
}
.nt-news__h1{
  margin: 0 0 6px;
  font-size: 34px;
  line-height: 1.15;
  font-weight: 800;
}
.nt-news__subtitle{
  margin: 0;
  opacity: .85;
  font-size: 14px;
  line-height: 1.4;
}
.sr-only{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;}

/* --- SEO block + FAQ (News page) --- */
.nt-news__seo{
  margin-top: 26px;
}
.nt-news__seo-inner{
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
  padding: 18px;
}
.nt-news__seo-inner h2{
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.2px;
  color: #fff;
}
.nt-news__seo-inner p{
  margin: 0 0 10px;
  color: var(--nt-muted);
  line-height: 1.6;
}
.nt-news__seo-inner p:last-child{ margin-bottom: 0; }

/* FAQ (same styling as Guides page) */
.seo-faq { padding: 60px 0; background: transparent; }
.seo-faq-title { font-size: 1.6rem; font-weight: 700; margin-bottom: 24px; }
.seo-faq-list { display: flex; flex-direction: column; gap: 12px; }
.seo-faq-item {
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
  overflow: hidden;
}
.seo-faq-question {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 16px 20px;
  background: transparent; border: 0; color: inherit; cursor: pointer;
  font-size: 1rem; text-align: left;
}
.seo-faq-question span:first-child { flex: 1; }
.seo-faq-toggle-icon { width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; }
.seo-faq-toggle-icon::before { content: '+'; font-size: 28px; line-height: 1; transition: transform .22s ease; }
.seo-faq-item.is-open .seo-faq-toggle-icon::before { transform: rotate(45deg); }
.seo-faq-answer {
  height: 0;
  overflow: hidden;
  padding: 0 20px;
  transition: height .38s ease, padding-top .38s ease, padding-bottom .38s ease;
  font-size: .95rem;
  line-height: 1.5;
  will-change: height;
}
.seo-faq-answer a {
  color: #7709FF;
  text-decoration: none;
  font-weight: 600;
}
.seo-faq-answer a:hover { text-decoration: underline; }
.seo-faq-answer p { margin: 12px 0; }
.seo-faq-answer ul, .seo-faq-answer ol { margin: 12px 0; padding-left: 20px; }
.seo-faq-answer li + li { margin-top: 4px; }

@media (max-width: 600px) {
  .seo-faq { padding: 44px 0; }
  .seo-faq-question { padding: 14px 16px; }
  .seo-faq-answer { padding-left: 16px; padding-right: 16px; }
}
