/* Modern font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

* {
  box-sizing: border-box;
}

/* Base layout */
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: radial-gradient(circle at top, #eef2ff 0, #f9fafb 40%, #f3f4f6 100%);
  color: #0f172a;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header */
header {
  background: rgba(15, 23, 42, 0.98);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
  padding: 0.85rem 1.75rem;
}

.header-inner {
  max-width: 1160px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.nav-links a {
  color: #e5e7eb;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.nav-links a:hover {
  background: rgba(15, 23, 42, 0.9);
  border-color: rgba(148, 163, 184, 0.7);
  color: #f9fafb;
}

/* Main */
main {
  flex: 1;
  padding: 2.75rem 1.5rem 3.25rem;
  max-width: 1160px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 3rem;
}

/* Hero / search area */
.wrapper {
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 1.75rem;
  padding: 2.75rem 2.25rem 2.5rem;
  box-shadow:
    0 24px 48px rgba(15, 23, 42, 0.18),
    0 0 0 1px rgba(148, 163, 184, 0.12);
}

/* Title + subtitle */
h1 {
  font-size: 2.15rem;
  line-height: 1.25;
  font-weight: 800;
  text-align: center;
  margin: 0 0 0.75rem;
  letter-spacing: -0.03em;
  color: #020617;
}

.subtext {
  font-size: 1.02rem;
  color: #4b5563;
  text-align: center;
  margin: 0 0 1.9rem;
  max-width: 640px;
}

/* Search box */
.search-box {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  max-width: 620px;
  width: 100%;
  margin: 0 0 1.25rem;
}

.search-box input {
  flex: 1 1 260px;
  min-width: 220px;
  max-width: 420px;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  font-size: 1rem;
  background: #f9fafb;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.search-box input:focus {
  outline: none;
  border-color: #2563eb;
  background: #ffffff;
  box-shadow:
    0 0 0 1px rgba(37, 99, 235, 0.5),
    0 10px 30px rgba(37, 99, 235, 0.12);
}

.search-box button {
  padding: 0.8rem 1.6rem;
  border-radius: 999px;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  color: #ffffff;
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.search-box button:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.4);
}

.search-box button:active {
  transform: translateY(0);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}

/* Messages */
#loadingMessage,
#successMessage {
  text-align: center;
  margin: 0.35rem 0 1rem;
  font-weight: 600;
  font-size: 0.98rem;
  display: none;
}

#loadingMessage {
  color: #4b5563;
}

#successMessage {
  color: #16a34a;
}

/* Progress bar */
.progress {
  display: none;
  position: relative;
  width: 100%;
  max-width: 620px;
  height: 0.8rem;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
  margin: 0.25rem auto 1.75rem;
}

.progress-bar {
  position: absolute;
  height: 100%;
  background: linear-gradient(90deg, #22c55e, #10b981);
  width: 0%;
  transition: width 0.35s ease;
}

/* Error box is inline styled in HTML – just refine font */
#errorBox {
  font-family: inherit;
  font-size: 0.95rem;
}

/* Results card */
.results {
  width: 100%;
  margin-top: 0.75rem;
}

.results .card {
  background: #0b1120;
  color: #e5e7eb;
  border-radius: 1.75rem;
  padding: 2.4rem 2.3rem;
  margin-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  box-shadow:
    0 24px 54px rgba(15, 23, 42, 0.75),
    0 0 0 1px rgba(15, 23, 42, 0.9);
}

.card-content {
  flex: 1 1 360px;
}

.card-content h3 {
  margin-top: 0;
  margin-bottom: 1.2rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: #e5e7eb;
}

.card-content p {
  margin: 0.25rem 0;
  font-size: 0.96rem;
  color: #e5e7eb;
}

.card-content p strong {
  color: #cbd5f5;
}

/* Map */
.map {
  flex: 1 1 360px;
  min-height: 280px;
  border-radius: 1.25rem;
  overflow: hidden;
  position: relative;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.7);
}

.map-placeholder {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, #111827, #020617);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  color: #9ca3af;
  z-index: 1;
}

/* Highlight + badges */
.owner-highlight {
  font-size: 1.15rem;
  font-weight: 700;
  color: #38bdf8;
}

.safety-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.22rem 0.7rem;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 999px;
  margin-left: 0.5rem;
  color: #f9fafb;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.safety-badge.A {
  background-color: #22c55e;
}

.safety-badge.B {
  background-color: #facc15;
  color: #111827;
}

.safety-badge.C,
.safety-badge.D,
.safety-badge.F {
  background-color: #ef4444;
}

/* Partner button */
.action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1.2rem;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #f9fafb;
  padding: 0.85rem 2.2rem;
  border-radius: 999px;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 600;
  width: 100%;
  max-width: 320px;
  text-align: center;
  box-shadow: 0 18px 40px rgba(34, 197, 94, 0.32);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.action-button:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
  box-shadow: 0 20px 44px rgba(34, 197, 94, 0.38);
}

/* Footer */
footer {
  background: #020617;
  color: #9ca3af;
  text-align: center;
  padding: 1.75rem 1.5rem;
  border-top: 1px solid rgba(31, 41, 55, 0.9);
  margin-top: auto;
}

footer p {
  margin: 0;
  font-size: 0.9rem;
}

footer a {
  color: #e5e7eb;
  margin: 0 0.35rem;
  text-decoration: none;
  font-weight: 500;
}

footer a:hover {
  text-decoration: underline;
}

