/* ES Gestiones — Servicio de mediación (mediacion.html y en/mediation.html) */

.med {
  font-family: var(--font-manrope), Manrope, system-ui, sans-serif;
  color: #241C1F;
}

.med-wrap {
  max-width: 1180px;
  margin: 0 auto;
}

.med h1,
.med h2,
.med h3 {
  font-family: var(--font-playfair), "Playfair Display", Georgia, serif;
  font-weight: 600;
  letter-spacing: -.02em;
  text-wrap: balance;
}

.med h2 em,
.med h1 em {
  font-style: italic;
  font-weight: 500;
}

/* Hero */
.med-hero .med-wrap { max-width: 1180px; }

.med-hero-badge {
  display: inline-flex;
  margin: 6px 0 18px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 248, 242, .14);
  border: 1px solid rgba(255, 248, 242, .24);
  color: #F7E5E8;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.med-hero h1 {
  max-width: 16ch;
  margin: 0 0 20px;
  color: #FFF8F2;
  font-size: clamp(2.4rem, 5.4vw, 4.4rem);
  line-height: 1.04;
}

.med-hero h1 em { color: #EFCFCF; }

.med-hero-lead {
  max-width: 48ch;
  margin: 0 0 30px;
  color: rgba(255, 244, 238, .9);
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  line-height: 1.62;
}

.med-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.med-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 24px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 160ms ease, transform 200ms cubic-bezier(.22, 1, .36, 1);
}

