/* RouteCalc Website Styles - Matching App Design */

/* ===== Variables ===== */
:root {
  /* Colors from app (Hyper theme) */
  --primary-color: #313a46;      /* Dark blue-gray (navbar) */
  --accent-color: #727cf5;       /* Blue accent */
  --success-color: #0acf97;      /* Green */
  --danger-color: #fa5c7c;       /* Red */
  --warning-color: #ffbc00;      /* Yellow */
  --info-color: #39afd1;         /* Info blue */
  --text-dark: #6c757d;
  --text-light: #98a6ad;
  --bg-light: #fafbfe;
  --bg-white: #ffffff;
  --border-color: #dee2e6;
  
  /* Modern shadows - Fonoa-style layered depth */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.03);
  
  /* Modern gradients */
  --gradient-primary: linear-gradient(135deg, #313a46 0%, #404954 100%);
  --gradient-accent: linear-gradient(135deg, #727cf5 0%, #5b64d4 100%);
  --gradient-success: linear-gradient(135deg, #0acf97 0%, #09b885 100%);
  
  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-size-base: 15px;
  --line-height-base: 1.5;
  
  /* Spacing */
  --spacing-unit: 0.25rem;
  --section-padding: 0.5rem;
  --container-max-width: 1400px;
}

/* ===== Reset & Base ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: var(--font-size-base);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family);
  line-height: var(--line-height-base);
  color: var(--text-dark);
  background-color: var(--bg-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
  color: var(--primary-color);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.25rem;
  letter-spacing: -0.01em;
}

h1 { 
  font-size: 1.5rem; 
  font-weight: 800;
}
h2 { 
  font-size: 1.125rem; 
  font-weight: 700;
}
h3 { 
  font-size: 1rem; 
  font-weight: 600;
}
h4 { font-size: 0.9375rem; }
h5 { font-size: 0.875rem; }
h6 { font-size: 0.8125rem; }

p {
  margin-bottom: 0.5rem;
  color: var(--text-dark);
  line-height: 1.5;
}

p {
  margin-bottom: var(--spacing-unit);
  color: var(--text-dark);
}

a {
  color: var(--accent-color);
  text-decoration: none;
  transition: all 0.3s ease;
}

a:hover {
  color: #5b64d4;
}

/* ===== Layout ===== */
.container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 calc(var(--spacing-unit) * 2);
}

.section {
  padding: var(--section-padding) 0;
  position: relative;
}

.section-alt {
  background: linear-gradient(180deg, var(--bg-light) 0%, rgba(250, 251, 254, 0.5) 100%);
  border-top: 1px solid rgba(222, 226, 230, 0.4);
  border-bottom: 1px solid rgba(222, 226, 230, 0.4);
  position: relative;
}

.section-alt::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(114, 124, 245, 0.1), transparent);
}

/* ===== Navigation ===== */
.navbar {
  background: var(--gradient-primary);
  padding: 0.5rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1), 0 1px 3px rgba(0,0,0,0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

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

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #ffffff;
  font-size: 1.125rem;
  font-weight: 700;
  text-decoration: none;
}

.navbar-brand:hover {
  color: #ffffff;
  opacity: 0.9;
}

.navbar-logo-img {
  height: 36px;
  width: auto;
  display: block;
}

.navbar-menu {
  display: flex;
  align-items: center;
  gap: 1rem;
  list-style: none;
}

.navbar-menu a {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  font-size: 0.8125rem;
  padding: 0.25rem 0;
  transition: all 0.2s ease;
}

.navbar-menu a:hover {
  color: #ffffff;
}

.btn-app {
  background: var(--gradient-accent);
  color: #ffffff;
  padding: 1.25rem 4rem;
  border-radius: 1rem;
  font-weight: 600;
  font-size: 1.375rem;
  border: none;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 10px 32px rgba(114, 124, 245, 0.5), 0 5px 16px rgba(114, 124, 245, 0.4);
  position: relative;
  overflow: hidden;
}

