/* =========================================================
   TIMELINE PAGE — Rajasthani Heritage Look  ✦ Upgraded
   ========================================================= */

/* ── Google Fonts extra ── */
@import url('https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@700&display=swap');

/* ── Page hero ── */
.tl-hero {
  margin: 1rem 0 0.5rem;
  text-align: center;
}

.tl-hero-inner {
  position: relative;
  padding: 2.5rem 1.5rem 2rem;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(201,164,73,0.28), transparent 65%),
    linear-gradient(180deg, rgba(253,245,225,0.98), rgba(238,220,180,0.95));
  border: 4px double var(--gold);
  overflow: hidden;
  box-shadow:
    0 16px 48px rgba(64,35,16,0.28),
    0 0 0 2px var(--maroon),
    inset 0 0 60px rgba(201,164,73,0.06);
  animation: hero-glow 5s ease-in-out infinite;
}

@keyframes hero-glow {
  0%,100% { box-shadow: 0 16px 48px rgba(64,35,16,0.28), 0 0 0 2px var(--maroon), inset 0 0 60px rgba(201,164,73,0.06); }
  50%      { box-shadow: 0 16px 48px rgba(64,35,16,0.28), 0 0 0 2px var(--maroon), 0 0 60px rgba(201,164,73,0.22), inset 0 0 60px rgba(201,164,73,0.12); }
}

/* jaali (lattice) overlay */
.tl-hero-jaali {
  position: absolute;
  inset: 0;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36' viewBox='0 0 36 36'%3E%3Ccircle cx='18' cy='18' r='14' stroke='%231a3a6a' stroke-width='1.2' fill='none'/%3E%3Ccircle cx='18' cy='18' r='6' fill='%231a3a6a'/%3E%3Cline x1='18' y1='0' x2='18' y2='36' stroke='%231a3a6a' stroke-width='0.6'/%3E%3Cline x1='0' y1='18' x2='36' y2='18' stroke='%231a3a6a' stroke-width='0.6'/%3E%3Cline x1='0' y1='0' x2='36' y2='36' stroke='%231a3a6a' stroke-width='0.3'/%3E%3Cline x1='36' y1='0' x2='0' y2='36' stroke='%231a3a6a' stroke-width='0.3'/%3E%3C/svg%3E");
  pointer-events: none;
}

/* top border ornament */
.tl-hero-inner::before {
  content: "✦ ❖ ✦ ❖ ✦ ❖ ✦ ❖ ✦ ❖ ✦";
  display: block;
  text-align: center;
  color: var(--gold-dark);
  font-size: 0.7rem;
  letter-spacing: 6px;
  margin-bottom: 0.8rem;
  opacity: 0.65;
}


.tl-hero-eyebrow {
  color: var(--deep-green);
  font-weight: 600;
  letter-spacing: 3px;
  font-size: 0.85rem;
  margin: 0 0 0.4rem;
  text-transform: uppercase;
}

.tl-hero-h1 {
  font-family: "Marcellus", serif;
  font-size: clamp(2.1rem, 6.5vw, 3.8rem);
  color: var(--maroon);
  margin: 0 0 0.4rem;
  text-shadow: 2px 3px 8px rgba(106,16,32,0.28), 0 0 40px rgba(201,164,73,0.18);
  animation: hero-h1-in 1.1s ease-out both;
  letter-spacing: 0.04em;
}

