/* =========================================================
   AREA-INDEX.CSS – Nepal Area Guide — Province Dashboard
   Used ONLY by index.php (area guide top page).
   Fully self-contained: does not share rules with area.css,
   so detail.php is never affected by changes here.
   ========================================================= */

:root {
  --idx-green-darker: #083a24;
  --idx-green-dark: #005a30;
  --idx-green: #00703c;
  --idx-green-light: #e8f5ef;
  --idx-gold: #DAA520;
  --idx-gold-light: #f5e6b8;
  --idx-white: #ffffff;
  --idx-text: #1c2420;
  --idx-text-soft: #5c6a63;
  --idx-text-light: #8a978f;
  --idx-bg: #f3f5f3;
  --idx-bg-card: #ffffff;
  --idx-line: #e4e9e4;
  --idx-shadow-sm: 0 2px 10px rgba(8,58,36,0.05);
  --idx-shadow-md: 0 12px 28px rgba(8,58,36,0.10);
  --idx-shadow-lg: 0 24px 60px rgba(8,58,36,0.18);
  --idx-radius-sm: 12px;
  --idx-radius-md: 18px;
  --idx-radius-lg: 24px;
  --idx-transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  --idx-container: 1360px;
  --idx-font-display: "Shippori Mincho", "Hiragino Mincho ProN", "Noto Serif JP", serif;
  --idx-font-body: "Hiragino Sans", "Noto Sans JP", "Yu Gothic", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

.ntg-area-index {
  background: var(--idx-bg);
  color: var(--idx-text);
  font-family: var(--idx-font-body);
  line-height: 1.7;
}

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

@media (min-width: 768px) {
  .idx-container { padding: 0 28px; }
}
@media (min-width: 1200px) {
  .idx-container { padding: 0 40px; }
}

/* Recurring signature texture: faint topographic contour lines,
   used at section seams to echo the province relief maps below. */
.idx-contour-divider {
  position: relative;
  height: 34px;
  background:
    repeating-radial-gradient(
      circle at 18% 40%,
      rgba(0,112,60,0.10) 0px,
      rgba(0,112,60,0.10) 1px,
      transparent 2px,
      transparent 13px
    ),
    repeating-radial-gradient(
      circle at 82% 60%,
      rgba(218,165,32,0.10) 0px,
      rgba(218,165,32,0.10) 1px,
      transparent 2px,
      transparent 16px
    );
  background-color: var(--idx-bg);
}

/* =========================================================
   HERO
   ========================================================= */
.idx-hero {
  position: relative;
  background-image: url('/jp/area/assets/images/himalaya.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 132px 20px 56px;
  overflow: hidden;
}

.idx-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(6,36,22,0.88) 0%,
    rgba(6,46,28,0.62) 45%,
    rgba(0,112,60,0.42) 100%
  );
  z-index: 0;
}

/* thin contour rings echoing a topo map, anchored top-right of hero */
.idx-hero-overlay::after {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background:
    repeating-radial-gradient(
      circle,
      transparent 0px,
      transparent 21px,
      rgba(255,255,255,0.08) 22px,
      rgba(255,255,255,0.08) 23px
    );
  opacity: 0.6;
}

.idx-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.idx-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--idx-gold-light);
  text-transform: uppercase;
  margin-bottom: 18px;
}

.idx-hero-eyebrow::before,
.idx-hero-eyebrow::after {
  content: '';
  width: 22px;
  height: 1px;
  background: var(--idx-gold-light);
  opacity: 0.7;
}

.idx-hero-title {
  font-family: var(--idx-font-display);
  font-size: clamp(30px, 5.2vw, 48px);
  font-weight: 700;
  line-height: 1.35;
  color: var(--idx-white);
  margin: 0 0 14px;
  text-shadow: 0 2px 18px rgba(0,0,0,0.35);
}

.idx-hero-sub {
  font-size: 15px;
  color: rgba(255,255,255,0.86);
  max-width: 520px;
  margin: 0 auto;
  font-weight: 400;
}

@media (min-width: 768px) {
  .idx-hero { padding: 156px 24px 72px; }
  .idx-hero-sub { font-size: 16px; }
}

/* =========================================================
   BREADCRUMB
   ========================================================= */
.idx-breadcrumb {
  background: var(--idx-bg-card);
  border-bottom: 1px solid var(--idx-line);
  padding: 10px 0;
}
.idx-breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 13px;
}
.idx-breadcrumb-item {
  display: inline-flex;
  align-items: center;
  color: var(--idx-text-soft);
}
.idx-breadcrumb-item:not(:last-child)::after {
  content: "›";
  margin: 0 8px;
  color: var(--idx-line);
  font-size: 16px;
}
.idx-breadcrumb-item a {
  color: var(--idx-green);
  text-decoration: none;
  font-weight: 500;
}
.idx-breadcrumb-item a:hover { text-decoration: underline; }
.idx-breadcrumb-item.is-current { color: var(--idx-text); font-weight: 600; }

