/* =========================================================
   UIUX UPGRADE — TOPBAR / NAVBAR / DETAIL PAGES
========================================================= */

/* Better tokens */
:root{
  --topbar-bg:
    linear-gradient(180deg, rgba(40, 52, 164, .96) 0%, rgba(27, 34, 132, .94) 100%);
  --navbar-bg:
    linear-gradient(180deg, rgba(15, 26, 74, .96) 0%, rgba(10, 18, 48, .98) 100%);
  --glass-dark: rgba(255,255,255,.08);
  --glass-dark-2: rgba(255,255,255,.12);
  --glass-stroke: rgba(255,255,255,.12);
  --content-max: 980px;
  --media-max: 1120px;
}

/* =========================================================
   DETAIL PAGE WRAPPER
========================================================= */
.detail-shell{
  background:
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(255,255,255,.96));
  border: 1px solid rgba(2,6,23,.08);
  border-radius: 24px;
  box-shadow:
    0 18px 54px rgba(2,6,23,.08),
    inset 0 1px 0 rgba(255,255,255,.72);
  overflow: hidden;
}

.detail-shell-inner{
  padding: 26px;
}

.detail-kicker{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(37,99,235,.92);
  background: rgba(37,99,235,.08);
  border: 1px solid rgba(37,99,235,.12);
  padding: 7px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.detail-title{
  font-size: clamp(1.55rem, 1.15rem + 1.8vw, 2.45rem);
  line-height: 1.08;
  font-weight: 950;
  letter-spacing: -.03em;
  color: #111827;
  margin: 0;
  max-width: 900px;
}

.detail-subtitle{
  margin-top: 8px;
  color: rgba(2,6,23,.58);
  font-size: .98rem;
  font-weight: 600;
}

.detail-back-btn{
  border-radius: 14px !important;
  min-height: 46px;
  padding: 10px 16px !important;
  font-weight: 800 !important;
  border-color: rgba(2,6,23,.14) !important;
}

.detail-divider{
  margin: 18px 0 22px;
  border-top: 1px solid rgba(2,6,23,.08);
}

/* =========================================================
   DETAIL MEDIA — make images proportional & elegant
========================================================= */
.media-elegant{
  width: 100%;
  display: flex;
  justify-content: center;
}

.media-elegant-frame{
  width: 100%;
  max-width: var(--media-max);
  margin-inline: auto;
  background:
    linear-gradient(180deg, rgba(255,255,255,.95), rgba(248,250,252,.94));
  border: 1px solid rgba(2,6,23,.10);
  border-radius: 22px;
  padding: 14px;
  box-shadow:
    0 18px 50px rgba(2,6,23,.09),
    inset 0 1px 0 rgba(255,255,255,.76);
}

.media-elegant-stage{
  width: 100%;
  border-radius: 18px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(241,245,249,.92), rgba(248,250,252,.98));
  border: 1px solid rgba(2,6,23,.08);
  display:flex;
  align-items:center;
  justify-content:center;
  min-height: 240px;
}

.media-elegant--wide .media-elegant-stage{
  aspect-ratio: 16 / 8.8;
  max-height: 560px;
}

.media-elegant--poster .media-elegant-frame{
  max-width: 720px;
}
.media-elegant--poster .media-elegant-stage{
  aspect-ratio: 4 / 5.2;
  max-height: 760px;
}

.media-elegant--logo .media-elegant-frame{
  max-width: 820px;
}
.media-elegant--logo .media-elegant-stage{
  aspect-ratio: 16 / 7;
  max-height: 400px;
}

.media-elegant-img{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain !important;
  object-position: center;
  margin: 0 auto;
  background: transparent;
}

/* Swiper plain content upgrade */
.content-swiper-plain{
  max-width: var(--media-max);
  margin: 0 auto 8px;
}

#contentSwiper{
  border-radius: 24px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(2,6,23,.10);
  box-shadow: 0 18px 50px rgba(2,6,23,.08);
  padding: 12px;
}

