/* ============================================
   PillPack-Inspired Design System (Orange Theme)
   ============================================ */

/* CSS Variables */
:root {
  /* Brand Colors - Orange Palette */
  --primary-color: #ff6b00;
  /* Vibrant Orange */
  --primary-dark: #e65100;
  /* Deep Orange */
  --primary-light: #fff0e6;
  /* Very Light Orange for backgrounds */
  --accent-color: #ff9e40;
  /* Soft Orange */

  /* Neutrals */
  --text-primary: #232f3e;
  /* Dark Navy/Black (Amazon/PillPack style) */
  --text-secondary: #565959;
  /* Softer Gray */
  --text-light: #7d8694;
  --bg-white: #ffffff;
  --bg-off-white: #fcfcfc;
  --bg-gray: #f2f4f8;

  /* UI Elements */
  --border-color: #e3e6eb;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 16px 32px rgba(0, 0, 0, 0.1);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 24px;
  /* Larger radius for cards */
  --radius-pill: 50px;
  /* For buttons */

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --spacing-xl: 6rem;
  /* More whitespace */
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-white);
  font-size: 16px;
  /* Adjusted base font size for Open Sans */
  -webkit-font-smoothing: antialiased;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--spacing-sm);
  color: var(--text-primary);
  letter-spacing: -0.02em;
  /* Tighter tracking for headings */
}

h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
}

p {
  margin-bottom: var(--spacing-sm);
  color: var(--text-secondary);
  font-weight: 400;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s ease;
  font-weight: 500;
}

a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* Header and Navigation */
header {
  background: var(--bg-white);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--border-color);
  padding: 0.5rem 0;
}

nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.5rem var(--spacing-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--primary-color);
  letter-spacing: -0.03em;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: var(--spacing-md);
  align-items: center;
}

.nav-links a {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.5rem 0;
}

.nav-links a:hover {
  color: var(--primary-color);
  text-decoration: none;
}

/* Dropdown Menu */
.dropdown {
  position: relative;
}

.dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--bg-white);
  box-shadow: var(--shadow-md);
  border-radius: var(--radius-md);
  padding: 0.5rem;
  min-width: 240px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  margin-top: 0.5rem;
  border: 1px solid var(--border-color);
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.dropdown-menu a {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
}

.dropdown-menu a:hover {
  background: var(--bg-gray);
  color: var(--primary-color);
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-primary);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 2rem;
  border-radius: var(--radius-pill);
  /* Pill shape */
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid transparent;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none !important;
}

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

.btn-primary:hover {
  background: var(--primary-dark);
  color: white !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 107, 0, 0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  border-color: var(--text-primary);
  background: var(--bg-gray);
  color: var(--text-primary);
}

.btn-large {
  padding: 1rem 2.5rem;
  font-size: 1.125rem;
}

/* Container and Layout */
.container {
  max-width: 1100px;
  /* Slightly narrower for reading */
  margin: 0 auto;
  padding: 0 var(--spacing-sm);
}

.section {
  padding: var(--spacing-lg) 0;
}

.section-alt {
  background: var(--bg-gray);
}

/* Hero Section */
.hero {
  padding: var(--spacing-xl) 0;
  background: var(--bg-white);
  overflow: hidden;
}

.hero-content {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: var(--spacing-xl);
  align-items: center;
}

.hero-text h1 {
  margin-bottom: var(--spacing-md);
  color: var(--text-primary);
}

.hero-text p {
  font-size: 1.35rem;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-md);
  max-width: 540px;
}

.hero-buttons {
  display: flex;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Hero Image */
.hero-image {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  object-fit: cover;
}

/* Testimonials */
.testimonial-card {
  text-align: center;
}

.stars {
  color: #ffc107;
  /* Gold for stars */
  font-size: 1.5rem;
  margin-bottom: var(--spacing-sm);
}

.client-name {
  font-weight: 700;
  color: var(--text-primary);
  margin-top: var(--spacing-sm);
}

/* Cards - Clean & Minimal */
.card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  /* Increased padding for airy feel */
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.card-icon {
  width: 64px;
  height: 64px;
  background: var(--primary-light);
  color: var(--primary-color);
  border-radius: 50%;
  /* Circle icons */
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--spacing-md);
  font-size: 1.75rem;
}

