/* Container for the entire hero section */
.intro-hero {
  position: relative;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-align: center;
  background: <? echo htmlspecialchars($background);?>
  margin: 0;
  padding: 0;
}

/* Video background setup */
.intro-hero__video {
  position: absolute !important;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  z-index: 0;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: none;
}

/* Overlay content on top of video */
.intro-hero__overlay {
  position: relative;
  z-index: 1;
  max-width: 800px;
  padding: 2rem;
  margin: 0 auto;
  width: 100%;
}

/* Optional semi-transparent overlay for readability */
.intro-hero__overlay::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4);
  z-index: -1;
}

/* Headline */
.intro-hero__title {
  font-size: 2.5rem;
  margin: 1rem 0 0.5rem;
}

/* Subtitle (legacy) */
.intro-hero__subtitle {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
}

/* Ticker Section */
.intro-hero__ticker {
  position: relative;
  height: 1.5em;
  overflow: hidden;
  font-size: 1.9rem;
  margin-bottom: 1.5rem;
  color: white;
}

.ticker-wrapper {
  height: 100%;
  overflow: hidden;
  position: relative;
}

.ticker-track {
  display: flex;
  flex-direction: column;
  transition: transform 0.6s ease-in-out;
}

.ticker-phrase {
  height: 1.5em;
  text-align: center;
  white-space: nowrap;
}

/* Tabs */
.intro-hero__options {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.intro-hero__options button {
  padding: 0.6rem 1.5rem;
  border: none;
  border-radius: 999px;
  background-color: white;
  color: black;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s ease;
  min-width: 120px;
  font-size: 1rem;
}

.intro-hero__options .active {
  background-color: #00796b;
  color: white;
}

/* Search form */
.intro-hero__form {
  max-width: 600px;
  margin: 0 auto;
}

/* Scroll indicator */
.intro-hero__scroll-indicator {
  margin-top: 2rem;
  font-size: 2rem;
  animation: intro-bounce 2s infinite;
}

@keyframes intro-bounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(10px); }
}

/* Suggestion item style */
.suggestion-item {
  background-color: white;
  color: black;
  font-family: 'Inter', sans-serif;
  text-align: left;
  padding: 0.6rem 1rem;
  border-bottom: 1px dotted #ccc;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.suggestion-item:last-child {
  border-bottom: none;
}

.suggestion-item:hover {
  background-color: #f0f8ff;
}

/* Suggestion box positioning and styling */
#suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin: 0;
  z-index: 1000;
  background-color: white;
  border: 1px solid #ccc;
  border-bottom: none;
  border-radius: 8px 8px 8px 8px;
  box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.05);
  font-family: 'Inter', sans-serif;
  box-sizing: border-box;
}

/* City container wrapper */
.city-container {
  flex: 1;
  position: relative;
}

.city-container input[type="text"] {
  width: 100%;
  padding: 0.8rem;
  margin-bottom: 1.5rem;
  border: 1px solid #ccc;
  border-radius: 8px 8px 0 0;
  font-size: 1rem;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}

/* Match label visibility */
.intro-hero__form label {
  color: #333;
  text-align: left;
}

/* Mobile full-width and improved layout */
@media (max-width: 768px) {
  html, body {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    overflow-x: hidden !important;
  }

  .intro-hero {
    margin: 0 !important;
    padding: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
  }

  .intro-hero__video {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;         /* ✅ Fix: stretch to full screen */
    height: 100vh !important;
    object-fit: cover !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }

  .intro-hero__overlay,
  .intro-hero__form {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 0 1rem !important;
    box-sizing: border-box !important;
  }

  .intro-hero__form form {
    width: 100% !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  .intro-hero__options {
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    padding: 0 1rem;
  }

  .intro-hero__options button {
    flex: 1 1 auto;
    min-width: 140px;
    font-size: 1rem;
  }

  .xcontainer,
  .content,
  .xcontent {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 0 1rem !important;
    box-sizing: border-box !important;
  }

  .article-list {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 auto !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .article-item {
    max-width: 360px !important;
    width: 100% !important;
    margin: 0 auto 1.5rem auto !important;
    text-align: center !important;
    box-sizing: border-box !important;
  }

  .article-content {
    padding: 0 1rem !important;
    text-align: center !important;
  }

  .article-title,
  .article-description {
    text-align: center !important;
  }
}
@media (max-width: 768px) {
     #suggestions {
    position: absolute;
    top: 100%; /* attach directly to input */
    left: 0;
    right: 0;
    z-index: 1000;
    margin: 0;
    background-color: white;
    border: 1px solid #ccc;
    border-top: none; /* remove top border to merge with input */
    border-radius: 8px 8px 8px 8px; /* round bottom corners only */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    font-family: 'Inter', sans-serif;
    box-sizing: border-box;
  }

  .city-container input[type="text"] {
    margin-bottom: 0 !important;
    border-radius: 8px 8px 8px 8px !important; /* rounded top corners */
  }
    
  .intro-hero__title {
    font-size: 1.8rem !important;  /* Smaller domain title */
    margin-bottom: 0.5rem !important;
    text-align: center !important;
  }

  .intro-hero__ticker {
    font-size: 1.4rem !important;
    height: 2em !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    text-align: left;
    position: relative;
    padding: 0 10px;
    margin-bottom: 1rem;
  }

  .ticker-wrapper {
    width: 100% !important;
    overflow: hidden !important;
    position: relative !important;
  }

  .ticker-track {
    display: inline-block !important;
    white-space: nowrap !important;
    animation: scroll-left 35s linear infinite !important;
  }

  .ticker-phrase {
    display: inline-block !important;
    padding-right: 7rem !important;
    white-space: nowrap !important;
  }
    /* Force State and City fields to share the row */
#search-form .form-group {
  flex: 0 0 48% !important;
  max-width: 48% !important;
  width: 48% !important;
  padding: 0 !important;
  margin: 0 !important;
  margin-bottom: 0.2rem !important; /* slight space below each field */
  box-sizing: border-box !important;
}

/* Arrange the form fields in a row with minimal gap */
#search-form .form-row {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: space-between !important;
  gap: 0.5rem !important;
}

/* Submit section positioning */
#search-form .form-submit {
  flex: 0 0 100% !important;
  max-width: 100% !important;
  margin-top: 0.3rem !important; /* reduced space above button */
  text-align: center !important;
}

/* Submit button styling */
#search-form .form-submit input[type="submit"] {
  width: 100% !important;
  padding: 0.6rem !important;
  font-size: 1.1rem !important;
}

/* Input and select spacing */
#search-form .form-group select,
#search-form .form-group input[type="text"] {
  margin-bottom: 0 !important;
  padding: 0.4rem !important; /* slightly tighter padding */
}

/* Label spacing */
#search-form .form-group label {
  margin-bottom: 0.2rem !important;
  display: block;
}
#search-form {
  margin-bottom: 0 !important; /* Eliminate bottom margin */
  padding-bottom: 1 !important;
}

#search-form .form-submit {
  margin-bottom: 0 !important; /* Remove any bottom spacing from the button container */
}

#search-form .form-submit input[type="submit"] {
  margin-bottom: 0 !important; /* Remove space below the button */
}
  @keyframes scroll-left {
    0% {
      transform: translateX(0%);
    }
    100% {
      transform: translateX(-100%);
    }
  }
}