.btn-app::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn-app:hover::before {
  opacity: 1;
}

.btn-app:hover {
  color: #ffffff;
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 14px 40px rgba(114, 124, 245, 0.55), 0 7px 20px rgba(114, 124, 245, 0.35);
}

/* ===== Hero Section ===== */
.hero {
  background: var(--gradient-primary);
  color: #ffffff;
  padding: 1.25rem 0;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1), 0 1px 3px rgba(0,0,0,0.08);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at top right, rgba(114, 124, 245, 0.1), transparent 50%);
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero h1 {
  color: #ffffff;
  font-size: 1.625rem;
  font-weight: 700;
  margin-bottom: 0.375rem;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.hero .subheadline {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.9);
  max-width: 750px;
  margin: 0 auto 0.625rem auto;
  line-height: 1.4;
}

.btn-primary {
  background: var(--gradient-success);
  color: #ffffff;
  padding: 0.875rem 2rem;
  border-radius: 0.625rem;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-block;
  box-shadow: 0 6px 20px rgba(10, 207, 151, 0.35), 0 3px 8px rgba(10, 207, 151, 0.25);
  letter-spacing: 0.01em;
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn-primary:hover::before {
  opacity: 1;
}

.btn-primary:hover {
  color: #ffffff;
  transform: translateY(-3px);
  box-shadow: 0 10px 32px rgba(10, 207, 151, 0.45), 0 5px 16px rgba(10, 207, 151, 0.3);
}

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

@media (min-width: 1200px) {
  .features-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

.feature-card {
  background: linear-gradient(135deg, rgba(250, 251, 254, 0.95) 0%, rgba(255, 255, 255, 0.98) 100%);
  padding: 0.75rem 1rem;
  border-radius: 0.625rem;
  border: 1px solid rgba(222, 226, 230, 0.5);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, 
    rgba(114, 124, 245, 0) 0%, 
    rgba(114, 124, 245, 0.6) 50%, 
    rgba(114, 124, 245, 0) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 0.625rem;
  background: radial-gradient(circle at top right, rgba(114, 124, 245, 0.03), transparent 60%);
  pointer-events: none;
}

.feature-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
  border-color: rgba(114, 124, 245, 0.25);
  background: linear-gradient(135deg, rgba(250, 251, 254, 1) 0%, rgba(255, 255, 255, 1) 100%);
}

.feature-icon-img {
  width: 4.5rem;
  height: 4.5rem;
  margin-bottom: 0.75rem;
  display: block;
  margin-left: auto;
  margin-right: auto;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.15));
}

.feature-card:hover .feature-icon-img {
  transform: translateY(-6px) scale(1.08);
  filter: drop-shadow(0 12px 32px rgba(0, 0, 0, 0.2));
}

.feature-card h3 {
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
  font-weight: 600;
  color: var(--primary-color);
}

.feature-card p {
  color: var(--text-light);
  margin-bottom: 0;
  font-size: 0.75rem;
  line-height: 1.4;
}

/* ===== Compact Pain Points List ===== */
.pain-points-list {
  max-width: 900px;
  margin: 0.5rem auto 0 auto;
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.25rem 1rem;
}

.pain-points-list li {
  padding: 0.25rem 0;
  font-size: 0.8125rem;
  line-height: 1.3;
  color: var(--text-dark);
  display: flex;
  align-items: flex-start;
  gap: 0.375rem;
  transition: all 0.2s ease;
}

.pain-points-list li:hover {
  transform: translateX(3px);
  color: var(--primary-color);
}

.pain-points-list li::before {
  content: "✗";
  color: var(--danger-color);
  font-weight: bold;
  font-size: 0.875rem;
  flex-shrink: 0;
  margin-top: 0.05rem;
  text-shadow: 0 1px 2px rgba(250, 92, 124, 0.2);
}

/* ===== Features List (Simple) ===== */
.features-list {
  max-width: 900px;
  margin: 0 auto;
  list-style: none;
  padding: 0;
}

.features-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
}

.features-list li:last-child {
  border-bottom: none;
}

