/* =========================
   GLOBAL SAFETY FIX
========================= */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
  background: #f5f5f7;
  overflow-x: hidden; /* HARD STOP overflow */
}

/* =========================
   WRAPPER
========================= */

.page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* =========================
   MAIN AREA
========================= */

.page {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;

  padding: 40px 16px;
  gap: 24px;
}

/* =========================
   LOGO
========================= */

.logo-container {
  width: 100%;
  display: flex;
  justify-content: center;
}

.logo {
  max-width: 160px;
  width: 100%;
  height: auto;
}

/* =========================
   SEARCH CARD
========================= */

.search-card {
  width: 100%;
  max-width: 520px; /* IMPORTANT: prevents overflow */
  background: white;

  border-radius: 16px;
  padding: 14px;

  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

/* FORM */
.search-form {
  display: flex;
  gap: 10px;
  width: 100%;
}

/* INPUT */
.search-input {
  flex: 1;
  min-width: 0; /* CRITICAL FIX for overflow */
  padding: 12px 14px;

  border-radius: 10px;
  border: 1px solid #ddd;

  font-size: 16px;
}

/* BUTTON */
.search-button {
  padding: 12px 16px;
  border-radius: 10px;
  border: none;

  background: #111;
  color: white;

  cursor: pointer;
  white-space: nowrap;
}

/* =========================
   SUGGESTIONS DROPDOWN
========================= */

.suggestions {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;

  max-height: 200px;
  overflow-y: auto;
}

.suggestion-item {
  padding: 10px;
  cursor: pointer;
  border-radius: 8px;
}

.suggestion-item:hover {
  background: #f2f2f2;
}

/* =========================
   FOOTER
========================= */

.site-footer {
  width: 100%;
  margin-top: auto;
  padding: 30px 16px;
  text-align: center;
  background: #fafafa;
  border-top: 1px solid #e5e5e5;
}

.footer-inner {
  max-width: 900px;
  margin: 0 auto;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* =========================
   MOBILE FIXES
========================= */

@media (max-width: 600px) {
  .search-form {
    flex-direction: column;
  }

  .search-button {
    width: 100%;
  }

  .search-card {
    max-width: 100%;
  }
}

.site-tagline {
  font-size: 24px;
  font-weight: 600;
  text-align: center;
  margin: 0;
  color: #111;
}

.site-description {
  font-size: 15px;
  text-align: center;
  color: #555;
  max-width: 480px;
  margin: 0;
  line-height: 1.5;
}

.ad-container {
  width: 100%;
  max-width: 728px;
  margin: 8px auto;
}
