/* Camply - Main Website Styles */

/* ===== ROOT VARIABLES ===== */
:root {
  /* Primary Colors - Forest Green Palette */
  --forest-green-primary: #2D5016;
  --forest-green-light: #4A7C59;
  --forest-green-dark: #1A3009;
  
  /* Secondary Colors */
  --earth-brown: #8B4513;
  --sunset-orange: #FF8C42;
  --sky-blue: #87CEEB;
  
  /* Neutral Colors */
  --off-white: #F8F6F0;
  --light-gray: #E8E6E1;
  --medium-gray: #9B9B9B;
  --dark-gray: #2C2C2C;
  --pure-black: #000000;
  
  /* Status Colors */
  --success-green: #28A745;
  --warning-orange: #FFC107;
  --error-red: #DC3545;
  --info-blue: #17A2B8;
  
  /* Legacy mappings for compatibility */
  --primary-color: var(--forest-green-primary);
  --secondary-color: var(--forest-green-light);
  --warning-color: var(--sunset-orange);
  --danger-color: var(--error-red);
  --dark-color: var(--dark-gray);
  --light-color: var(--off-white);
  --text-muted: var(--medium-gray);
  
  /* Spacing System */
  --space-xxs: 4px;
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-xxl: 48px;
  
  /* Border Radius */
  --radius-small: 4px;
  --radius-medium: 8px;
  --radius-large: 12px;
  --border-radius: var(--radius-medium);
  
  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
  --box-shadow: var(--shadow-sm);
  
  /* Transitions */
  --transition: all 0.3s ease;
  --transition-fast: all 0.2s ease;
}

/* ===== GLOBAL STYLES ===== */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--dark-gray);
  background-color: var(--off-white);
}

/* Typography Scale */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  color: var(--dark-gray);
  line-height: 1.2;
}

.display-4 {
  font-size: 2.5rem;
  font-weight: 700;
}

.display-5 {
  font-size: 2rem;
  font-weight: 600;
}

.lead {
  font-size: 1.125rem;
  font-weight: 400;
}

/* Smooth scrolling for anchor links */
html {
  scroll-behavior: smooth;
}

/* ===== NAVIGATION ===== */
.navbar {
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  background-color: var(--forest-green-primary) !important;
  border-bottom: 1px solid var(--forest-green-light);
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 700;
  transition: var(--transition);
  color: white !important;
}

.navbar-brand:hover {
  transform: scale(1.05);
  color: var(--off-white) !important;
}

.navbar-nav .nav-link {
  font-weight: 500;
  margin: 0 var(--space-sm);
  transition: var(--transition);
  position: relative;
  color: var(--off-white) !important;
}

.navbar-nav .nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 50%;
  background-color: var(--sunset-orange);
  transition: var(--transition);
  transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
  width: 100%;
}

.navbar-nav .nav-link:hover {
  color: white !important;
}

/* ===== HERO SECTION ===== */
.hero-section {
  background: linear-gradient(135deg, var(--forest-green-primary) 0%, var(--forest-green-light) 50%, var(--earth-brown) 100%);
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 120 120"><defs><pattern id="forest-pattern" width="60" height="60" patternUnits="userSpaceOnUse"><g fill="white" opacity="0.08"><path d="M15,45 L12,50 L18,50 Z"/><path d="M45,25 L42,30 L48,30 Z"/><circle cx="8" cy="35" r="1.5"/><circle cx="35" cy="15" r="1"/><circle cx="52" cy="45" r="1.2"/><path d="M25,15 Q27,12 29,15 Q27,18 25,15"/><path d="M10,20 Q12,17 14,20 Q12,23 10,20"/><path d="M40,40 Q42,37 44,40 Q42,43 40,40"/><ellipse cx="20" cy="25" rx="2" ry="1" opacity="0.06"/><ellipse cx="50" cy="35" rx="1.5" ry="0.8" opacity="0.06"/></g></pattern></defs><rect width="120" height="120" fill="url(%23forest-pattern)"/></svg>');
  opacity: 0.4;
}

.hero-section::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(180deg, transparent 0%, var(--off-white) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: var(--space-xl) 0;
}

.hero-content h1 {
  animation: fadeInUp 1s ease-out;
  color: white;
  margin-bottom: var(--space-lg);
}

.hero-content p {
  animation: fadeInUp 1s ease-out 0.2s both;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: var(--space-xl);
}

.hero-buttons {
  animation: fadeInUp 1s ease-out 0.4s both;
}

.hero-image img {
  max-width: 100%;
  height: auto;
  animation: float 3s ease-in-out infinite;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.2));
}

.hero-graphic {
  animation: float 3s ease-in-out infinite;
}

