/**
 * eZine Issue Index (table of contents) — flip-card / accordion design.
 * Rendered by the [ezine_index] shortcode (Issue Index Builder).
 */
.ezine-wrap {
  position: fixed !important;
  inset: 0 !important;
  z-index: 99999;
  width: 100vw;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}
.ezine-wrap *,
.ezine-wrap *::before,
.ezine-wrap *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
.ezine-wrap a {
  text-decoration: none !important;
  color: inherit;
}

.ezine-wrap {
  --cream:  #F4F0E6;
  --ink:    #2C3028;
  --ink-2:  #5C6054;
  --ink-3:  #9A9E90;
  --divide: rgba(44,48,40,0.1);
  --serif:'MARUBuriot Regular00',Georgia,serif;
  --serif-bold:'MARUBuriot Bold00',Georgia,serif;
  --sans:'NanumSquareNeoTTF bRg','Helvetica Neue',sans-serif;
  --sans-light:'NanumSquareNeoTTF aLt','Helvetica Neue',sans-serif;
  --sans-bold:'NanumSquareNeoTTF cBd','Helvetica Neue',sans-serif;
  font-family: var(--sans);
  background: var(--cream);
  color: var(--ink);
  transition: background-color 0.55s ease;
}

/* layout */
.mob-wrap {
  display: flex;
  flex-direction: column;
  height: 100svh;
  /* .ezine-wrap is fixed, so the shell's own reservation for the bar does not
     reach here and this column has to clear it itself. Track the bar variable
     rather than a fixed value: it differs per breakpoint and per issue. */
  padding-top: var(--ezine-nav-menu-bar-height);
}

/* HERO */
.mob-hero {
  display: block;
  flex: 0 0 38%;
  position: relative;
  text-decoration: none;
  overflow: hidden;
  background:
    linear-gradient(to bottom, rgba(255,255,255,0.08) 0%, rgba(30,50,30,0.68) 100%),
    linear-gradient(155deg, #7AAE82 0%, #A0C8A0 40%, #C8E0BC 100%);
  background-size: cover;
  background-position: center;
}
.hero-body {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 18px 30px 26px;
}
.h-num {
  font-family: var(--sans-bold);
  display: block;
  font-size: .62rem; font-weight: 400;
  letter-spacing: .26em;
  color: rgba(255,255,255,0.78);
  margin-bottom: 8px;
}
.h-num:empty { display: none; }

.h-tag {
  font-family: var(--sans-bold);
  display: inline-block;
  font-size: .52rem; font-weight: 400;
  letter-spacing: .3em; text-transform: uppercase;
  color: rgba(255,255,255,0.75);
  background: rgba(255,255,255,0.15);
  padding: 3px 8px; border-radius: 20px;
  margin-bottom: 8px;
}
.h-tag:empty { display: none; }
.h-desc:empty { display: none; }
.h-title {
  font-family: var(--sans-bold);
  font-size: 1.45rem; font-weight: 400;
  color: #fff; line-height: 1.25; margin-bottom: 6px;
  word-break: keep-all;
}
.h-desc {
  font-family: var(--sans-light);
  font-size: .88rem; font-weight: 400;
  color: rgba(255,255,255,0.75);
  line-height: 1.5; margin-bottom: 12px;
  word-break: keep-all;
}
.h-cta {
  font-family: var(--sans-bold);
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .72rem; font-weight: 400;
  letter-spacing: .16em; text-transform: uppercase;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,0.5);
  padding-bottom: 2px;
}