.med-btn--light { background: #FAF6F0; color: #561C24; box-shadow: 0 14px 30px -14px rgba(0, 0, 0, .55); }
.med-btn--ghost { border: 1px solid rgba(255, 248, 242, .4); color: #FFF8F2; }
.med-btn--wine { background: #6D2932; color: #fff; }

@media (hover: hover) and (pointer: fine) {
  .med-btn:hover { transform: translateY(-2px); }
  .med-btn--light:hover { background: #fff; }
  .med-btn--ghost:hover { background: rgba(255, 248, 242, .1); }
  .med-btn--wine:hover { background: #561C24; }
}

/* Secciones */
.med-section {
  padding-block: clamp(64px, 8vw, 104px);
  background: #fff;
}

.med-section--paper { background: #F9F3EC; }

.med-head {
  max-width: 640px;
  margin-bottom: clamp(32px, 4vw, 48px);
}

.med-head h2,
.med-faq h2,
.med-mediadora-copy h2,
.med-closing h2 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 4vw, 2.9rem);
  line-height: 1.08;
}

.med-head h2 em,
.med-faq h2 em,
.med-mediadora-copy h2 em,
.med-closing h2 em { color: #6D2932; }

.med-head p {
  margin: 0;
  color: #574A4E;
  font-size: 1.0625rem;
  line-height: 1.62;
}

/* Mediadora */
.med-mediadora-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
}

.med-portrait {
  margin: 0;
  overflow: hidden;
  border-radius: 16px;
  aspect-ratio: 4 / 5;
  background: #EAE2D9;
  box-shadow: 0 30px 60px -36px rgba(36, 28, 31, .45);
}

.med-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  display: block;
}

.med-mediadora-copy > p {
  max-width: 58ch;
  margin: 0 0 26px;
  color: #4F4246;
  font-size: 1.0625rem;
  line-height: 1.68;
}

.med-credential {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 28px;
  padding: 16px 20px;
  border: 1px solid #E4DAD2;
  border-radius: 14px;
  background: #FBF8F5;
}

.med-credential img {
  flex: none;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: #fff;
  object-fit: contain;
}

.med-credential strong {
  display: block;
  margin-bottom: 4px;
  font-size: 1rem;
  line-height: 1.35;
}

.med-credential span {
  color: #6D2932;
  font-weight: 700;
  font-size: .9375rem;
  font-variant-numeric: lining-nums tabular-nums;
}

.med-principles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.med-principles li {
  padding-top: 12px;
  border-top: 1px solid #C7B7A3;
  color: #574A4E;
  font-size: .9375rem;
  line-height: 1.55;
}

.med-principles strong { display: block; color: #241C1F; }

/* Ámbitos */
.med-areas {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 18px;
}

.med-area {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 26px;
  border: 1px solid #C7B7A3;
  border-radius: 14px;
  background: #fff;
  scroll-margin-top: 96px;
}

.med-area h3 { margin: 4px 0 0; font-size: 1.4rem; line-height: 1.2; }

.med-area p {
  margin: 0 0 6px;
  color: #574A4E;
  font-size: .9375rem;
  line-height: 1.62;
}

.med-area a {
  margin-top: auto;
  color: #6D2932;
  font-weight: 700;
  text-decoration: none;
}

.med-area a:hover { text-decoration: underline; }

.med-note {
  max-width: 78ch;
  margin: 32px 0 0;
  padding: 18px 22px;
  border: 1px solid #E4DAD2;
  border-radius: 12px;
  background: #fff;
  color: #4F4246;
  font-size: .9375rem;
  line-height: 1.62;
}

.med-note strong { color: #6D2932; }

/* Proceso */
.med-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: med-step;
}

.med-steps li {
  counter-increment: med-step;
  padding-top: 18px;
  border-top: 1px solid #C7B7A3;
}

.med-steps li::before {
  content: counter(med-step, decimal-leading-zero);
  display: block;
  margin-bottom: 12px;
  color: #A3787F;
  font: italic 500 2.4rem/1 var(--font-playfair), "Playfair Display", Georgia, serif;
  font-variant-numeric: lining-nums;
  font-feature-settings: "lnum" 1;
}

.med-steps h3 {
  margin: 0 0 8px;
  font-family: var(--font-manrope), Manrope, system-ui, sans-serif;
  font-size: 1.1875rem;
  font-weight: 700;
  letter-spacing: -.012em;
}

.med-steps p {
  margin: 0;
  color: #574A4E;
  font-size: .9375rem;
  line-height: 1.6;
}

.med-modality {
  margin: 36px 0 0;
  color: #4F4246;
  font-size: 1rem;
}

/* FAQ */
.med-faq { max-width: 820px; }

.med-faq details {
  border-bottom: 1px solid #D9CBBE;
}

.med-faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
  padding-block: 14px;
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  font-size: 1.0625rem;
}

.med-faq summary::-webkit-details-marker { display: none; }

.med-faq summary::after {
  content: "+";
  flex: none;
  color: #6D2932;
  font-size: 1.5rem;
  font-weight: 400;
  transition: transform 200ms cubic-bezier(.22, 1, .36, 1);
}

.med-faq details[open] summary::after { transform: rotate(45deg); }

.med-faq details p {
  max-width: 66ch;
  margin: 0 0 20px;
  color: #574A4E;
  line-height: 1.65;
}

/* Cierre claro: evita dos franjas vino seguidas antes del pie */
.med-closing { border-top: 1px solid #E4DAD2; }

.med-closing-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}

.med-closing p {
  margin: 0;
  color: #574A4E;
  font-size: 1.0625rem;
}

@media (max-width: 900px) {
  .med-mediadora-grid { grid-template-columns: 1fr; }
  .med-portrait { max-width: 420px; aspect-ratio: 4 / 4.4; }
  .med-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .med-principles,
  .med-steps { grid-template-columns: 1fr; }
  .med-credential { align-items: flex-start; }
  .med-credential img { width: 64px; height: 64px; }
}

@media (prefers-reduced-motion: reduce) {
  .med-btn, .med-faq summary::after { transition: none; }
}

/* Fotografías de portada, detrás del contenido y del degradado de contraste. */
.med-hero[data-med-gallery]::before { content: none; }
.med-hero[data-med-gallery]::after { z-index: 1; }
.med-hero[data-med-gallery] > .med-wrap {
  position: relative;
  z-index: 2;
  pointer-events: none;
}
.med-hero[data-med-gallery] > .med-wrap a { pointer-events: auto; }

.med-hero .med-gallery-track {
  position: absolute;
  z-index: 0;
  inset: 0;
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.med-gallery-track::-webkit-scrollbar { display: none; }
.med-gallery-track:focus-visible { outline: 3px solid #FFF8F2; outline-offset: -5px; }
.med-gallery-track.is-dragging { scroll-snap-type: none; cursor: grabbing; }

.med-gallery-slide {
  flex: 0 0 100%;
  min-width: 0;
  scroll-snap-align: start;
  user-select: none;
}

.med-gallery-slide picture { display: block; height: 100%; }

.med-gallery-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.med-gallery-agreement img { object-position: center 45%; }

.med-gallery-guide, .med-gallery-progress {
  display: flex;
  align-items: center;
  gap: 7px;
}

.med-gallery-guide {
  gap: 12px;
  margin-top: 20px;
  color: #FFF8F2;
  font-size: .85rem;
  font-weight: 650;
}

.med-gallery-progress span {
  width: 8px;
  height: 8px;
  border: 1px solid #FFF8F2;
  border-radius: 50%;
}

.med-hero:not([data-med-active="1"]) .med-gallery-progress span:first-child,
.med-hero[data-med-active="1"] .med-gallery-progress span:last-child { background: #FFF8F2; }

.med-gallery-mouse { display: none; }

@media (hover: hover) and (pointer: fine) {
  .med-gallery-track { cursor: grab; }
  .med-gallery-mouse { display: inline; }
  .med-gallery-touch { display: none; }
}

/* Página «Sobre nosotros» */
.about .med-hero h1 { max-width: 18ch; }
.about-contact { display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.about-contact p { margin: 0 0 10px; color: #4F4246; }
.about-contact a:not(.med-btn) { color: #6D2932; font-weight: 600; }
.about-values { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 560px) { .about-values { grid-template-columns: 1fr; } }
