/* ============================================================
   Link Social — Tema Femenino / Ginecológico  v2
   Color de marca: var(--primary) / --primary-dark / --primary-light
   / --primary-soft / rgba(var(--primary-rgb), alpha) — inyectados
   por script.js desde brand.primaryColor.
   Tipografía: Playfair Display (títulos) + DM Sans (cuerpo).
   Paleta decorativa fija: marfil, blush, mauve, salvia, cobre.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,700;1,400&family=DM+Sans:wght@300;400;500;600&display=swap');

/* ── Tokens decorativos del tema (no cambian con la marca) ─────── */
:root {
  /* Paleta de identidad — para nth-child y decoración de fondo */
  --f-blush:    #C8897E;
  --f-mauve:    #A07285;
  --f-sage:     #7A9E88;
  --f-lavender: #9490B2;
  --f-copper:   #B87A60;
  --f-wine:     #8B4055;
  --f-gold:     #C4A06A;

  /* Paleta base — el JS inyecta --primary* */
  --background:       #FBF5F0;
  --foreground:       #2C1A17;
  --card:             #FFFAF7;
  --muted:            #F5EBE4;
  --secondary:        #EFE0D8;
  --border:           #E2CBBF;
  --muted-foreground: #8D6B62;

  --shadow-sm: 0 2px 12px rgba(44,26,23,.06);
  --shadow-md: 0 8px 28px rgba(44,26,23,.11);
  --radius:    16px;
  --radius-sm: 12px;
  --radius-xs:  8px;
}

[hidden] { display: none !important; }

/* ── Reset base ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--background); color: var(--foreground);
  line-height: 1.6; -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a  { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; margin: 0; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
i[data-lucide] { width: 18px; height: 18px; display: inline-block; flex-shrink: 0; }

/* ── Fondo premium con halos orgánicos + textura grain ───────── */
/* El fondo lo inyecta JS con el brand hue; los blobs usan --primary-rgb */
.page {
  min-height: 100vh; position: relative; overflow: hidden;
  background: var(--background, #FBF5F0); /* fallback; JS lo sobreescribe */
}
/* Grain muy sutil */
.page::before {
  content: ''; position: fixed; inset: 0;
  pointer-events: none; z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.72' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='260' height='260' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  opacity: .028; mix-blend-mode: multiply;
}
/* Blob orgánico detrás del hero */
.page::after {
  content: ''; position: absolute;
  width: 460px; height: 460px;
  top: -120px; left: 50%; transform: translateX(-50%);
  border-radius: 60% 40% 55% 45% / 45% 55% 40% 60%;
  background: radial-gradient(ellipse, rgba(var(--primary-rgb),.10) 0%, rgba(var(--primary-rgb),.05) 50%, transparent 75%);
  pointer-events: none; z-index: 0;
  animation: morphBlob 18s ease-in-out infinite alternate;
}
@keyframes morphBlob {
  from { border-radius: 60% 40% 55% 45% / 45% 55% 40% 60%; transform: translateX(-50%) scale(1) rotate(0deg); }
  to   { border-radius: 45% 55% 40% 60% / 60% 40% 55% 45%; transform: translateX(-50%) scale(1.06) rotate(4deg); }
}

/* ── Contenedor ───────────────────────────────────────────────── */
.container {
  position: relative; z-index: 1; max-width: 460px;
  margin: 0 auto; padding: 40px 18px 80px;
  display: flex; flex-direction: column; align-items: center;
}

/* ── Secciones ────────────────────────────────────────────────── */
.block { width: 100%; margin-top: 36px; }
.section-title {
  font-family: 'DM Sans', sans-serif;
  font-size: .68rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted-foreground); margin-bottom: 14px;
}

/* ── Hero ────────────────────────────────────────────────────── */
.hero {
  text-align: center; display: flex; flex-direction: column;
  align-items: center; gap: 12px; padding-top: 12px;
}

