/*
  ScamProtector static site styles
  - Warm, friendly color scheme
  - Elegant serif primary font for readability
  - Large, accessible typography and clean spacing
  - Simple responsive grid
*/

:root {
  --bg: #fffaf2; /* soft warm background */
  --surface: #fff7ea; /* slightly deeper warm card bg */
  --text: #2b2b2b; /* near-black for high contrast */
  --muted: #5a5a5a; /* secondary text */
  --primary: #b45f06; /* warm burnt orange */
  --primary-dark: #8f4d05;
  --accent: #3a6b35; /* calm green accent */
  --border: #e7dccd;
  --focus: #1e90ff; /* focus outline color */
}

/* Base */
html {
  font-size: 18px; /* larger base font for readability */
}
@media (max-width: 480px) {
  html { font-size: 17px; }
}
@media (min-width: 1200px) {
  html { font-size: 19px; }
}

body {
  margin: 0;
  font-family: 'Merriweather', Georgia, 'Times New Roman', serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden; /* guard against incidental horizontal overflow */
}

/* Ensure padding/border are included in element width to avoid overflow */
*, *::before, *::after { box-sizing: border-box; }

/* Make media elements responsive by default */
img, svg, video { max-width: 100%; height: auto; }

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  flex-wrap: wrap; /* allow wrapping on narrow screens instead of overflowing */
}
.text-size { display: flex; gap: 8px; align-items: center; }
.btn-textsize { background: #fff; color: var(--text); border: 1px solid var(--border); padding: 8px 10px; border-radius: 6px; }
.btn-textsize:hover { background: #fdf3e3; }
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
}
.brand-name { font-size: 1.1rem; }
.menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 1rem;
}
.nav { display: flex; gap: 16px; }
.nav-link { color: var(--text); text-decoration: none; padding: 8px; border-radius: 6px; }
.nav-link:hover { background: #fff3dd; }

@media (max-width: 720px) {
  .menu-toggle { display: inline-block; }
  .nav { display: none; }
  .nav.open { display: flex; flex-direction: column; padding: 8px 0; }
}

/* Hero */
.hero {
  background: linear-gradient(0deg, var(--surface), var(--bg));
  padding: 48px 0 32px;
}

/* Hero layout - side by side on desktop, stacked on mobile */
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
}

@media (max-width: 768px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

.hero-content {
  /* Content takes up left side on desktop */
}

.hero-title {
  font-size: 2rem;
  line-height: 1.25;
  margin: 0 0 12px;
}
.hero-subtitle {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 720px;
}
.hero-cta { margin-top: 20px; }
.note { color: var(--muted); margin-top: 8px; }

/* Carousel Styles */
.hero-carousel {
  /* Carousel takes up right side on desktop, below content on mobile */
}

.carousel-title {
  font-size: 1.2rem;
  margin: 0 0 16px;
  color: var(--text);
  text-align: center;
}

.carousel-container {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.carousel-track {
  display: flex;
  transition: transform 0.3s ease-in-out;
  /* width set dynamically in HTML via Alpine */
}

.carousel-slide {
  flex: 0 0 calc(100% / var(--slides-count, 1)); /* width per slide; fallback single */
  text-align: center;
  padding: 8px;
}

.carousel-image {
  width: 100%;
  max-width: 280px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  margin: 0 auto;
  display: block;
}

.carousel-caption {
  margin: 12px 0 0;
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 600;
}

/* Carousel Navigation Buttons */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 2;
}

.carousel-btn:hover {
  background: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.carousel-prev {
  left: 8px;
}

.carousel-next {
  right: 8px;
}

.carousel-btn i {
  color: var(--primary);
  font-size: 0.9rem;
}

/* Carousel Dots */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: var(--border);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.carousel-dot.active {
  background: var(--primary);
}

.carousel-dot:hover {
  background: var(--primary-dark);
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .carousel-container {
    padding: 12px;
  }
  
  .carousel-image {
    max-width: 240px;
  }
  
  .carousel-btn {
    width: 36px;
    height: 36px;
  }
  
  .carousel-prev {
    left: 6px;
  }
  
  .carousel-next {
    right: 6px;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .carousel-track {
    transition: none;
  }
}

/* Buttons */
.btn {
  display: inline-block;
  border: none;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 1rem;
  cursor: pointer;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: #e8f1ea; color: var(--accent); border: 1px solid #d5e5d8; }
.btn-secondary:hover { background: #dbeade; }

/* Sections */
.section { padding: 36px 0; }
.section h2 { font-size: 1.6rem; margin: 0 0 16px; }
.section h3 { font-size: 1.2rem; margin-top: 0; }

/* Cards and grid */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 720px) { .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
}

/* Card icons */
.card .icon {
  font-size: 1.5rem;
  display: inline-block;
  margin-right: 0.5rem;
  color: var(--primary);
}

/* FontAwesome icon styling */
.card .icon i {
  font-size: 1.5rem;
  color: var(--primary);
}

.card h3 { display: inline-block; }

/* Signup page */
.signup { padding: 36px 0; }
.signup .signup-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  max-width: 640px;
  margin: 0 auto;
}
.signup .field { margin-bottom: 16px; }
.signup label {
  display: block;
  margin-bottom: 6px;
  font-weight: 700;
}
.signup input, .signup select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  background: #fff;
}
.signup .actions { display: flex; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.note-small { font-size: 0.9rem; color: var(--muted); }

/* Pricing */
.pricing .price-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  max-width: 520px;
}

/* Annual plan highlight */
.price-highlight {
  background: linear-gradient(135deg, #f8f4e6, #fff7ea);
  border: 2px solid var(--primary);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
  position: relative;
}

.badge {
  background: var(--primary);
  color: white;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  display: inline-block;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.price { font-size: 1.4rem; margin: 0; }
.amount { font-weight: 700; font-size: 1.8rem; }
.per { color: var(--muted); }

.price-breakdown {
  color: var(--primary);
  font-weight: 600;
  margin: 4px 0 0 0;
  font-size: 1rem;
}

.price-alternative {
  text-align: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}

.monthly-price {
  color: var(--muted);
  margin: 0;
  font-size: 0.95rem;
}

.trial { color: var(--muted); margin: 8px 0 16px; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }
.payment-note { color: var(--muted); margin-top: 10px; }

/* FAQ */
.faq-item { border-bottom: 1px solid var(--border); }
.faq-q {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  padding: 14px 0;
  font-size: 1.1rem;
  cursor: pointer;
}
.faq-a { padding-bottom: 14px; color: var(--muted); }

/* Footer */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 20px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
}
.footer-note { color: var(--muted); }
.footer-link { color: var(--text); text-decoration: none; margin-right: 8px; }
.footer-link:hover { text-decoration: underline; }

/* Accessibility */
:focus { outline: 3px solid var(--focus); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}