/* Timmerman School Heritage & History Slide Deck Styles */

.history-hero {
  position: relative;
  background: radial-gradient(circle at 50% 18%, #0d284f 0%, #061933 65%, #030f20 100%);
  color: #fff;
  padding: 56px 20px 72px;
  overflow: hidden;
  border-bottom: 1px solid rgba(189, 138, 46, 0.28);
}

.history-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(rgba(189, 138, 46, 0.12) 1px, transparent 1px),
    radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 32px 32px, 16px 16px;
  background-position: 0 0, 16px 16px;
  opacity: 0.7;
  pointer-events: none;
}

.history-hero .inner {
  position: relative;
  max-width: 1140px;
  margin: 0 auto;
  z-index: 2;
}

.history-hero-header {
  text-align: center;
  max-width: 820px;
  margin: 0 auto 36px;
}

.history-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(189, 138, 46, 0.16);
  border: 1px solid rgba(189, 138, 46, 0.42);
  color: #f7d58b;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.history-hero-header h1 {
  font-family: "Libre Baskerville", serif;
  font-size: clamp(30px, 4.4vw, 50px);
  line-height: 1.15;
  color: #ffffff;
  margin: 0 0 14px;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
}

.history-hero-header p {
  font-size: clamp(15px, 1.8vw, 18px);
  line-height: 1.6;
  color: #d1dcec;
  margin: 0;
}

/* 3D Slide Deck Stage */
.deck-container {
  position: relative;
  perspective: 1200px;
  max-width: 960px;
  margin: 0 auto;
  padding: 10px 0 24px;
}

.deck-stage {
  position: relative;
  height: 380px;
  display: flex;
  justify-content: center;
  align-items: center;
  transform-style: preserve-3d;
}

@media (max-width: 760px) {
  .deck-stage {
    height: 320px;
  }
}

.deck-card {
  position: absolute;
  width: min(520px, 86vw);
  height: 350px;
  border-radius: 20px;
  overflow: hidden;
  background: #091e38;
  border: 2px solid rgba(189, 138, 46, 0.35);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.55);
  cursor: pointer;
  transition: transform 0.55s cubic-bezier(0.25, 1, 0.45, 1),
              opacity 0.55s ease,
              filter 0.55s ease,
              box-shadow 0.55s ease,
              border-color 0.55s ease;
  user-select: none;
  touch-action: pan-y;
}

@media (max-width: 760px) {
  .deck-card {
    height: 300px;
  }
}

.deck-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  display: block;
  transition: transform 0.6s ease;
}

.deck-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 25, 51, 0.1) 0%, rgba(6, 25, 51, 0.4) 50%, rgba(3, 15, 32, 0.94) 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px 22px;
  color: #fff;
}

.deck-card-year {
  align-self: flex-start;
  background: rgba(189, 138, 46, 0.92);
  color: #061933;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.05em;
  padding: 4px 12px;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  text-transform: uppercase;
}

.deck-card-caption h3 {
  font-family: "Libre Baskerville", serif;
  font-size: clamp(18px, 2.2vw, 23px);
  margin: 0 0 6px;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.deck-card-caption p {
  font-size: 14px;
  color: #e2eaf5;
  margin: 0;
  line-height: 1.4;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
}

/* Card Positioning in 3D Space */
.deck-card.is-center {
  transform: translateX(0%) scale(1) translateZ(0);
  opacity: 1;
  z-index: 10;
  filter: none;
  border-color: rgba(247, 213, 139, 0.85);
  box-shadow: 0 24px 60px -8px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(189, 138, 46, 0.4);
}

.deck-card.is-left {
  transform: translateX(-56%) scale(0.82) rotateY(16deg) translateZ(-60px);
  opacity: 0.6;
  z-index: 5;
  filter: brightness(0.75) saturate(0.85);
}

.deck-card.is-right {
  transform: translateX(56%) scale(0.82) rotateY(-16deg) translateZ(-60px);
  opacity: 0.6;
  z-index: 5;
  filter: brightness(0.75) saturate(0.85);
}

.deck-card.is-hidden-left {
  transform: translateX(-115%) scale(0.65) translateZ(-160px);
  opacity: 0;
  z-index: 1;
  pointer-events: none;
}

.deck-card.is-hidden-right {
  transform: translateX(115%) scale(0.65) translateZ(-160px);
  opacity: 0;
  z-index: 1;
  pointer-events: none;
}

@media (max-width: 640px) {
  .deck-card.is-left {
    transform: translateX(-35%) scale(0.78) rotateY(12deg);
    opacity: 0.35;
  }
  .deck-card.is-right {
    transform: translateX(35%) scale(0.78) rotateY(-12deg);
    opacity: 0.35;
  }
}

/* Deck Controls & Indicators */
.deck-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.deck-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(189, 138, 46, 0.4);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 18px;
}

.deck-btn:hover,
.deck-btn:focus-visible {
  background: #bd8a2e;
  color: #061f44;
  transform: scale(1.08);
  box-shadow: 0 0 16px rgba(189, 138, 46, 0.5);
}

.deck-indicators {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

.deck-indicator {
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #c0cddf;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.22s ease;
}

.deck-indicator:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.deck-indicator.active {
  background: #bd8a2e;
  border-color: #f7d58b;
  color: #061933;
  box-shadow: 0 2px 10px rgba(189, 138, 46, 0.45);
}

.deck-play-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #c0cddf;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.deck-play-btn:hover {
  border-color: #bd8a2e;
  color: #fff;
}