@keyframes hero-h1-in {
  from { opacity: 0; transform: translateY(18px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.tl-hero-sub {
  color: var(--saffron);
  font-family: "Marcellus", serif;
  font-size: clamp(0.85rem, 2vw, 1.1rem);
  letter-spacing: 0.12em;
}

.tl-arch {
  width: min(360px, 92%);
  margin: 0.75rem auto 0;
  animation: arch-pulse 4s ease-in-out infinite;
}

.tl-arch svg { width: 100%; height: auto; }

@keyframes arch-pulse {
  0%,100% { opacity: 0.65; filter: drop-shadow(0 0 0px rgba(201,164,73,0)); }
  50%      { opacity: 1;    filter: drop-shadow(0 0 6px rgba(201,164,73,0.55)); }
}

/* ── Day tabs ── */
.tl-tabs {
  display: flex;
  justify-content: center;
  gap: 0;
  margin: 1.4rem auto 0;
  flex-wrap: nowrap;
  position: relative;
  z-index: 2;
  max-width: 560px;
  border: 2px solid var(--gold-dark);
  box-shadow: 0 6px 24px rgba(64,35,16,0.22);
  overflow: hidden;
}

.tl-tab {
  font-family: "Marcellus", serif;
  font-size: clamp(0.85rem, 2vw, 1rem);
  padding: 0.7rem 1.5rem;
  background: linear-gradient(180deg, #3a1a08, #2a1006);
  color: #d4b87a;
  border: none;
  border-right: 1px solid var(--gold-dark);
  cursor: pointer;
  letter-spacing: 0.08em;
  transition: all 0.35s;
  position: relative;
  overflow: hidden;
  flex: 1;
  text-align: center;
}

.tl-tab:last-child { border-right: none; }

/* shimmer sweep */
.tl-tab::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(201,164,73,0.25) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.55s;
}

.tl-tab:hover::before { transform: translateX(120%); }
.tl-tab--active::before { transform: translateX(120%); }

/* bottom indicator bar */
.tl-tab::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.tl-tab--active::after,
.tl-tab:hover::after {
  transform: scaleX(1);
}

.tl-tab:hover,
.tl-tab--active {
  background: linear-gradient(180deg, var(--maroon), var(--maroon-dark));
  color: #fff8e8;
  text-shadow: 0 0 12px rgba(240,204,112,0.5);
}

.tl-tab--active {
  box-shadow: inset 0 -3px 0 var(--gold);
}

/* day badge inside tab */
.tl-tab-badge {
  display: inline-block;
  background: var(--gold);
  color: var(--maroon-dark);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 0.7rem;
  line-height: 20px;
  text-align: center;
  margin-right: 0.35rem;
  font-family: "Hind", sans-serif;
  font-weight: 700;
  vertical-align: middle;
  transition: background 0.3s, color 0.3s;
}

.tl-tab--active .tl-tab-badge {
  background: #fff8e8;
  color: var(--maroon);
}

/* ── Day panels ── */
.tl-panel { display: block; animation: panel-in 0.55s ease both; }
.tl-panel--hidden { display: none; }

@keyframes panel-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Day hero image ── */
.tl-day-header {
  position: relative;
  overflow: hidden;
  margin-top: 1rem;
  border: 3px solid var(--gold);
  box-shadow: 0 8px 32px rgba(44,16,8,0.35);
}

/* corner florals */
.tl-day-header::before,
.tl-day-header::after {
  content: "❋";
  position: absolute;
  z-index: 3;
  color: var(--gold);
  font-size: 1.6rem;
  line-height: 1;
  opacity: 0.85;
  text-shadow: 0 0 8px rgba(201,164,73,0.6);
  animation: corner-spin 12s linear infinite;
}

.tl-day-header::before { top: 8px; left: 10px; }
.tl-day-header::after  { bottom: 8px; right: 10px; animation-direction: reverse; }

@keyframes corner-spin {
  to { transform: rotate(360deg); }
}

.tl-day-img {
  display: block;
  width: 100%;
  height: clamp(170px, 30vh, 300px);
  object-fit: cover;
  filter: brightness(0.6) saturate(1.3);
  transition: transform 0.8s ease, filter 0.6s ease;
}

.tl-day-header:hover .tl-day-img {
  transform: scale(1.06);
  filter: brightness(0.7) saturate(1.5);
}

.tl-day-header-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem;
  background: linear-gradient(180deg, rgba(44,16,8,0.1), rgba(44,16,8,0.65));
}

.tl-day-header-overlay h2 {
  color: #fff8e8;
  font-family: "Marcellus", serif;
  font-size: clamp(1.3rem, 4.5vw, 2.3rem);
  margin: 0 0 0.3rem;
  text-shadow: 0 2px 14px rgba(0,0,0,0.9), 0 0 30px rgba(201,164,73,0.4);
  letter-spacing: 0.04em;
}

.tl-day-header-overlay p {
  color: var(--gold-light);
  font-size: clamp(0.82rem, 2vw, 1.05rem);
  margin: 0;
  letter-spacing: 2px;
  text-shadow: 0 1px 6px rgba(0,0,0,0.8);
}

.tl-day-header--garjana .tl-day-header-overlay {
  background: linear-gradient(180deg, rgba(106,16,32,0.2), rgba(30,12,5,0.75));
}

/* ── Floating stickers ── */
.tl-stickers {
  position: relative;
  height: 0;
  overflow: visible;
  pointer-events: none;
}

.tl-sticker {
  position: absolute;
  font-size: clamp(1.6rem, 4.5vw, 2.8rem);
  filter: drop-shadow(0 3px 8px rgba(44,16,8,0.35));
  animation: sticker-float 5s ease-in-out infinite;
}

.tl-sticker--float1 { left:  2%; top: -32px; animation-delay: 0s;    animation-duration: 4.5s; }
.tl-sticker--float2 { right: 4%; top: -48px; animation-delay: 1.2s;  animation-duration: 5.5s; }
.tl-sticker--float3 { left: 14%; top: -22px; animation-delay: 0.6s;  animation-duration: 6s; }
.tl-sticker--float4 { right:15%; top: -38px; animation-delay: 1.8s;  animation-duration: 4.8s; }

@keyframes sticker-float {
  0%,100% { transform: translateY(0) rotate(-4deg) scale(1);   }
  33%      { transform: translateY(-10px) rotate(5deg) scale(1.08); }
  66%      { transform: translateY(-5px) rotate(-2deg) scale(0.96); }
}

/* ── Timeline path wrapper ── */
.tl-path {
  position: relative;
  padding: 1.5rem 0 1rem 0;
  margin-top: 1.25rem;
}

/* ── Glowing vertical line ── */
.tl-path::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: clamp(26px, 5.5vw, 48px);
  width: 4px;
  background: linear-gradient(180deg,
    transparent 0%,
    var(--gold-light) 5%,
    var(--gold) 20%,
    var(--saffron) 50%,
    var(--gold) 80%,
    var(--gold-light) 95%,
    transparent 100%
  );
  border-radius: 2px;
  animation: line-pulse 2.5s ease-in-out infinite;
}

@keyframes line-pulse {
  0%,100% { opacity: 0.75; filter: drop-shadow(0 0 2px rgba(201,164,73,0.3)); }
  50%      { opacity: 1;   filter: drop-shadow(0 0 8px rgba(201,164,73,0.7)); }
}

/* ── Timeline item ── */
.tl-item {
  display: flex;
  gap: clamp(0.7rem, 2.5vw, 1.4rem);
  align-items: flex-start;
  margin-bottom: 1.35rem;
  padding-left: clamp(14px, 3vw, 28px);
  position: relative;
  /* stagger-in animation driven by JS adding .visible */
}

/* connector dot on the line */
.tl-item::before {
  content: "";
  position: absolute;
  left: clamp(22px, 5vw, 44px);
  top: clamp(18px, 3.5vw, 26px);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gold);
  border: 2px solid var(--paper-light);
  box-shadow: 0 0 0 3px var(--gold-dark), 0 0 10px rgba(201,164,73,0.6);
  z-index: 2;
  transform: translateX(-50%);
  animation: dot-pulse 2.8s ease-in-out infinite;
}

