/* Best Hike Day - Main Stylesheet */

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

:root {
  --primary-green: #16a34a;
  --primary-dark: #15803d;
  --accent-yellow: #fbbf24;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6;
  color: var(--gray-800);
  background: white;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  line-height: 1.2;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
header {
  background: var(--primary-green);
  color: white;
  padding: 1rem 1.5rem;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: white;
  font-size: 1.25rem;
  font-weight: 700;
}

.logo img {
  height: 2rem;
}

nav {
  display: flex;
  gap: 2rem;
  align-items: center;
}

nav a {
  color: white;
  text-decoration: none;
  transition: opacity 0.2s;
}

nav a:hover {
  opacity: 0.8;
}

/* Hero Section */
.hero {
  background-image: url('../images/hero-hiking.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  position: relative;
  margin-top: 4rem;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  padding: 2rem;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  line-height: 1.8;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.875rem 2rem;
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.btn-primary {
  background: var(--accent-yellow);
  color: var(--gray-900);
}

.btn-primary:hover {
  background: #f59e0b;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(251, 191, 36, 0.4);
}

.btn-outline {
  background: transparent;
  color: white;
  border: 2px solid white;
}

.btn-outline:hover {
  background: white;
  color: var(--gray-900);
}

.btn-green {
  background: var(--primary-green);
  color: white;
}

.btn-green:hover {
  background: var(--primary-dark);
}

/* App Badges */
.app-badges {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
}

.app-badges img {
  height: 50px;
  cursor: pointer;
  transition: transform 0.2s;
}

.app-badges img:hover {
  transform: scale(1.05);
}

/* Sections */
section {
  padding: 5rem 0;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--gray-900);
}

.section-subtitle {
  text-align: center;
  color: var(--gray-600);
  font-size: 1.125rem;
  max-width: 700px;
  margin: 0 auto 3rem;
}

.divider {
  width: 6rem;
  height: 4px;
  background: var(--accent-yellow);
  margin: 0 auto 3rem;
}

/* Feature Cards */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.feature-card {
  background: white;
  padding: 2rem;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.feature-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--primary-green);
}

.feature-card p {
  color: var(--gray-600);
  line-height: 1.8;
}

/* Dark Section */
.dark-section {
  background: var(--gray-900);
  color: white;
}

.dark-section .section-title {
  color: var(--primary-green);
}

.dark-section p {
  color: var(--gray-300);
}

/* Percentage Circle */
.percentage-circle {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: var(--primary-green);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 2rem;
  box-shadow: 0 8px 24px rgba(22, 163, 74, 0.3);
}

.percentage-circle .number {
  font-size: 4rem;
  font-weight: 700;
  color: white;
}

/* Footer */
footer {
  background: var(--gray-900);
  color: var(--gray-400);
  text-align: center;
  padding: 2rem 0;
}

/* Weather Page Styles */
.weather-container {
  min-height: 100vh;
  background: var(--gray-50);
  padding-top: 6rem;
  padding-bottom: 3rem;
}

.search-form {
  max-width: 800px;
  margin: 0 auto 3rem;
}

.search-box {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.search-input {
  flex: 1;
  padding: 0.875rem 1rem;
  font-size: 1rem;
  border: 2px solid var(--gray-300);
  border-radius: 0.5rem;
  outline: none;
}

.search-input:focus {
  border-color: var(--primary-green);
}

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

.weather-card.excellent {
  background: var(--primary-green);
  color: white;
}

.weather-card.good {
  background: #dcfce7;
  border: 2px solid #86efac;
}

.weather-card.fair {
  background: #fef3c7;
  border: 2px solid #fde047;
}

.weather-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 1rem;
}

.weather-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.metric {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Trail Cards */
.trails-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.trail-card {
  background: white;
  padding: 1.5rem;
  border-radius: 0.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s;
}

.trail-card:hover {
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.trail-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 0.75rem;
}

.trail-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin: 0.75rem 0;
  font-size: 0.875rem;
}

.difficulty-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 600;
}

.difficulty-easy {
  background: #dcfce7;
  color: #166534;
}

.difficulty-moderate {
  background: #fef3c7;
  color: #854d0e;
}

.difficulty-hard {
  background: #fee2e2;
  color: #991b1b;
}

/* Map Container */
#map {
  width: 100%;
  height: 400px;
  border-radius: 0.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Loading State */
.loading {
  text-align: center;
  padding: 3rem;
  color: var(--gray-600);
}

.spinner {
  border: 4px solid var(--gray-200);
  border-top: 4px solid var(--primary-green);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--gray-600);
}

.empty-state-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

/* Responsive */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  nav {
    gap: 1rem;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  .weather-metrics {
    grid-template-columns: 1fr;
  }
  
  .trails-grid {
    grid-template-columns: 1fr;
  }
}

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

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-2 { margin-top: 1rem; }
.mt-4 { margin-top: 2rem; }

.hidden {
  display: none;
}

.flex {
  display: flex;
}

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.gap-2 {
  gap: 1rem;
}