.camping-scene {
  padding: var(--space-xxl);
  position: relative;
}

.camping-scene i {
  display: inline-block;
  transition: var(--transition);
}

/* ===== FEATURE CARDS ===== */
.feature-card {
  background: white;
  padding: var(--space-xl);
  border-radius: var(--radius-large);
  box-shadow: var(--shadow-sm);
  text-align: center;
  transition: var(--transition);
  border: 1px solid var(--light-gray);
  height: 100%;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--forest-green-primary), var(--forest-green-light));
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-md);
  border-color: var(--forest-green-light);
}

.feature-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--space-lg);
  background: linear-gradient(135deg, var(--forest-green-primary), var(--forest-green-light));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: white;
  position: relative;
}

.feature-icon::after {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--forest-green-light), var(--forest-green-primary));
  z-index: -1;
}

.feature-card h4 {
  color: var(--dark-gray);
  margin-bottom: var(--space-md);
  font-weight: 600;
  font-size: 1.25rem;
}

.feature-card p {
  color: var(--medium-gray);
  margin-bottom: 0;
  line-height: 1.6;
}

/* ===== BUTTONS ===== */
.btn {
  border-radius: var(--radius-medium);
  font-weight: 600;
  padding: var(--space-sm) var(--space-xl);
  transition: var(--transition);
  border: none;
  text-decoration: none;
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}

.btn-warning {
  background: linear-gradient(135deg, var(--sunset-orange), #ff9a5b);
  color: white;
  border: none;
}

.btn-warning:hover {
  background: linear-gradient(135deg, #ff7b2e, var(--sunset-orange));
  color: white;
}

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

.btn-outline-light:hover {
  background: white;
  color: var(--forest-green-primary);
  border-color: white;
}

.btn-primary {
  background: linear-gradient(135deg, var(--forest-green-primary), var(--forest-green-light));
  color: white;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--forest-green-dark), var(--forest-green-primary));
  color: white;
}

.btn-success {
  background: linear-gradient(135deg, var(--success-green), #20c997);
  color: white;
}

.btn-dark {
  background: linear-gradient(135deg, var(--dark-gray), #495057);
  color: white;
}

.btn-lg {
  padding: var(--space-md) var(--space-xxl);
  font-size: 1.125rem;
  min-height: 56px;
}

/* ===== DOWNLOAD BUTTONS ===== */
.download-buttons .btn {
  min-width: 200px;
  font-size: 1rem;
}

/* ===== SECTIONS ===== */
section {
  padding: var(--space-xxl) 0;
}

section:nth-child(even) {
  background-color: var(--off-white);
}

.bg-light {
  background-color: var(--light-gray) !important;
}

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

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

/* Scroll animations */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  .display-4 {
    font-size: 2rem;
  }
  
  .display-5 {
    font-size: 1.75rem;
  }
  
  .hero-content {
    padding: var(--space-lg) 0;
    text-align: center;
  }
  
  .hero-buttons {
    flex-direction: column;
    gap: var(--space-md);
  }
  
  .hero-buttons .btn {
    width: 100%;
  }
  
  .feature-card {
    margin-bottom: var(--space-lg);
  }
  
  section {
    padding: var(--space-xl) 0;
  }
}

/* ===== FOOTER ===== */
footer {
  background: var(--forest-green-dark);
  color: var(--off-white);
}

.footer-brand {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
  color: white;
}

.footer-links a {
  text-decoration: none;
  transition: var(--transition);
  color: var(--off-white);
}

.footer-links a:hover {
  color: var(--sunset-orange) !important;
  transform: translateX(4px);
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--forest-green-primary);
  color: white;
  border-radius: 50%;
  text-decoration: none;
  transition: var(--transition);
  margin-right: var(--space-sm);
}

.footer-social a:hover {
  background: var(--sunset-orange);
  transform: translateY(-2px);
}

/* ===== CONTACT SECTION ===== */
.contact-info a {
  text-decoration: none;
  transition: var(--transition);
  color: white;
}

.contact-info a:hover {
  color: var(--sunset-orange);
  transform: translateX(4px);
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border-radius: 50%;
  text-decoration: none;
  transition: var(--transition);
  margin: 0 var(--space-sm);
}

.social-links a:hover {
  background: var(--sunset-orange);
  transform: translateY(-3px);
  color: white;
}

/* ===== UTILITY CLASSES ===== */
.text-forest-green {
  color: var(--forest-green-primary) !important;
}

.text-sunset-orange {
  color: var(--sunset-orange) !important;
}

.bg-forest-green {
  background-color: var(--forest-green-primary) !important;
}

.bg-earth-brown {
  background-color: var(--earth-brown) !important;
}

.border-forest-green {
  border-color: var(--forest-green-primary) !important;
}

