/* =================================================================
   Elway Hero — Split Layout (Design 2)
   Left: heading + search | Right: category grid | Bottom: ad carousel
   Video background + diagonal teal gradient overlay
   Mobile-first | Namespace: ew2-
   ================================================================= */

/* --- Hero section — break out of .site-content padding --- */
.ew2-hero {
  position: relative;
  overflow: hidden;
  margin-top: -24px;
  margin-left: -24px;
  margin-right: -24px;
}

/* Diagonal teal gradient overlay */
.ew2-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* --- Video background --- */
.ew2-hero-video {
  position: absolute;
  inset: 0;
}

.ew2-hero-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* --- Content overlay --- */
.ew2-hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  padding: 24px 24px 8px;
  max-width: 1280px;
  margin: 0 auto;
  gap: 32px;
}

/* --- Top section (stacked on mobile/tablet, two-column on desktop) --- */
.ew2-hero-top {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* --- Left column: heading + search --- */
.ew2-hero-left {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* --- Heading --- */
.ew2-heading {
  color: #fff;
  font-size: 28px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.08;
}

/* --- Search bar (smaller than stacked design) --- */
/* Override global form card styles from elway-theme.css (match specificity: form + class) */
.site-content form.ew2-search {
  background: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  max-width: 420px;
  margin: 0;
}

.site-content form.ew2-search::before {
  display: none;
}

.site-content .ew2-hero form.ew2-search input[type="text"] {
  height: 48px;
  padding: 0 56px 0 24px;
  background: #fff;
  border: 1px solid #d0d5dd;
  border-radius: 100px;
  font-size: 15px;
  color: #0a0a0a;
}

.site-content .ew2-hero form.ew2-search button[type="submit"] {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
}

.ew2-search {
  position: relative;
  width: 100%;
  max-width: 420px;
}

.ew2-search-input {
  width: 100%;
  height: 48px;
  padding: 0 56px 0 24px;
  background: #fff;
  border: 1px solid #d0d5dd;
  border-radius: 100px;
  font-size: 15px;
  color: #0a0a0a;
  outline: none;
  transition: border-color 0.2s;
}

.ew2-search-input:focus {
  border-color: var(--accent, #006883);
}

.ew2-search-input::placeholder {
  color: #98a2b3;
}

.ew2-search-btn {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  padding: 0;
  background: var(--accent, #006883);
  border: none;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ew2-search-btn:hover {
  background: color-mix(in srgb, var(--accent, #006883) 85%, black);
}

.ew2-search-btn svg {
  width: 18px;
  height: 18px;
}

/* --- Category grid (hidden on mobile — mobile grid below hero) --- */
.ew2-categories {
  display: none;
}

/* --- Category tile — frosted glass with icon --- */
.ew2-tile {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  max-width: 165px;
  height: 120px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: background 0.2s ease;
}

.ew2-tile:hover {
  background: rgba(0, 0, 0, 0.55);
}

.ew2-tile-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent, #155dfc);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
}

.ew2-tile-name {
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  letter-spacing: 0.02em;
}

/* --- Promo carousel (hidden on mobile) --- */
.ew2-promos {
  display: none;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
}

.ew2-promos .ads-container {
  max-width: none;
  padding: 0;
}

.ew2-promos .ads-arrow {
  background: rgba(255, 255, 255, 0.9);
  color: #333;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.ew2-promos .ads-arrow:hover {
  background: #fff;
  color: #000;
  border: none;
}

.ew2-promos .ads-dot {
  background: rgba(255, 255, 255, 0.4);
}

.ew2-promos .ads-dot:hover {
  background: rgba(255, 255, 255, 0.6);
}

.ew2-promos .ads-dot--active {
  background: #fff;
}

.ew2-promos .ads-dots {
  padding: 12px 0 0;
}

/* --- Mobile category grid (below hero, normal flow) — also full-width --- */
.ew2-mobile-categories {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 16px;
  margin-left: -24px;
  margin-right: -24px;
}

.ew2-mobile-categories .ew2-tile {
  max-width: none;
  height: 120px;
}

/* --- Mobile promo strip — also full-width --- */
.ew2-mobile-promos {
  padding: 0 0 16px;
  margin-left: -24px;
  margin-right: -24px;
}

/* =================================================================
   Tablet (769px+) — still stacked, categories show inside hero
   ================================================================= */
@media (min-width: 769px) {
  .ew2-hero-content {
    padding: 48px 40px 8px;
    gap: 48px;
  }

  .ew2-hero-left {
    gap: 0;
  }

  .ew2-heading {
    font-size: 44px;
  }

  /* Show categories inside hero as grid, stacked below heading */
  .ew2-categories {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 165px));
    gap: 12px;
    justify-content: center;
  }

  .ew2-promos {
    display: block;
  }

  /* Hide mobile versions */
  .ew2-mobile-categories,
  .ew2-mobile-promos {
    display: none;
  }
}

/* =================================================================
   Desktop (1025px+) — two-column split layout
   ================================================================= */
@media (min-width: 1025px) {
  .ew2-hero-content {
    padding: 100px 56px 8px;
    gap: 72px;
  }

  .ew2-hero-top {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 80px;
    align-items: center;
  }

  .ew2-heading {
    font-size: 56px;
  }

  .ew2-categories {
    grid-template-columns: repeat(auto-fill, minmax(150px, 165px));
  }
}
