/* =========================================================
   DANANG2NITE — PHASE 38
   MOBILE MAGAZINE LIST ONLY / PREMIUM NIGHT EDITORIAL
   Loaded only at max-width: 820px.
   HOME, PC LIST, VIEW, Places, Side Menu are untouched.
   ========================================================= */

body.page-magazine-list .site-main{
  position:relative;
  overflow:hidden;
  isolation:isolate;
  background:
    radial-gradient(circle at 8% 1%,rgba(117,0,52,.18),transparent 25%),
    radial-gradient(circle at 92% 8%,rgba(65,0,78,.14),transparent 27%),
    linear-gradient(180deg,#070708 0%,#080709 58%,#070708 100%);
}
body.page-magazine-list .site-main::before{
  content:"";
  position:absolute;
  z-index:-1;
  inset:0 0 auto;
  height:440px;
  pointer-events:none;
  background:
    repeating-linear-gradient(90deg,transparent 0 79px,rgba(255,255,255,.011) 80px,transparent 81px),
    linear-gradient(90deg,rgba(230,37,114,.025),transparent 36%,transparent 68%,rgba(217,185,110,.018));
  mask-image:linear-gradient(to bottom,#000,transparent 100%);
}

/* ---------- HERO ---------- */
.index-hero{
  position:relative;
  padding-block:39px 23px;
  border-bottom:1px solid rgba(255,255,255,.06);
}
.d2n-magazine-index-hero{
  width:calc(100% - 18px);
}
.d2n-magazine-index-hero::after{
  content:"D2N / EDITORIAL ARCHIVE";
  display:block;
  margin-top:15px;
  color:#514c48;
  font-size:5px;
  font-weight:900;
  letter-spacing:1.7px;
}
.index-hero .eyebrow{
  color:var(--gold-soft);
}
.index-hero h1{
  max-width:100%;
  margin:11px 0 0;
  font-family:Georgia,"Times New Roman",serif;
  font-size:clamp(43px,13vw,61px);
  font-weight:700;
  line-height:.92;
  letter-spacing:-2.2px;
  text-wrap:balance;
  background:linear-gradient(to bottom,#fbf8f3 0%,#f7f1e6 48%,#e1c77f 100%);
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}
.index-hero p{
  max-width:96%;
  margin:14px 0 0;
  color:#aaa39a;
  font-size:12px;
  line-height:1.6;
}

/* ---------- CATEGORY FILTER ---------- */
.d2n-index-category-nav{
  width:100%;
  margin-top:0;
  padding:10px 9px 12px;
  display:flex;
  gap:6px;
  overflow-x:auto;
  scroll-snap-type:x proximity;
  scrollbar-width:none;
  overscroll-behavior-x:contain;
}
.d2n-index-category-nav::-webkit-scrollbar{
  display:none;
}
.d2n-index-category-nav__item{
  position:relative;
  flex:0 0 132px;
  min-width:132px;
  min-height:51px;
  padding:8px 9px;
  display:grid;
  grid-template-columns:auto 1fr;
  align-items:center;
  gap:7px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.075);
  border-radius:11px;
  background:
    linear-gradient(145deg,rgba(255,255,255,.025),rgba(255,255,255,.004)),
    #0d0c0e;
  color:#918a84;
  text-decoration:none;
  scroll-snap-align:start;
}
.d2n-index-category-nav__item::before{
  content:"";
  position:absolute;
  inset:0 auto 0 0;
  width:2px;
  background:linear-gradient(to bottom,transparent,var(--pink),transparent);
  opacity:0;
}
.d2n-index-category-nav__item span{
  width:24px;
  height:24px;
  display:grid;
  place-items:center;
  border:1px solid rgba(255,255,255,.075);
  border-radius:50%;
  color:#756e68;
  font-size:5px;
  font-weight:950;
}
.d2n-index-category-nav__item strong{
  min-width:0;
  color:#a39c95;
  font-size:7px;
  line-height:1.18;
  font-weight:900;
  letter-spacing:.25px;
  text-transform:uppercase;
  white-space:normal;
}
.d2n-index-category-nav__item.is-active{
  border-color:rgba(230,37,114,.38);
  background:
    radial-gradient(circle at 0 50%,rgba(230,37,114,.16),transparent 56%),
    #0d0c0e;
}
.d2n-index-category-nav__item.is-active::before{
  opacity:1;
}
.d2n-index-category-nav__item.is-active span{
  color:var(--gold-soft);
  border-color:rgba(217,185,110,.22);
}
.d2n-index-category-nav__item.is-active strong{
  color:#fff5f8;
}

/* ---------- LIST WRAPPER ---------- */
.d2n-magazine-index{
  width:calc(100% - 16px);
  padding-top:12px;
  padding-bottom:54px;
}

/* ---------- FIRST STORY / MOBILE COVER ---------- */
.d2n-index-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:8px;
}
.d2n-index-card{
  min-width:0;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.075);
  border-radius:15px;
  background:
    linear-gradient(145deg,rgba(255,255,255,.015),transparent 62%),
    #0d0c0e;
  text-decoration:none;
  box-shadow:0 12px 28px rgba(0,0,0,.15);
}

