/* ======================================================================
   CONTENIDO CLÍNICO · Ampliaciones de las cinco vistas
   1. Inicio  2. Directorio  3. Remisión  4. Nosotros  5. Prevención
   6. Mapa/contacto  7. Adaptación. No requiere librerías ni imágenes extra.
   styles.css define la marca; navigation.css define el menú y las vistas.
   ====================================================================== */

/* BASE · Oculta únicamente controles interactivos cuando JavaScript no existe. */
html:not(.js) [data-js-only] {
  display: none;
}
.editorial-heading {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 80px;
  align-items: end;
  margin-bottom: 42px;
}
.editorial-heading > p {
  max-width: 400px;
  justify-self: end;
}
.editorial-heading h2 {
  font-size: clamp(29px, 3vw, 40px);
}
.section-lead {
  margin: 24px 0;
}
.hero h1 {
  font-size: clamp(48px, 5.5vw, 74px);
}
.hero-description {
  max-width: 470px;
}
.hero .photo-index {
  display: none;
}

/* 1 · INICIO · Accesos con área completa pulsable y una banda de contexto. */
.clinical-access {
  background: var(--soft);
}
.access-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}
.access-item {
  padding: 26px 0;
  border-top: 1px solid #cdd1de;
  position: relative;
}
.access-number {
  display: block;
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--pink);
  font-weight: 750;
  margin-bottom: 22px;
}
.access-item h3 {
  font-size: 23px;
  max-width: 280px;
  line-height: 1.35;
}
.access-item p {
  margin: 16px 0 22px;
  max-width: 320px;
  font-size: 13px;
}
.access-item > .icon {
  transition: transform 0.2s;
  color: var(--pink);
}
.access-item:hover > .icon {
  transform: translateX(7px);
}
.access-item:hover h3 {
  color: var(--pink);
}
.clinical-banner {
  margin-top: 36px;
  padding: 36px 40px;
  background: var(--navy);
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 30px;
  justify-content: space-between;
}
.clinical-banner .eyebrow {
  color: #ffacc5;
  margin-bottom: 12px;
}
.clinical-banner h3 {
  color: white;
  font-size: 24px;
}
.clinical-banner p:not(.eyebrow) {
  color: #d0d5e8;
  font-size: 12px;
  margin-top: 12px;
}
.clinical-banner .button {
  margin-top: 0;
  flex-shrink: 0;
}

/* 2 · SERVICIOS · Fichas HTML nativas; content.js solo filtra su visibilidad. */
.area-ribbon {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  padding: 22px 0;
  border-block: 1px solid var(--line);
  margin-bottom: 54px;
}
.area-ribbon > span {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
}
.area-ribbon .icon {
  width: 30px;
  height: 30px;
  color: var(--pink);
}
.directory-heading h2 {
  font-size: 28px;
  letter-spacing: -0.8px;
  margin-bottom: 10px;
}
.directory-heading p {
  font-size: 13px;
}
.directory-controls {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-top: 28px;
}
.search-field {
  flex: 1 1 300px;
  max-width: 380px;
}
.search-field label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 7px;
}
.search-field input {
  width: 100%;
  min-height: 48px;
  border: 1px solid #cdd2df;
  border-radius: 8px;
  padding: 12px 15px;
  background: white;
  color: var(--navy);
  font-size: 13px;
}
.study-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding-bottom: 3px;
}
.study-filters button {
  padding: 10px 14px;
  border-radius: 30px;
  border: 1px solid var(--line);
  background: white;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  min-height: 42px;
}
.study-filters button:hover {
  border-color: var(--navy);
}
.study-filters button[aria-pressed="true"] {
  background: var(--navy);
  color: white;
  border-color: var(--navy);
}
.result-count {
  margin: 22px 0 14px;
  font-size: 11px;
}
.study-list {
  border-top: 1px solid var(--line);
}
.study {
  border-bottom: 1px solid var(--line);
}
.study summary {
  display: flex;
  align-items: center;
  gap: 25px;
  padding: 23px 22px;
  cursor: pointer;
  list-style: none;
  border-radius: 8px;
}
.study summary::-webkit-details-marker {
  display: none;
}
.study summary:hover {
  background: #f6f7fa;
}
.study-number {
  color: #858b9f;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.study-summary {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}
.study-category {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--pink);
  font-weight: 750;
}
.study-summary strong {
  color: var(--navy);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
}
.study-subtitle {
  font-size: 12px;
  color: var(--muted);
}
.study summary > .icon {
  color: var(--pink);
  transition: transform 0.2s;
}
.study[open] {
  background: #f6f7fa;
}
.study[open] summary > .icon {
  transform: rotate(45deg);
}
.study-body {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px 34px;
  padding: 6px 28px 30px 62px;
}
.study-body h3 {
  font-size: 12px;
  margin-bottom: 9px;
  letter-spacing: 0;
}
.study-body p {
  font-size: 12px;
  line-height: 1.85;
}
.study-action {
  grid-column: 1 / -1;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}
