/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background: #f5f5f5;
}

/* Header Styles */
.home-header {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.6) 0%, rgba(118, 75, 162, 0.6) 100%), url('images/header-bg.png');
  background-size: cover;
  background-position: center;
  color: white;
  padding: 3rem 1.5rem;
  text-align: center;
}

.home-header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.subtitle {
  font-size: 1.2rem;
  opacity: 0.9;
}

.location-header {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.6) 0%, rgba(118, 75, 162, 0.6) 100%), url('images/header-bg.png');
  background-size: cover;
  background-position: center;
  color: white;
  padding: 2rem 1.5rem;
}

.breadcrumb {
  margin-bottom: 1rem;
}

.breadcrumb a {
  color: white;
  text-decoration: none;
  opacity: 0.9;
  transition: opacity 0.3s;
}

.breadcrumb a:hover {
  opacity: 1;
}

.location-header h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.date-range {
  opacity: 0.9;
  font-size: 0.95rem;
}

/* Main Content */
.home-content,
.location-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.intro {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  margin-bottom: 2rem;
  font-size: 1.1rem;
  line-height: 1.8;
}

/* Route Map Section */
.route-map-section {
  margin: 2rem 0;
}

.route-map-section h2 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  color: #333;
  text-align: center;
}

.map-container {
  background: white;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  margin-bottom: 1rem;
}

.route-map {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}

.map-caption {
  text-align: center;
  color: #666;
  font-style: italic;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Locations List */
.locations-list h2 {
  margin-bottom: 1.5rem;
  color: #333;
  font-size: 1.8rem;
}

.locations {
  list-style: none;
  display: grid;
  gap: 1rem;
}

.location-item a {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  color: #333;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.location-item a:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.location-number {
  font-size: 2rem;
  font-weight: 700;
  color: #667eea;
  min-width: 50px;
  text-align: center;
}

.location-info h3 {
  font-size: 1.3rem;
  margin-bottom: 0.25rem;
  color: #333;
}

.location-info .date-range {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.story-count {
  color: #667eea;
  font-size: 0.9rem;
  font-weight: 500;
}

/* Story Styles */
.story {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  margin-bottom: 2rem;
}

.story h2 {
  color: #667eea;
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.story time {
  display: block;
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.story-content p {
  margin-bottom: 1rem;
  line-height: 1.8;
}

.story-content p:last-child {
  margin-bottom: 0;
}

/* Photo Gallery */
.photo-gallery {
  margin-top: 3rem;
}

.photo-gallery h2 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  color: #333;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

.gallery-item {
  display: block;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}

.gallery-item:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.gallery-item img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
}

/* Navigation */
.location-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 1.5rem;
  gap: 1rem;
}

.nav-btn {
  padding: 0.75rem 1.5rem;
  background: #667eea;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 500;
  transition: background 0.3s, transform 0.2s;
  white-space: nowrap;
}

.nav-btn:hover:not(.disabled) {
  background: #5568d3;
  transform: translateY(-1px);
}

.nav-btn.disabled {
  background: #ccc;
  cursor: not-allowed;
  opacity: 0.6;
}

.nav-btn.home {
  background: #764ba2;
}

.nav-btn.home:hover {
  background: #653a8a;
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem 1.5rem;
  color: #666;
  font-size: 0.9rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .home-header h1 {
    font-size: 2rem;
  }

  .subtitle {
    font-size: 1rem;
  }

  .location-header h1 {
    font-size: 1.5rem;
  }

  .location-item a {
    gap: 1rem;
    padding: 1rem;
  }

  .location-number {
    font-size: 1.5rem;
    min-width: 40px;
  }

  .location-info h3 {
    font-size: 1.1rem;
  }

  .story {
    padding: 1.5rem;
  }

  .story h2 {
    font-size: 1.5rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }

  .gallery-item img {
    height: 150px;
  }

  .location-nav {
    flex-wrap: wrap;
  }

  .nav-btn {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
  }

  .nav-btn.prev,
  .nav-btn.next {
    flex: 1;
    min-width: 100px;
  }
}

@media (max-width: 480px) {
  .home-header,
  .location-header {
    padding: 1.5rem 1rem;
  }

  .home-content,
  .location-content {
    padding: 1.5rem 1rem;
  }

  .intro {
    padding: 1.5rem;
    font-size: 1rem;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-item img {
    height: 200px;
  }
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.lightbox.active {
  display: flex;
}

#lightbox-img {
  max-width: 90%;
  max-height: 90vh;
  object-fit: contain;
  user-select: none;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  padding: 1rem;
  transition: background 0.3s;
  z-index: 10000;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.3);
}

.lightbox-close:disabled,
.lightbox-prev:disabled,
.lightbox-next:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.lightbox-close {
  top: 1rem;
  right: 1rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 2.5rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-prev {
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 80px;
  border-radius: 8px;
}

.lightbox-next {
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 80px;
  border-radius: 8px;
}

.lightbox-counter {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .lightbox-prev,
  .lightbox-next {
    width: 40px;
    height: 60px;
    font-size: 1.5rem;
  }

  .lightbox-prev {
    left: 0.5rem;
  }

  .lightbox-next {
    right: 0.5rem;
  }

  .lightbox-close {
    top: 0.5rem;
    right: 0.5rem;
    width: 40px;
    height: 40px;
    font-size: 2rem;
  }

  #lightbox-img {
    max-width: 95%;
    max-height: 85vh;
  }

  .lightbox-counter {
    bottom: 1rem;
    font-size: 0.8rem;
  }
}