.card h3 {
  margin-bottom: var(--spacing-xs);
  font-size: 1.5rem;
}

.card p {
  margin-bottom: var(--spacing-md);
  flex-grow: 1;
}

.card .btn {
  width: 100%;
  margin-top: 0.75rem;
  /* Space between buttons */
}

.card .btn:first-of-type {
  margin-top: auto;
  /* Push to bottom */
}

/* Grid Layouts */
.grid {
  display: grid;
  gap: var(--spacing-md);
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

/* How It Works Section */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-lg);
  counter-reset: step;
}

.step-card {
  text-align: left;
  /* Left aligned like PillPack */
  border: none;
  background: transparent;
  padding: 0;
  box-shadow: none;
}

.step-card:hover {
  transform: none;
  box-shadow: none;
  border: none;
}

.step-number {
  width: 40px;
  height: 40px;
  background: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.125rem;
  margin-bottom: var(--spacing-sm);
}

/* Feature List */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-md);
}

.feature-item {
  display: flex;
  gap: var(--spacing-sm);
  align-items: flex-start;
  padding: var(--spacing-sm);
  background: var(--bg-white);
  border-radius: var(--radius-md);
}

.feature-icon {
  color: var(--primary-color);
  font-size: 1.5rem;
  margin-top: 0.25rem;
}

/* FAQ Accordion - Minimalist Style */
.faq-container {
  border-top: 1px solid var(--border-color);
}

.faq-item {
  border-bottom: 1px solid var(--border-color);
  padding: 0;
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  padding: 1.5rem 0;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 1.125rem;
  transition: color 0.2s ease;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
}

.faq-question:hover {
  color: var(--primary-color);
}

.faq-icon {
  position: relative;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-left: 1rem;
}

.faq-icon::before,
.faq-icon::after {
  content: '';
  position: absolute;
  background-color: currentColor;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: transform 0.3s ease;
}

.faq-icon::before {
  width: 16px;
  height: 2px;
}

.faq-icon::after {
  width: 2px;
  height: 16px;
}

.faq-item[open] .faq-icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

/* For the Plus to X animation, we rotate the whole icon 45deg so the + becomes x,
   or we just rotate the vertical bar to be horizontal to make a minus.
   The Notion style is usually a plus that turns 45deg to X or just minus.
   Let's do a Plus that rotates to 45deg (X) or just 0 to Minus.
   Prompt image looks like standard accordion. I'll stick to Plus -> Minus or Plus -> X.
   Let's go with Plus (+) -> Minus (-).
*/

.faq-item[open] .faq-icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
  opacity: 0;
  /* To make it a minus */
}

/* Actually, for a minus, we just hide the vertical bar. */

details.faq-item>summary {
  list-style: none;
}

details.faq-item>summary::-webkit-details-marker {
  display: none;
}

.faq-answer {
  padding-bottom: 1.5rem;
  color: var(--text-secondary);
  line-height: 1.6;
  padding-right: 2rem;
  /* Animation handled by browser for details, but we can add keyframes if needed.
     Standard details/summary is instant. For smooth, we need JS or grid transition.
     I'll stick to standard details for simplicity and reliability unless user asks for animation.
  */
}

/* Forms */
.form-group {
  margin-bottom: var(--spacing-md);
}

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

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.2s ease;
  background: var(--bg-off-white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  background: var(--bg-white);
  box-shadow: 0 0 0 3px var(--primary-light);
}

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

.form-group .radio-group {
  display: flex;
  gap: var(--spacing-md);
  flex-wrap: wrap;
}

.form-group .radio-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-off-white);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  cursor: pointer;
}

.form-group .radio-item:hover {
  border-color: var(--primary-color);
}

.form-group .error {
  color: #d32f2f;
  font-size: 0.875rem;
  margin-top: 0.5rem;
  display: none;
}

.form-group.error .error {
  display: block;
}