/* Content sections (guide, features, testimonials, FAQ) */
.section {
  padding: 4.25rem 0;
  width: 100%;
}

.addon-wrapper {
  background: #f3f4f6;
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
  padding-top: 3.25rem;
  padding-bottom: 3.25rem;
}

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* overwrite earlier .grid, used for features/testimonials layout */
.grid {
  width: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.75rem;
}
/* Force 2 cards per row for Key Features */
.addon-wrapper .grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* On mobile, show 1 card per row */
@media (max-width: 768px) {
  .addon-wrapper .grid {
    grid-template-columns: 1fr;
  }
}


/* Section headings */
.section-title {
  text-align: center;
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.4rem;
  color: #020617;
  letter-spacing: -0.03em;
}

.section-subtitle {
  text-align: center;
  font-size: 0.98rem;
  color: #6b7280;
  margin-bottom: 2.5rem;
}

/* Generic cards for Key Features, Testimonials, etc. */
.addon-wrapper .card,
.section .card {
  background: #ffffff;
  padding: 1.9rem 1.8rem;
  border-radius: 1.25rem;
  border: 1px solid #e5e7eb;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
  display: block;
}

.addon-wrapper .card h3,
.section .card h3 {
  margin-top: 0;
  margin-bottom: 0.65rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: #111827;
}

.addon-wrapper .card p,
.section .card p {
  margin: 0;
  font-size: 0.95rem;
  color: #4b5563;
}

/* Testimonials */
.testimonial-card {
  font-style: italic;
}

.testimonial-author {
  margin-top: 1.25rem;
  font-weight: 600;
  color: #111827;
  font-style: normal;
}


/* FAQ */
.faq-item {
  margin: 0 auto 1.75rem;
  max-width: 1000px;
  background: #ffffff;
  padding: 1.9rem 2.2rem;
  border-radius: 1.25rem;
  border: 1px solid #e5e7eb;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
  position: relative;
}

.faq-item:last-of-type {
  margin-bottom: 0;
}

.faq-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  bottom: 18px;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, #22c55e, #16a34a);
}

.faq-item h3 {
  font-size: 1.08rem;
  font-weight: 700;
  margin-bottom: 0.55rem;
  color: #111827;
}

.faq-item p {
  color: #4b5563;
  font-size: 0.97rem;
  line-height: 1.6;
}

.faq-item {
  margin-bottom: 2.25rem;
}

.faq-item h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: #111827;
}

.faq-item p {
  color: #4b5563;
  font-size: 0.95rem;
}

/* Responsive */
@media (max-width: 900px) {
  main {
    padding: 2.1rem 1.25rem 2.75rem;
  }

  .wrapper {
    padding: 2.2rem 1.6rem 2.1rem;
  }

  h1 {
    font-size: 1.9rem;
  }

  .results .card {
    padding: 2rem 1.8rem;
  }
}

@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .nav-links {
    justify-content: center;
  }

  .results .card {
    flex-direction: column;
  }

  .map {
    min-height: 240px;
  }
}

@media (max-width: 480px) {
  .wrapper {
    padding: 1.9rem 1.25rem 1.9rem;
  }

  .search-box {
    gap: 0.6rem;
  }

  .search-box button {
    width: 100%;
    justify-content: center;
  }
}

/* NEW HEADER */
.site-header {
  width: 100%;
  background: #ffffff;
  padding: 14px 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.site-header .header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-header .logo img {
  height: 64px;
  width: auto;
}

.site-header .nav-links {
  display: flex;
  gap: 24px;
}

.site-header .nav-links a {
  color: #111827;     /* dark text for white header */
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
}

.site-header .nav-links a:hover {
  color: #F97316;      /* orange hover to match your new logo */
}
/* Hamburger button (desktop hidden by default) */
.menu-toggle {
  display: none;              /* hidden on desktop */
  width: 36px;
  height: 30px;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 3px;
  background: #111827;
  border-radius: 999px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-toggle span + span {
  margin-top: 6px;
}

/* X animation when open */
.menu-toggle.is-open span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}
.menu-toggle.is-open span:nth-child(2) {
  opacity: 0;
}
.menu-toggle.is-open span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* Mobile header & dropdown nav */
@media (max-width: 768px) {

  /* keep header in one row: logo + burger */
  .site-header .header-inner {
    padding: 0 16px;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    text-align: left;
  }

  /* dropdown menu */
  .site-header .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
    flex-direction: column;
    gap: 0;
    padding: 10px 16px 14px;
    display: none;   /* hidden by default */
  }

  .site-header .nav-links a {
    padding: 10px 0;
  }

  .site-header .nav-links.nav-open {
    display: flex;   /* show when toggled */
  }

  .menu-toggle {
    display: inline-flex;    /* show hamburger on mobile */
    flex-direction: column;
    justify-content: center;
  }
}


/* MOBILE FIXES (critical) */
@media (max-width: 768px) {

  /* Reduce global side padding */
  body, main, .wrapper, .section, .container {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  /* Prevent max-width from shrinking content too much */
  .container {
    max-width: 100% !important;
    width: 100% !important;
  }

  /* Make cards fill screen width */
  .card, .testimonial-card, .faq-item {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* Fix content wrapper */
  .wrapper {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Ensure search box and buttons fill properly */
  .search-box input,
  .search-box button {
    width: 100% !important;
  }

  /* Reduce gap between sections */
  .section {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
}