/* =========================================================
   DASHBOARD STAT STRIP
   ========================================================= */
.idx-stats {
  padding: 40px 0 8px;
}

.idx-stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 640px) {
  .idx-stats-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
}

.idx-stat-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--idx-bg-card);
  border: 1px solid var(--idx-line);
  border-radius: var(--idx-radius-md);
  padding: 24px 24px 22px;
  box-shadow: var(--idx-shadow-sm);
  overflow: hidden;
  transition: var(--idx-transition);
}

.idx-stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--idx-shadow-md);
  border-color: rgba(0,112,60,0.18);
}

.idx-stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 3px;
  background: var(--idx-green);
  opacity: 0.85;
}

.idx-stat-card:nth-child(2)::before { background: var(--idx-gold); }
.idx-stat-card:nth-child(3)::before { background: var(--idx-green-dark); }

.idx-stat-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--idx-text-soft);
  letter-spacing: 0.03em;
  margin-bottom: 10px;
}

.idx-stat-value {
  font-family: var(--idx-font-display);
  font-size: 40px;
  font-weight: 700;
  color: var(--idx-green-darker);
  line-height: 1;
  display: flex;
  align-items: baseline;
  gap: 7px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.idx-stat-value small {
  font-family: var(--idx-font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--idx-text-light);
  letter-spacing: 0;
}

.idx-stat-note {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--idx-line);
  font-size: 12.5px;
  color: var(--idx-text-light);
}

/* =========================================================
   INTRO
   ========================================================= */
.idx-intro {
  padding: 40px 0 8px;
}

.idx-intro-text {
  max-width: 820px;
}

.idx-intro-text h2 {
  font-family: var(--idx-font-display);
  font-size: 23px;
  margin: 0 0 14px;
  color: var(--idx-green-darker);
  font-weight: 700;
}

.idx-intro-text p {
  margin: 0 0 14px;
  color: var(--idx-text-soft);
  font-size: 15px;
}

.idx-intro-text strong {
  color: var(--idx-green-darker);
}

/* =========================================================
   SECTION HEADER
   ========================================================= */
.idx-section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
  flex-wrap: wrap;
}

.idx-section-header h2 {
  font-family: var(--idx-font-display);
  font-size: 24px;
  margin: 0 0 4px;
  color: var(--idx-green-darker);
  font-weight: 700;
}

.idx-section-header p {
  margin: 0;
  color: var(--idx-text-soft);
  font-size: 14px;
}

.idx-section-header .idx-section-count {
  flex-shrink: 0;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--idx-green);
  background: var(--idx-green-light);
  border: 1px solid rgba(0,112,60,0.14);
  padding: 7px 15px;
  border-radius: 999px;
  letter-spacing: 0.05em;
}

/* =========================================================
   PROVINCE DASHBOARD GRID (photo tiles)
   ========================================================= */
.idx-provinces {
  padding: 44px 0 60px;
}

.idx-province-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  grid-template-columns: 1fr;
}

@media (min-width: 560px) {
  .idx-province-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .idx-province-grid { grid-template-columns: repeat(3, 1fr); gap: 22px; }
}

/* Every card is identical in structure and ratio — same aspect-ratio,
   same radius, same padding scale, at every breakpoint. Grid columns
   are equal-width (1fr), so all cards in a row match exactly. */
.idx-province-card {
  position: relative;
  display: flex;
  border-radius: var(--idx-radius-md);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--idx-shadow-sm);
  border: 1px solid rgba(8,58,36,0.06);
  transition: var(--idx-transition);
  background: var(--idx-green-darker);
}

.idx-province-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--idx-shadow-lg);
}

.idx-province-photo {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}

.idx-province-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.idx-province-card:hover .idx-province-photo img {
  transform: scale(1.07);
}

.idx-province-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(3,20,12,0.94) 0%,
    rgba(3,20,12,0.62) 32%,
    rgba(3,20,12,0.02) 58%,
    rgba(3,20,12,0.18) 100%
  );
}

.idx-province-number {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.32);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--idx-white);
  font-size: 12.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: center;
  justify-content: center;
}

.idx-province-count {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--idx-green-darker);
  background: var(--idx-gold-light);
  padding: 5px 12px;
  border-radius: 999px;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 8px rgba(0,0,0,0.14);
}

.idx-province-body {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 20px 18px;
}

.idx-province-en {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.66);
  text-transform: uppercase;
  margin-bottom: 5px;
}

.idx-province-name {
  font-family: var(--idx-font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--idx-white);
  margin: 0 0 9px;
  line-height: 1.3;
  letter-spacing: 0.01em;
}

.idx-province-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  font-size: 12px;
  color: rgba(255,255,255,0.82);
  min-height: 17px;
}

.idx-province-meta .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255,255,255,0.55);
  flex-shrink: 0;
}

.idx-province-arrow {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 13px;
  padding-top: 13px;
  border-top: 1px solid rgba(255,255,255,0.16);
  width: 100%;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--idx-gold-light);
  opacity: 0.9;
  transition: opacity 0.3s ease;
}

