/* md5 — estilo institucional (gris / azul / dorado), no clon de citas-previa */

:root {
  --blue: #3b4a73;
  --blue-dark: #2c3858;
  --blue-light: #4d5f93;
  --gold: #d4af37;
  --gold-bright: #e8c84a;
  --gold-strip: #dbc04e;
  --ink: #1a1a1a;
  --ink-soft: #444;
  --muted: #666;
  --bg: #e8e8e8;
  --bg-soft: #f0f0f0;
  --bg-white: #ffffff;
  --line: #cfcfcf;
  --warn-bg: #fff9e6;
  --warn-line: #e0c96a;
  --font: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --header-h: 112px;
  --radius-pill: 999px;
  --radius: 6px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg-white);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--blue);
}

a:hover {
  color: var(--blue-dark);
}

.container {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.site-header__disclaimer {
  background: var(--bg-soft);
  color: var(--muted);
  text-align: center;
  font-size: 0.72rem;
  padding: 0.4rem 1rem;
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--blue);
  text-decoration: none;
}

.brand__icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  display: grid;
  place-items: center;
}

.site-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.15rem 1.25rem;
}

.site-nav a {
  color: var(--ink);
  font-size: 0.95rem;
  text-decoration: none;
  padding: 0.35rem 0;
}

.site-nav a:hover {
  color: var(--blue);
  text-decoration: underline;
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown__panel {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 240px;
  max-height: 65vh;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  padding: 0.35rem;
  z-index: 60;
}

.nav-dropdown:hover .nav-dropdown__panel,
.nav-dropdown.is-open .nav-dropdown__panel {
  display: block;
}

.nav-dropdown__panel a {
  display: block;
  padding: 0.45rem 0.65rem;
  font-size: 0.88rem;
}

.nav-phone {
  font-weight: 700;
  color: var(--blue) !important;
}

/* Hero panel (split + blob image) */
.hero-panel {
  background: var(--bg);
  padding: 2rem 0 0;
  overflow: hidden;
}

.hero-panel__inner {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 42%);
  gap: 0.5rem;
  align-items: stretch;
  min-height: 320px;
}

.hero-panel__copy {
  padding: 1.5rem 0 2rem;
  max-width: 540px;
}

.hero-panel__copy h1 {
  font-size: clamp(1.75rem, 3.2vw, 2.25rem);
  color: var(--blue);
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.2;
}

.hero-panel__copy .lead {
  color: var(--ink-soft);
  margin-bottom: 1rem;
}

.hero-panel__copy .provider {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 1rem;
}

.hero-blob {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 280px;
}

.hero-blob__img {
  width: min(420px, 100%);
  aspect-ratio: 1;
  border-radius: 50%;
  object-fit: cover;
  border: 6px solid #fff;
  box-shadow: 0 0 0 12px rgba(59, 74, 115, 0.12);
}

.hero-panel__shape {
  position: absolute;
  right: -80px;
  top: 10%;
  width: 55%;
  height: 80%;
  background: var(--bg-white);
  border-radius: 50% 0 0 50%;
  z-index: 0;
  pointer-events: none;
}

.hero-blob picture {
  position: relative;
  z-index: 1;
}

/* Alerts & buttons */
.notice-warn {
  background: var(--warn-bg);
  border: 1px solid var(--warn-line);
  padding: 0.7rem 0.85rem;
  font-size: 0.88rem;
  color: #4a4228;
  margin-bottom: 1.1rem;
  border-radius: var(--radius);
}

.alert-private,
.notice-warn {
  background: var(--warn-bg);
  border: 1px solid var(--warn-line);
  padding: 0.7rem 0.85rem;
  font-size: 0.88rem;
  margin-bottom: 1.1rem;
  border-radius: var(--radius);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.7rem 1.35rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: filter 0.15s;
}

.btn:hover {
  filter: brightness(1.05);
  text-decoration: none;
}

.btn-primary {
  background: var(--blue);
  color: #fff;
}

.btn-secondary {
  background: var(--blue-light);
  color: #fff;
}

.btn-outline {
  background: #fff;
  color: var(--blue);
  border: 2px solid var(--blue);
}

