/* Modern Dark Theme CSS */
:root {
  --primary-bg: #0a0a0a;
  --secondary-bg: #1a1a1a;
  --card-bg: #2a2a2a;
  --text-primary: #ffffff;
  --text-secondary: #b0b0b0;
  --text-muted: #808080;
  --accent: #00d4ff;
  --accent-hover: #00b8e6;
  --border: #404040;
  --shadow: rgba(0, 0, 0, 0.5);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--primary-bg);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Header Styles */
header {
  background: var(--secondary-bg);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  height: 50px;
  width: auto;
}

.header-content {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.header-content h1 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
}

nav {
  display: flex;
  gap: 2rem;
}

nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
}

nav a:hover {
  color: var(--accent);
}

nav a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

nav a:hover::after {
  width: 100%;
}

/* Main Content */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 4rem 0;
  background: linear-gradient(135deg, var(--secondary-bg) 0%, var(--card-bg) 100%);
  border-radius: 20px;
  margin-bottom: 3rem;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Trip Post Specific Styles */
.trip-post .hero {
  text-align: left;
  padding: 2rem 0;
}

.trip-post .hero h1 {
  font-size: 2.5rem;
  background: var(--text-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.trip-cover {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: 12px;
}

/* Trip Detail Styles */
.trip-header {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  padding: 3rem 0;
}

.trip-header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.trip-meta-top {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.trip-stats {
  display: flex;
  gap: 2rem;
  margin-top: 1.5rem;
}

.stat-item {
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--accent);
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.trip-header-image img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 8px 32px var(--shadow);
}

/* Route & Map Styles */
.route-map-container {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  margin-top: 1rem;
}

.map-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.map-placeholder {
  background: var(--card-bg);
  border: 2px dashed var(--border);
  border-radius: 12px;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 1.1rem;
  transition: all 0.3s ease;
}

.map-placeholder:hover {
  border-color: var(--accent);
  background: var(--secondary-bg);
}

.map-placeholder.embedded {
  border: none;
  background: none;
  padding: 0;
}

.map-placeholder iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 12px;
}

.map-controls {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.map-controls .btn {
  flex: 1;
  min-width: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
}

.route-info {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  height: fit-content;
}

.route-info h3 {
  margin-bottom: 1rem;
  color: var(--text-primary);
  font-size: 1.2rem;
}

.route-details {
  color: var(--text-secondary);
  line-height: 1.6;
}

.route-details .route-point {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.route-details .route-point:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.route-point .point-icon {
  background: var(--accent);
  color: var(--primary-bg);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.route-point .point-info h4 {
  margin: 0 0 0.25rem 0;
  color: var(--text-primary);
  font-size: 1rem;
}

.route-point .point-info p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Responsive adjustments for Route & Map */
@media (max-width: 768px) {
  .route-map-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .map-controls {
    flex-direction: column;
  }
  
  .map-controls .btn {
    min-width: auto;
  }
  
  .trip-header-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }
  
  .trip-stats {
    justify-content: center;
  }
}

/* Trip Highlights */
.highlights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.highlight-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--card-bg);
  border-radius: 12px;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.highlight-item:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.highlight-icon {
  font-size: 1.5rem;
  color: var(--accent);
}

.highlight-item span {
  color: var(--text-primary);
  font-weight: 500;
}

/* Trip Story */
.trip-story {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 2rem;
  border: 1px solid var(--border);
}

.story-content p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

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

/* Related Trips */
.related-trips {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

/* Buttons */
.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--primary-bg);
  padding: 12px 24px;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.btn:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px var(--shadow);
}

.btn-secondary {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}

.btn-secondary:hover {
  background: var(--accent);
  color: var(--primary-bg);
}

/* Filter Buttons */
.filter-btn {
  background: transparent;
  color: var(--text-secondary);
  border: 2px solid var(--border);
  transition: all 0.3s ease;
}

.filter-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.filter-btn.active {
  background: var(--accent);
  color: var(--primary-bg);
  border-color: var(--accent);
}

/* Cards */
.card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 1.5rem;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px var(--shadow);
  border-color: var(--accent);
}

.card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 1rem;
}

.card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.card p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.card-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

/* Utility Classes */
.text-center {
  text-align: center;
}

/* Grid Layouts */
.grid {
  display: grid;
  gap: 2rem;
  margin-bottom: 3rem;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* Sections */
.section {
  margin-bottom: 4rem;
}

.section h2 {
  font-size: 2.5rem;
  margin-bottom: 2rem;
  color: var(--text-primary);
  position: relative;
}

.section h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 60px;
  height: 4px;
  background: var(--accent);
  border-radius: 2px;
}

/* Trip Cards */
.trip-card {
  background: var(--card-bg);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
  cursor: pointer;
}

.trip-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px var(--shadow);
  border-color: var(--accent);
}

.trip-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.trip-card-content {
  padding: 1.5rem;
}

.trip-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.trip-card p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.trip-card .btn {
  width: 100%;
  text-align: center;
}

/* Category Badge */
.category-badge {
  display: inline-block;
  background: var(--accent);
  color: var(--primary-bg);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
}

/* Trip Card Meta Improvements */
.trip-card .card-meta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.trip-card .card-meta span:first-child {
  color: var(--accent);
  font-weight: 500;
}

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

.gallery-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 1;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.gallery-item:hover {
  transform: scale(1.05);
}

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

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-overlay h3 {
  color: white;
  text-align: center;
}

/* Lightbox */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 2rem;
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  text-align: center;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 12px;
  margin-bottom: 1rem;
}

.lightbox-caption {
  color: white;
  text-align: center;
}

.lightbox-caption h3 {
  margin-bottom: 0.5rem;
  font-size: 1.5rem;
}

.lightbox-caption p {
  color: #b0b0b0;
  font-size: 1rem;
}

.close-lightbox {
  position: absolute;
  top: -40px;
  right: 0;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.3s ease;
}

.close-lightbox:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Footer */
footer {
  background: var(--secondary-bg);
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  text-align: center;
  margin-top: 4rem;
}

footer p {
  color: var(--text-muted);
}

/* Responsive Design */
@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    gap: 1rem;
    padding: 0 1rem;
  }
  
  .header-content {
    flex-direction: column;
    gap: 1rem;
  }
  
  nav {
    gap: 1rem;
  }
  
  main {
    padding: 1rem;
  }
  
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .trip-post .hero h1 {
    font-size: 2rem;
  }
  
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
  
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
  
  .lightbox {
    padding: 1rem;
  }
  
  .lightbox-content img {
    max-height: 50vh;
  }
  
  .lightbox-caption h3 {
    font-size: 1.2rem;
  }
  
  .trip-cover {
    height: 250px;
  }

  /* Responsive Design for Trip Detail */
  .trip-header-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 0 1rem;
  }
  
  .trip-header-text h1 {
    font-size: 2.5rem;
  }
  
  .trip-stats {
    gap: 1rem;
  }
  
  .stat-value {
    font-size: 1.5rem;
  }
  
  .highlights-grid {
    grid-template-columns: 1fr;
  }
  
  .related-trips {
    grid-template-columns: 1fr;
  }
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

/* Loading States */
.loading {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
}

.loading::after {
  content: '';
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-radius: 50%;
  border-top-color: var(--accent);
  animation: spin 1s ease-in-out infinite;
  margin-left: 10px;
}

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