/* ===== DOWNLOAD BUTTONS ===== */
.download-buttons {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  justify-content: center;
}

.download-buttons .btn {
  min-width: 200px;
  font-size: 1rem;
  background: var(--forest-green-primary);
  border: 2px solid var(--forest-green-primary);
  color: white;
}

.download-buttons .btn:hover {
  background: var(--forest-green-light);
  border-color: var(--forest-green-light);
  color: white;
}

.download-buttons .btn i {
  font-size: 1.25rem;
}

/* ===== APP SHOWCASE ===== */
.app-showcase {
  position: relative;
  height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.phone-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 500px;
  animation: float 3s ease-in-out infinite;
}

.carousel {
  max-width: 300px;
  z-index: 2;
  border-radius: 45px !important;
  overflow: hidden;
}

.phone-frame {
  background: linear-gradient(145deg, #2D5016, #4A7C59);
  padding: 20px 15px 25px 15px;
  border-radius: 45px !important;
  box-shadow: 
    0 20px 40px rgba(45, 80, 22, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
}

.phone-frame::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
}

.phone-screen {
  width: 250px;
  height: auto;
  border-radius: 25px !important;
  display: block;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  object-fit: cover;
  clip-path: inset(0 round 25px);
}

/* Carousel Custom Styling */
.carousel-indicators {
  bottom: -40px;
}

.carousel-indicators button {
  background-color: var(--forest-green-primary);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin: 0 6px;
}

.carousel-indicators button.active {
  background-color: var(--sunset-orange);
}

.carousel-control-prev,
.carousel-control-next {
  width: 40px;
  height: 40px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(45, 80, 22, 0.8);
  border-radius: 50%;
  margin: 0 -60px;
  opacity: 0.8;
  transition: var(--transition);
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
  opacity: 1;
  background: var(--forest-green-primary);
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
  width: 20px;
  height: 20px;
}

.floating-elements {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
}

.floating-icon {
  position: absolute;
  width: 40px;
  height: 40px;
  background: rgba(255, 140, 66, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  box-shadow: 0 8px 16px rgba(255, 140, 66, 0.3);
}

.float-1 {
  top: 10%;
  left: 10%;
  animation: floatIcon 4s ease-in-out infinite;
}

.float-2 {
  top: 20%;
  right: 15%;
  animation: floatIcon 4s ease-in-out infinite 1s;
}

.float-3 {
  bottom: 25%;
  left: 5%;
  animation: floatIcon 4s ease-in-out infinite 2s;
}

.float-4 {
  bottom: 15%;
  right: 10%;
  animation: floatIcon 4s ease-in-out infinite 3s;
}

@keyframes floatIcon {
  0%, 100% {
    transform: translateY(0px) scale(1);
  }
  50% {
    transform: translateY(-15px) scale(1.1);
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .app-showcase {
    height: 400px;
  }
  
  .phone-screen {
    width: 200px;
  }
  
  .phone-container {
    height: 400px;
  }
  
  .carousel-control-prev,
  .carousel-control-next {
    margin: 0 -50px;
    width: 35px;
    height: 35px;
  }
  
  .floating-icon {
    width: 30px;
    height: 30px;
    font-size: 14px;
  }
}

.social-links a {
  display: inline-block;
  transition: var(--transition);
}

.social-links a:hover {
  transform: scale(1.2);
  color: var(--warning-color) !important;
}

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

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  .hero-content h1 {
    font-size: 2.5rem;
  }
  
  .hero-buttons .btn {
    display: block;
    width: 100%;
    margin-bottom: 1rem;
  }
  
  .feature-card {
    margin-bottom: 2rem;
  }
  
  .download-buttons .btn {
    display: block;
    width: 100%;
    margin-bottom: 1rem;
  }
}

@media (max-width: 576px) {
  section {
    padding: 3rem 0;
  }
  
  .hero-content {
    text-align: center;
  }
  
  .navbar-brand {
    font-size: 1.25rem;
  }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== UTILITY CLASSES ===== */
.text-primary {
  color: var(--primary-color) !important;
}

.text-secondary {
  color: var(--secondary-color) !important;
}

.text-warning {
  color: var(--warning-color) !important;
}

.bg-primary {
  background: linear-gradient(135deg, var(--primary-color), #0056b3) !important;
}

.bg-gradient {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) !important;
}

/* ===== SCROLLBAR STYLING ===== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--secondary-color);
}

/* ===== LOADING STATES ===== */
.loading {
  opacity: 0.7;
  pointer-events: none;
}

.spinner {
  border: 2px solid #f3f3f3;
  border-top: 2px solid var(--primary-color);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
  display: inline-block;
  margin-right: 0.5rem;
}

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