.callbtns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.call-note {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.75rem;
}

.hero-note {
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--muted);
  margin-top: 0.85rem;
  max-width: 52ch;
}

/* Find bar (amarillo) */
.find-bar-wrap {
  background: var(--bg);
  padding: 0 0 2rem;
}

.find-bar {
  display: flex;
  align-items: stretch;
  background: var(--gold-strip);
  border-radius: var(--radius-pill);
  padding: 0.35rem 0.35rem 0.35rem 1.25rem;
  gap: 0.5rem;
}

.find-bar input {
  flex: 1;
  border: none;
  background: #fff;
  border-radius: var(--radius-pill);
  padding: 0.65rem 1rem;
  min-width: 0;
}

.find-bar button {
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: var(--radius-pill);
  padding: 0.65rem 1.5rem;
  font-weight: 600;
  cursor: pointer;
}

/* Sections */
.section {
  padding: 2.75rem 0;
}

.section--gray {
  background: var(--bg-soft);
}

.section__title {
  font-size: 1.5rem;
  color: var(--blue);
  margin-bottom: 0.35rem;
}

.section__intro {
  color: var(--muted);
  max-width: 62ch;
  margin-bottom: 1.75rem;
}

.section__label {
  display: none;
}

/* Info blocks (no 3-column cards) */
.info-blocks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.info-block {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  padding: 1.25rem;
}

.info-block h3 {
  color: var(--blue);
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
}

.info-block p {
  font-size: 0.92rem;
  color: var(--ink-soft);
}

/* Steps line */
.steps-line {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  position: relative;
}

.steps-line article {
  background: #fff;
  border: 1px solid var(--line);
  padding: 1.25rem;
  text-align: left;
}

.steps-line .num {
  display: inline-block;
  background: var(--gold);
  color: var(--ink);
  font-weight: 700;
  width: 2rem;
  height: 2rem;
  line-height: 2rem;
  text-align: center;
  border-radius: 50%;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.steps-line h3 {
  color: var(--blue);
  font-size: 1rem;
  margin-bottom: 0.35rem;
}

.steps-line p {
  font-size: 0.9rem;
  color: var(--muted);
}

/* Topic list (rows, not cards) */
.topic-list {
  border: 1px solid var(--line);
  background: #fff;
}

.topic-row {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}

.topic-row:last-child {
  border-bottom: none;
}

.topic-row:hover {
  background: var(--bg-soft);
  text-decoration: none;
}

.topic-row__title {
  font-weight: 700;
  color: var(--blue);
}

.topic-row__desc {
  font-size: 0.9rem;
  color: var(--muted);
}

.topic-row__go {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--blue);
  white-space: nowrap;
}

/* Legacy svc-card hidden mapping */
.svc-grid {
  display: none;
}

.svc-card {
  display: none;
}

/* Trust */
.trust-list {
  list-style: none;
  margin: 0 0 1.5rem;
}

.trust-list li {
  padding: 0.35rem 0 0.35rem 1.25rem;
  position: relative;
  color: var(--ink-soft);
}

.trust-list li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--gold);
  font-weight: 700;
}

.notice-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 5px solid var(--gold);
  padding: 1.1rem 1.25rem;
}

.notice-panel h3 {
  color: var(--blue);
  margin-bottom: 0.4rem;
}

.remember-box {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 5px solid var(--gold);
  padding: 1.1rem 1.25rem;
}

.benefits-list {
  list-style: none;
  margin: 0 0 1.5rem;
}

.benefits-list li {
  padding: 0.35rem 0 0.35rem 1.25rem;
  position: relative;
  color: var(--ink-soft);
}

.benefits-list li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--gold);
}

/* CTA */
.contact-panel {
  background: var(--bg);
  text-align: center;
  padding: 2.5rem 0;
}

.contact-panel h2 {
  color: var(--blue);
  margin-bottom: 0.5rem;
}

.contact-panel p {
  color: var(--muted);
  margin-bottom: 1rem;
}

.phone-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--blue);
  color: #fff !important;
  font-weight: 700;
  border-radius: var(--radius-pill);
  padding: 0.8rem 1.5rem;
  text-decoration: none;
}

