/* =========================================================
   Then & Now: shared styles for suburb history pages
   Used by: papakura-then-and-now.php, ellerslie-then-and-now.php
   ========================================================= */

/* <picture> wrappers are invisible to layout — children inherit parent styles unchanged */
.tn-figure picture,
.tn-compare picture { display: contents; }

:root {
  --tn-sepia:    #6b4a2d;
  --tn-cream:    #f5efe4;
  --tn-paper:    #faf6ed;
  --tn-rule:     #d8cdb6;
  --tn-overlay:  rgba(0, 31, 73, 0.78);
  --tn-overlay-strong: rgba(0, 31, 73, 0.88);
  --tn-amber:    #c89c4b;
}

/* ─── HERO ───────────────────────────────────────────────── */
.tn-hero {
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  overflow: hidden;
  margin-top: 80px;
}
.tn-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: grayscale(0.35) sepia(0.18);
  z-index: 0;
}
.tn-hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0,31,73,0.35) 0%,
    rgba(0,31,73,0.65) 55%,
    rgba(0,31,73,0.92) 100%
  );
}
.tn-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 880px;
  padding: 120px 32px 80px;
}
.tn-hero .tn-eyebrow {
  font-size: 14px;
  letter-spacing: 4px;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--tn-amber);
  margin-bottom: 16px;
}
.tn-hero h1 {
  font-size: clamp(40px, 7vw, 84px);
  font-weight: 300;
  letter-spacing: -1px;
  line-height: 1.02;
  margin: 0 0 20px;
  font-family: 'Source Sans 3', sans-serif;
}
.tn-hero h1 strong {
  font-weight: 700;
  font-style: italic;
}
.tn-hero p {
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.55;
  font-weight: 300;
  max-width: 640px;
  margin: 0 auto 32px;
  color: rgba(255,255,255,0.88);
}
.tn-hero-meta {
  display: flex;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
  margin-top: 12px;
}
.tn-hero-meta span i { margin-right: 8px; color: var(--tn-amber); }
.tn-hero-scroll {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: rgba(255,255,255,0.6);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.tn-hero-scroll i { display: block; margin-top: 6px; animation: tnBounce 1.6s infinite; }
@keyframes tnBounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(6px); }
}

/* ─── INTRO LEDE ────────────────────────────────────────── */
.tn-lede {
  background: var(--tn-paper);
  padding: 80px 0;
  border-bottom: 1px solid var(--tn-rule);
}
.tn-lede-inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 32px;
  text-align: center;
}
.tn-lede p {
  font-size: 21px;
  line-height: 1.65;
  color: #3a2f20;
  font-weight: 300;
  margin: 0;
  font-style: italic;
}

/* ─── ERA NAVIGATION (sticky scrollspy) ─────────────────── */
.tn-eranav {
  position: sticky;
  top: 80px;
  z-index: 50;
  background: rgba(250, 246, 237, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--tn-rule);
}
.tn-eranav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--tn-rule) transparent;
}
.tn-eranav-inner::-webkit-scrollbar { height: 4px; }
.tn-eranav-inner::-webkit-scrollbar-thumb { background: var(--tn-rule); border-radius: 2px; }
.tn-eranav a {
  flex-shrink: 0;
  padding: 8px 16px;
  font-size: 13px;
  letter-spacing: 0.5px;
  font-weight: 600;
  color: var(--tn-sepia);
  border-radius: 100px;
  border: 1px solid var(--tn-rule);
  background: rgba(255,255,255,0.6);
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
}
.tn-eranav a:hover { background: var(--tn-sepia); color: var(--tn-cream); border-color: var(--tn-sepia); }
.tn-eranav a.active { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ─── TIMELINE SECTIONS ─────────────────────────────────── */
.tn-era {
  padding: 100px 0;
  position: relative;
}
.tn-era:nth-child(even) { background: var(--tn-paper); }
.tn-era-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.tn-era:nth-child(even) .tn-era-inner .tn-era-text { order: 2; }
.tn-era:nth-child(even) .tn-era-inner .tn-era-image { order: 1; }

.tn-era-pill {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--tn-sepia);
  background: var(--tn-cream);
  border: 1px solid var(--tn-rule);
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 20px;
}
.tn-era h2 {
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 300;
  color: var(--navy);
  line-height: 1.15;
  margin: 0 0 16px;
}
.tn-era h2 strong { font-weight: 700; }
.tn-era-years {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--tn-amber);
  margin-bottom: 24px;
}
.tn-era p {
  font-size: 17px;
  line-height: 1.7;
  color: #4a3f2e;
  margin: 0 0 16px;
}