@keyframes dot-pulse {
  0%,100% { box-shadow: 0 0 0 3px var(--gold-dark), 0 0 6px rgba(201,164,73,0.4); }
  50%      { box-shadow: 0 0 0 5px var(--gold-dark), 0 0 14px rgba(201,164,73,0.75); }
}

/* ── Node circle ── */
.tl-node {
  flex-shrink: 0;
  width: clamp(44px, 9vw, 62px);
  height: clamp(44px, 9vw, 62px);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff8e8, #f0d898, #d4a94a);
  border: 3px solid var(--gold);
  box-shadow:
    0 0 0 3px rgba(201,164,73,0.25),
    0 5px 16px rgba(44,16,8,0.25),
    inset 0 -2px 4px rgba(106,16,32,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1.2rem, 3.2vw, 1.7rem);
  position: relative;
  z-index: 1;
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.35s;
  animation: node-breathe 3.5s ease-in-out infinite;
  cursor: default;
}

.tl-item:hover .tl-node {
  transform: scale(1.18) rotate(12deg);
  box-shadow:
    0 0 0 5px var(--gold-light),
    0 8px 22px rgba(44,16,8,0.35),
    inset 0 -2px 4px rgba(106,16,32,0.15);
}

@keyframes node-breathe {
  0%,100% { box-shadow: 0 0 0 3px rgba(201,164,73,0.22), 0 5px 14px rgba(44,16,8,0.22), inset 0 -2px 4px rgba(106,16,32,0.12); }
  50%      { box-shadow: 0 0 0 6px rgba(201,164,73,0.4),  0 7px 20px rgba(44,16,8,0.3),  inset 0 -2px 4px rgba(106,16,32,0.12); }
}