.study-action .text-link {
  font-size: 12px;
}
.empty-studies {
  padding: 36px;
  background: var(--soft);
  border-radius: 12px;
  text-align: center;
}
.empty-studies h3 {
  margin-bottom: 12px;
}
.text-button {
  border: 0;
  border-bottom: 1px solid currentColor;
  padding: 6px 0;
  margin-top: 10px;
  color: var(--pink);
  background: transparent;
  font-size: 12px;
  font-weight: 700;
}

/* 3 · REMISIÓN · Lista numerada para lectura rápida, sin requisitos inventados. */
.referral-section {
  background: var(--soft);
}
.referral-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 90px;
}
.referral-grid h2 {
  max-width: 380px;
}
.referral-grid .section-lead {
  max-width: 360px;
  font-size: 14px;
}
.referral-list article {
  display: flex;
  gap: 22px;
  padding: 24px 0;
  border-bottom: 1px solid #dce0e9;
}
.referral-list article:first-child {
  padding-top: 0;
}
.referral-list article > span {
  color: var(--pink);
  font-size: 11px;
  font-weight: 800;
}
.referral-list h3 {
  font-size: 19px;
  margin-bottom: 10px;
}
.referral-list p {
  font-size: 13px;
}

/* 4 · NOSOTROS · Secuencia educativa y principios de trabajo. */
.diagnostic-path {
  background: var(--soft);
}
.path-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px;
}
.path-steps li {
  border-top: 2px solid #d9dce7;
  padding-top: 24px;
}
.path-steps li > span {
  color: var(--pink);
  font-size: 12px;
  font-weight: 750;
  display: block;
  margin-bottom: 28px;
}
.path-steps h3 {
  font-size: 21px;
  margin-bottom: 12px;
}
.path-steps p {
  font-size: 13px;
}
.principles {
  margin-top: 54px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 30px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.principles h3 {
  font-size: 17px;
  margin-bottom: 10px;
}
.principles p {
  font-size: 12px;
}

/* 5 · PREVENCIÓN · Lecturas contextualizadas, fuentes externas visibles. */
.context-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.context-card {
  padding: 34px;
  background: var(--soft);
  border-radius: 14px;
  border: 1px solid var(--line);
}
.context-card:nth-child(2) {
  background: #fff8fa;
  border-color: #f0dce4;
}
.card-tag {
  color: var(--pink);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.5px;
  display: block;
  margin-bottom: 20px;
}
.context-card h3 {
  font-size: 24px;
  margin-bottom: 20px;
  line-height: 1.3;
}
.context-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.context-list li {
  padding: 11px 0 11px 22px;
  position: relative;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}
.context-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--pink);
}
.context-card > p {
  margin-bottom: 17px;
  font-size: 13px;
}
.context-card .text-link {
  font-size: 12px;
}
.resources-heading {
  margin: 54px 0 24px;
}
.resources-heading h3 {
  font-size: 25px;
  margin-bottom: 10px;
}
.resources-heading p {
  font-size: 13px;
}
.resource-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.resource-links > a {
  position: relative;
  border-top: 1px solid #cbd0dc;
  padding: 22px 30px 16px 0;
}
.resource-links span {
  color: var(--pink);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.5px;
}
.resource-links strong {
  display: block;
  color: var(--navy);
  font-size: 16px;
  line-height: 1.5;
  margin: 13px 0 9px;
}
.resource-links small {
  color: var(--muted);
  font-size: 11px;
}
.resource-links .icon {
  position: absolute;
  top: 22px;
  right: 0;
  width: 18px;
  color: var(--pink);
}
.resource-links a:hover strong {
  color: var(--pink);
}

/* 6 · CONTACTO · El iframe no se crea con una biblioteca, lo sirve Google.
 * Su URL se guarda en config.js y se asigna al entrar en Contacto (main.js).
 * Nunca cubrimos los controles, atribución ni enlaces del proveedor del mapa.
 */
.contact-grid {
  align-items: start;
}
.map-card {
  border-radius: 15px;
  overflow: hidden;
  background: var(--navy);
  border: 1px solid #e1e4eb;
}
.map-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 28px;
  color: #d1d7ef;
}
.map-heading > span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
}
.map-heading .icon {
  color: #ff9ebb;
}
.location-map {
  width: 100%;
  height: 350px;
  display: block;
  border: 0;
  background: #e9edf0;
}
html:not(.js) .location-map {
  display: none;
}
.map-address {
  padding: 28px;
}
.map-address .eyebrow {
  color: #f7abc2;
  margin-bottom: 12px;
  font-size: 9px;
}
.map-address h2 {
  color: white;
  font-size: 27px;
  line-height: 1.35;
  letter-spacing: -0.8px;
}
.map-address > p:not(.eyebrow) {
  color: #c0c8e1;
  margin-top: 10px;
  font-size: 11px;
}
.map-actions {
  display: flex;
  align-items: center;
  gap: 23px;
  flex-wrap: wrap;
  margin-top: 22px;
}
.map-actions .button {
  margin: 0;
}
.copy-address {
  background: none;
  color: white;
  font-size: 11px;
  border: 0;
  border-bottom: 1px solid #8f99bd;
  padding: 5px 0;
}
.map-address .copy-status {
  min-height: 0;
  margin: 0;
}
.map-address .copy-status:not(:empty) {
  margin-top: 12px;
}
.map-fallback {
  color: white;
  padding: 0 28px 24px;
  font-size: 12px;
}
.contact-note {
  display: flex;
  gap: 13px;
  margin-top: 26px;
  padding: 20px;
  border: 1px solid #d9deea;
  border-radius: 9px;
}
.contact-note .icon {
  color: var(--pink);
  width: 18px;
  margin-top: 2px;
}
.contact-note p {
  font-size: 12px;
}
.contact-note strong {
  color: var(--navy);
}
.consultation label {
  font-size: 11px;
}
.privacy-note {
  font-size: 10px;
}
.faq-grid {
  align-items: start;
}

