/* American Rent a Car — home hero & booking widget */

.am-hero {
  position: relative;
  overflow: hidden;
  background: #fff;
  padding: 1rem 0 2rem;
}

.am-hero__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.am-hero__bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
}

.am-hero__bg-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(255, 255, 255, 0.82) 42%, rgba(248, 250, 252, 0.72) 100%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0.55) 52%, transparent 100%);
}

.am-hero__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 max(1.25rem, env(safe-area-inset-left, 0px)) 0 max(1.25rem, env(safe-area-inset-right, 0px));
}

.am-hero__grid {
  display: grid;
  gap: 1.25rem;
  align-items: stretch;
}

/* —— Pitch card —— */
.am-hero__pitch {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid #e2e8f0;
  border-radius: 1.25rem;
  background: #fff;
  box-shadow: 0 18px 48px rgba(0, 40, 104, 0.08);
  overflow: hidden;
}

.am-hero__pitch-accent {
  flex-shrink: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color-primary, #c8102e) 0%, #f8fafc 50%, var(--color-secondary, #002868) 100%);
}

.am-hero__pitch-watermark {
  position: absolute;
  right: -0.5rem;
  bottom: 2.5rem;
  font-size: 7.5rem;
  line-height: 1;
  color: color-mix(in srgb, var(--color-secondary, #002868) 7%, transparent);
  pointer-events: none;
  z-index: 0;
}

.am-hero__pitch-body {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  padding: 1.35rem 1.25rem 1.25rem;
}

.am-hero__pitch-intro {
  flex-shrink: 0;
}

.am-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.85rem;
  padding: 0.35rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  background: var(--color-primary, #c8102e);
}

.am-hero__eyebrow i {
  font-size: 0.75rem;
}

.am-hero__title {
  margin: 0;
  font-family: var(--font-display, 'Oswald', system-ui, sans-serif);
  font-size: clamp(1.65rem, 4.2vw, 2.2rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--color-secondary, #002868);
}

.am-hero__subtitle {
  margin: 0.55rem 0 0;
  font-family: var(--font-display, 'Oswald', system-ui, sans-serif);
  font-size: clamp(1.15rem, 2.8vw, 1.45rem);
  font-weight: 700;
  line-height: 1.28;
  color: var(--color-primary, #c8102e);
  text-wrap: balance;
}

.am-hero__lede {
  margin: 0.75rem 0 0;
  font-size: 0.975rem;
  line-height: 1.55;
  color: #475569;
}

.am-hero__features {
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.65rem;
  align-content: start;
}

.am-hero__feature {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  border-radius: 0.8rem;
  border: 1px solid #e2e8f0;
  background: linear-gradient(135deg, #f8fafc 0%, #fff 100%);
}

.am-hero__feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 0.65rem;
  flex-shrink: 0;
  font-size: 1rem;
  color: var(--color-primary, #c8102e);
  background: color-mix(in srgb, var(--color-primary, #c8102e) 11%, white);
  border: 1px solid color-mix(in srgb, var(--color-primary, #c8102e) 18%, white);
}

.am-hero__feature-copy {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.am-hero__feature-copy strong {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--color-secondary, #002868);
}

.am-hero__feature-copy span {
  font-size: 0.875rem;
  line-height: 1.45;
  color: #475569;
}

.am-hero__pitch-footer {
  flex-shrink: 0;
  display: grid;
  gap: 0.55rem;
  margin-top: auto;
  padding-top: 0.35rem;
}

.am-hero__action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 2.75rem;
  padding: 0.65rem 1rem;
  border-radius: 0.7rem;
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.am-hero__action i {
  font-size: 1rem;
  flex-shrink: 0;
}

.am-hero__action--wa {
  color: #fff;
  background: #25d366;
  border: 1px solid #1ebe57;
}

.am-hero__action--wa:hover {
  background: #1fb855;
}

.am-hero__action--phone {
  color: var(--color-secondary, #002868);
  background: #fff;
  border: 1px solid #cbd5e1;
}

.am-hero__action--phone:hover {
  background: #f8fafc;
  border-color: color-mix(in srgb, var(--color-secondary, #002868) 25%, #cbd5e1);
}

.am-hero__location-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0.55rem 0.75rem;
  border-radius: 0.55rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #64748b;
  background: color-mix(in srgb, var(--color-secondary, #002868) 5%, white);
  border: 1px solid #e2e8f0;
}

.am-hero__location-note i {
  color: var(--color-primary, #c8102e);
  font-size: 0.8rem;
}

/* —— Booking card —— */
.am-hero__booking {
  border: 1px solid #e2e8f0;
  border-radius: 1.25rem;
  background: #fff;
  box-shadow: 0 18px 48px rgba(0, 40, 104, 0.1);
  padding: 1.25rem 1.25rem 1.35rem;
}

.am-hero__booking-head {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #f1f5f9;
}

.am-hero__booking-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  flex-shrink: 0;
  color: var(--color-primary, #c8102e);
  background: color-mix(in srgb, var(--color-primary, #c8102e) 12%, white);
  border: 1px solid color-mix(in srgb, var(--color-primary, #c8102e) 22%, white);
}

.am-hero__booking-icon i {
  font-size: 1.1rem;
  line-height: 1;
}

.am-hero__booking-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary, #c8102e);
}

.am-hero__booking-title {
  margin: 0;
  font-family: var(--font-display, 'Oswald', system-ui, sans-serif);
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  font-weight: 700;
  line-height: 1.15;
  text-transform: uppercase;
  color: var(--color-secondary, #002868);
}

.am-hero__booking-hint {
  margin: 0.35rem 0 0;
  font-size: 0.875rem;
  line-height: 1.45;
  color: #64748b;
}

.am-hero__booking-form {
  padding: 0.85rem;
  border-radius: 0.875rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
}

.am-hero__booking {
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
}

/* Hide desktop pitch on mobile; mobile intro handles hierarchy */
.am-hero__pitch {
  display: none;
}

.page-home.theme-american .am-hero__mobile .home-app-hero__mobile-intro {
  display: block;
  margin-bottom: 1rem;
}

.page-home.theme-american .am-hero__mobile .home-app-hero__headline {
  font-family: var(--font-display, 'Oswald', system-ui, sans-serif);
  font-size: clamp(1.5rem, 6vw, 1.85rem);
  font-weight: 700;
  line-height: 1.12;
  color: var(--color-secondary, #002868);
}

.page-home.theme-american .am-hero__mobile .home-app-hero__lede {
  font-size: 0.9375rem;
  color: #64748b;
}

.am-hero__mobile-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.85rem 0 0;
  padding: 0;
  list-style: none;
}

.am-hero__mobile-trust li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #334155;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.am-hero__mobile-trust li i {
  font-size: 0.85rem;
  color: var(--color-primary, #c8102e);
}

@media (min-width: 1024px) {
  .am-hero__mobile-trust {
    display: none;
  }
}

/* —— Widget form (American home) —— */
.page-home.theme-american .booking.is-home-embed.is-american-home {
  color: #0f172a;
}

/* Only style step1 when visible — never force display (JS hides steps) */
.page-home.theme-american .booking.is-home-embed.is-american-home #step1:not(.widget-step--hidden) {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  align-items: end;
}

.page-home.theme-american .booking.is-home-embed.is-american-home #step1:not(.widget-step--hidden) > .field {
  grid-column: 1 / -1;
  min-width: 0;
}

.page-home.theme-american .booking.is-home-embed.is-american-home .widget-step1-shell.widget-step--hidden {
  display: none !important;
}

.page-home.theme-american .booking.is-home-embed.is-american-home .field label {
  margin: 0 0 0.35rem 0.15rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.page-home.theme-american .booking.is-home-embed.is-american-home .control {
  min-height: 3rem;
  padding: 0.65rem 0.85rem;
  border-radius: 0.75rem;
  background: #fff;
  border: 1px solid #cbd5e1;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.page-home.theme-american .booking.is-home-embed.is-american-home .control input,
.page-home.theme-american .booking.is-home-embed.is-american-home .control select,
.page-home.theme-american .booking.is-home-embed.is-american-home .control input.w-alt-input,
.page-home.theme-american .booking.is-home-embed.is-american-home .select-clean select {
  font-size: 1rem;
  font-weight: 600;
  color: #0f172a;
}

.page-home.theme-american .booking.is-home-embed.is-american-home .cta {
  grid-column: 1 / -1 !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  min-height: 3.25rem;
  margin: 0.25rem 0 0 !important;
  padding: 0.85rem 1.25rem;
  border: 0;
  border-radius: 0.75rem;
  font-size: 1rem;
  font-weight: 800;
  align-self: stretch !important;
}

.page-home.theme-american .booking.is-home-embed.is-american-home .cta:not([disabled]) {
  background: var(--w-primary, var(--color-primary, #c8102e));
  color: #fff;
  box-shadow: 0 10px 28px color-mix(in srgb, var(--color-primary, #c8102e) 32%, transparent);
  cursor: pointer;
}

.page-home.theme-american .booking.is-home-embed.is-american-home .cta[disabled] {
  opacity: 1;
  background: #e2e8f0;
  color: #64748b;
  box-shadow: none;
  cursor: not-allowed;
}

.page-home.theme-american .booking.is-home-embed.is-american-home .widget-feedback-rail {
  min-height: 1.5rem;
  margin-top: 0.35rem;
}

/* Step progress (American home widget) */
.am-widget-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 0.85rem;
  padding: 0;
  list-style: none;
}

.am-widget-steps li {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.35rem 0.5rem;
  border-radius: 0.5rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
  color: #94a3b8;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.am-widget-steps li.is-active {
  color: #fff;
  background: var(--color-primary, #c8102e);
  border-color: var(--color-primary, #c8102e);
}

.am-widget-steps li.is-done {
  color: var(--color-secondary, #002868);
  background: color-mix(in srgb, var(--color-secondary, #002868) 8%, white);
  border-color: color-mix(in srgb, var(--color-secondary, #002868) 18%, #e2e8f0);
}

@media (max-width: 767px) {
  .am-widget-steps {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-bottom: 0.65rem;
    padding-bottom: 0.15rem;
  }

  .am-widget-steps::-webkit-scrollbar {
    display: none;
  }

  .am-widget-steps li {
    flex: 0 0 auto;
    min-width: 4.25rem;
    font-size: 0.625rem;
    padding: 0.3rem 0.45rem;
  }
}

/* Steps 2–5 inside American home embed */
.page-home.theme-american .booking.is-home-embed.is-american-home .step-header {
  margin: 0 0 0.75rem;
}

.page-home.theme-american .booking.is-home-embed.is-american-home .step-header .muted {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #64748b;
}

.page-home.theme-american .booking.is-home-embed.is-american-home .step-footer {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid #e2e8f0;
}

.page-home.theme-american .booking.is-home-embed.is-american-home .extras {
  grid-template-columns: 1fr;
  gap: 0.65rem;
}

.page-home.theme-american .booking.is-home-embed.is-american-home .extra-card {
  position: relative;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
  padding: 0.85rem 2.75rem 0.85rem 0.85rem;
  border-color: #e2e8f0;
  border-radius: 0.75rem;
}

.page-home.theme-american .booking.is-home-embed.is-american-home .extra-card > i,
.page-home.theme-american .booking.is-home-embed.is-american-home .extra-card > img {
  width: 1.75rem;
  height: 1.75rem;
  font-size: 1.25rem;
}

.page-home.theme-american .booking.is-home-embed.is-american-home .extra-title {
  font-size: 0.875rem;
  line-height: 1.35;
  color: #0f172a;
}

.page-home.theme-american .booking.is-home-embed.is-american-home .extra-price {
  font-size: 0.8125rem;
}

.page-home.theme-american .booking.is-home-embed.is-american-home .extra-toggle {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  margin: 0;
}

.page-home.theme-american .booking.is-home-embed.is-american-home .extra-toggle label {
  font-size: 0;
  gap: 0;
}

.page-home.theme-american .booking.is-home-embed.is-american-home .extra-toggle label i {
  font-size: 1.25rem;
}

.page-home.theme-american .booking.is-home-embed.is-american-home .cats {
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .page-home.theme-american .booking.is-home-embed.is-american-home #step1:not(.widget-step--hidden) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-home.theme-american .booking.is-home-embed.is-american-home .field-branch {
    grid-column: 1 / -1;
  }

  .page-home.theme-american .booking.is-home-embed.is-american-home .extras {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-home.theme-american .booking.is-home-embed.is-american-home .cats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .am-hero {
    padding: 2.5rem 0 3.5rem;
  }

  .am-hero__inner {
    padding-left: max(2rem, env(safe-area-inset-left, 0px));
    padding-right: max(2rem, env(safe-area-inset-right, 0px));
  }

  .am-hero__mobile {
    display: none;
  }

  .am-hero__pitch {
    display: flex;
  }

  .am-hero__grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 1.75rem;
    align-items: stretch;
  }

  .am-hero__pitch {
    height: 100%;
  }

  .am-hero__pitch-body {
    padding: 1.65rem 1.5rem 1.4rem;
    gap: 1.25rem;
    flex: 1;
  }

  .am-hero__title {
    font-size: clamp(1.85rem, 2.4vw, 2.35rem);
  }

  .am-hero__subtitle {
    font-size: clamp(1.2rem, 1.6vw, 1.5rem);
  }

  .am-hero__lede {
    font-size: 1.0625rem;
    line-height: 1.6;
    max-width: 36ch;
  }

  .am-hero__features {
    gap: 0.75rem;
  }

  .am-hero__feature {
    padding: 1rem 1.1rem;
  }

  .am-hero__feature-icon {
    width: 2.75rem;
    height: 2.75rem;
    font-size: 1.125rem;
  }

  .am-hero__feature-copy strong {
    font-size: 1.0625rem;
  }

  .am-hero__feature-copy span {
    font-size: 0.9375rem;
  }

  .am-hero__pitch-footer {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: auto;
    padding-top: 0.5rem;
  }

  .am-hero__location-note {
    grid-column: 1 / -1;
  }

  .am-hero__booking {
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1.5rem 1.65rem;
    align-self: stretch;
  }

  .am-hero__booking-form {
    flex: 1;
  }

  .page-home.theme-american .booking.is-home-embed.is-american-home #step1:not(.widget-step--hidden) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-home.theme-american .booking.is-home-embed.is-american-home .extras {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-home.theme-american .booking.is-home-embed.is-american-home .cats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1280px) {
  .page-home.theme-american .booking.is-home-embed.is-american-home #step1:not(.widget-step--hidden) {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .page-home.theme-american .booking.is-home-embed.is-american-home .field-branch {
    grid-column: 1 / -1;
  }

  .page-home.theme-american .booking.is-home-embed.is-american-home .cta {
    grid-column: 1 / -1;
  }

  .page-home.theme-american .booking.is-home-embed.is-american-home .extras {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .am-hero * {
    animation: none !important;
    transition: none !important;
  }
}

/* iOS Safari: reinforce 16px fields inside home widget on touch devices */
@media (max-width: 767px) {
  .rentacar-widget .control input,
  .rentacar-widget .control select,
  .rentacar-widget .control input.w-alt-input,
  .rentacar-widget .select-clean select,
  .rentacar-widget .form-control,
  .rentacar-widget .iti input {
    font-size: 16px !important;
  }
}