/* First result gets a cinematic cover treatment. */
.d2n-index-card:first-child{
  position:relative;
  min-height:322px;
  display:block;
  border-color:rgba(230,37,114,.15);
  box-shadow:
    0 18px 46px rgba(0,0,0,.24),
    inset 0 -1px 0 rgba(230,37,114,.16);
}
.d2n-index-card:first-child .d2n-index-card__media{
  position:absolute;
  inset:0;
  min-height:0;
  aspect-ratio:auto;
}
.d2n-index-card:first-child .d2n-index-card__media::before{
  content:"";
  position:absolute;
  z-index:1;
  inset:0;
  background:
    radial-gradient(circle at 88% 10%,rgba(230,37,114,.11),transparent 32%),
    linear-gradient(90deg,rgba(65,0,28,.10),transparent 55%);
}
.d2n-index-card:first-child .d2n-index-card__media::after{
  content:"";
  position:absolute;
  z-index:2;
  inset:0;
  background:
    linear-gradient(180deg,rgba(0,0,0,.01) 8%,rgba(0,0,0,.09) 40%,rgba(0,0,0,.56) 70%,rgba(4,4,5,.98) 100%);
}
.d2n-index-card:first-child .d2n-index-card__body{
  position:absolute;
  z-index:3;
  left:0;
  right:0;
  bottom:0;
  min-height:0;
  padding:22px 15px 14px;
}
.d2n-index-card:first-child .d2n-index-card__category{
  color:var(--gold-soft);
}
.d2n-index-card:first-child h2{
  max-width:95%;
  margin-top:7px;
  font-family:Georgia,"Times New Roman",serif;
  color:#fffaf4;
  font-size:27px;
  font-weight:700;
  line-height:1.03;
  letter-spacing:-.75px;
  text-wrap:balance;
  text-shadow:0 5px 18px rgba(0,0,0,.55);
  -webkit-line-clamp:3;
}
.d2n-index-card:first-child p{
  max-width:95%;
  margin-top:7px;
  color:#c2bab1;
  font-size:8px;
  line-height:1.45;
  -webkit-line-clamp:2;
}
.d2n-index-card:first-child .d2n-index-card__foot{
  margin-top:10px;
}

