/**
 * HappyPreggie — Consumer Homepage Styles (/)
 * Reference: planning/04-page-by-page-functional-and-visual-spec.md (Section 1)
 */

/* 1.1 Hero Banner & Dual Autocomplete Search Bar */
.hp-hero {
  position: relative;
  background: linear-gradient(135deg, #fce5e9 0%, #fef3f5 42%, #fce2e8 78%, #f7edf8 100%);
  color: var(--hp-text-primary);
  padding: 64px 0 68px;
  overflow: visible;
  border-bottom: 1px solid rgba(244, 180, 184, 0.35);
}

.hp-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 82% 16%, rgba(255, 255, 255, 0.8) 0%, transparent 45%),
    radial-gradient(circle at 10% 85%, rgba(252, 226, 232, 0.5) 0%, transparent 45%);
  pointer-events: none;
}

.hp-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 920px;
  margin: 0 auto;
  text-align: center;
}

.hp-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--hp-teal-accent, #0aaca2);
  border: 1px solid #08968d;
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  padding: 6px 16px;
  border-radius: var(--hp-radius-pill);
  margin-bottom: 18px;
  box-shadow: 0 4px 14px rgba(10, 172, 162, 0.32);
  letter-spacing: 0.1px;
}

.hp-hero-eyebrow i {
  color: #ffffff;
  font-size: 13px;
}

.hp-hero h1 {
  color: #3b125d;
  font-size: clamp(28px, 4.2vw, 44px);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.6px;
  margin-bottom: 14px;
}

.hp-hero-lead {
  color: #554854;
  font-size: clamp(15px, 1.8vw, 17.5px);
  font-weight: 600;
  line-height: 1.55;
  max-width: 740px;
  margin: 0 auto 30px;
}

/* Composite Search Pill Card */
.hp-search-composite {
  background: #ffffff;
  background-color: #ffffff;
  border-radius: var(--hp-radius-pill);
  padding: 8px 8px 8px 22px;
  display: grid;
  grid-template-columns: 2fr 1fr auto;
  align-items: center;
  gap: 8px;
  box-shadow: 0 16px 38px rgba(59, 18, 93, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(97, 46, 149, 0.14);
  text-align: left;
  position: relative;
}

@media (max-width: 767px) {
  .hp-search-composite {
    background: #ffffff;
    background-color: #ffffff;
    grid-template-columns: 1fr;
    border-radius: var(--hp-radius-lg);
    padding: 14px;
    gap: 12px;
  }
}

.hp-search-field {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 12px;
}

.hp-search-field + .hp-search-field {
  border-left: 1px solid var(--hp-border-light);
  padding-left: 16px;
}

@media (max-width: 767px) {
  .hp-search-field + .hp-search-field {
    border-left: none;
    border-top: 1px solid var(--hp-border-light);
    padding-left: 0;
    padding-top: 10px;
  }
}

.hp-search-field i {
  color: #603197;
  font-size: 16px;
}

.hp-search-field-inputs {
  flex: 1;
}

.hp-search-field-inputs label {
  display: block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #764da0;
  margin-bottom: 1px;
}

.hp-search-field-inputs input {
  width: 100%;
  border: none;
  padding: 2px 0;
  font-family: var(--hp-font-sans);
  font-size: 14.5px;
  font-weight: 700;
  color: #222222;
  background: transparent;
}

.hp-search-field-inputs input:focus {
  outline: none;
}

.hp-search-field-inputs input::placeholder {
  color: #94a3b8;
  font-weight: 500;
  opacity: 1;
}

.hp-search-field-inputs input::-webkit-input-placeholder {
  color: #94a3b8;
  font-weight: 500;
}

.hp-search-field-inputs input::-moz-placeholder {
  color: #94a3b8;
  font-weight: 500;
  opacity: 1;
}

.hp-search-field-inputs input:-ms-input-placeholder {
  color: #94a3b8;
  font-weight: 500;
}

.hp-search-composite .btn-search {
  background-color: #603197;
  color: #ffffff;
  border-radius: var(--hp-radius-pill);
  font-weight: 800;
  padding: 12px 28px;
  box-shadow: 0 4px 14px rgba(96, 49, 151, 0.35);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.hp-search-composite .btn-search:hover {
  background-color: #4c1d75;
  box-shadow: 0 6px 18px rgba(96, 49, 151, 0.45);
  transform: translateY(-1px);
}

/* Autocomplete Dropdown (#category_list & #location_list) */
.hp-autocomplete-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid var(--hp-border-light);
  border-radius: var(--hp-radius-md);
  box-shadow: var(--hp-shadow-modal);
  z-index: 1020;
  max-height: 320px;
  overflow-y: auto;
  display: none;
  padding: 8px;
}

.hp-autocomplete-dropdown.is-open {
  display: block;
}

.hp-autocomplete-group-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--hp-text-caption);
  padding: 6px 10px 4px;
}