.features-list li strong {
  font-size: 1rem;
  color: var(--primary-color);
  display: block;
  margin-bottom: 0.25rem;
}

.features-list li p {
  margin: 0;
  color: var(--text-light);
  font-size: 0.875rem;
  line-height: 1.4;
}

/* ===== Steps / How It Works ===== */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 0.5rem;
}

.step {
  text-align: center;
  padding: 0.75rem;
  background: linear-gradient(135deg, rgba(250, 251, 254, 0.95) 0%, rgba(255, 255, 255, 0.98) 100%);
  border-radius: 0.625rem;
  border: 1px solid rgba(222, 226, 230, 0.5);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.step::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 0.625rem;
  background: radial-gradient(circle at top center, rgba(114, 124, 245, 0.03), transparent 60%);
  pointer-events: none;
}

.step:hover {
  box-shadow: var(--shadow-lg);
  border-color: rgba(114, 124, 245, 0.25);
  transform: translateY(-3px);
  background: linear-gradient(135deg, rgba(250, 251, 254, 1) 0%, rgba(255, 255, 255, 1) 100%);
}

.step-icon-img {
  width: 4rem;
  height: 4rem;
  margin: 0 auto 0.625rem auto;
  display: block;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  filter: drop-shadow(0 6px 20px rgba(0, 0, 0, 0.15));
}

.step:hover .step-icon-img {
  transform: translateY(-5px) scale(1.06);
  filter: drop-shadow(0 10px 28px rgba(0, 0, 0, 0.2));
}

.step h3 {
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
  font-weight: 600;
  color: var(--primary-color);
}

.step p {
  color: var(--text-light);
  font-size: 0.75rem;
  line-height: 1.4;
}

/* ===== Pricing Cards ===== */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.pricing-card {
  background: linear-gradient(135deg, rgba(250, 251, 254, 0.95) 0%, rgba(255, 255, 255, 0.98) 100%);
  padding: 0.75rem 1rem;
  border-radius: 0.625rem;
  border: 2px solid rgba(222, 226, 230, 0.5);
  text-align: center;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.pricing-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, 
    rgba(114, 124, 245, 0) 0%, 
    rgba(114, 124, 245, 0.6) 50%, 
    rgba(114, 124, 245, 0) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.pricing-card:hover::before {
  opacity: 1;
}

.pricing-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 0.625rem;
  background: radial-gradient(circle at top center, rgba(114, 124, 245, 0.04), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.pricing-card > * {
  position: relative;
  z-index: 1;
}

.pricing-card.popular {
  border-color: rgba(114, 124, 245, 0.4);
  box-shadow: var(--shadow-lg);
  background: linear-gradient(135deg, 
    rgba(114, 124, 245, 0.04) 0%, 
    rgba(250, 251, 254, 0.98) 100%);
}

.pricing-card.popular::after {
  background: radial-gradient(circle at top center, rgba(114, 124, 245, 0.08), transparent 60%);
}

.pricing-card.popular > h3::before {
  content: "Most Popular";
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gradient-accent);
  color: #ffffff;
  padding: 0.15rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.6875rem;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(114, 124, 245, 0.3);
  white-space: nowrap;
}

.pricing-card:hover {
  border-color: rgba(114, 124, 245, 0.35);
  box-shadow: var(--shadow-xl);
  transform: translateY(-3px);
  background: linear-gradient(135deg, rgba(250, 251, 254, 1) 0%, rgba(255, 255, 255, 1) 100%);
}

.pricing-card h3 {
  font-size: 1rem;
  margin-bottom: 0.375rem;
  font-weight: 600;
  position: relative;
}

.pricing-card .price {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary-color);
  margin: 0.5rem 0;
  line-height: 1;
}

.pricing-card .price-currency {
  font-size: 1rem;
  font-weight: 500;
}

.pricing-card .routes-count {
  color: var(--text-light);
  font-size: 0.75rem;
  margin-bottom: 0.5rem;
}

