/* ===== BASE STYLES ===== */
body {
  margin: 0;
  font-family: 'Open Sans', sans-serif;
  background:
    linear-gradient(rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.15)),
    url('../assets/images/Shivaji.png') no-repeat center center fixed;
  background-size: cover;
  color: #e6edf3;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===== HEADER STYLES ===== */
header {
  background-color: #000;
  padding: 15px 0 0 0;
}

.topbar {
  display: flex;
  justify-content: center;
  padding: 10px 40px;
}

.menu {
  display: flex;
  gap: 32px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.menu li a {
  font-family: 'Exile', system-ui;
  text-decoration: none;
  color: #c9d1d9;
  font-size: 14px;
  letter-spacing: 1px;
  transition: color 0.3s;
}

.menu li a:hover {
  color: #58a6ff;
}

.header-divider {
  height: 1px;
  background: #30363d;
  margin-top: 15px;
}

/* ===== MAIN CONTENT STYLES ===== */
.historical-container {
  display: flex;
  min-height: calc(100vh - 76px);
  padding: 0 0 0 170px;
  align-items: center;
  box-sizing: border-box;
  position: relative;
}

.historical-title {
  font-family: 'Playwrite HU', cursive;
  max-width: 500px;
  margin-top: 350px;
  margin-left: 30px;
  color: #fff;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
}

.historical-title h1 {
  font-size: 3.8rem;
  font-weight: 350;
  margin: 0;
  line-height: 1;
  letter-spacing: -1px;
  white-space: nowrap;
}

.timeline-container {
  display: flex;
  align-items: center;
  margin: 20px 0;
  gap: 10px;
}

.timeline {
  font-family: "Teko", sans-serif;
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: 1px;
  line-height: 1;
}

.timeline-description {
  font-family: "Teko", sans-serif;
  font-size: 1rem;
  font-weight: 300;
  letter-spacing: 0.5px;
  opacity: 0.8;
  margin-top: 2px;
  text-transform: uppercase;
}

.subtitle {
  font-size: 1.2rem;
  font-weight: 200;
  letter-spacing: 3px;
  margin-top: 30px;
  margin-left: 2px;
  white-space: nowrap;
  opacity: 0.7;
  font-family: 'Playwrite HU', cursive;
}

/* ===== VERTICAL IMAGE STYLES ===== */
.vertical-images {
  position: fixed;
  left: 50px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 18px;
  z-index: 2;
}

.v-image {
  width: 50px;
  height: 50px;
  background-color: #000;
  border: 2px solid #30363d;
  border-radius: 50%;
  position: relative;
  background-size: cover;
  background-position: center;
  transition: all 0.3s ease;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.v-image:hover {
  transform: scale(1.1);
  border-color: #58a6ff;
}

.v-image-label {
  position: absolute;
  left: 65px;
  top: 50%;
  transform: translateY(-50%);
  font-family: 'Teko', sans-serif;
  font-size: 16px;
  font-weight: 400;
  color: #e6edf3;
  padding: 5px 10px;
  background-color: rgba(0,0,0,0.7);
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  text-shadow: 0 0 5px rgba(0,0,0,0.9);
  line-height: 1.3;
  pointer-events: none;
}

.v-image:hover .v-image-label {
  opacity: 1;
  transform: translateY(-50%) translateX(5px);
}

/* Image placeholders */
.v-image:nth-child(1) { background-image: url('../assets/images/fort-1850.jpg'); }
.v-image:nth-child(2) { background-image: url('../assets/images/marine-drive-1940.jpg'); }
.v-image:nth-child(3) { background-image: url('../assets/images/dabbawalas-1930.jpg'); }
.v-image:nth-child(4) { background-image: url('../assets/images/gateway-1924.jpg'); }
.v-image:nth-child(5) { background-image: url('../assets/images/slider6.jpg'); }
.v-image:nth-child(6) { background-image: url('../assets/images/local-train-1970.jpg'); }

/* ===== SANSKRIT GLYPH TRAIL ===== */
.sanskrit-glyph {
  position: absolute;
  font-family: 'Teko', sans-serif;
  color: #FFFFFF;
  font-weight: 400;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.9;
  animation: glyphFade 1.5s ease-out forwards;
}

@keyframes glyphFade {
  0% {
    transform: translate(-50%, -50%) scale(0.8) translateY(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.3) translateY(-30px) rotate(15deg);
    opacity: 0;
  }
}

/* ===== TIMELINE SECTION STYLES ===== */
.timeline-section {
  padding: 80px 170px;
  background-color: rgba(0, 0, 0, 0.85);
  color: #e6edf3;
  position: relative;
  z-index: 10;
}

.timeline-content h2 {
  font-family: 'Playwrite HU', cursive;
  font-size: 3rem;
  margin-bottom: 50px;
  text-align: center;
  letter-spacing: 3px;
  color: #fff;
  text-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

.timeline-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.era-title {
  grid-column: 1 / -1;
  font-family: 'Teko', sans-serif;
  font-size: 2rem;
  font-weight: 500;
  margin-top: 60px;
  margin-bottom: 10px;
  color: #58a6ff;
  letter-spacing: 1px;
}

.era-divider {
  grid-column: 1 / -1;
  height: 2px;
  background: linear-gradient(90deg, transparent, #58a6ff, transparent);
  margin-bottom: 30px;
}

.timeline-year {
  font-family: 'Teko', sans-serif;
  font-size: 1.8rem;
  font-weight: 400;
  text-align: right;
  padding-right: 30px;
  position: relative;
  border-right: 2px solid #58a6ff;
  color: #fff;
}

.timeline-year::after {
  content: '';
  position: absolute;
  right: -7px;
  top: 10px;
  width: 12px;
  height: 12px;
  background: #58a6ff;
  border-radius: 50%;
}

.timeline-event {
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 1px dashed rgba(255,255,255,0.1);
}

.timeline-event h3 {
  font-family: 'Teko', sans-serif;
  font-size: 1.6rem;
  margin-top: 0;
  margin-bottom: 15px;
  letter-spacing: 1px;
  color: #fff;
}

.timeline-event p {
  font-family: 'Open Sans', sans-serif;
  line-height: 1.7;
  margin: 0;
  opacity: 0.9;
  font-size: 1rem;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .historical-container {
    padding-left: 100px;
  }
  
  .timeline-section {
    padding: 60px 50px;
  }
}

@media (max-width: 768px) {
  .historical-container {
    padding-left: 20px;
  }
  
  .vertical-images {
    left: 15px;
  }
  
  .historical-title h1 {
    font-size: 2.8rem;
  }
  
  .timeline-section {
    padding: 50px 20px;
  }
  
  .timeline-grid {
    grid-template-columns: 1fr;
  }
  
  .timeline-year {
    text-align: left;
    padding-left: 30px;
    border-left: 2px solid #58a6ff;
    border-right: none;
    padding-bottom: 10px;
  }
  
  .timeline-year::after {
    left: -7px;
    right: auto;
  }
  
  .timeline-event {
    padding-left: 20px;
    margin-bottom: 30px;
  }
}

/* ===== BACKGROUND TINT ===== */
.background-tint {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0);
  z-index: 5;
  transition: background-color 0.5s ease;
  pointer-events: none;
}
/* Updated Audio Narration Styles */
.audio-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-bottom: 30px;
  grid-column: 1 / -1;
}

#audioToggle {
  background: linear-gradient(145deg, #1a5fb4, #1e78e4);
  border: none;
  color: white;
  padding: 10px 20px;
  border-radius: 50px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease;
  font-family: 'Teko', sans-serif;
  font-size: 1.2rem;
  letter-spacing: 1px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

#audioToggle::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: 0.5s;
}

#audioToggle:hover::before {
  left: 100%;
}

#audioToggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

#audioToggle:active {
  transform: translateY(0);
}

.audio-icon {
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

#audioToggle.active .audio-icon {
  transform: scale(1.1);
}

.audio-status {
  font-size: 1rem;
  font-family: 'Teko', sans-serif;
  letter-spacing: 1px;
  background: rgba(0, 0, 0, 0.3);
  padding: 5px 10px;
  border-radius: 20px;
  transition: all 0.3s ease;
}

body.audio-active .audio-status {
  background: rgba(88, 166, 255, 0.3);
  color: #58a6ff;
}

/* Pulse animation for active state */
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(88, 166, 255, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(88, 166, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(88, 166, 255, 0); }
}

.audio-active-mode {
  animation: pulse 2s infinite;
}