#contentSwiper .swiper-slide{
  display:flex;
  align-items:center;
  justify-content:center;
  background:
    linear-gradient(180deg, rgba(248,250,252,.95), rgba(255,255,255,.98));
  border-radius: 18px;
  overflow:hidden;
  aspect-ratio: 16 / 8.8;
  max-height: 560px;
}

#contentSwiper .swiper-slide img{
  width: 100%;
  height: 100%;
  object-fit: contain;
  display:block;
}

#contentSwiper .swiper-button-prev,
#contentSwiper .swiper-button-next{
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: rgba(15,23,42,.56);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.14);
}
#contentSwiper .swiper-button-prev:after,
#contentSwiper .swiper-button-next:after{
  font-size: 16px;
  color:#fff;
  font-weight:900;
}

#contentSwiper .swiper-pagination{
  bottom: 10px !important;
}
#contentSwiper .swiper-pagination-bullet{
  width: 8px;
  height: 8px;
  opacity: 1;
  background: rgba(148,163,184,.55);
}
#contentSwiper .swiper-pagination-bullet-active{
  width: 22px;
  border-radius: 999px;
  background: linear-gradient(90deg, #2563eb, #4f46e5);
}

/* =========================================================
   READABILITY FOR CONTENT
========================================================= */
.detail-content-wrap{
  max-width: var(--content-max);
  margin: 0 auto;
  padding-top: 4px;
}

.detail-content-intro{
  text-align: center;
  margin: 0 auto 18px;
  max-width: 820px;
}

.detail-content-intro h2,
.detail-content-intro h3{
  font-size: clamp(1.15rem, 1rem + 1vw, 1.8rem);
  font-weight: 900;
  letter-spacing: -.02em;
  margin-bottom: 10px;
  color: #111827;
}

.detail-content-intro p{
  color: rgba(2,6,23,.72);
  font-size: 1rem;
  line-height: 1.75;
}

.rte-content{
  color: rgba(2, 6, 23, .88);
  font-size: 15.5px;
  line-height: 1.9;
}

.rte-content p{
  margin-bottom: 14px;
}

.rte-content h1,
.rte-content h2,
.rte-content h3,
.rte-content h4{
  scroll-margin-top: calc(var(--header-offset) + 20px);
}

.rte-content img{
  border-radius: 16px;
}

.rte-content blockquote{
  border-left-width: 5px;
  padding: 14px 16px;
  background: linear-gradient(180deg, rgba(37,99,235,.06), rgba(37,99,235,.03));
}

/* =========================================================
   MOBILE
========================================================= */
@media (max-width: 992px){
  .detail-shell-inner{
    padding: 18px;
  }

  .detail-divider{
    margin: 16px 0 18px;
  }

  .media-elegant-frame{
    padding: 10px;
    border-radius: 18px;
  }

  .media-elegant-stage{
    border-radius: 14px;
  }

  .media-elegant--wide .media-elegant-stage,
  #contentSwiper .swiper-slide{
    aspect-ratio: 16 / 10.5;
    max-height: none;
  }
}

@media (max-width: 576px){

  .detail-shell{
    border-radius: 18px;
  }

  .detail-shell-inner{
    padding: 15px;
  }

  .detail-title{
    font-size: clamp(1.28rem, 1.05rem + 1.4vw, 1.7rem);
  }

  .detail-subtitle{
    font-size: .9rem;
  }

  .media-elegant-frame{
    padding: 8px;
  }

  .media-elegant--wide .media-elegant-stage,
  #contentSwiper .swiper-slide{
    aspect-ratio: 16 / 11.2;
  }

  #contentSwiper{
    padding: 8px;
    border-radius: 18px;
  }

  #contentSwiper .swiper-button-prev,
  #contentSwiper .swiper-button-next{
    width: 38px;
    height: 38px;
  }

  .detail-content-wrap{
    max-width: 100%;
  }

  .rte-content{
    font-size: 14.5px;
    line-height: 1.82;
  }
}