/* ===========================================
   COMPONENT: Hero
   Used on: Home, City, Service, Category pages
   =========================================== */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(1200px 520px at 8% -10%, rgba(79,199,186,0.16), transparent 62%),
    radial-gradient(980px 460px at 92% 10%, rgba(14,139,127,0.18), transparent 64%),
    linear-gradient(135deg, var(--color-navy) 0%, #0f2a2a 60%, var(--color-navy) 100%);
}

/* Background image layer */
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.42;
  filter: blur(2px);
  transform: scale(1.04);
  z-index: 0;
}

/* Content */
.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  display: block;
  padding-top: calc(64px + var(--space-10));
  padding-bottom: var(--space-12);
}
.hero > .hero-content .hero-inner {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: clamp(1.5rem, 3vw, 3.25rem);
  align-items: start;
  justify-items: stretch;
  width: 100%;
  max-width: 1200px;
}

/* Text side */
.hero-text {
  position: relative;
  min-width: 0;
  max-width: 600px;
  margin: 0;
  justify-self: start;
  padding: clamp(1rem, 2vw, 1.5rem);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--radius-xl);
}
.hero > .hero-content .hero-inner > .hero-text {
  width: 100%;
  justify-self: start;
}

/* Premium glass text card where needed (non-home hero variants) */
:is(.about-page,.services-page,.contact-page,.category-page) .hero-text {
  border-radius: var(--radius-xl);
  background: linear-gradient(145deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
  border: 1px solid rgba(255,255,255,0.16);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.24),
    0 18px 46px rgba(2,6,23,0.34),
    0 6px 20px rgba(15,159,143,0.16);
  backdrop-filter: blur(14px) saturate(135%);
  -webkit-backdrop-filter: blur(14px) saturate(135%);
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}
.hero-text h1 {
  color: rgba(255,255,255,0.90);
  margin-bottom: var(--space-6);
  text-shadow: 0 10px 30px rgba(2,6,23,0.45);
  line-height: 1.18;
}
.hero-text h1 span {
  display: block;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 700;
  font-size: 1.18em;
  color: #ffffff;
  letter-spacing: -0.02em;
  line-height: 1.12;
}
.hero-text p {
  font-size: var(--text-lg);
  color: rgba(255,255,255,0.75);
  max-width: 60ch;
  margin-bottom: var(--space-8);
  line-height: 1.8;
  overflow-wrap: anywhere;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  align-items: center;
  margin-bottom: var(--space-8);
}
/* Highlight pill */
.hero-highlight {
  display: inline-block;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-teal-light);
  background: rgba(14,139,127,0.12);
  border: 1px solid rgba(14,139,127,0.3);
  border-radius: 9999px;
  padding: 0.4rem 1.1rem;
  margin-bottom: var(--space-6);
  letter-spacing: 0.01em;
}

.hero-trust {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  flex-wrap: wrap;
}
.hero-trust-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.65);
}
.hero-trust-item i { color: var(--color-teal-light); }

/* Google rating badge */
.google-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-full);
  padding: 0.375rem 0.875rem;
}
.google-badge .stars { color: #FBBF24; font-size: var(--text-sm); }
.google-badge span { font-size: var(--text-xs); color: rgba(255,255,255,0.8); }

/* Form card side â€” true glassmorphism */
.hero .hero-form-card {
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 460px;
  justify-self: end;
  align-self: start;
  background:
    linear-gradient(155deg, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0.08) 55%, rgba(255,255,255,0.05) 100%);
  backdrop-filter: blur(26px) saturate(160%);
  -webkit-backdrop-filter: blur(26px) saturate(160%);
  border: 1px solid rgba(255,255,255,.24);
  box-shadow:
    inset 0 1.5px 0 rgba(255,255,255,.34),
    0 30px 78px rgba(0,0,0,.44),
    0 12px 34px rgba(15,159,143,.22),
    0 2px 8px rgba(0,0,0,.20);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
}
.hero > .hero-content .hero-inner > .hero-form-card {
  width: min(100%, 460px);
  max-width: 460px;
  justify-self: end;
  align-self: start;
}

/* Keep form card on the right for About and Services desktop layouts */
:is(.about-page,.services-page) .hero-form-card {
  justify-self: end;
}

/* Treatment/category pages: let copy width breathe for longer content */
.category-page .hero-text {
  max-width: none;
}
.category-page .hero-text p {
  max-width: none;
}
/* Top highlight line */
.hero .hero-form-card::before {
  content: "";
  position: absolute;
  top: 0; left: 10%; right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent);
  pointer-events: none;
  z-index: 1;
}

