/*
  RetailAer Sample Site CSS
  Class-Based Palette System v1.6.0
  Reliable color switching without flash or race conditions
*/

/* Default/Fallback: Chartreuse Jet Palette */
:root,
.palette-chartreuse {
  --accent: #A6CE39;      /* bright chartreuse - main accent */
  --teal: #005F6B;        /* deep teal - secondary elements */
  --highlight: #A6CE39;   /* chartreuse highlight */
  --dark: #1C1C1C;        /* dark slate - text */
  --oat: #EDE6D6;         /* warm oat - backgrounds */
  --gray: #4A4A4A;        /* gray - muted text */
}

/* Dynamic Flight Palette - Bold Aviation Colors */
.palette-dynamic-flight {
  --accent: #D3212D;      /* bold red - main accent */
  --teal: #002C54;        /* navy blue - secondary elements */
  --highlight: #FAD02E;   /* bright yellow - highlights */
  --dark: #1A1A1A;        /* near black - text */
  --oat: #F8F9FA;         /* cool white - backgrounds */
  --gray: #6C757D;        /* cool gray - muted text */
}

/* RetailAir Classic Palette - Based on retailaer.com */
.palette-retailair-classic {
  --accent: #00BBA4;      /* teal - main accent from retailaer.com */
  --teal: #2F4858;        /* dark blue-gray - secondary elements */
  --highlight: #59CF9F;   /* light green - highlights */
  --dark: #2F4858;        /* dark blue-gray - text */
  --oat: #FFFFFF;         /* clean white - backgrounds */
  --gray: rgba(47, 72, 88, 0.72); /* muted blue-gray - muted text */
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--oat);
  color: var(--dark);
}

.side-nav {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  width: 220px;
  background: var(--dark);
  display: flex;
  flex-direction: column;
  padding: 2rem 1rem;
  box-sizing: border-box;
}

.side-nav a {
  text-decoration: none;
  color: #ffffff;
  padding: 0.75rem 0;
  margin-bottom: 0.5rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.side-nav a.active {
  color: var(--accent);
  font-weight: 600;
}

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

.side-nav .cta {
  margin-top: auto;
  background: var(--accent);
  color: var(--dark);
  padding: 0.75rem 1rem;
  border-radius: 4px;
  text-align: center;
  font-weight: 600;
  transition: opacity 0.2s ease;
}

.side-nav .cta:hover {
  opacity: 0.85;
}

main {
  margin-right: 220px;
  padding: 2rem;
  min-height: 100vh;
  box-sizing: border-box;
}

.hero {
  padding: 4rem 2rem;
  background: var(--oat);
  text-align: left;
  border-radius: 8px;
  margin-bottom: 2rem;
  border: 1px solid rgba(0,0,0,0.1);
}

.hero h1 {
  font-size: 3.2rem;
  font-weight: 700;
  margin: 0.5rem 0;
  line-height: 1.1;
}

.hero .subhead {
  font-size: 1.125rem;
  max-width: 40rem;
  color: var(--gray);
}

.cta-row {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.btn-primary,
.btn-outline {
  display: inline-block;
  padding: 0.75rem 1rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.2s ease-in-out;
}

.btn-primary {
  background-color: var(--accent);
  color: var(--dark);
}

.btn-outline {
  border: 2px solid var(--dark);
  color: var(--dark);
}

.btn-primary:hover,
.btn-outline:hover {
  opacity: 0.85;
}

/* Media carousel */
.media-carousel {
  display: flex;
  overflow-x: auto;
  margin-top: 2rem;
  padding-bottom: 1rem;
  gap: 1rem;
}

.media-card {
  flex: 0 0 auto;
  background-color: var(--teal);
  color: #fff;
  border-radius: 6px;
  padding: 1rem;
  min-width: 200px;
}

/* Solutions grid */
.solutions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.solution-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 6px;
  padding: 1rem;
}

.solution-card h2 {
  margin-top: 0;
  color: var(--teal);
}

/* Insights grid */
.insights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.insight-card {
  background: #fff;
  border-radius: 4px;
  overflow: hidden;
}

.insight-card header {
  background-color: var(--teal);
  color: #fff;
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.insight-card .body {
  padding: 1rem;
  color: var(--dark);
  font-size: 0.95rem;
}

/* Contact page */
.contact-container {
  max-width: 600px;
  margin-top: 1rem;
}

.contact-container .btn-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.btn-sales {
  display: inline-block;
  flex: 1;
  background-color: var(--accent);
  color: var(--dark);
  padding: 0.75rem 1rem;
  border-radius: 4px;
  text-align: center;
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.2s ease-in-out;
}

.btn-support {
  display: inline-block;
  flex: 1;
  border: 2px solid var(--dark);
  color: var(--dark);
  padding: 0.75rem 1rem;
  border-radius: 4px;
  text-align: center;
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.2s ease-in-out;
}

.btn-sales:hover,
.btn-support:hover {
  opacity: 0.85;
}

/* Version badge */
.version-badge {
  position: fixed;
  top: 20px;
  left: 20px;
  background: var(--accent);
  color: var(--dark);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Footer */
footer {
  position: fixed;
  bottom: 20px;
  right: 240px;
  left: 20px;
  background: var(--dark);
  color: #ffffff;
  padding: 1rem 2rem;
  border-radius: 8px;
  text-align: center;
  font-size: 0.9rem;
  z-index: 999;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Responsive adjustments */
@media (max-width: 960px) {
  /* Convert side nav into bottom nav */
  .side-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    top: auto;
    height: 60px;
    width: 100%;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    padding: 0.5rem 1rem;
    box-sizing: border-box;
    background: var(--dark);
  }

  .side-nav a {
    margin: 0;
    font-size: 0.8rem;
    padding: 0.5rem;
  }

  main {
    margin: 0;
    padding: 2rem 1rem 8rem; /* bottom padding for nav + footer */
  }

  /* Scale down hero */
  .hero h1 {
    font-size: 2rem;
  }

  .hero .subhead {
    font-size: 1rem;
  }

  footer {
    position: static;
    margin-top: 2rem;
    margin-bottom: 5rem;
    border-radius: 4px;
  }
}