.pricing-card ul {
  list-style: none;
  text-align: left;
  margin: 0.75rem 0;
}

.pricing-card ul li {
  padding: 0.25rem 0;
  color: var(--text-dark);
  font-size: 0.75rem;
}

.pricing-card ul li::before {
  content: "✓";
  color: var(--success-color);
  font-weight: bold;
  margin-right: 0.375rem;
  font-size: 0.875rem;
}

/* ===== Contact Form ===== */
.contact-form {
  max-width: 600px;
  margin: calc(var(--spacing-unit) * 3) auto 0 auto;
  background: linear-gradient(135deg, rgba(250, 251, 254, 0.95) 0%, rgba(255, 255, 255, 0.98) 100%);
  padding: calc(var(--spacing-unit) * 3);
  border-radius: 0.625rem;
  border: 1px solid rgba(222, 226, 230, 0.5);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.contact-form::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 0.625rem;
  background: radial-gradient(circle at top right, rgba(114, 124, 245, 0.03), transparent 60%);
  pointer-events: none;
}

.form-group {
  margin-bottom: calc(var(--spacing-unit) * 1.5);
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(222, 226, 230, 0.5);
  border-radius: 0.625rem;
  font-family: var(--font-family);
  font-size: 1rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  background: linear-gradient(135deg, rgba(250, 251, 254, 0.6) 0%, rgba(255, 255, 255, 0.9) 100%);
  position: relative;
  z-index: 1;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(114, 124, 245, 0.08), var(--shadow-sm);
  transform: translateY(-1px);
  background: var(--bg-white);
}

.form-group textarea {
  min-height: 150px;
  resize: vertical;
}

.btn-submit {
  background: var(--gradient-accent);
  color: #ffffff;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.8125rem;
  border: none;
  cursor: pointer;
  width: 100%;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  display: inline-block;
  box-shadow: 0 4px 12px rgba(114, 124, 245, 0.25), 0 2px 4px rgba(114, 124, 245, 0.15);
  position: relative;
  overflow: hidden;
}

.btn-submit::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn-submit:hover::before {
  opacity: 1;
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(114, 124, 245, 0.4), 0 3px 8px rgba(114, 124, 245, 0.2);
  color: #ffffff;
}

/* ===== Footer ===== */
.footer {
  background: var(--gradient-primary);
  color: rgba(255, 255, 255, 0.8);
  padding: 0.75rem 0;
  margin-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}

.footer .container {
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  list-style: none;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.75rem;
}

.footer-links a:hover {
  color: #ffffff;
}

.footer-copyright {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
}

/* ===== Utilities ===== */
.text-center {
  text-align: center;
}

.mb-2 {
  margin-bottom: calc(var(--spacing-unit) * 2);
}

.mb-3 {
  margin-bottom: calc(var(--spacing-unit) * 3);
}

.mt-3 {
  margin-top: calc(var(--spacing-unit) * 3);
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
  :root {
    --section-padding: 1rem;
  }
  
  .navbar-menu {
    display: none; /* Hide menu on mobile (add hamburger later if needed) */
  }
  
  .hero {
    padding: 1.25rem 0;
  }
  
  .hero h1 {
    font-size: 1.5rem;
  }
  
  .hero .subheadline {
    font-size: 0.875rem;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  .pricing-grid {
    grid-template-columns: 1fr;
  }
  
  .pricing-card.popular {
    transform: scale(1);
  }
  
  .steps {
    grid-template-columns: 1fr;
  }
}

/* ===== Admin Panel Styles ===== */
.admin-container {
  max-width: 800px;
  margin: 2rem auto;
  padding: 2rem;
}

.admin-form {
  background: var(--bg-white);
  padding: 2rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border-color);
}

.admin-section {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
}

.admin-section:last-child {
  border-bottom: none;
}

.admin-section h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

/* ===== Success/Error Messages ===== */
.alert {
  padding: 1rem 1.5rem;
  border-radius: 0.375rem;
  margin-bottom: 1.5rem;
}

.alert-success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert-error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}