/* LOCKED (password-protected) pages: hide the real preview behind a curious "?" */
.mob-hero .ezine-locked-thumb { display: none; }
.mob-hero.is-locked .ezine-locked-thumb {
  display: flex;
  position: absolute;
  inset: 0;
  z-index: 1;
  color: rgba(255, 255, 255, 0.92);
  background:
    radial-gradient(circle at 50% 34%, rgba(255, 255, 255, 0.10), rgba(0, 0, 0, 0) 58%),
    linear-gradient(155deg, #3c4d3e 0%, #232c24 100%);
}
.mob-hero .ezine-locked-thumb__icon { width: 32%; max-width: 130px; opacity: 0.6; }
.mob-hero.is-locked .hero-body { z-index: 2; }

.if-lock {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px; height: 20px;
  flex: 0 0 auto;
  color: var(--item-ac, currentColor);
}
.if-lock svg { width: 100%; height: 100%; }
.mob-item.is-locked .if-title { font-style: italic; opacity: 0.92; }
.mob-item.is-locked .if-arr { opacity: 0.65; }

/* LIST */
.mob-list {
  flex: 1;
  overflow-y: scroll;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
}

/* each row */
.mob-item {
  border-top: 1px solid var(--divide);
  overflow: hidden;
  transform: translateZ(0);
}

/* The content page currently featured as the hero is hidden from the list. */
.mob-item.is-promoted {
  display: none;
}

/* FRONT */
.item-front {
  display: flex;
  align-items: center;
  min-height: 64px;
  padding: 0 30px;
  gap: 12px;
  background: var(--cream);
  cursor: pointer;
  transition: background-color 0.3s ease;
}
.mob-item.open .item-front {
  display: none;
}

.if-num {
  font-family: var(--sans-bold);
  font-size: .9rem; font-weight: 400;
  color: var(--item-ac);
  flex-shrink: 0; min-width: 24px;
  opacity: .7;
}
.if-divider {
  width: 1px; height: 16px;
  background: var(--divide);
  flex-shrink: 0;
}
.if-tag {
  font-family: var(--sans-bold);
  font-size: .62rem; font-weight: 400;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--item-ac);
  flex-shrink: 0; opacity: .85;
}
.if-title {
  font-size: 1rem; font-weight: 400;
  color: var(--ink);
  flex: 1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  word-break: keep-all;
}
.if-arr {
  font-size: .9rem;
  color: var(--ink-3);
  flex-shrink: 0;
  display: inline-block;
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
}
.mob-item.open .if-arr {
  transform: rotate(90deg);
}

/* BACK — accordion */
.item-back {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.42s cubic-bezier(0.4,0,0.2,1);
  background: var(--item-bg);
  cursor: pointer;
}
.mob-item.open .item-back {
  max-height: 180px;
}

.ib-inner {
  padding: 14px 30px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ib-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.ib-tag {
  font-family: var(--sans-bold);
  font-size: .62rem; font-weight: 400;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--item-ac);
}
.ib-close {
  background: none; border: none;
  font-size: 1rem;
  cursor: pointer;
  color: var(--item-ac);
  opacity: .65; padding: 4px 6px;
  line-height: 1;
  transition: opacity .2s;
  position: relative; z-index: 10;
}
.ib-close:hover { opacity: 1; }

.ib-title {
  font-family: var(--sans-bold);
  font-size: 1.15rem; font-weight: 400;
  color: var(--ink); line-height: 1.28;
  word-break: keep-all;
}
.ib-desc {
  font-family: var(--sans-light);
  font-size: .92rem; font-weight: 400;
  color: var(--ink-2); line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: keep-all;
}
.ib-cta {
  font-family: var(--sans-bold);
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .68rem; font-weight: 400;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--item-ac);
  border-bottom: 1px solid var(--item-ac);
  padding-bottom: 2px;
  align-self: flex-start;
  opacity: .85;
}

@media (max-width: 768px) {
  .mag-spread-left { display: none; }
}

