@import url('https://fonts.googleapis.com/css2?family=Great+Vibes&display=swap');

:root {
  --bg: #f6f9ff;
  --surface: #ffffff;
  --surface-soft: #edf4ff;
  --ink: #162438;
  --muted: #5a6d84;
  --primary: #2d6cdf;
  --primary-dark: #16479e;
  --line: rgba(45, 108, 223, 0.16);
  --shadow: 0 22px 55px rgba(17, 49, 102, 0.12);
  --radius: 24px;
  --container: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #f8fbff 0%, #edf4ff 100%);
  line-height: 1.65;
}

a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; max-width: 100%; }
p { margin: 0 0 1rem; color: var(--muted); }
p,
li {
  text-align: justify;
  text-justify: inter-word;
}
h1, h2, h3 {
  margin: 0 0 1rem;
  line-height: 1.08;
  font-family: 'Playfair Display', serif;
}
h1 { font-size: clamp(2.4rem, 4.8vw, 4.8rem); }
h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); }
h3 { font-size: 1.3rem; }

.container {
  width: min(calc(100% - 2rem), var(--container));
  margin: 0 auto;
}
.section { padding: 4.5rem 0; }
.section--compact { padding-top: 2rem; }
.eyebrow {
  margin: 0 0 .75rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .78rem;
  color: var(--primary);
  font-weight: 700;
}
.lead,
.lead-sm { font-size: 1.06rem; max-width: 65ch; }
.lead-sm { font-size: 1rem; }
#disfunciones-relacionales .section-heading .lead {
  max-width: none;
  width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(248, 251, 255, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.header-bar,
.hero-layout,
.feature-layout,
.workshops-layout,
.contact-layout,
.contact-card,
.footer-wrap,
.section-heading,
.stacked-sections,
.info-grid {
  display: grid;
  gap: 1.5rem;
}
.header-bar {
  grid-template-columns: auto 1fr auto;
  align-items: center;
  min-height: 82px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .9rem;
}
.brand strong { display: block; }
.brand small { color: var(--muted); }
.brand-mark {
  display: inline-block;
  min-width: 78px;
  font-family: 'Great Vibes', cursive;
  font-size: 2.2rem;
  line-height: 1;
  color: var(--primary-dark);
  transform: rotate(-11deg) translateY(2px);
  transform-origin: left bottom;
}
.main-nav {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  flex-wrap: wrap;
}
.main-nav a {
  color: var(--muted);
  font-weight: 600;
  transition: color .2s ease;
}
.main-nav a:hover { color: var(--primary-dark); }
.main-nav a.is-active {
  color: var(--primary-dark);
  text-decoration: underline;
  text-underline-offset: 6px;
}
.nav-toggle {
  display: none;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--ink);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.hero-layout {
  grid-template-columns: 1fr;
  align-items: center;
}
.view-root {
  min-height: 62vh;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .22s ease, transform .22s ease;
}
.view-root.is-ready {
  opacity: 1;
  transform: translateY(0);
}
.highlight-list,
.check-list {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--muted);
}
.highlight-list li,
.check-list li { margin-bottom: .65rem; }
.highlight-links a {
  color: var(--primary-dark);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.highlight-links a:hover {
  color: var(--primary);
}
.home-cards {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.home-card {
  background: rgba(255, 255, 255, .92);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.home-card a {
  display: grid;
  grid-template-columns: 132px 1fr;
  align-items: start;
  gap: .9rem;
  padding: .9rem .95rem 1rem;
}
.home-card img {
  width: 132px;
  height: 132px;
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid var(--line);
  margin-bottom: 0;
  background: #fff;
  align-self: center;
}
.home-card-content { min-width: 0; }
.home-card h3 {
  margin-bottom: .45rem;
  font-size: 1.2rem;
}
.home-card p {
  margin-bottom: .5rem;
}
.home-card-cta {
  color: var(--primary-dark);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.hero-carousel {
  display: grid;
  gap: 1rem;
}
.hero-slides {
  position: relative;
  min-height: 420px;
  border-radius: calc(var(--radius) + 4px);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #d8e6ff;
}
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .5s ease;
}
.hero-slide.is-active { opacity: 1; }
.hero-slide img {
  height: 100%;
  object-fit: cover;
}
.hero-slide figcaption {
  position: absolute;
  inset: auto 1.25rem 1.25rem 1.25rem;
  padding: 1rem 1.1rem;
  border-radius: 18px;
  background: rgba(22, 36, 56, 0.64);
  color: #fff;
  backdrop-filter: blur(8px);
}
.hero-dots {
  display: flex;
  gap: .6rem;
  justify-content: center;
}
.hero-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 0;
  background: rgba(22, 36, 56, 0.25);
  cursor: pointer;
}
.hero-dot.is-active { background: var(--primary); }

.stacked-sections { grid-template-columns: 1fr; }
.detail-card,
.info-card,
.workshop-item,
.contact-card {
  background: rgba(255,255,255,.92);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.detail-card-body { padding: 1.75rem; }
.detail-banner img { max-height: 250px; }
.detail-media-image {
  width: 220px;
  float: left;
  margin: .15rem 1rem .7rem 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #f1f6ff;
}
.detail-media-image img {
  width: 100%;
  aspect-ratio: 250 / 262;
  object-fit: cover;
}
.profile-name {
  margin: .5rem 0 .7rem;
  color: var(--ink);
}
.profile-image {
  width: 250px;
  margin: 0 0 1rem;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #f1f6ff;
}
.profile-image img {
  width: 100%;
  aspect-ratio: 250 / 262;
  object-fit: cover;
}
.letter-signature {
  width: 95px;
  margin: .2rem 0 1rem auto;
}
.letter-signature img {
  width: 100%;
  object-fit: contain;
}
.signature-note {
  font-style: italic;
}
.detail-card-body::after {
  content: '';
  display: table;
  clear: both;
}
.section-heading { margin-bottom: 1.5rem; }
.section-banner {
  margin: 0 0 1.5rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: #d8e6ff;
}
.section-banner img {
  width: 100%;
  max-height: 290px;
  object-fit: cover;
}
.info-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.info-card,
.workshop-item { padding: 1.4rem; }
.sexual-grid .info-card.is-solo {
  grid-column: 1 / -1;
  max-width: 820px;
  justify-self: center;
}
.info-card-image {
  width: 200px;
  float: left;
  margin: .2rem 1rem .6rem 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #f1f6ff;
}
.info-card-image img {
  width: 100%;
  aspect-ratio: 250 / 187;
  object-fit: cover;
}
.media-card::after {
  content: '';
  display: table;
  clear: both;
}
.closing-note {
  margin-top: 1.25rem;
  padding: 1.2rem 1.4rem;
  border-left: 4px solid var(--primary);
  background: rgba(255,255,255,.75);
  border-radius: 18px;
}

.accent-panel {
  background: linear-gradient(180deg, rgba(45,108,223,.1), rgba(255,255,255,0));
}
.feature-layout {
  grid-template-columns: .85fr 1.15fr;
  align-items: start;
}
.feature-copy,
.workshops-header,
.workshop-list,
.contact-links {
  display: grid;
  gap: 1rem;
}
.contact-links a {
  color: var(--primary-dark);
  text-decoration: underline;
  text-underline-offset: 4px;
  font-weight: 600;
}
.contact-links a:hover {
  color: var(--primary);
}
.workshops-layout {
  grid-template-columns: 1fr;
}
.contact-layout {
  grid-template-columns: 1fr;
}
.contact-map {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: #d8e6ff;
}
.contact-map iframe {
  display: block;
  width: 100%;
  height: clamp(300px, 45vw, 430px);
  border: 0;
}
.format {
  margin-bottom: 0;
  color: var(--primary-dark);
  font-weight: 700;
}
.contact-card {
  grid-template-columns: 1fr .9fr;
  padding: 1.75rem;
}

.site-footer {
  padding: 1.25rem 0 2rem;
  border-top: 1px solid var(--line);
}
.footer-wrap {
  grid-template-columns: 1fr auto;
  align-items: center;
}

@media (max-width: 920px) {
  .header-bar,
  .feature-layout,
  .workshops-layout,
  .contact-layout,
  .contact-card,
  .footer-wrap,
  .info-grid {
    grid-template-columns: 1fr;
  }

  .header-bar {
    grid-template-columns: auto auto;
  }

  .nav-toggle {
    display: inline-block;
    justify-self: end;
  }

  .main-nav {
    display: none;
    grid-column: 1 / -1;
    flex-direction: column;
    align-items: flex-start;
    padding-top: .75rem;
    border-top: 1px solid var(--line);
  }

  .main-nav.open { display: flex; }
  .home-cards { grid-template-columns: 1fr; }
  .home-card a { grid-template-columns: 108px 1fr; }
  .home-card img { width: 108px; height: 108px; }
}

@media (max-width: 640px) {
  .section { padding: 3.5rem 0; }
  .hero-slides { min-height: 300px; }
  .hero-slide figcaption {
    inset: auto .8rem .8rem .8rem;
    font-size: .95rem;
  }
  .info-card-image {
    float: none;
    width: 170px;
    margin: 0 auto .8rem;
  }
  .detail-media-image {
    float: none;
    width: 180px;
    margin: 0 auto .8rem;
  }
  .profile-image {
    width: 190px;
  }
  .letter-signature {
    width: 82px;
  }
}