/* Avatar: halo fino con el color de marca */
.avatar {
  width: 114px; height: 114px; border-radius: 50%;
  overflow: hidden; background: var(--muted); flex-shrink: 0;
  border: 2px solid rgba(var(--primary-rgb), .45);
  box-shadow:
    0 0 0 6px rgba(var(--primary-rgb), .10),
    0 0 0 12px rgba(var(--primary-rgb), .06),
    0 12px 32px rgba(44,26,23,.12);
  position: relative;
}
.avatar img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: top center; display: block;
}

/* Nombre editorial */
.hero h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.6rem; font-weight: 700;
  line-height: 1.2; letter-spacing: -.01em;
  color: var(--foreground); margin-top: 6px;
}

/* Badge especialidad con color de marca (cápsula elegante, no gradiente) */
.specialty {
  display: inline-block;
  background: rgba(var(--primary-rgb), .10);
  color: var(--primary);
  border: 1px solid rgba(var(--primary-rgb), .28);
  font-size: .72rem; font-weight: 600;
  padding: 5px 18px; border-radius: 99px;
  letter-spacing: .06em; text-transform: uppercase;
}

.tagline {
  font-size: .9rem; font-weight: 400;
  color: var(--muted-foreground); max-width: 300px;
  line-height: 1.6; font-style: italic;
}

/* ── Cards ────────────────────────────────────────────────────── */
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.pad, .card.pad { padding: 18px 20px; }
.card-button { width: 100%; text-align: left; }

/* Layout fila — usado por el botón CV */
.row { display: flex; align-items: center; gap: 14px; padding: 14px 18px; }

/* ── Icon squares ─────────────────────────────────────────────── */
.icon-square {
  flex: 0 0 auto; width: 42px; height: 42px;
  border-radius: var(--radius-xs);
  display: flex; align-items: center; justify-content: center;
  background: var(--muted); color: var(--muted-foreground);
}
/* Color de marca */
.icon-square.primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
}
.icon-square.soft {
  background: rgba(var(--primary-rgb), .12);
  color: var(--primary);
  width: 34px; height: 34px; border-radius: var(--radius-xs);
}

/* ── Links de contacto ────────────────────────────────────────── */
.link-list { display: flex; flex-direction: column; gap: 10px; }

/* Estructura base — sin !important para que el modo bold (inline style) pueda tomar el control */
.link-list a,
.link-list li > button {
  display: flex; align-items: center; gap: 14px; padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--foreground);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
/* Hover subtle */
.link-list a:not(.bold-card):hover,
.link-list li > button:hover {
  transform: translateY(-2px);
  border-color: rgba(var(--primary-rgb), .45);
  box-shadow: var(--shadow-md);
}
/* Hover bold — brillo sin alterar colores */
.link-list a.bold-card:hover {
  transform: translateY(-2px);
  filter: brightness(1.07);
  box-shadow: 0 14px 36px rgba(var(--primary-rgb), .40);
}