/* ---------- REST OF STORIES / COMPACT EDITORIAL RAIL ---------- */
.d2n-index-card:not(:first-child){
  display:grid;
  grid-template-columns:39% minmax(0,1fr);
  min-height:148px;
}
.d2n-index-card__media{
  position:relative;
  min-height:148px;
  overflow:hidden;
  background:#121114;
}
.d2n-index-card__media::before{
  content:"";
  position:absolute;
  z-index:1;
  inset:0;
  background:
    radial-gradient(circle at 88% 12%,rgba(230,37,114,.08),transparent 35%),
    linear-gradient(90deg,rgba(55,0,24,.07),transparent 55%);
}
.d2n-index-card__media::after{
  content:"";
  position:absolute;
  z-index:2;
  inset:0;
  background:
    linear-gradient(90deg,transparent 66%,rgba(13,12,14,.27)),
    linear-gradient(180deg,transparent 72%,rgba(0,0,0,.22));
  pointer-events:none;
}
.d2n-index-card__media img{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
}
.d2n-index-card__number{
  position:absolute;
  z-index:3;
  right:7px;
  bottom:7px;
  width:25px;
  height:25px;
  display:grid;
  place-items:center;
  border:1px solid rgba(255,255,255,.13);
  border-radius:50%;
  background:rgba(7,7,8,.46);
  color:#e5ddd6;
  font-size:6px;
  font-weight:950;
  backdrop-filter:blur(7px);
}
.d2n-index-card__body{
  min-height:148px;
  padding:12px 11px 10px;
  display:flex;
  flex-direction:column;
}
.d2n-index-card__category{
  display:inline-flex;
  align-items:center;
  gap:5px;
  color:var(--pink-soft);
  font-size:6px;
  font-weight:950;
  letter-spacing:.65px;
  text-transform:uppercase;
}
.d2n-index-card__category::before{
  content:"";
  width:10px;
  height:1px;
  background:currentColor;
  opacity:.8;
}
.d2n-index-card h2{
  margin:6px 0 0;
  font-family:Georgia,"Times New Roman",serif;
  color:#fffaf4;
  font-size:16px;
  font-weight:700;
  line-height:1.16;
  letter-spacing:-.3px;
  text-wrap:balance;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:3;
  overflow:hidden;
}
.d2n-index-card p{
  margin:6px 0 0;
  color:#9e9790;
  font-size:7px;
  line-height:1.38;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  overflow:hidden;
}
.d2n-index-card__foot{
  margin-top:auto;
  padding-top:7px;
  border-top:1px solid rgba(255,255,255,.06);
  display:flex;
  justify-content:space-between;
  align-items:center;
  color:#7d7670;
  font-size:5px;
  font-weight:900;
  letter-spacing:.5px;
  text-transform:uppercase;
}
.d2n-index-card__foot b{
  width:20px;
  height:20px;
  display:grid;
  place-items:center;
  border:1px solid rgba(217,185,110,.14);
  border-radius:50%;
  color:var(--gold-soft);
  font-size:7px;
}

/* ---------- EMPTY ---------- */
.d2n-index-empty{
  min-height:160px;
  border:1px solid rgba(230,37,114,.14);
  border-radius:15px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:6px;
  background:
    radial-gradient(circle at 50% 0,rgba(230,37,114,.055),transparent 58%),
    rgba(255,255,255,.008);
}
.d2n-index-empty strong{
  color:var(--gold-soft);
  font-family:Georgia,"Times New Roman",serif;
  font-size:17px;
  font-style:italic;
}
.d2n-index-empty span{
  color:#77706e;
  font-size:8px;
}

/* ---------- SCRIPT COMPENSATION ---------- */
html[lang^="zh"] .index-hero h1,
html[lang="ja"] .index-hero h1,
html[lang="ko"] .index-hero h1,
html[lang="th"] .index-hero h1,
html[lang="hi"] .index-hero h1,
html[lang="ar"] .index-hero h1,
html[lang^="zh"] .d2n-index-card h2,
html[lang="ja"] .d2n-index-card h2,
html[lang="ko"] .d2n-index-card h2,
html[lang="th"] .d2n-index-card h2,
html[lang="hi"] .d2n-index-card h2,
html[lang="ar"] .d2n-index-card h2{
  font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans",sans-serif;
}
html[lang^="zh"] .index-hero h1,
html[lang="ja"] .index-hero h1,
html[lang="ko"] .index-hero h1{
  font-size:40px;
  line-height:1.03;
  letter-spacing:-1.3px;
}
html[lang="th"] .index-hero h1,
html[lang="hi"] .index-hero h1,
html[lang="ar"] .index-hero h1{
  font-size:38px;
  line-height:1.06;
  letter-spacing:-1.1px;
}
html[lang^="zh"] .d2n-index-card:first-child h2,
html[lang="ja"] .d2n-index-card:first-child h2,
html[lang="ko"] .d2n-index-card:first-child h2,
html[lang="th"] .d2n-index-card:first-child h2,
html[lang="hi"] .d2n-index-card:first-child h2,
html[lang="ar"] .d2n-index-card:first-child h2{
  font-size:24px;
  line-height:1.08;
}

/* ---------- NARROW PHONES ---------- */
@media(max-width:430px){
  .d2n-magazine-index-hero{
    width:calc(100% - 12px);
  }
  .d2n-index-category-nav{
    padding-inline:6px;
  }
  .d2n-index-category-nav__item{
    flex-basis:126px;
    min-width:126px;
  }
  .d2n-magazine-index{
    width:calc(100% - 10px);
  }
  .d2n-index-card:first-child{
    min-height:304px;
  }
  .d2n-index-card:first-child h2{
    font-size:25px;
  }
  .d2n-index-card:not(:first-child){
    grid-template-columns:37% minmax(0,1fr);
  }
  .d2n-index-card h2{
    font-size:15px;
  }
}