.idx-province-card:hover .idx-province-arrow {
  opacity: 1;
}

.idx-province-arrow span {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.idx-province-card:hover .idx-province-arrow span {
  transform: translateX(4px);
}

/* =========================================================
   HIGHLIGHTS — insight cards
   ========================================================= */
.idx-highlights {
  padding: 8px 0 60px;
}

.idx-highlight-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
}

@media (min-width: 600px) {
  .idx-highlight-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 980px) {
  .idx-highlight-grid { grid-template-columns: repeat(4, 1fr); }
}

.idx-highlight-card {
  background: var(--idx-bg-card);
  border: 1px solid var(--idx-line);
  border-radius: var(--idx-radius-sm);
  padding: 20px 18px;
  transition: var(--idx-transition);
}

.idx-highlight-card:hover {
  border-color: rgba(0,112,60,0.3);
  box-shadow: var(--idx-shadow-md);
  transform: translateY(-3px);
}

.idx-highlight-tag {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--idx-green);
  background: var(--idx-green-light);
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
  letter-spacing: 0.02em;
}

.idx-highlight-card h3 {
  margin: 0 0 6px;
  font-size: 15.5px;
  color: var(--idx-green-darker);
  font-weight: 700;
}

.idx-highlight-card p {
  margin: 0;
  font-size: 13px;
  color: var(--idx-text-soft);
  line-height: 1.65;
}

/* =========================================================
   CTA
   ========================================================= */
.idx-cta {
  padding: 8px 0 76px;
}

.idx-cta-box {
  position: relative;
  background: linear-gradient(135deg, var(--idx-green-dark), var(--idx-green));
  color: var(--idx-white);
  border-radius: var(--idx-radius-lg);
  padding: 44px 28px;
  text-align: center;
  box-shadow: var(--idx-shadow-lg);
  overflow: hidden;
}

.idx-cta-box::before {
  content: '';
  position: absolute;
  bottom: -60px;
  left: -60px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background:
    repeating-radial-gradient(
      circle,
      transparent 0px,
      transparent 15px,
      rgba(255,255,255,0.06) 16px,
      rgba(255,255,255,0.06) 17px
    );
}

.idx-cta-box h2 {
  position: relative;
  font-family: var(--idx-font-display);
  margin: 0 0 12px;
  font-size: 23px;
  font-weight: 700;
}

.idx-cta-box p {
  position: relative;
  margin: 0 0 26px;
  opacity: 0.92;
  font-size: 14.5px;
}

.idx-btn {
  position: relative;
  display: inline-block;
  background: var(--idx-white);
  color: var(--idx-green-darker);
  font-weight: 700;
  padding: 13px 30px;
  border-radius: 999px;
  text-decoration: none;
  transition: var(--idx-transition);
  font-size: 14px;
}

.idx-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.16);
}

/* =========================================================
   RESPONSIVE TUNING
   ========================================================= */
@media (max-width: 767px) {
  .idx-hero { padding: 118px 16px 44px; }
  .idx-hero-title { font-size: 26px; }
  .idx-stats { padding: 28px 0 4px; }
  .idx-intro { padding: 28px 0 4px; }
  .idx-provinces { padding: 32px 0 44px; }
  .idx-highlights { padding: 4px 0 44px; }
  .idx-cta { padding: 4px 0 52px; }
  .idx-cta-box { padding: 34px 20px; }
  .idx-province-name { font-size: 18px; }
}

/* =========================================================
   MOTION
   ========================================================= */
.idx-stat-card,
.idx-province-card,
.idx-highlight-card {
  opacity: 0;
  transform: translateY(16px);
  animation: idxFadeUp 0.55s ease forwards;
}

.idx-stat-card:nth-child(1) { animation-delay: 0.03s; }
.idx-stat-card:nth-child(2) { animation-delay: 0.08s; }
.idx-stat-card:nth-child(3) { animation-delay: 0.13s; }

.idx-province-card:nth-child(1) { animation-delay: 0.04s; }
.idx-province-card:nth-child(2) { animation-delay: 0.08s; }
.idx-province-card:nth-child(3) { animation-delay: 0.12s; }
.idx-province-card:nth-child(4) { animation-delay: 0.16s; }
.idx-province-card:nth-child(5) { animation-delay: 0.20s; }
.idx-province-card:nth-child(6) { animation-delay: 0.24s; }
.idx-province-card:nth-child(7) { animation-delay: 0.28s; }

.idx-highlight-card:nth-child(1) { animation-delay: 0.05s; }
.idx-highlight-card:nth-child(2) { animation-delay: 0.09s; }
.idx-highlight-card:nth-child(3) { animation-delay: 0.13s; }
.idx-highlight-card:nth-child(4) { animation-delay: 0.17s; }

@keyframes idxFadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .idx-stat-card,
  .idx-province-card,
  .idx-highlight-card {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .idx-province-photo img,
  .idx-province-arrow span {
    transition: none;
  }
}