.hp-autocomplete-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--hp-radius-sm);
  font-size: 13px;
  font-weight: 700;
  color: var(--hp-text-primary);
  cursor: pointer;
}

.hp-autocomplete-item:hover {
  background-color: var(--hp-purple-tint);
  color: var(--hp-purple-primary);
}

.hp-hero-quick-tags {
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
}

.hp-hero-quick-tags span {
  color: #554854;
  font-weight: 700;
}

.hp-hero-quick-tags a {
  background: #ffffff;
  color: #3b125d;
  padding: 5px 14px;
  border-radius: var(--hp-radius-pill);
  font-weight: 700;
  font-size: 12.5px;
  border: 1px solid rgba(97, 46, 149, 0.16);
  box-shadow: 0 2px 5px rgba(59, 18, 93, 0.04);
  text-decoration: none;
  transition: all 0.2s ease;
}

.hp-hero-quick-tags a:hover {
  background: #603197;
  color: #ffffff;
  border-color: #603197;
  box-shadow: 0 4px 12px rgba(96, 49, 151, 0.25);
  transform: translateY(-1px);
}

.hp-hero-quick-tags a.hp-hero-tag--hpcover {
  background: #fce4e8;
  color: #603197;
  border-color: rgba(220, 70, 120, 0.25);
}

.hp-hero-quick-tags a.hp-hero-tag--hpcover i {
  color: #e66767;
}

.hp-hero-quick-tags a.hp-hero-tag--hpcover:hover {
  background: #603197;
  color: #ffffff;
  border-color: #603197;
}

.hp-hero-quick-tags a.hp-hero-tag--hpcover:hover i {
  color: #ffffff;
}

/* Hero Trust Perks (adapted from Screenshot's 4 checks) */
.hp-hero-trust-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px dashed rgba(97, 46, 149, 0.16);
}

.hp-hero-trust-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 700;
  color: #3b125d;
}