.form-group.error input,
.form-group.error select,
.form-group.error textarea {
  border-color: #d32f2f;
}

.form-success {
  background: #e8f5e9;
  color: #1b5e20;
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-md);
  display: none;
  border: 1px solid #c8e6c9;
}

.form-success.show {
  display: block;
}

/* CTA Section */
.cta-section {
  background: var(--primary-color);
  color: white;
  padding: var(--spacing-xl) var(--spacing-md);
  text-align: center;
  border-radius: var(--radius-lg);
  margin: var(--spacing-xl) 0;
  position: relative;
  overflow: hidden;
}

.cta-section h2 {
  color: white;
  margin-bottom: var(--spacing-md);
  font-size: 2.5rem;
}

.cta-section p {
  color: rgba(255, 255, 255, 0.95);
  font-size: 1.25rem;
  margin-bottom: var(--spacing-md);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.cta-buttons {
  display: flex;
  gap: var(--spacing-sm);
  justify-content: center;
  flex-wrap: wrap;
}

.cta-buttons .btn {
  background: white;
  color: var(--primary-color);
  border: none;
}

.cta-buttons .btn:hover {
  background: var(--bg-off-white);
  transform: translateY(-2px);
}

.cta-buttons .btn-secondary {
  background: transparent;
  color: white;
  border: 2px solid white;
}

.cta-buttons .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

/* Footer */
footer {
  background: var(--bg-white);
  color: var(--text-primary);
  padding: var(--spacing-xl) 0 var(--spacing-md);
  border-top: 1px solid var(--border-color);
  margin-top: var(--spacing-xl);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}

.footer-section h3 {
  color: var(--text-primary);
  margin-bottom: var(--spacing-md);
  font-size: 1.125rem;
}

.footer-section p,
.footer-section a {
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  display: block;
  font-size: 0.95rem;
}

.footer-section a:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

.footer-bottom {
  text-align: center;
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--border-color);
  color: var(--text-light);
  font-size: 0.875rem;
}

/* Mobile Sticky Bar */
.mobile-sticky-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-white);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
  padding: var(--spacing-sm);
  z-index: 999;
  border-top: 1px solid var(--border-color);
}

.mobile-sticky-bar .btn {
  flex: 1;
  margin: 0 var(--spacing-xs);
  padding: 0.75rem;
}

.mobile-sticky-bar .btn-group {
  display: flex;
  gap: var(--spacing-xs);
}

/* Map Placeholder */
.map-placeholder {
  width: 100%;
  height: 300px;
  background: var(--bg-gray);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  margin: var(--spacing-md) 0;
  border: 1px solid var(--border-color);
}

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

.mb-sm {
  margin-bottom: var(--spacing-sm);
}

.mb-md {
  margin-bottom: var(--spacing-md);
}

.mb-lg {
  margin-bottom: var(--spacing-lg);
}

.mt-sm {
  margin-top: var(--spacing-sm);
}

.mt-md {
  margin-top: var(--spacing-md);
}

.mt-lg {
  margin-top: var(--spacing-lg);
}

/* Responsive Design */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-white);
    flex-direction: column;
    padding: var(--spacing-md);
    box-shadow: var(--shadow-lg);
    border-bottom: 1px solid var(--border-color);
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links li {
    width: 100%;
    text-align: center;
  }

  .nav-links .btn-primary {
    width: 100%;
    margin-top: var(--spacing-sm);
  }

  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--spacing-md);
  }

  .hero-text p {
    margin-left: auto;
    margin-right: auto;
  }

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

  .mobile-sticky-bar {
    display: block;
  }

  body {
    padding-bottom: 80px;
  }

  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    padding: 0;
    margin: 0;
    background: transparent;
    border: none;
    text-align: center;
  }

  .dropdown-menu a {
    padding: 0.5rem;
  }
}

@media (max-width: 480px) {
  .section {
    padding: var(--spacing-md) 0;
  }

  .hero {
    padding: var(--spacing-md) 0;
  }

  .cta-buttons {
    flex-direction: column;
  }

  .cta-buttons .btn {
    width: 100%;
  }

  h1 {
    font-size: 2.25rem;
  }
}