.phone-btn:hover {
  background: var(--blue-dark);
  color: #fff;
}

.cta-band__fine,
.contact-panel__fine {
  font-size: 0.8rem;
  color: var(--muted);
  max-width: 56ch;
  margin: 1rem auto 0;
}

.cta-band {
  background: var(--bg);
  text-align: center;
  padding: 2.5rem 0;
}

.cta-band h2 {
  color: var(--blue);
}

/* Footer */
.footer {
  background: var(--bg-soft);
  color: var(--ink-soft);
  padding: 2rem 0 1.25rem;
  border-top: 1px solid var(--line);
  font-size: 0.92rem;
}

.footer a {
  color: var(--blue);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr 1fr;
  gap: 2rem;
  margin-bottom: 1.25rem;
}

.footer h3 {
  color: var(--blue);
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.footer ul {
  list-style: none;
}

.footer li {
  margin-bottom: 0.3rem;
}

.footer__legal {
  border-top: 1px solid var(--line);
  padding-top: 1rem;
  font-size: 0.82rem;
}

.footer__copy {
  margin-top: 1rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.mobile-cta {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 45;
  padding: 0.55rem 1rem calc(0.55rem + env(safe-area-inset-bottom));
  background: var(--gold-strip);
  border-top: 1px solid var(--line);
}

.mobile-cta .phone-btn {
  width: 100%;
  justify-content: center;
}

/* Legal strip removed on home — hide if present */
.legal-strip {
  display: none;
}

/* Subpages */
.page-hero {
  background: var(--bg);
  padding: 2rem 0 1rem;
}

.page-hero h1 {
  color: var(--blue);
  font-size: 1.75rem;
}

.doc-list {
  list-style: none;
}

.doc-list li {
  padding: 0.3rem 0 0.3rem 1rem;
  border-left: 3px solid var(--gold);
  margin-bottom: 0.35rem;
}

.legal-page {
  padding: 2rem 0 3rem;
}

.legal-page h1 {
  color: var(--blue);
}

.legal-page .updated,
.legal-page .legal-updated {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.error-page {
  padding: 3rem 0 4rem;
  text-align: center;
}

.error-page__inner {
  max-width: 520px;
  margin: 0 auto;
}

.error-page__code {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.error-page__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
  margin: 1.5rem 0;
}

.error-page__links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  justify-content: center;
  font-size: 0.92rem;
}

.site-header .nav-phone--bar {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.95rem;
  background: var(--blue);
  color: #fff !important;
  border-radius: var(--radius-pill);
  font-weight: 600;
  text-decoration: none;
}

.site-header .nav-phone--bar:hover {
  background: var(--blue-dark);
  color: #fff;
  text-decoration: none;
}

/* Popup & cookies */
.site-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 900;
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
}

.site-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

body.has-cookie-banner .site-overlay.is-visible {
  bottom: var(--cookie-h, 0px);
}

.phone-popup {
  position: fixed;
  inset: 0;
  z-index: 910;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  padding-bottom: calc(1.25rem + env(safe-area-inset-bottom));
  pointer-events: none;
}

.phone-popup[hidden] {
  display: none !important;
}

.phone-popup.is-open {
  pointer-events: auto;
}

body.phone-popup-open {
  overflow: hidden;
}

body.has-cookie-banner.phone-popup-open .phone-popup {
  padding-bottom: calc(var(--cookie-h, 100px) + 1rem);
}

.phone-popup__dialog {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 4px solid var(--gold);
  border-radius: 12px;
  padding: 1.75rem 1.5rem 1.5rem;
  width: min(420px, 100%);
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
  transform: translateY(10px) scale(0.98);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.phone-popup.is-open .phone-popup__dialog {
  transform: none;
  opacity: 1;
}

.phone-popup__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  border: none;
  background: var(--bg-soft);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  z-index: 1;
}

.phone-popup__title {
  color: var(--blue);
  margin: 0.25rem 2rem 0.5rem;
  font-size: 1.35rem;
}

.phone-popup__hours {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.phone-popup__number {
  display: block;
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--blue);
  margin: 0.5rem 0 1rem;
  text-decoration: none;
}

.phone-popup__number:hover {
  text-decoration: underline;
}

.phone-popup__cta {
  width: 100%;
  justify-content: center;
}

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 920;
  background: var(--gold-bright);
  border-top: 2px solid var(--gold);
  padding: 1rem 1.25rem calc(1rem + env(safe-area-inset-bottom));
  pointer-events: none;
}

