/* Enel Health custom theme styles. */

:root {
  --eh-radius-sm: 0.75rem;
  --eh-radius-md: 1.25rem;
  --eh-radius-lg: 2rem;
  --eh-shadow-sm: 0 1rem 2.5rem rgba(16, 24, 40, 0.08);
  --eh-shadow-md: 0 1.5rem 4rem rgba(16, 24, 40, 0.12);
  --eh-border: 1px solid var(--wp--preset--color--border);
}

html {
  scroll-behavior: smooth;
}

body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

a {
  text-underline-offset: 0.18em;
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
.wp-block-button__link:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--wp--preset--color--blue) 65%, white);
  outline-offset: 4px;
}

.wp-site-blocks {
  overflow-x: clip;
}

.eh-main {
  margin-block-start: 0;
}

.eh-section {
  padding-top: clamp(4rem, 8vw, 7.5rem);
  padding-bottom: clamp(4rem, 8vw, 7.5rem);
}

.eh-section-heading {
  max-width: 760px;
  margin-inline: auto;
  margin-bottom: clamp(2rem, 5vw, 4rem);
}

.eh-section-heading p:not(.eh-eyebrow) {
  color: var(--wp--preset--color--muted);
}

/* Header */
.eh-header {
  position: sticky;
  top: 0;
  z-index: 20;
  margin-block-start: 0;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(208, 213, 221, 0.75);
  backdrop-filter: blur(18px);
}

.admin-bar .eh-header {
  top: 32px;
}

.eh-header__inner {
  min-height: 76px;
  gap: 1.25rem;
}

.eh-brand {
  gap: 0.75rem;
}

.eh-site-logo img {
  border-radius: 0.9rem;
}

.eh-site-title a {
  color: var(--wp--preset--color--slate);
  font-weight: 800;
  letter-spacing: -0.04em;
  text-decoration: none;
}

.eh-site-tagline {
  color: var(--wp--preset--color--muted);
  margin: 0;
}

.eh-header__nav {
  gap: 1.25rem;
}

.eh-navigation a {
  text-decoration: none;
}

.eh-button-small .wp-block-button__link {
  padding: 0.7rem 1rem;
  font-size: 0.9rem;
}

/* Buttons */
.wp-block-button__link {
  box-shadow: 0 0.65rem 1.4rem rgba(14, 107, 92, 0.18);
}

.wp-block-button__link:hover {
  transform: translateY(-1px);
}

.is-style-outline > .wp-block-button__link,
.wp-block-button.is-style-outline .wp-block-button__link {
  color: var(--wp--preset--color--primary);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid color-mix(in srgb, var(--wp--preset--color--primary) 38%, white);
  box-shadow: none;
}