.hp-hero-trust-item i {
  color: var(--hp-teal-accent, #0aaca2);
  font-size: 15px;
}

/* 1.2 Primary Service Category Grid & Dynamic Stage-Specific Care Carousel */
.hp-stage-section-header {
  margin-bottom: 16px;
}

.hp-stage-main-title {
  font-size: clamp(19px, 2.2vw, 24px);
  font-weight: 800;
  color: var(--hp-purple-dark, #3b125d);
  letter-spacing: -0.015em;
  margin-bottom: 0;
  line-height: 1.3;
}

/* 4-Stage Segmented Selector: 4-cols desktop, 2x2 grid mobile (100% visible on screen) */
.hp-stage-selector-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

@media (max-width: 991px) {
  .hp-stage-selector-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 14px;
  }
}

@media (max-width: 480px) {
  .hp-stage-selector-grid {
    gap: 8px;
  }
}

.hp-stage-card-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--hp-radius-md, 14px);
  background: #ffffff;
  border: 1.5px solid var(--hp-border-light, #e2e8f0);
  color: var(--hp-text-secondary, #475569);
  cursor: pointer;
  text-align: left;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  width: 100%;
}

.hp-stage-card-btn:hover {
  border-color: var(--hp-purple-primary, #612e95);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(97, 46, 149, 0.1);
}

.hp-stage-card-btn.is-active {
  background: linear-gradient(135deg, var(--hp-purple-primary, #612e95) 0%, var(--hp-purple-dark, #3b125d) 100%);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 8px 20px rgba(97, 46, 149, 0.28);
}

.hp-stage-card-icon {
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
}

.hp-stage-card-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 2px;
}

.hp-stage-card-title {
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
  color: var(--hp-text-primary, #1e293b);
}

.hp-stage-card-desc {
  font-size: 11px;
  font-weight: 600;
  color: var(--hp-text-muted, #64748b);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hp-stage-card-btn.is-active .hp-stage-card-title {
  color: #ffffff;
}

.hp-stage-card-btn.is-active .hp-stage-card-desc {
  color: rgba(255, 255, 255, 0.88);
}

@media (max-width: 575px) {
  .hp-stage-card-btn {
    padding: 9px 10px;
    gap: 8px;
    border-radius: 12px;
  }
  .hp-stage-card-icon {
    font-size: 19px;
  }
  .hp-stage-card-title {
    font-size: 11.5px;
  }
  .hp-stage-card-desc {
    font-size: 10px;
  }
}


/* Category Tiles in Compact Horizontal Scroll Format */
.hp-category-scroll-container {
  margin-bottom: 24px;
  position: relative;
}

.hp-category-scroll-track {
  display: flex;
  align-items: stretch;
  gap: 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(97, 46, 149, 0.2) transparent;
  padding: 4px 2px 10px 2px;
}

.hp-category-scroll-track::-webkit-scrollbar {
  height: 5px;
}

.hp-category-scroll-track::-webkit-scrollbar-thumb {
  background: rgba(97, 46, 149, 0.2);
  border-radius: 4px;
}

.hp-category-scroll-track .service-t {
  flex: 0 0 auto;
  width: 108px;
  min-width: 108px;
  max-width: 108px;
  padding: 10px 6px;
  gap: 6px;
  border-radius: 12px;
}

.hp-category-scroll-track .service-t .service-t-icon {
  width: 40px;
  height: 40px;
  font-size: 18px;
  border-radius: 10px;
}

.hp-category-scroll-track .service-t .service-t-title {
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 28px;
}

@media (max-width: 575px) {
  .hp-category-scroll-container {
    margin-bottom: 18px;
  }
  .hp-category-scroll-track {
    gap: 8px;
  }
  .hp-category-scroll-track .service-t {
    width: 96px;
    min-width: 96px;
    max-width: 96px;
    padding: 8px 4px;
  }
  .hp-category-scroll-track .service-t .service-t-icon {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }
  .hp-category-scroll-track .service-t .service-t-title {
    font-size: 10.5px;
    min-height: 26px;
  }
}

/* Dynamic Stage-Specific Provider Carousels */
.hp-stage-carousels-container {
  position: relative;
  min-height: 320px;
}

.hp-stage-carousel-pane {
  width: 100%;
  animation: hpFadeIn 0.25s ease-in-out;
}

.hp-stage-carousel-pane:not(.is-active) {
  display: none !important;
}

@keyframes hpFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 1.5 HPCover Free Insurance Protection Split Banner */
.hp-hpcover-banner {
  background: linear-gradient(135deg, #fce5e9 0%, #fef3f5 42%, #fce2e8 78%, #f7edf8 100%);
  border: 1px solid #f6ccd2;
  border-radius: 20px;
  padding: 38px 42px;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 32px;
  align-items: center;
  box-shadow: 0 8px 30px rgba(60, 18, 93, 0.05);
}

@media (max-width: 991px) {
  .hp-hpcover-banner {
    grid-template-columns: 1fr;
    padding: 26px 20px;
  }
}

.hp-hpcover-banner h2 {
  color: #3b125d;
  font-size: clamp(22px, 2.5vw, 30px);
  font-weight: 900;
  line-height: 1.25;
  margin-bottom: 10px;
}

.hp-hpcover-perks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
  margin: 18px 0 24px;
}

@media (max-width: 575px) {
  .hp-hpcover-perks {
    grid-template-columns: 1fr;
  }
}

.hp-hpcover-perk-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: #3b125d;
  font-size: 14px;
}

.hp-hpcover-perk-item i {
  color: var(--hp-teal-accent, #0aaca2);
  font-size: 15px;
}

.hp-hpcover-banner .btn {
  border-radius: var(--hp-radius-pill, 50px);
  font-weight: 700;
  padding: 10px 22px;
}

/* 1.7 Pregnancy Planning Tool Callout Section */
.hp-planning-callout {
  background: #ffffff;
  border: 1px solid var(--hp-border-light);
  border-radius: var(--hp-radius-lg);
  padding: 36px;
  box-shadow: var(--hp-shadow-card);
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 32px;
  align-items: center;
}

@media (max-width: 991px) {
  .hp-planning-callout {
    grid-template-columns: 1fr;
    padding: 24px;
  }
}

.hp-planning-features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.hp-planning-mini-card {
  background: var(--hp-purple-tint);
  border-radius: var(--hp-radius-md);
  padding: 16px;
}

.hp-planning-mini-card i {
  font-size: 22px;
  color: var(--hp-purple-primary);
  margin-bottom: 8px;
}

.hp-planning-mini-card h4 {
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 4px;
}

/* 1.9 Latest Blogs Grid */
.hp-home-blogs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

@media (max-width: 991px) {
  .hp-home-blogs-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 575px) {
  .hp-home-blogs-grid {
    grid-template-columns: 1fr;
  }
}