/* desktop (>=769px) */
@media (min-width: 769px) {
  .ezine-wrap {
    display: flex;
    flex-direction: row;
    background: #1B3522;
  }
  .mag-spread-left {
    display: flex;
    flex: 0 0 50%; width: 50%;
    position: relative; overflow: hidden;
    background: #000;
    align-items: center; justify-content: center;
  }
  .mag-spread-left::after {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0; width: 16px;
    background: linear-gradient(to right,
      transparent 0%, rgba(0,0,0,0.2) 60%, rgba(0,0,0,0.38) 100%);
    z-index: 5; pointer-events: none;
  }
  .sl-video {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover; display: block; z-index: 1;
  }
  .sl-scrim {
    position: absolute; inset: 0;
    background: linear-gradient(to bottom,
      rgba(10,20,12,0.28) 0%, rgba(10,20,12,0.10) 40%, rgba(10,20,12,0.55) 100%);
    z-index: 2;
  }
  .sl-text {
    position: absolute; inset: 0; z-index: 3;
    display: flex; flex-direction: column;
    justify-content: center; align-items: flex-start;
    padding: 0 52px;
  }
  .sl-eyebrow {
    font-size: 0.52rem; font-weight: 400;
    letter-spacing: 0.42em; text-transform: uppercase;
    color: rgba(255,255,255,0.55); margin-bottom: 18px;
  }
  .sl-rule-top {
    width: 32px; height: 1px;
    background: rgba(255,255,255,0.35); margin-bottom: 20px;
  }
  .sl-headline {
    font-family: var(--serif-bold);
    font-size: clamp(2.6rem, 4.2vw, 4.8rem);
    font-weight: 400; line-height: 1.08;
    color: #fff; letter-spacing: -0.01em; margin-bottom: 6px;
  }
  .sl-headline em {
    font-style: italic; color: rgba(255,255,255,0.72); font-size: 0.88em;
  }
  .sl-subtitle {
    font-family: var(--sans-light);
    font-size: 0.95rem; font-weight: 400;
    color: rgba(255,255,255,0.65); line-height: 1.7;
    margin-top: 18px; letter-spacing: 0.04em; word-break: keep-all;
  }
  .sl-rule-bottom {
    width: 1px; height: 48px;
    background: rgba(255,255,255,0.25); margin-top: 32px;
  }
  .sl-logo {
    position: absolute; bottom: 100px; left: 40px;
    font-family: var(--sans-bold);
    font-size: 0.88rem; font-weight: 400;
    letter-spacing: 0.18em; text-transform: uppercase;
    color: rgba(255,255,255,0.6); z-index: 4;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
  }
  .sl-vert {
    position: absolute; right: 24px; top: 50%;
    transform: translateY(-50%) rotate(90deg);
    font-size: 0.46rem; letter-spacing: 0.55em;
    text-transform: uppercase; color: rgba(255,255,255,0.35);
    white-space: nowrap; z-index: 4;
    text-shadow: 0 2px 6px rgba(0,0,0,0.4);
  }

  .mob-wrap {
    flex: 0 0 50%; width: 50%;
    background: var(--cream);
    position: relative; overflow-y: auto;
  }
  .mob-wrap::before {
    content: '';
    position: absolute; top: 0; left: 0; bottom: 0; width: 14px;
    background: linear-gradient(to right, rgba(0,0,0,0.14) 0%, transparent 100%);
    z-index: 10; pointer-events: none;
  }

  .mob-hero  { flex: 0 0 35%; }
  .hero-body { padding: 28px 48px 36px; }
  .h-title   { font-size: 2rem; }
  .h-desc    { font-size: 0.8rem; }

  .item-front { padding: 0 48px; gap: 14px; min-height: 70px; }
  .ib-inner   { padding: 16px 48px 20px; }

  .if-num   { font-size: 1rem; }
  .if-tag   { font-size: 0.68rem; }
  .if-title { font-size: 1.08rem; }
  .if-arr   { font-size: 1rem; }

  .ib-title { font-size: 1.3rem; }
  .ib-desc  { font-size: .84rem; }
  .ib-tag   { font-size: .68rem; }
  .ib-cta   { font-size: .72rem; }

  .mob-item.open .item-back { max-height: 200px; }
}

/* LOAD ANIMATION */
@keyframes ezineIndexFadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.mob-hero { animation: ezineIndexFadeUp .55s ease .1s both; }
.mob-item { animation: ezineIndexFadeUp .4s ease both; }
.mob-item:nth-child(1)  { animation-delay: .15s }
.mob-item:nth-child(2)  { animation-delay: .20s }
.mob-item:nth-child(3)  { animation-delay: .25s }
.mob-item:nth-child(4)  { animation-delay: .30s }
.mob-item:nth-child(5)  { animation-delay: .35s }
.mob-item:nth-child(6)  { animation-delay: .40s }
.mob-item:nth-child(7)  { animation-delay: .45s }
.mob-item:nth-child(8)  { animation-delay: .50s }
.mob-item:nth-child(9)  { animation-delay: .55s }
.mob-item:nth-child(10) { animation-delay: .60s }
.mob-item:nth-child(11) { animation-delay: .65s }
.mob-item:nth-child(12) { animation-delay: .70s }
.mob-item:nth-child(13) { animation-delay: .75s }
.mob-item:nth-child(14) { animation-delay: .80s }

@keyframes ezineIndexTextIn {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}
.sl-eyebrow     { animation: ezineIndexTextIn .8s ease .3s both; }
.sl-rule-top    { animation: ezineIndexTextIn .7s ease .45s both; }
.sl-headline    { animation: ezineIndexTextIn .85s ease .5s both; }
.sl-subtitle    { animation: ezineIndexTextIn .8s ease .7s both; }
.sl-rule-bottom { animation: ezineIndexTextIn .7s ease .9s both; }