/* Hero */
.eh-hero {
  position: relative;
  padding-top: clamp(4rem, 8vw, 8rem);
  background:
    radial-gradient(circle at 82% 20%, rgba(47, 128, 237, 0.14), transparent 24rem),
    radial-gradient(circle at 8% 4%, rgba(14, 107, 92, 0.13), transparent 26rem),
    linear-gradient(180deg, #f7fbf9 0%, #ffffff 100%);
}

.eh-hero__columns {
  gap: clamp(2rem, 5vw, 5rem);
}

.eh-eyebrow {
  width: fit-content;
  color: var(--wp--preset--color--primary);
  background: var(--wp--preset--color--mint);
  border: 1px solid rgba(14, 107, 92, 0.12);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: var(--wp--preset--font-size--xs);
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.has-text-align-center.eh-eyebrow,
.eh-section-heading .eh-eyebrow {
  margin-inline: auto;
}

.eh-hero__title {
  max-width: 11ch;
}

.eh-hero__lead {
  max-width: 58ch;
  color: var(--wp--preset--color--muted);
}

.eh-hero__buttons {
  margin-top: 2rem;
}

.eh-trust-pills {
  gap: 0.75rem;
  margin-top: 2rem;
}

.eh-trust-pills p {
  margin: 0;
  padding: 0.55rem 0.8rem;
  color: var(--wp--preset--color--primary-dark);
  background: rgba(255, 255, 255, 0.78);
  border: var(--eh-border);
  border-radius: 999px;
  box-shadow: 0 0.35rem 1rem rgba(16, 24, 40, 0.05);
  font-size: var(--wp--preset--font-size--small);
  font-weight: 650;
}

.eh-hero-card {
  position: relative;
  isolation: isolate;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--eh-radius-lg);
  box-shadow: var(--eh-shadow-md);
}

.eh-hero-card::before {
  content: "";
  position: absolute;
  inset: -1rem;
  z-index: -1;
  background: linear-gradient(135deg, rgba(14, 107, 92, 0.16), rgba(47, 128, 237, 0.14));
  border-radius: calc(var(--eh-radius-lg) + 1rem);
}

.eh-card-label {
  color: var(--wp--preset--color--blue);
  font-size: var(--wp--preset--font-size--xs);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eh-journey-list {
  gap: 1rem;
}

.eh-journey-list p {
  margin: 0;
  padding: 1rem;
  background: var(--wp--preset--color--light);
  border: var(--eh-border);
  border-radius: var(--eh-radius-md);
}

/* Trust strip */
.eh-trust-section {
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
  background: var(--wp--preset--color--slate);
  color: white;
}

.eh-trust-section h3,
.eh-trust-section p {
  color: white;
}

.eh-trust-grid {
  gap: 1rem;
}

.eh-trust-grid .wp-block-column {
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--eh-radius-md);
}

.eh-stat {
  color: #9debdc !important;
  font-weight: 850;
  letter-spacing: -0.03em;
}

/* Cards */
.eh-services {
  background: white;
}

.eh-card-grid {
  gap: 1.25rem;
}

.eh-service-card,
.eh-post-card,
.eh-content-card {
  height: 100%;
  padding: clamp(1.25rem, 3vw, 2rem);
  background: white;
  border: var(--eh-border);
  border-radius: var(--eh-radius-lg);
  box-shadow: var(--eh-shadow-sm);
}

.eh-service-card {
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.eh-service-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--wp--preset--color--primary) 26%, white);
  box-shadow: var(--eh-shadow-md);
}

.eh-service-card p:not(.eh-icon):not(.eh-card-link) {
  color: var(--wp--preset--color--muted);
}

.eh-icon {
  display: grid;
  width: 3rem;
  height: 3rem;
  place-items: center;
  color: white;
  background: var(--wp--preset--color--primary);
  border-radius: 1rem;
  font-size: 1.5rem;
  font-weight: 900;
  line-height: 1;
}

.eh-card-link a {
  font-weight: 800;
  text-decoration: none;
}

/* Process */
.eh-process {
  background: var(--wp--preset--color--light);
}

.eh-step-list {
  gap: 1rem;
}

.eh-step {
  gap: 1rem;
  padding: 1.25rem;
  background: white;
  border: var(--eh-border);
  border-radius: var(--eh-radius-md);
}

.eh-step__num {
  display: grid;
  flex: 0 0 2.5rem;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  margin: 0;
  color: white;
  background: var(--wp--preset--color--primary);
  border-radius: 999px;
  font-weight: 850;
}

.eh-step h3,
.eh-step p {
  margin-top: 0;
  margin-bottom: 0.35rem;
}

.eh-step p {
  color: var(--wp--preset--color--muted);
}

/* Why */
.eh-feature-panel {
  padding: clamp(1.5rem, 5vw, 4rem);
  color: white;
  background:
    radial-gradient(circle at 80% 20%, rgba(47, 128, 237, 0.24), transparent 20rem),
    linear-gradient(135deg, #084c42, #0e6b5c);
  border-radius: var(--eh-radius-lg);
  box-shadow: var(--eh-shadow-md);
}

.eh-feature-panel h2,
.eh-feature-panel h3,
.eh-feature-panel p {
  color: white;
}

.eh-feature-panel .eh-eyebrow {
  color: #084c42;
  background: #d8fff4;
}

.eh-mini-grid {
  gap: 1rem;
  margin-bottom: 1rem;
}

.eh-mini-card {
  min-height: 100%;
  padding: 1.25rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--eh-radius-md);
}

.eh-mini-card h3,
.eh-mini-card p {
  margin-top: 0;
}

/* FAQ */
.eh-faq {
  background: white;
}

.eh-faq-list {
  max-width: 860px;
}

.eh-faq-item {
  padding: 1.25rem 1.5rem;
  background: var(--wp--preset--color--light);
  border: var(--eh-border);
  border-radius: var(--eh-radius-md);
}