.cookie-banner.is-visible {
  pointer-events: auto;
}

.cookie-banner[hidden] {
  display: none !important;
}

.cookie-banner__card {
  max-width: 960px;
  margin: 0 auto;
}

.cookie-banner__title {
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.35rem;
}

.cookie-banner__text {
  font-size: 0.88rem;
  color: var(--ink-soft);
  margin-bottom: 0.75rem;
}

.cookie-banner__actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn-accept {
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: var(--radius-pill);
  padding: 0.5rem 1.25rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-decline {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 0.5rem 1.25rem;
  cursor: pointer;
}

body.has-cookie-banner .mobile-cta {
  bottom: var(--cookie-h, 88px);
}

body.phone-popup-open .mobile-cta,
body.has-cookie-banner .mobile-cta {
  display: none;
}

.header-phone-mobile {
  display: none;
  margin-left: auto;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--blue);
  text-decoration: none;
  padding: 0.45rem 0.7rem;
  border: 2px solid var(--blue);
  border-radius: var(--radius-pill);
}

.is-search-hit {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.pillars,
.pillar,
.steps-row,
.step-box,
.hero-citas,
.hero-card-call,
.section__header {
  /* legacy: unused on new home */
}

@media (max-width: 900px) {
  .site-header__inner {
    flex-wrap: wrap;
    gap: 0.65rem;
  }

  .brand {
    font-size: 1rem;
    max-width: 55%;
  }

  .brand__icon {
    width: 34px;
    height: 34px;
  }

  .header-phone-mobile {
    display: inline-flex;
    align-items: center;
  }

  .site-header__inner > .nav-phone--bar {
    display: none;
  }

  .hero-panel {
    padding-top: 1rem;
  }

  .hero-panel__inner {
    grid-template-columns: 1fr;
  }

  .hero-panel__copy {
    padding: 0.5rem 0 1rem;
  }

  .hero-panel__copy h1 {
    font-size: 1.45rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .hero-blob {
    justify-content: center;
    min-height: auto;
    padding-bottom: 1rem;
  }

  .hero-blob__img {
    width: min(260px, 78vw);
  }

  .hero-panel__shape {
    display: none;
  }

  .find-bar {
    flex-direction: column;
    align-items: stretch;
    border-radius: 14px;
    padding: 0.5rem;
    gap: 0.45rem;
  }

  .find-bar button {
    width: 100%;
  }

  .info-blocks,
  .steps-line {
    grid-template-columns: 1fr;
  }

  .topic-row {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .site-nav {
    display: none;
  }

  .mobile-cta {
    display: block;
  }

  body {
    padding-bottom: 64px;
  }

  body.has-cookie-banner,
  body.phone-popup-open {
    padding-bottom: 0;
  }

  .phone-popup {
    align-items: flex-start;
    overflow-y: auto;
    padding-top: calc(0.75rem + env(safe-area-inset-top));
    -webkit-overflow-scrolling: touch;
  }

  body.has-cookie-banner.phone-popup-open .phone-popup {
    padding-bottom: calc(var(--cookie-h, 140px) + 0.75rem);
    max-height: 100dvh;
  }

  .phone-popup__dialog {
    width: 100%;
    margin-top: 0.25rem;
  }

  .phone-popup__title {
    font-size: 1.15rem;
    margin-right: 1.75rem;
  }

  .phone-popup__number {
    font-size: 1.45rem;
  }

  .cookie-banner__actions {
    flex-direction: column;
  }

  .cookie-banner__actions .btn-accept,
  .cookie-banner__actions .btn-decline {
    width: 100%;
    text-align: center;
  }

  .footer__grid {
    grid-template-columns: 1fr;
  }
}