/* ── Card ── */
.tl-card {
  flex: 1;
  padding: 0.9rem 1.1rem 0.85rem;
  background:
    radial-gradient(ellipse at 5% 5%, rgba(201,164,73,0.14), transparent 55%),
    linear-gradient(155deg, rgba(255,250,235,0.99), rgba(242,225,192,0.95));
  border: 2px solid var(--gold-dark);
  border-left: 5px solid var(--saffron);
  position: relative;
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.34,1.2,0.64,1), box-shadow 0.35s;
  box-shadow: 0 3px 14px rgba(44,16,8,0.1);
}

/* inner dashed border */
.tl-card::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px dashed rgba(106,16,32,0.2);
  pointer-events: none;
  transition: border-color 0.3s;
}

/* decorative corner symbol */
.tl-card::after {
  content: "◈";
  position: absolute;
  bottom: 6px;
  right: 9px;
  color: rgba(201,164,73,0.55);
  font-size: 0.72rem;
  transition: color 0.3s;
}

/* shimmer on hover */
.tl-card-shimmer {
  content: "";
  position: absolute;
  top: 0;
  left: -80%;
  width: 60%;
  height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,0.35), transparent);
  transition: left 0.55s ease;
  pointer-events: none;
}

.tl-item:hover .tl-card {
  transform: translateX(7px) translateY(-2px);
  box-shadow: 0 10px 30px rgba(106,16,32,0.2), 0 2px 8px rgba(44,16,8,0.12);
  border-left-color: var(--maroon);
}

.tl-item:hover .tl-card::before {
  border-color: rgba(106,16,32,0.38);
}

.tl-item:hover .tl-card::after {
  color: var(--gold);
}

/* ── FINALE card ── */
.tl-card--finale {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(201,164,73,0.28), transparent 65%),
    linear-gradient(155deg, rgba(255,252,238,0.99), rgba(245,228,198,0.97));
  border: 3px solid var(--gold);
  border-left: 6px solid var(--maroon);
  box-shadow: 0 8px 32px rgba(106,16,32,0.28), 0 0 20px rgba(201,164,73,0.12);
  animation: finale-glow 3s ease-in-out infinite;
}

@keyframes finale-glow {
  0%,100% { box-shadow: 0 8px 32px rgba(106,16,32,0.28), 0 0 10px rgba(201,164,73,0.1); }
  50%      { box-shadow: 0 8px 32px rgba(106,16,32,0.28), 0 0 40px rgba(201,164,73,0.32); }
}