.tn-era-image {
  position: relative;
}
.tn-figure {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  box-shadow:
    0 24px 48px -16px rgba(0,31,73,0.32),
    0 4px 12px rgba(0,0,0,0.06);
}
.tn-figure img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #f0e8d4;
}
.tn-figure-cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, transparent, rgba(0,31,73,0.92));
  color: rgba(255,255,255,0.92);
  padding: 60px 18px 14px;
  font-size: 13px;
  line-height: 1.5;
}
.tn-figure-cap strong { color: var(--tn-amber); font-weight: 600; }
.tn-figure-cap a { color: rgba(255,255,255,0.72); text-decoration: underline; }
.tn-figure-cap a:hover { color: var(--tn-amber); }

/* ─── BEFORE / AFTER SLIDER ─────────────────────────────── */
.tn-compare-section {
  background: #0d2548;
  color: #fff;
  padding: 110px 0;
}
.tn-compare-section .tn-section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 64px;
  padding: 0 32px;
}
.tn-compare-section .tn-section-head .tn-era-pill {
  background: rgba(200, 156, 75, 0.18);
  color: var(--tn-amber);
  border-color: rgba(200, 156, 75, 0.4);
}
.tn-compare-section h2 {
  font-size: clamp(32px, 4.4vw, 48px);
  font-weight: 300;
  color: #fff;
  line-height: 1.15;
  margin: 0 0 16px;
}
.tn-compare-section h2 strong { font-weight: 700; font-style: italic; }
.tn-compare-section .tn-section-head p {
  font-size: 18px;
  line-height: 1.6;
  color: rgba(255,255,255,0.72);
  margin: 0;
}

.tn-compare-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  display: grid;
  gap: 48px;
}
.tn-compare-item h3 {
  font-size: 22px;
  font-weight: 600;
  color: #fff;
  margin: 0 0 6px;
  letter-spacing: -0.2px;
}
.tn-compare-item .tn-compare-sub {
  font-size: 14px;
  color: rgba(255,255,255,0.6);
  margin: 0 0 18px;
}
.tn-compare {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  user-select: none;
  background: #000;
  aspect-ratio: 16 / 10;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.5);
  touch-action: none;
}
.tn-compare img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.tn-compare-after-wrap {
  position: absolute;
  inset: 0;
  width: 50%;
  overflow: hidden;
}
.tn-compare-after-wrap img {
  width: 200%;
  max-width: none;
}
.tn-compare-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  background: #fff;
  cursor: ew-resize;
  z-index: 3;
  transform: translateX(-50%);
}
.tn-compare-handle::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  transform: translate(-50%, -50%);
  box-shadow: 0 6px 16px rgba(0,0,0,0.4);
}
.tn-compare-handle::after {
  content: "\f337";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(90deg);
  color: var(--navy);
  font-size: 18px;
  z-index: 1;
}
.tn-compare-label {
  position: absolute;
  top: 16px;
  padding: 6px 12px;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 700;
  border-radius: 100px;
  z-index: 2;
  color: #fff;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
}
.tn-compare-label.before { left: 16px; }
.tn-compare-label.after  { right: 16px; }
.tn-compare-caption {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  margin-top: 14px;
  line-height: 1.5;
}
.tn-compare-caption a { color: rgba(255,255,255,0.7); text-decoration: underline; }
.tn-compare-caption a:hover { color: var(--tn-amber); }

