/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #2e7d32; /* Forest Green - representing nature and trails */
  --secondary-color: #795548; /* Brown - representing dirt and earth */
  --accent-color: #ffa000; /* Amber - representing adventure spirit */
  --text-color: #333;
  --light-bg: #f5f5f5;
  --dark-bg: #1a1a1a;
  --trail-color: #4caf50; /* Light Green - for trail lines */
  --mountain-color: #607d8b; /* Blue Grey - for mountain elements */
}

body {
  font-family: "Roboto", sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--light-bg);
}

/* Navigation */
.navbar {
  background: rgba(26, 26, 26, 0.95);
  padding: 1rem 2rem;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  border-bottom: 3px solid var(--accent-color);
}

.logo h1 {
  color: var(--accent-color);
  font-size: 1.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  position: relative;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background-color: var(--accent-color);
  transition: all 0.3s;
  transform: translateX(-50%);
}

.nav-links a:hover::after {
  width: 100%;
}

.mobile-menu {
  display: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0.5rem;
}

/* Hero Section */
.hero {
  height: 100vh;
  background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
    url("assets/images/hero-bg.jpg") center/cover;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  padding: 0 1rem;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    45deg,
    rgba(46, 125, 50, 0.2),
    rgba(255, 160, 0, 0.2)
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero-content h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  color: var(--accent-color);
}

.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.cta-button {
  display: inline-block;
  padding: 1rem 2rem;
  background-color: var(--primary-color);
  color: white;
  text-decoration: none;
  border-radius: 5px;
  font-weight: 600;
  transition: all 0.3s;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: 2px solid transparent;
}

.cta-button:hover {
  background-color: transparent;
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.cta-button.secondary {
  background-color: var(--accent-color);
  margin-left: 1rem;
}

.cta-button.secondary:hover {
  background-color: transparent;
  border-color: var(--accent-color);
  color: var(--accent-color);
}

/* Routes Section */
.routes-section {
  padding: 5rem 2rem;
  background-color: white;
  position: relative;
}

.routes-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(
    to right,
    var(--primary-color),
    var(--accent-color)
  );
}

.routes-section h2 {
  text-align: center;
  color: var(--secondary-color);
  font-size: 2.5rem;
  margin-bottom: 3rem;
  position: relative;
  display: inline-block;
}

.routes-section h2::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background-color: var(--accent-color);
}

.routes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* Map Section */
.map-section {
  padding: 5rem 2rem;
  background-color: var(--light-bg);
  position: relative;
}

.map-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(
    to right,
    var(--accent-color),
    var(--primary-color)
  );
}

.map-section h2 {
  text-align: center;
  color: var(--secondary-color);
  font-size: 2.5rem;
  margin-bottom: 3rem;
  position: relative;
  display: inline-block;
}

.map-section h2::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background-color: var(--accent-color);
}

#map {
  height: 500px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  border: 1px solid #eee;
  overflow: hidden;
}

/* Footer */
footer {
  background-color: var(--dark-bg);
  color: white;
  padding: 3rem 2rem 1rem;
  position: relative;
}

footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(
    to right,
    var(--primary-color),
    var(--accent-color)
  );
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.footer-section h3 {
  color: var(--accent-color);
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}

.footer-section h3::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 30px;
  height: 2px;
  background-color: var(--accent-color);
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section a {
  color: white;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-section a:hover {
  color: var(--accent-color);
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-links a {
  color: white;
  font-size: 1.5rem;
  transition: all 0.3s;
  padding: 0.5rem;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
}

.social-links a:hover {
  color: var(--accent-color);
  background-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.footer-bottom {
  text-align: center;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(26, 26, 26, 0.95);
    flex-direction: column;
    padding: 1rem;
    gap: 1rem;
  }

  .nav-links.active {
    display: flex;
  }

  .mobile-menu {
    display: block;
  }

  .nav-links a {
    display: block;
    padding: 0.8rem;
    text-align: center;
  }

  .hero-content h1 {
    font-size: 2.5rem;
  }

  .route-actions {
    flex-direction: column;
  }

  .view-route,
  .download-gpx {
    width: 100%;
  }
}

/* Utility Classes */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.text-center {
  text-align: center;
}

.mb-1 {
  margin-bottom: 1rem;
}
.mb-2 {
  margin-bottom: 2rem;
}
.mb-3 {
  margin-bottom: 3rem;
}

/* Route Card Styles */
.route-card {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s;
  border: 1px solid #eee;
  position: relative;
}

.route-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background-color: var(--primary-color);
  opacity: 0;
  transition: opacity 0.3s;
}

.route-card:hover {
  transform: translateY(-5px);
}

.route-card:hover::before {
  opacity: 1;
}

.route-card h3 {
  color: var(--secondary-color);
  padding: 1.5rem;
  margin: 0;
  font-size: 1.4rem;
  border-bottom: 1px solid #eee;
}

.route-card p {
  padding: 1.5rem;
  color: #666;
  margin: 0;
  line-height: 1.6;
}

.route-actions {
  padding: 1.5rem;
  display: flex;
  gap: 1rem;
  border-top: 1px solid #eee;
  background: var(--light-bg);
}

.view-route,
.download-gpx {
  flex: 1;
  padding: 0.8rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.view-route {
  background-color: var(--primary-color);
  color: white;
}

.download-gpx {
  background-color: var(--secondary-color);
  color: white;
}

.view-route:hover,
.download-gpx:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Error and Success Messages */
.error-message,
.success-message {
  background-color: white;
  padding: 1rem 2rem;
  border-radius: 5px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 1rem;
  z-index: 1000;
}

.error-message {
  border-left: 4px solid #c62828;
  color: #c62828;
}

.success-message {
  border-left: 4px solid #2e7d32;
  color: #2e7d32;
}

.close-error,
.close-success {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: inherit;
  opacity: 0.7;
  transition: opacity 0.3s;
}

.close-error:hover,
.close-success:hover {
  opacity: 1;
}