/* ── Time badge ── */
.tl-time {
  display: inline-block;
  font-weight: 700;
  color: #fff8e8;
  font-size: 0.82rem;
  margin-bottom: 0.3rem;
  letter-spacing: 0.07em;
  background: linear-gradient(90deg, var(--maroon), var(--saffron));
  padding: 0.12rem 0.55rem;
  border-radius: 1px;
  box-shadow: 0 2px 6px rgba(106,16,32,0.25);
}

/* ── Title ── */
.tl-title {
  font-family: "Marcellus", serif;
  font-size: clamp(0.98rem, 2.4vw, 1.18rem);
  color: var(--royal-blue);
  margin: 0.3rem 0 0.32rem;
  line-height: 1.35;
}

/* ── Description ── */
.tl-desc {
  font-size: 0.88rem;
  color: #5a3a28;
  margin: 0 0 0.5rem;
  line-height: 1.6;
}

/* ── Tag pill ── */
.tl-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.73rem;
  background: linear-gradient(90deg, var(--maroon), var(--saffron));
  color: #fff8e8;
  padding: 0.14rem 0.6rem;
  border-radius: 20px;
  letter-spacing: 0.06em;
  font-family: "Marcellus", serif;
  box-shadow: 0 2px 6px rgba(106,16,32,0.2);
  transition: transform 0.25s, box-shadow 0.25s;
}

.tl-item:hover .tl-tag {
  transform: scale(1.05);
  box-shadow: 0 3px 10px rgba(106,16,32,0.32);
}


/* ── Event count strip ── */
.tl-event-count {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin: 1rem auto 0;
  padding: 0.7rem 1.2rem;
  background: linear-gradient(90deg, rgba(201,164,73,0.08), rgba(201,164,73,0.18), rgba(201,164,73,0.08));
  border-top: 1px solid rgba(201,164,73,0.3);
  border-bottom: 1px solid rgba(201,164,73,0.3);
}

.tl-count-item {
  text-align: center;
  color: var(--maroon);
  font-family: "Marcellus", serif;
}

.tl-count-num {
  display: block;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--gold-dark);
  text-shadow: 0 1px 3px rgba(106,16,32,0.18);
}

.tl-count-label {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--royal-blue);
  text-transform: uppercase;
}

/* ── Scroll progress bar ── */
.tl-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--saffron), var(--gold), var(--maroon));
  width: 0%;
  z-index: 9999;
  transition: width 0.1s linear;
  box-shadow: 0 0 6px rgba(201,164,73,0.6);
}

/* ── Reveal (scroll-in) ── */
.tl-item.reveal {
  opacity: 0;
  transform: translateX(-22px);
  transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.34,1.2,0.64,1);
}

.tl-item.reveal.visible {
  opacity: 1;
  transform: translateX(0);
}

/* stagger delays */
.tl-item:nth-child(1)  { transition-delay: 0.05s; }
.tl-item:nth-child(2)  { transition-delay: 0.12s; }
.tl-item:nth-child(3)  { transition-delay: 0.19s; }
.tl-item:nth-child(4)  { transition-delay: 0.26s; }
.tl-item:nth-child(5)  { transition-delay: 0.33s; }
.tl-item:nth-child(6)  { transition-delay: 0.40s; }
.tl-item:nth-child(7)  { transition-delay: 0.47s; }
.tl-item:nth-child(8)  { transition-delay: 0.54s; }
.tl-item:nth-child(9)  { transition-delay: 0.61s; }
.tl-item:nth-child(10) { transition-delay: 0.68s; }

/* ── Responsive ── */
@media (max-width: 500px) {
  .tl-path::before { left: 20px; width: 3px; }
  .tl-item { padding-left: 8px; }
  .tl-item::before { left: 18px; }
  .tl-tabs { max-width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .tl-hero-inner,
  .tl-arch,
  .tl-node,
  .tl-path::before,
  .tl-card--finale,
  .tl-sticker,
  .tl-tab,
  .tl-item,
  .tl-item::before,
  .tl-day-header::before,
  .tl-day-header::after { animation: none !important; transition: none !important; }
}