/* 7 · RESPONSIVE · Las fichas se apilan sin desplazamiento horizontal. */
@media (max-width: 1050px) {
  .directory-controls {
    flex-direction: column;
    align-items: stretch;
  }
  .search-field {
    flex-basis: auto;
    max-width: none;
  }
  .referral-grid {
    gap: 45px;
  }
  .clinical-banner {
    flex-direction: column;
    align-items: start;
  }
  .editorial-heading {
    gap: 40px;
  }
}
@media (max-width: 760px) {
  .editorial-heading,
  .referral-grid,
  .context-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .editorial-heading > p {
    max-width: 100%;
    justify-self: start;
    font-size: 13px;
  }
  .access-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .access-item {
    padding: 24px 35px 24px 0;
  }
  .access-number {
    margin-bottom: 13px;
  }
  .access-item h3,
  .access-item p {
    max-width: none;
  }
  .access-item p {
    margin-bottom: 0;
  }
  .access-item > .icon {
    position: absolute;
    right: 0;
    top: 30px;
  }
  .clinical-banner {
    padding: 28px 24px;
  }
  .clinical-banner .button {
    width: 100%;
    font-size: 10px;
  }
  .area-ribbon {
    gap: 15px;
    flex-direction: column;
    margin-bottom: 35px;
  }
  .study-filters button {
    padding-inline: 12px;
  }
  .study summary {
    gap: 14px;
    padding: 20px 8px;
  }
  .study-summary strong {
    font-size: 17px;
  }
  .study-subtitle {
    font-size: 11px;
  }
  .study-body {
    grid-template-columns: 1fr;
    padding: 3px 20px 26px 36px;
    gap: 19px;
  }
  .study-action {
    grid-column: auto;
  }
  .referral-list {
    margin-top: 14px;
  }
  .path-steps {
    grid-template-columns: 1fr 1fr;
    gap: 28px 24px;
  }
  .path-steps li > span {
    margin-bottom: 16px;
  }
  .principles {
    grid-template-columns: 1fr;
    padding: 25px;
  }
  .context-card {
    padding: 26px;
  }
  .resource-links {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .map-heading {
    padding: 19px 22px;
  }
  .map-address {
    padding: 25px;
  }
  .map-address h2 {
    font-size: 25px;
  }
  .location-map {
    height: 330px;
  }
}
@media (max-width: 380px) {
  .hero h1 {
    font-size: 45px;
  }
  .path-steps {
    grid-template-columns: 1fr;
  }
  .map-actions {
    gap: 14px;
  }
  .map-address {
    padding: 21px;
  }
  .map-address h2 {
    font-size: 22px;
  }
}

/* CONTACTO · remitente de informes. El correo comercial permanece independiente. */
.report-delivery {
  display: flex;
  gap: 1rem;
  padding: clamp(1.2rem, 3vw, 1.8rem);
  margin: 1.5rem 0;
  border-radius: 1.2rem;
  color: #fff;
  background:
    radial-gradient(ellipse at 100% 0%, #343970 0%, transparent 65%), #171d4d;
  border: 1px solid #414671;
  box-shadow: 0 12px 30px #171d4d12;
}
.report-delivery > div {
  min-width: 0;
}
.report-delivery-icon {
  display: grid;
  place-items: center;
  flex: 0 0 2.7rem;
  height: 2.7rem;
  border-radius: 0.9rem;
  color: #ffafcf;
  background: #ffffff12;
  border: 1px solid #ffffff20;
}
.report-delivery .eyebrow {
  color: #e2bbd5;
  font-size: 0.6rem;
  margin-bottom: 0.8rem;
}
.report-delivery h3 {
  color: #fff;
  font-size: 1.18rem;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}
.report-delivery p {
  color: #d7d9ed;
  font-size: 0.82rem;
  margin: 0;
}
.report-sender {
  display: block;
  color: #fff;
  font-size: clamp(0.93rem, 2vw, 1.12rem);
  margin: 0.4rem 0 0.8rem;
  overflow-wrap: anywhere;
}
.report-delivery .report-delivery-note {
  font-size: 0.75rem;
  line-height: 1.65;
}
@media (max-width: 380px) {
  .report-delivery {
    flex-direction: column;
  }
  .report-delivery-icon {
    flex-basis: auto;
    width: 2.7rem;
  }
}