/* Dynamic Synchronized Narrative Panel */
.deck-story-panel {
  max-width: 860px;
  margin: 30px auto 0;
  background: rgba(9, 30, 56, 0.78);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(189, 138, 46, 0.3);
  border-radius: 20px;
  padding: 28px 32px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  position: relative;
  min-height: 180px;
}

@media (max-width: 600px) {
  .deck-story-panel {
    padding: 20px;
  }
}

.story-content {
  display: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.story-content.active {
  display: block;
  opacity: 1;
  animation: fadeInStory 0.45s ease forwards;
}

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

.story-kicker {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #f7d58b;
  font-weight: 800;
  margin-bottom: 8px;
}

.story-title {
  font-family: "Libre Baskerville", serif;
  font-size: clamp(20px, 2.4vw, 26px);
  color: #ffffff;
  margin: 0 0 12px;
  line-height: 1.25;
}

.story-body {
  font-size: 15px;
  line-height: 1.7;
  color: #d8e2f0;
  margin: 0 0 16px;
}

.story-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.story-pill {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(189, 138, 46, 0.18);
  border: 1px solid rgba(189, 138, 46, 0.4);
  color: #f7d58b;
}

.story-citation {
  font-size: 12px;
  color: #9cb1cc;
  font-style: italic;
}

/* Secondary Editorial Feature Sections */
.history-section {
  padding: 64px 20px;
}

.history-section.light {
  background: #fdfbf7;
}

.history-section.white {
  background: #ffffff;
}

.history-grid-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 44px;
  align-items: center;
  max-width: 1140px;
  margin: 0 auto;
}

@media (max-width: 860px) {
  .history-grid-split {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

.history-photo-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(6, 31, 68, 0.16);
  border: 1px solid rgba(6, 31, 68, 0.08);
  background: #fff;
}

.history-photo-card img {
  width: 100%;
  height: auto;
  display: block;
}

.history-photo-caption {
  padding: 14px 18px;
  background: #fff;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: #556277;
  line-height: 1.5;
}

.history-photo-caption strong {
  color: var(--navy);
  display: block;
  margin-bottom: 2px;
}

.quote-callout {
  border-left: 4px solid var(--gold);
  padding: 16px 22px;
  background: rgba(189, 138, 46, 0.06);
  border-radius: 0 14px 14px 0;
  margin: 22px 0;
}

.quote-callout p {
  font-family: "Libre Baskerville", serif;
  font-style: italic;
  font-size: 17px;
  color: var(--navy);
  margin: 0 0 6px;
  line-height: 1.5;
}

.quote-callout cite {
  font-size: 13px;
  color: #66758c;
  font-style: normal;
  font-weight: 600;
}

/* Seven-Decade Interactive Timeline */
.timeline-wrap {
  position: relative;
  max-width: 880px;
  margin: 40px auto 0;
  padding-left: 32px;
}

.timeline-wrap::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 10px;
  bottom: 10px;
  width: 3px;
  background: linear-gradient(180deg, #bd8a2e 0%, rgba(189, 138, 46, 0.3) 100%);
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  margin-bottom: 40px;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -29px;
  top: 4px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #bd8a2e;
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px rgba(189, 138, 46, 0.5);
}

.timeline-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px 26px;
  box-shadow: 0 8px 24px rgba(6, 31, 68, 0.06);
}

.timeline-year-tag {
  display: inline-block;
  font-size: 13px;
  font-weight: 800;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.timeline-card h3 {
  font-family: "Libre Baskerville", serif;
  font-size: 20px;
  color: var(--navy);
  margin: 0 0 8px;
}

.timeline-card p {
  color: #4b586d;
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
}

/* Split Timeline Milestone: Text / Image Aligned */
.timeline-item {
  scroll-margin-top: 100px;
}

.timeline-card-split {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 24px;
  align-items: start;
}

@media (max-width: 860px) {
  .timeline-card-split {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

.timeline-media {
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  background: #f4f6fa;
  border: 1px solid var(--line);
  box-shadow: 0 4px 14px rgba(6, 31, 68, 0.08);
}

.timeline-media img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.timeline-media figcaption {
  padding: 8px 12px;
  font-size: 12px;
  line-height: 1.4;
  color: #556277;
  background: #fafbfc;
  border-top: 1px solid var(--line);
}

.timeline-media figcaption strong {
  display: block;
  color: var(--navy);
  font-size: 12px;
  margin-bottom: 2px;
}

.timeline-highlight .timeline-card {
  border-color: #bd8a2e;
  box-shadow: 0 0 0 3px rgba(189, 138, 46, 0.4), 0 12px 32px rgba(189, 138, 46, 0.2);
  transition: all 0.4s ease;
}

.timeline-card .quote-callout {
  margin-top: 14px;
  margin-bottom: 0;
  padding: 12px 16px;
  border-left: 3px solid #bd8a2e;
  background: #fdfaf4;
  border-radius: 0 8px 8px 0;
}

.timeline-card .quote-callout p {
  font-style: italic;
  color: #334155;
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 4px;
}

.timeline-card .quote-callout cite {
  font-size: 12px;
  color: #718096;
  font-weight: 600;
  display: block;
}

@media (prefers-reduced-motion: reduce) {
  .deck-card,
  .deck-card img,
  .deck-btn,
  .deck-indicator,
  .tradition-card-image img {
    transition: none !important;
  }
}