/* ─── LANDMARKS GRID ────────────────────────────────────── */
.tn-landmarks {
  background: var(--tn-paper);
  padding: 110px 0;
  border-top: 1px solid var(--tn-rule);
}
.tn-landmarks .tn-section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 64px;
  padding: 0 32px;
}
.tn-landmarks h2 {
  font-size: clamp(32px, 4.4vw, 44px);
  font-weight: 300;
  color: var(--navy);
  line-height: 1.15;
  margin: 0 0 14px;
}
.tn-landmarks h2 strong { font-weight: 700; }
.tn-landmarks .tn-section-head p {
  font-size: 17px;
  color: #5b4d36;
  margin: 0;
}
.tn-landmarks-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.tn-landmark {
  background: #fff;
  border: 1px solid var(--tn-rule);
  border-radius: 4px;
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s;
}
.tn-landmark:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -16px rgba(0,31,73,0.18);
}
.tn-landmark-img {
  aspect-ratio: 4 / 3;
  background: #d8cdb6 center/cover no-repeat;
  position: relative;
}
.tn-landmark-img::after {
  content: attr(data-year);
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: rgba(0,0,0,0.6);
  color: var(--tn-amber);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  padding: 4px 10px;
  border-radius: 100px;
}
.tn-landmark-body { padding: 20px 22px 24px; }
.tn-landmark h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--navy);
  margin: 0 0 8px;
  line-height: 1.3;
}
.tn-landmark p {
  font-size: 14px;
  line-height: 1.55;
  color: #5b4d36;
  margin: 0;
}

/* ─── CREDITS ───────────────────────────────────────────── */
.tn-credits {
  background: #f3ecdb;
  padding: 64px 0;
  border-top: 1px solid var(--tn-rule);
}
.tn-credits-inner {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 32px;
}
.tn-credits h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 8px;
  letter-spacing: -0.2px;
}
.tn-credits-lede {
  font-size: 14px;
  color: #5b4d36;
  margin: 0 0 28px;
  line-height: 1.6;
}
.tn-credits ol {
  list-style: none;
  counter-reset: cred;
  margin: 0;
  padding: 0;
}
.tn-credits li {
  counter-increment: cred;
  padding: 12px 0 12px 38px;
  position: relative;
  font-size: 13px;
  line-height: 1.6;
  color: #4a3f2e;
  border-bottom: 1px dashed var(--tn-rule);
}
.tn-credits li::before {
  content: counter(cred, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 12px;
  font-size: 11px;
  font-weight: 700;
  color: var(--tn-sepia);
  background: var(--tn-cream);
  padding: 2px 8px;
  border-radius: 100px;
}
.tn-credits li a { color: var(--tn-sepia); text-decoration: underline; }
.tn-credits li a:hover { color: var(--navy); }
.tn-credits li strong { color: var(--navy); }

/* ─── CLOSING CTA ───────────────────────────────────────── */
.tn-cta {
  background: linear-gradient(135deg, #001F49 0%, #002a63 100%);
  color: #fff;
  padding: 110px 0;
  text-align: center;
}
.tn-cta-inner { max-width: 720px; margin: 0 auto; padding: 0 32px; }
.tn-cta h2 {
  font-size: clamp(32px, 4.4vw, 44px);
  font-weight: 300;
  margin: 0 0 16px;
  line-height: 1.2;
}
.tn-cta h2 strong { font-weight: 700; font-style: italic; }
.tn-cta p {
  font-size: 18px;
  color: rgba(255,255,255,0.78);
  line-height: 1.6;
  margin: 0 0 36px;
}
.tn-cta .btn {
  font-size: 16px;
  padding: 16px 36px;
  min-height: 56px;
}

/* ─── RESPONSIVE ────────────────────────────────────────── */
@media (max-width: 880px) {
  .tn-era { padding: 64px 0; }
  .tn-era-inner { grid-template-columns: 1fr; gap: 32px; }
  .tn-era:nth-child(even) .tn-era-inner .tn-era-text { order: 1; }
  .tn-era:nth-child(even) .tn-era-inner .tn-era-image { order: 2; }
  .tn-landmarks-grid { grid-template-columns: 1fr; gap: 24px; }
  .tn-eranav { top: 72px; }
  .tn-eranav-inner { padding: 10px 16px; }
  .tn-eranav a { font-size: 12px; padding: 6px 12px; }
  .tn-hero { min-height: 64vh; }
  .tn-compare-section, .tn-landmarks, .tn-cta { padding: 72px 0; }
  .tn-compare-handle::before { width: 36px; height: 36px; }
}
@media (max-width: 540px) {
  .tn-hero-meta { gap: 14px; font-size: 11px; }
  .tn-lede p { font-size: 18px; }
}