/* â”€â”€ Scoped form text for dark card â”€â”€ */
.hero .hero-form-card .lead-form-header h3 {
  color: #FFFFFF;
}
.hero .hero-form-card .lead-form-header p {
  color: rgba(255,255,255,.60);
}
.hero .hero-form-card .form-group label {
  color: rgba(255,255,255,.82);
}
.hero .hero-form-card .form-group label .required { color: #f87171; }

.hero .hero-form-card .lead-form-header {
  background: linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,.04));
  border: 1px solid rgba(255,255,255,.18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Glass inputs */
.hero .form-control {
  background: rgba(255,255,255,.12);
  border: 1.5px solid rgba(255,255,255,.24);
  color: rgba(255,255,255,.98);
  border-radius: 0.75rem;
}
.hero .form-control::placeholder { color: rgba(255,255,255,.62); }
.hero .form-control:focus {
  background: rgba(255,255,255,.17);
  border-color: rgba(79,199,186,.78);
  box-shadow: 0 0 0 3px rgba(79,199,186,.24);
}
.hero .form-control option {
  background: #0d2b1e;
  color: #fff;
}

/* Green CTA button */
.hero .form-submit {
  background: linear-gradient(135deg, #0a7b6e 0%, #0E8B7F 100%);
  box-shadow: 0 4px 14px rgba(14,139,127,.22);
  transition: all 0.2s ease;
}
.hero .form-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(14,139,127,.30);
  filter: brightness(1.04);
}

/* Hero pages with custom submit class names */
.hero .lead-form button[type="submit"] {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  font-family: 'DM Sans', sans-serif;
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #ffffff;
  background: linear-gradient(135deg, #0a7b6e 0%, #0E8B7F 100%);
  box-shadow: 0 4px 14px rgba(14,139,127,.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.hero .lead-form button[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(14,139,127,.30);
  filter: brightness(1.04);
}

.hero [class$="-form-note"] {
  color: rgba(255,255,255,.78);
}

/* Disclaimer */
.hero .hero-form-card .form-disclaimer { color: rgba(255,255,255,.56); }

/* â”€â”€ Hero primary button boost â”€â”€ */
.hero-text .btn-primary {
  background: linear-gradient(135deg, #0B7D72 0%, #0F9F8F 55%, #4FC7BA 100%);
  box-shadow: 0 4px 18px rgba(15,159,143,.45), 0 1px 4px rgba(15,159,143,.28);
}
.hero-text .btn-primary:hover {
  box-shadow: 0 8px 28px rgba(15,159,143,.65), 0 3px 10px rgba(15,159,143,.40), 0 20px 44px rgba(15,159,143,.18);
}

/* â”€â”€ WhatsApp button â€” green gradient â”€â”€ */
.hero-text .btn-white {
  background: linear-gradient(135deg, #14A493 0%, #0E8F7E 100%);
  color: #fff;
  box-shadow: 0 4px 16px rgba(20,164,147,.35), 0 1px 4px rgba(0,0,0,.10);
}
.hero-text .btn-white:hover {
  background: linear-gradient(135deg, #1fba58 0%, #15803d 100%);
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 8px 26px rgba(20,164,147,.50), 0 3px 8px rgba(0,0,0,.12);
}

/* Short hero variant (city/service/category pages) */
.hero-short {
  min-height: 60vh;
}
.hero-short .hero-inner {
  grid-template-columns: 1fr minmax(300px,420px);
}

/* Compact hero variant (blog/about pages) */
.hero-compact {
  min-height: 40vh;
  padding: 8rem 0 4rem;
}
.hero-compact .hero-inner {
  grid-template-columns: 1fr;
}

@media (min-width: 1025px) {
  .home-page .hero > .hero-content .hero-inner {
    grid-template-columns: 1fr 420px;
    align-items: start;
  }

  .home-page .hero > .hero-content .hero-inner > .hero-text {
    justify-self: start;
    margin: 0;
  }

  .home-page .hero > .hero-content .hero-inner > .hero-form-card {
    justify-self: end;
  }
}

@media (max-width: 1024px) {
  .hero > .hero-content .hero-inner {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
  .hero-text { max-width: none; }
  .hero > .hero-content .hero-inner > .hero-form-card {
    max-width: 480px;
    justify-self: start;
  }
}
@media (max-width: 768px) {
  .hero { min-height: auto; padding: 2.5rem 0 2rem; }
  .hero-content { padding: calc(64px + var(--space-3)) 0 var(--space-5); }
  .hero-text { padding: 0; }
  .home-page .hero .hero-text {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .home-page .hero-home .hero-bg {
    background-image: image-set(
      url('/images/hero/hero-home-mobile.webp') type('image/webp'),
      url('/images/hero/hero-home-mobile.jpg') type('image/jpeg')
    ) !important;
    background-size: cover;
    background-position: center top;
  }
  .hero-badges { margin-bottom: var(--space-4); }
  .hero-badges .badge {
    max-width: 100%;
    white-space: normal;
    line-height: 1.35;
  }
  .hero-highlight { margin-bottom: var(--space-4); }
  .hero-highlight {
    max-width: 100%;
    white-space: normal;
    line-height: 1.35;
  }
  .hero-text h1 { margin-bottom: var(--space-4); }
  .home-page .hero .hero-text h1,
  .home-page .hero .hero-text h1 span {
    color: #ffffff;
  }
  .hero-text p {
    font-size: 1rem;
    line-height: 1.55;
    margin-bottom: var(--space-4);
    color: rgba(255,255,255,0.92);
  }
  .hero-actions {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 10px;
    margin-bottom: var(--space-5);
  }
  .hero-actions .btn {
    width: auto;
    flex: 1 1 0;
    min-height: 44px;
    padding: 0.7rem 0.75rem;
    font-size: 0.88rem;
    white-space: normal;
    text-align: center;
    justify-content: center;
  }
  .hero-trust {
    width: 100%;
    gap: var(--space-3);
  }
  .hero-trust-item {
    width: 100%;
    font-size: 0.84rem;
    line-height: 1.4;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .hero > .hero-content .hero-inner > .hero-form-card {
    max-width: 100%;
    width: 100%;
    justify-self: stretch;
    padding: 14px;
  }
  .home-page .hero .hero-form-card {
    background: #f4f8fa;
    border: 1px solid #d7e2ea;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.16);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .home-page .hero .hero-form-card::before {
    display: none;
  }
  .home-page .hero .hero-form-card .lead-form-header {
    background: transparent;
    border: 0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    margin-bottom: 0.8rem;
  }
  .home-page .hero .hero-form-card .lead-form-header h3 { color: #0f172a; }
  .home-page .hero .hero-form-card .lead-form-header p { color: #64748b; }
  .home-page .hero .hero-form-card .form-group label { color: #0f172a; }
  .home-page .hero .hero-form-card .form-control {
    background: #ffffff;
    color: #0f172a;
    border: 1.5px solid #d8e1e8;
  }
  .home-page .hero .hero-form-card .form-control::placeholder { color: #8ea0af; }
  .home-page .hero .hero-form-card .form-control:focus {
    background: #ffffff;
    border-color: #0e8b7f;
    box-shadow: 0 0 0 3px rgba(14,139,127,0.14);
  }
  .home-page .hero .hero-form-card .form-disclaimer {
    color: #7b8b98;
  }
}
@media (max-width: 640px) {
  .hero { padding: 2.2rem 0 1.8rem; }
  .hero-content { padding: calc(64px + var(--space-2)) 0 var(--space-4); }
  .hero-text h1 {
    font-size: 1.5rem;
    line-height: 1.15;
    overflow-wrap: anywhere;
  }
  .hero-text p {
    font-size: 0.95rem;
    line-height: 1.52;
    margin-bottom: var(--space-4);
  }
  .hero-badges .badge {
    font-size: 0.72rem;
    padding: 0.3rem 0.6rem;
  }
  .hero-highlight {
    font-size: 0.8rem;
    padding: 0.32rem 0.78rem;
  }
  .hero-actions { gap: 8px; }
  .hero-actions .btn {
    padding: 0.66rem 0.55rem;
    font-size: 0.84rem;
    line-height: 1.2;
  }
}
@media (max-width: 380px) {
  .hero { padding: 2rem 0 1.6rem; }
  .hero-text h1 {
    font-size: 1.35rem;
    line-height: 1.1;
  }
  .hero-text p {
    font-size: 0.86rem;
    line-height: 1.52;
  }
  .hero-actions .btn {
    padding: 0.62rem 0.5rem;
    font-size: 0.8rem;
  }
  .hero-trust-item {
    font-size: 0.8rem;
  }
}