.row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row-title { font-size: .9rem; font-weight: 600; color: var(--foreground); }
.row-sub {
  font-size: .75rem; color: var(--muted-foreground);
  margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.row-arrow {
  margin-left: auto; color: var(--muted-foreground);
  font-size: .95rem; padding-left: 8px; flex-shrink: 0; transition: transform .2s;
}
.link-list a:not(.bold-card):hover .row-arrow { transform: translateX(3px); }

/* Colores rotativos DECORATIVOS — solo en modo subtle (:not(.bold-card))
   En bold, el ícono glass lo controla el JS                              */
.link-list li:nth-child(6n+1) a:not(.bold-card) .icon-square { background: linear-gradient(135deg,#C8897E,#A07285) !important; color:#fff !important; }
.link-list li:nth-child(6n+2) a:not(.bold-card) .icon-square { background: linear-gradient(135deg,#7A9E88,#5F8A78) !important; color:#fff !important; }
.link-list li:nth-child(6n+3) a:not(.bold-card) .icon-square { background: linear-gradient(135deg,#9490B2,#7A7598) !important; color:#fff !important; }
.link-list li:nth-child(6n+4) a:not(.bold-card) .icon-square { background: linear-gradient(135deg,#B87A60,#C4A06A) !important; color:#fff !important; }
.link-list li:nth-child(6n+5) a:not(.bold-card) .icon-square { background: linear-gradient(135deg,#A07285,#9490B2) !important; color:#fff !important; }
.link-list li:nth-child(6n+0) a:not(.bold-card) .icon-square { background: linear-gradient(135deg,#8B4055,#A07285) !important; color:#fff !important; }

/* Botón Ver Currículum con color de marca */
#open-cv {
  background: rgba(var(--primary-rgb), .04) !important;
  border: 1px solid rgba(var(--primary-rgb), .30) !important;
}
#open-cv:hover {
  background: rgba(var(--primary-rgb), .09) !important;
  border-color: rgba(var(--primary-rgb), .55) !important;
}

.link-list + .card { margin-top: 14px; }

/* ── Horario ──────────────────────────────────────────────────── */
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.card-head h3 {
  margin: 0; font-family: 'Playfair Display', serif;
  font-size: .95rem; font-weight: 700; color: var(--foreground);
}
.schedule { display: flex; flex-direction: column; }
.schedule li {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 0; border-top: 1px solid var(--border); font-size: .84rem;
}
.schedule li:first-child { border-top: none; }
.schedule li span:first-child { font-weight: 500; }

/* ── Mapa / Ubicación ─────────────────────────────────────────── */
.map-card { margin-top: 12px; }
.map-card .card-body { display: flex; gap: 14px; padding: 18px; align-items: flex-start; }
.map-card h3 { margin: 0; font-family: 'Playfair Display', serif; font-size: .95rem; font-weight: 700; }
.map-card p  { margin: 4px 0 0; font-size: .82rem; }

/* Enlace "Cómo llegar" como píldora con color de marca */
.link-primary {
  display: inline-flex; align-items: center; gap: 4px;
  margin-top: 10px; padding: 5px 14px; border-radius: 99px;
  font-size: .76rem; font-weight: 600;
  color: var(--primary);
  border: 1px solid rgba(var(--primary-rgb), .35);
  background: rgba(var(--primary-rgb), .06);
  transition: background .18s, border-color .18s;
}
.link-primary:hover {
  background: rgba(var(--primary-rgb), .12);
  border-color: rgba(var(--primary-rgb), .55);
}

.map-frame { border-top: 1px solid var(--border); aspect-ratio: 16/9; }
.map-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ── Servicios ────────────────────────────────────────────────── */
.services-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; list-style: none; }
.services-grid li {
  display: flex; flex-direction: column; gap: 10px; padding: 18px 14px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-sm);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.services-grid li:hover {
  transform: translateY(-2px); box-shadow: var(--shadow-md);
  border-color: rgba(var(--primary-rgb), .35);
}

/* Colores rotativos DECORATIVOS en servicios (paleta del tema) */
.services-grid li:nth-child(6n+1) .icon-square { background: rgba(200,137,126,.15); color: var(--f-blush); }
.services-grid li:nth-child(6n+2) .icon-square { background: rgba(122,158,136,.15); color: var(--f-sage); }
.services-grid li:nth-child(6n+3) .icon-square { background: rgba(148,144,178,.15); color: var(--f-lavender); }
.services-grid li:nth-child(6n+4) .icon-square { background: rgba(184,122,96,.15);  color: var(--f-copper); }
.services-grid li:nth-child(6n+5) .icon-square { background: rgba(160,114,133,.15); color: var(--f-mauve); }
.services-grid li:nth-child(6n+0) .icon-square { background: rgba(139,64,85,.12);   color: var(--f-wine); }

.svc-title { font-size: .84rem; font-weight: 600; line-height: 1.25; color: var(--foreground); }
.svc-desc  { font-size: .74rem; color: var(--muted-foreground); line-height: 1.45; }

/* ── FAQ ──────────────────────────────────────────────────────── */
.faq-details {
  background: rgba(251,245,240,.7); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 20px; backdrop-filter: blur(4px);
}
.faq-details[open] { background: var(--card); }

.faq-details > summary {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  cursor: pointer; list-style: none;
  font-family: 'DM Sans', sans-serif; font-size: .7rem; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; color: var(--muted-foreground);
}
.faq-details > summary::-webkit-details-marker { display: none; }
.faq-details[open] > summary .chev { transform: rotate(180deg); }
.chev { transition: transform .22s; display: inline-block; }

.faq-body { margin-top: 18px; display: flex; flex-direction: column; gap: 16px; }

/* Título de grupo FAQ con color de marca */
.faq-group h3 {
  margin: 0 0 8px; font-family: 'Playfair Display', serif;
  font-size: .78rem; font-weight: 500; font-style: italic;
  letter-spacing: .02em; color: var(--primary);
}

.faq-item { border-bottom: 1px solid var(--border); }
.faq-item:last-child { border-bottom: none; }

.faq-item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  list-style: none; cursor: pointer; padding: 12px 0;
  font-size: .86rem; font-weight: 500; color: var(--foreground);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "▾"; color: var(--primary);
  transition: transform .2s; font-size: .78rem;
  flex-shrink: 0; opacity: .85;
}
.faq-item[open] summary::after { transform: rotate(180deg); }

.faq-item .answer { padding: 0 0 14px; font-size: .83rem; color: var(--muted-foreground); line-height: 1.65; }

/* ── Carrusel de Videos ───────────────────────────────────────── */
.carousel { position: relative; }
.carousel-viewport { overflow: hidden; border-radius: var(--radius); }
.carousel-track { display: flex; transition: transform .38s cubic-bezier(.4,0,.2,1); }
.carousel-track > li { flex: 0 0 100%; padding: 0 2px; }

.carousel-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--card); border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; z-index: 2; color: var(--foreground);
  cursor: pointer; transition: background .15s, box-shadow .15s;
}
.carousel-btn:hover { background: var(--muted); box-shadow: var(--shadow-md); }
.carousel-btn.prev { left: 6px; }
.carousel-btn.next { right: 6px; }

.video-card { overflow: hidden; border-radius: var(--radius); border: 1px solid var(--border); background: var(--card); box-shadow: var(--shadow-sm); }
.video-thumb-link { position: relative; display: block; aspect-ratio: 16/9; overflow: hidden; }
.video-thumb-link img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .38s; }
.video-thumb-link:hover img { transform: scale(1.04); }
.video-play-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(44,26,23,.22); transition: background .2s;
}
.video-thumb-link:hover .video-play-overlay { background: rgba(44,26,23,.38); }

/* Botón play con color de marca */
.video-play-btn {
  width: 54px; height: 54px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; padding-left: 3px;
  box-shadow: 0 4px 20px rgba(var(--primary-rgb),.40);
  transition: transform .2s;
}
.video-thumb-link:hover .video-play-btn { transform: scale(1.1); }
.video-meta { display: flex; align-items: center; gap: 8px; padding: 12px 14px; font-size: .84rem; font-weight: 500; }
.video-meta .play { color: var(--primary); }

/* ── Promos ───────────────────────────────────────────────────── */
.promo {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-sm); transition: transform .2s;
}
.promo:hover { transform: translateY(-2px); }
.promo .promo-info { flex: 1; min-width: 0; }
.promo .promo-info .t { font-size: .88rem; font-weight: 600; margin: 0; }
.promo .promo-info .d { font-size: .74rem; color: var(--muted-foreground); margin: 2px 0 0; }
.promo .price { text-align: right; flex-shrink: 0; }
.promo .price .now { font-size: .88rem; font-weight: 700; color: var(--primary); margin: 0; }
.promo .price .old { font-size: .74rem; color: var(--muted-foreground); text-decoration: line-through; margin: 0; }

/* ── Modal CV ─────────────────────────────────────────────────── */
.modal {
  position: fixed; inset: 0; z-index: 200;
  display: none; align-items: flex-end; justify-content: center;
}
.modal.open { display: flex; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(30,12,10,.42); backdrop-filter: blur(5px); }
.modal-content {
  position: relative; z-index: 1; background: var(--card);
  border-radius: var(--radius) var(--radius) 0 0;
  width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto;
  box-shadow: 0 -10px 48px rgba(44,26,23,.18);
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--primary-rgb),.30) transparent;
}
.modal-content::-webkit-scrollbar { width: 4px; }
.modal-content::-webkit-scrollbar-thumb { background: rgba(var(--primary-rgb),.30); border-radius: 99px; }
.modal-close {
  position: absolute; top: 12px; right: 14px; z-index: 3;
  background: rgba(255,255,255,.25); border: none; border-radius: 50%;
  width: 30px; height: 30px; font-size: 1.15rem; line-height: 1;
  cursor: pointer; color: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.modal-close:hover { background: rgba(255,255,255,.38); }

/* Cabecera del CV — gradiente de color de marca */
.cv-header {
  position: relative; overflow: hidden;
  padding: 28px 24px 22px;
  background: linear-gradient(140deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  border-radius: var(--radius) var(--radius) 0 0;
}
.cv-blob { position: absolute; border-radius: 50%; background: rgba(255,255,255,.10); filter: blur(36px); pointer-events: none; }
.cv-blob.a { width: 180px; height: 180px; right: -50px; top: -50px; }
.cv-blob.b { width: 140px; height: 140px; left: -40px; bottom: -50px; }

.cv-head-row { position: relative; display: flex; gap: 16px; align-items: flex-start; }
.cv-avatar {
  width: 66px; height: 66px; border-radius: 50%; flex-shrink: 0;
  overflow: hidden; border: 2px solid rgba(255,255,255,.55);
  box-shadow: 0 4px 16px rgba(44,26,23,.22); background: rgba(255,255,255,.18);
}
.cv-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }

.cv-header h3 {
  margin: 0; font-family: 'Playfair Display', serif;
  font-size: 1.15rem; font-weight: 700; letter-spacing: -.01em;
}
.cv-sub { margin: 4px 0 0; font-size: .8rem; color: rgba(255,255,255,.86); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.chips span {
  background: rgba(255,255,255,.18); padding: 3px 11px;
  border-radius: 99px; font-size: .7rem; font-weight: 600;
  border: 1px solid rgba(255,255,255,.28);
}

.cv-body { padding: 22px 22px 30px; display: flex; flex-direction: column; gap: 16px; font-size: .86rem; }
.cv-section { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; }
.cv-sec-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.cv-sec-head h4 {
  margin: 0; font-size: .68rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .1em; color: var(--muted-foreground);
}

/* Timeline con color de marca */
.timeline {
  border-left: 2px solid rgba(var(--primary-rgb),.30);
  padding-left: 16px; display: flex; flex-direction: column; gap: 14px;
}
.timeline li { position: relative; }
.timeline li::before {
  content: ""; position: absolute; left: -21px; top: 6px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb),.18);
}
.timeline p { margin: 0; }

/* Stats con color de marca */
.stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-bottom: 10px; }
.stats > div {
  background: rgba(var(--primary-rgb),.07);
  border: 1px solid rgba(var(--primary-rgb),.18);
  border-radius: var(--radius-xs); padding: 10px 6px; text-align: center;
}
.stats .big {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem; font-weight: 700; margin: 0; color: var(--primary);
}
.stats p.muted { margin: 2px 0 0; font-size: .66rem; line-height: 1.2; }

/* Bullets con color de marca */
.bullets { display: flex; flex-direction: column; gap: 7px; color: var(--muted-foreground); }
.bullets li { display: flex; gap: 8px; align-items: flex-start; }
.bullets span { color: var(--primary); flex-shrink: 0; margin-top: 2px; }

/* Pills con color de marca */
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pills span {
  background: rgba(var(--primary-rgb),.08);
  border: 1px solid rgba(var(--primary-rgb),.22);
  padding: 4px 12px; border-radius: 99px;
  font-size: .74rem; font-weight: 500; color: var(--primary);
}

/* ── Utilidades / Footer / Responsive ────────────────────────── */
.footer { width: 100%; margin-top: 48px; text-align: center; font-size: .7rem; color: var(--muted-foreground); font-weight: 400; letter-spacing: .04em; }
.muted { color: var(--muted-foreground); }
.small { font-size: .8rem; }
.mt    { margin-top: 10px; }

@media (max-width: 400px) {
  .services-grid { grid-template-columns: 1fr; }
  .hero h1       { font-size: 1.35rem; }
  .container     { padding: 32px 14px 68px; }
}