.eh-faq-item + .eh-faq-item {
  margin-top: 1rem;
}

.eh-faq-item summary {
  cursor: pointer;
  color: var(--wp--preset--color--slate);
  font-weight: 800;
}

.eh-faq-item p {
  color: var(--wp--preset--color--muted);
}

/* Final CTA */
.eh-final-cta {
  padding-top: clamp(3rem, 6vw, 6rem);
  background: linear-gradient(180deg, white, var(--wp--preset--color--mint));
}

.eh-cta-card {
  padding: clamp(2rem, 5vw, 5rem);
  background: white;
  border: 1px solid rgba(14, 107, 92, 0.12);
  border-radius: var(--eh-radius-lg);
  box-shadow: var(--eh-shadow-md);
}

.eh-cta-card p {
  color: var(--wp--preset--color--muted);
}

/* Pages and posts */
.eh-page-hero,
.eh-post-header {
  padding-top: clamp(4rem, 8vw, 7rem);
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
}

.eh-page-hero p,
.eh-post-meta,
.eh-post-meta a {
  color: var(--wp--preset--color--muted);
}

.eh-content-card {
  margin-bottom: clamp(4rem, 7vw, 7rem);
}

.eh-content-card > * {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.eh-content-card > .alignwide,
.eh-content-card > .alignfull {
  max-width: 100%;
}

.eh-post-featured img,
.eh-post-card__image img {
  border-radius: var(--eh-radius-lg);
}

.eh-post-tags,
.eh-post-tags a,
.eh-eyebrow a {
  color: var(--wp--preset--color--primary);
  font-size: var(--wp--preset--font-size--small);
  font-weight: 800;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.eh-query {
  margin-bottom: clamp(4rem, 7vw, 7rem);
}

.eh-post-grid {
  gap: 1.25rem;
}

.eh-post-card {
  display: flex;
  flex-direction: column;
}

.eh-post-card h2 a {
  color: var(--wp--preset--color--slate);
  text-decoration: none;
}

.eh-post-card .wp-block-post-excerpt__more-link {
  color: var(--wp--preset--color--primary);
  font-weight: 800;
  text-decoration: none;
}

.eh-404-card {
  max-width: 780px;
  min-height: 52vh;
  display: grid;
  align-content: center;
}

/* Footer */
.eh-footer {
  margin-block-start: 0;
  padding-top: clamp(3rem, 6vw, 5rem);
  padding-bottom: 2rem;
  color: white;
  background: var(--wp--preset--color--slate);
}

.eh-footer h2,
.eh-footer h3,
.eh-footer p,
.eh-footer a {
  color: white;
}

.eh-footer a {
  text-decoration: none;
}

.eh-footer a:hover {
  color: #9debdc;
}

.eh-footer__text,
.eh-footer__bottom p {
  color: rgba(255, 255, 255, 0.74);
}

.eh-footer__links {
  display: grid;
  gap: 0.65rem;
  padding-left: 0;
  list-style: none;
}

.eh-footer__separator {
  border-color: rgba(255, 255, 255, 0.14);
  margin-top: 2rem;
  margin-bottom: 1.5rem;
}

.eh-footer__bottom {
  gap: 1rem;
}

/* Utilities */
.wp-block-image img {
  height: auto;
}

.wp-block-separator {
  border-top-width: 1px;
}

@supports not (color: color-mix(in srgb, black, white)) {
  .is-style-outline > .wp-block-button__link,
  .wp-block-button.is-style-outline .wp-block-button__link {
    border-color: var(--wp--preset--color--primary);
  }
}

@media (max-width: 782px) {
  .admin-bar .eh-header {
    top: 46px;
  }

  .eh-header {
    position: relative;
  }

  .eh-header__inner,
  .eh-header__nav {
    align-items: center;
  }

  .eh-site-tagline,
  .eh-header__cta {
    display: none;
  }

  .eh-section {
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
  }

  .eh-hero__title {
    max-width: 100%;
  }

  .eh-trust-section {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
  }

  .eh-feature-panel,
  .eh-cta-card,
  .eh-service-card,
  .eh-post-card,
  .eh-content-card {
    border-radius: 1.35rem;
  }

  .eh-step {
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
