/* ==========================================================================
   Urocare Costa Rica — Design system
   Paleta extraída del logo: teal #1FB2D6 · azul #3380B8
   Tipografía: Fraunces (display, cálida/orgánica) + Inter (texto, clínica/legible)
   Elemento de firma: la "línea que conecta" — curva inspirada en el trazo
   del uréter del logo, usada como nexo visual entre lo físico y lo emocional.
   ========================================================================== */

:root {
  /* Color */
  --teal: #1FB2D6;
  --teal-dark: #12839F;
  --teal-tint: #EAF7FA;
  --blue: #3380B8;
  --blue-dark: #1E5D89;
  --blue-tint: #EAF2F8;
  --warm: #E08A63;
  --warm-dark: #B4623F;
  --warm-tint: #FBF1EA;
  --navy: #10283B;
  --ink: #33454F;
  --gray: #6B7C85;
  --border: #DCE6EA;
  --bg: #FCFDFD;
  --white: #FFFFFF;

  /* Type */
  --font-display: 'Source Serif 4', Georgia, serif;
  --font-body: 'Quicksand', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Layout */
  --radius: 6px;
  --radius-lg: 18px;
  --maxw: 1180px;
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 40px;
  --space-5: 64px;
  --space-6: 96px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--navy);
  font-weight: 560;
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.1rem, 4.2vw, 3.4rem); font-weight: 460; }
h2 { font-size: clamp(1.6rem, 2.8vw, 2.3rem); }
h3 { font-size: 1.3rem; font-weight: 600; }
p { margin: 0 0 1em; }
a { color: var(--blue-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

a:focus-visible,
button:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--teal-dark);
  outline-offset: 3px;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--teal-dark);
  margin-bottom: var(--space-2);
}

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--space-3);
}

.section { padding: var(--space-6) 0; }
.section-sm { padding: var(--space-5) 0; }
.bg-soft { background: var(--teal-tint); }
.bg-warm { background: var(--warm-tint); }
.bg-navy { background: var(--navy); color: #CFE3EC; }
.bg-navy h2, .bg-navy h3 { color: #fff; }

.lede {
  font-size: 1.2rem;
  color: var(--ink);
  max-width: 640px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.96rem;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-dark); }
.btn-outline { background: transparent; border-color: var(--navy); color: var(--navy); }
.btn-outline:hover { border-color: var(--teal-dark); color: var(--teal-dark); }
.btn-outline-light { background: transparent; border-color: rgba(255,255,255,.55); color: #fff; }
.btn-outline-light:hover { border-color: #fff; }
.btn-warm { background: var(--warm); color: #fff; }
.btn-warm:hover { background: var(--warm-dark); }
.btn-block { width: 100%; justify-content: center; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(252,253,253,.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 14px; padding-bottom: 14px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { height: 44px; width: auto; }
.brand-text { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; color: var(--navy); }
.nav { display: flex; align-items: center; gap: var(--space-4); }
.nav-links { display: flex; gap: var(--space-3); list-style: none; margin: 0; padding: 0; }
.nav-links a {
  color: var(--ink); font-weight: 500; font-size: 0.95rem;
  padding: 6px 2px; border-bottom: 2px solid transparent;
}
.nav-links a:hover, .nav-links a.active { color: var(--teal-dark); border-color: var(--teal); text-decoration: none; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--navy); margin: 5px 0; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: var(--space-4) 0 var(--space-5);
  overflow: hidden;
}
.hero h1 { margin-bottom: 0.4em; }
.hero .lede { margin-bottom: var(--space-3); }
.hero-ctas { display: flex; gap: var(--space-2); flex-wrap: wrap; margin-top: var(--space-3); }
.hero-visual { position: relative; }
.hero-visual svg { width: 100%; height: auto; }

/* ---------- Image slider (Inicio) ---------- */
.slider {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: clamp(340px, 46vw, 560px);
  background: var(--navy);
}
.slide {
  position: absolute; inset: 0;
  opacity: 0; visibility: hidden;
  transform: scale(1.09);
  transition: opacity 1s ease, transform 7s cubic-bezier(.19,.68,.35,1), visibility 0s linear 1s;
  background-size: cover; background-position: center;
}
.slide.active {
  opacity: 1; visibility: visible;
  transform: scale(1);
  transition: opacity 1s ease, transform 7s cubic-bezier(.19,.68,.35,1);
}
.slide::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(11,28,42,.82) 0%, rgba(11,28,42,.55) 32%, rgba(11,28,42,.08) 62%, transparent 80%);
}
.slide-text {
  position: absolute; left: 0; bottom: 0; top: 0;
  display: flex; flex-direction: column; justify-content: center;
  max-width: 560px; padding: var(--space-4) var(--space-4);
  z-index: 2;
}
.slide-text .eyebrow { color: #8FE2F2; }
.slide-text h1 { color: #fff; margin-bottom: 0.35em; }
.slide-text p { color: #DCEAF0; max-width: 460px; }
.slide-text > * {
  opacity: 0; transform: translateY(16px);
  transition: opacity .7s ease, transform .7s ease;
}
.slide.active .slide-text > * { opacity: 1; transform: translateY(0); }
.slide.active .slide-text .eyebrow { transition-delay: .15s; }
.slide.active .slide-text h1 { transition-delay: .28s; }
.slide.active .slide-text p { transition-delay: .42s; }
.slider-nav {
  position: absolute; z-index: 3; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.4);
  color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.slider-nav:hover { background: rgba(255,255,255,.3); }
.slider-prev { left: var(--space-2); }
.slider-next { right: var(--space-2); }
.slider-dots {
  position: absolute; z-index: 3; left: var(--space-4); bottom: var(--space-3);
  display: flex; gap: 8px;
}
.slider-dots .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: rgba(255,255,255,.4); border: none; cursor: pointer; padding: 0;
}
.slider-dots .dot.active { background: #fff; width: 22px; border-radius: 5px; transition: width .25s ease; }
@media (max-width: 700px) {
  .slide-text { max-width: 100%; padding: var(--space-3); }
  .slide::after { background: linear-gradient(180deg, rgba(11,28,42,.35) 0%, rgba(11,28,42,.88) 78%); }
  .slide-text { justify-content: flex-end; padding-bottom: var(--space-4); }
  .slider-nav { display: none; }
}

/* stat strip */
.stat-strip {
  border-top: 1px solid var(--border);
  margin-top: var(--space-5);
  padding-top: var(--space-3);
  display: flex; gap: var(--space-5); flex-wrap: wrap;
}
.stat b { display: block; font-family: var(--font-display); font-size: 1.7rem; color: var(--navy); }
.stat span { font-size: 0.85rem; color: var(--gray); }

/* ---------- Two-pillar split ---------- */
.pillars { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.pillar {
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  position: relative;
}
.pillar-uro { background: var(--blue-tint); border: 1px solid #cfe0ee; }
.pillar-sex { background: var(--warm-tint); border: 1px solid #f0dccb; }
.pillar .eyebrow { }
.pillar-uro .eyebrow { color: var(--blue-dark); }
.pillar-sex .eyebrow { color: var(--warm-dark); }
.pillar h3 { font-size: 1.5rem; }
.pillar ul { padding-left: 1.1em; margin: var(--space-2) 0; }
.pillar li { margin-bottom: 6px; }

/* ---------- Cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); }
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
}
.card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.card p { color: var(--gray); font-size: 0.95rem; margin-bottom: 0; }

/* ---------- Divider line motif (signature element) ---------- */
.thread {
  display: block; width: 100%; height: 40px; margin: 0;
  background: center / 100% 40px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1180 40' preserveAspectRatio='none'%3E%3Cpath d='M0 20 C 200 0, 300 40, 500 20 S 800 0, 1180 20' fill='none' stroke='%23DCE6EA' stroke-width='2'/%3E%3C/svg%3E");
}

/* ---------- Placeholder photo block ---------- */
.photo-slot {
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  background: linear-gradient(155deg, var(--blue-tint), var(--teal-tint));
  border: 1.5px dashed #A9C8D3;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; color: var(--blue-dark); text-align: center; padding: var(--space-3);
}
.photo-slot span { font-size: 0.82rem; color: var(--gray); max-width: 220px; }
.photo-slot.wide { aspect-ratio: 16/10; }

.photo-real {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/5;
}
.photo-real img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-real.wide { aspect-ratio: 16/10; }

/* ---------- Timeline (Sobre la doctora) ---------- */
.timeline { position: relative; padding-left: 34px; }
.timeline::before {
  content: ""; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 2px;
  background: linear-gradient(var(--teal), var(--blue));
}
.timeline-item { position: relative; padding-bottom: var(--space-3); }
.timeline-item::before {
  content: ""; position: absolute; left: -34px; top: 4px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--white); border: 2.5px solid var(--teal);
}
.timeline-item b { display: block; color: var(--navy); }
.timeline-item .yr { font-size: 0.82rem; color: var(--teal-dark); font-weight: 600; }

/* ---------- Procedures list ---------- */
.proc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-4); }
.proc-group h4 { font-family: var(--font-body); font-weight: 700; font-size: 0.85rem; letter-spacing: .05em; text-transform: uppercase; color: var(--blue-dark); margin-bottom: 10px;}
.proc-group ul { margin: 0; padding-left: 1.1em; color: var(--ink); }
.proc-group li { margin-bottom: 6px; }

/* ---------- Blog banner (imagen genérica de artículo) ---------- */
.blog-banner {
  aspect-ratio: 3/1;
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: var(--space-4);
  position: relative; overflow: hidden;
}
.blog-banner svg { width: 84px; height: 84px; }
.blog-banner-teal { background: var(--teal-tint); }
.blog-banner-teal svg { color: var(--teal-dark); }
.blog-banner-warm { background: var(--warm-tint); }
.blog-banner-warm svg { color: var(--warm-dark); }
.blog-banner-blue { background: var(--blue-tint); }
.blog-banner-blue svg { color: var(--blue-dark); }
.blog-banner .ring {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  border-radius: 50%; border: 1.5px solid currentColor; opacity: .18;
}
.blog-banner-photo { aspect-ratio: 16/7; background: var(--teal-tint); }
.blog-banner-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 620px) { .blog-banner { aspect-ratio: 16/9; } .blog-banner svg { width: 60px; height: 60px; } .blog-banner-photo { aspect-ratio: 4/3; } }

/* ---------- Blog ---------- */
.post-card {
  border-bottom: 1px solid var(--border); padding: var(--space-3) 4px;
  display: grid; grid-template-columns: 132px 1fr; gap: var(--space-3); align-items: center;
  color: inherit; border-radius: var(--radius);
}
.post-card:hover { text-decoration: none; background: var(--teal-tint); }
.post-card h3 { color: var(--navy); }
.post-thumb {
  width: 132px; height: 132px; border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.post-thumb svg { width: 40px; height: 40px; }
.post-thumb-teal { background: var(--teal-tint); color: var(--teal-dark); }
.post-thumb-warm { background: var(--warm-tint); color: var(--warm-dark); }
.post-thumb-blue { background: var(--blue-tint); color: var(--blue-dark); }
.post-thumb-photo { overflow: hidden; }
.post-thumb-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-tag { font-size: 0.78rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--teal-dark); }
article.post { max-width: 720px; margin: 0 auto; }
article.post h1 { margin-bottom: 6px; }
article.post .meta { color: var(--gray); font-size: 0.9rem; margin-bottom: var(--space-4); }
article.post h2 { font-size: 1.3rem; margin-top: 1.6em; }
article.post p { font-size: 1.04rem; }
.byline {
  margin-top: var(--space-4);
  padding: var(--space-3);
  background: var(--teal-tint);
  border-radius: var(--radius);
  font-size: 0.92rem; color: var(--ink);
}
.note {
  font-size: 0.88rem; color: var(--gray); border-left: 3px solid var(--border);
  padding-left: 12px; margin-top: var(--space-3);
}

/* ---------- Course page ---------- */
.module {
  border: 1px solid var(--border); border-radius: var(--radius); padding: var(--space-2) var(--space-3);
  margin-bottom: 10px; display: grid; grid-template-columns: 44px 1fr; gap: var(--space-2); align-items: start;
}
.module .num { font-family: var(--font-display); font-size: 1.3rem; color: var(--teal-dark); }
.module h4 { margin: 0 0 4px; font-family: var(--font-body); font-weight: 700; font-size: 1rem; color: var(--navy); }
.module p { margin: 0; color: var(--gray); font-size: 0.92rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #B9CCD6; padding: var(--space-5) 0 var(--space-3); }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: var(--space-4); }
.site-footer h4 { color: #fff; font-family: var(--font-body); font-size: 0.85rem; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 14px; }
.site-footer a { color: #B9CCD6; }
.site-footer a:hover { color: #fff; }
.site-footer .brand-text { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: var(--space-4); padding-top: var(--space-3); font-size: 0.82rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; color: #8FA7B2; }

/* ---------- Social icons (minimal, round) ---------- */
.social-row { display: flex; gap: 10px; flex-wrap: wrap; }
.social-icon {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); color: var(--blue-dark);
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.social-icon:hover { background: var(--teal); border-color: var(--teal); color: #fff; text-decoration: none; }
.social-icon svg { width: 16px; height: 16px; }
.social-row.on-dark .social-icon { border-color: rgba(255,255,255,.28); color: #CFE3EC; }
.social-row.on-dark .social-icon:hover { background: var(--teal); border-color: var(--teal); color: #fff; }

/* ---------- Card media (pillars, video cards) ---------- */
.card-media { border-radius: var(--radius); overflow: hidden; margin-bottom: 14px; aspect-ratio: 16/10; }
.card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pillar-media { border-radius: var(--radius); overflow: hidden; margin-bottom: var(--space-2); aspect-ratio: 16/9; }
.pillar-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.video-card { display: block; color: inherit; }
.video-card:hover { text-decoration: none; }
.video-card .card-media { position: relative; }
.video-card .play-badge {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
}
.video-card .play-badge span {
  width: 46px; height: 46px; border-radius: 50%; background: rgba(16,40,59,.55);
  display: flex; align-items: center; justify-content: center;
}
.video-card:hover .play-badge span { background: var(--teal); }

/* WhatsApp floating button */
.wa-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 60;
  width: 56px; height: 56px; border-radius: 50%;
  background: #22B573; color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(16,40,59,.25);
}
.wa-float:hover { transform: scale(1.06); }

/* ---------- Page hero (subpages) ---------- */
.page-hero { padding: var(--space-5) 0 var(--space-4); border-bottom: 1px solid var(--border); }
.page-hero .lede { max-width: 700px; }

/* Utility */
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.section-head { max-width: 640px; margin: 0 auto var(--space-4); text-align: center; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-5); align-items: center; }
.list-check { list-style: none; padding: 0; margin: 0; }
.list-check li { position: relative; padding-left: 28px; margin-bottom: 12px; }
.list-check li::before {
  content: ""; position: absolute; left: 0; top: 6px; width: 14px; height: 14px;
  border-radius: 50%; background: var(--teal-tint); border: 1.5px solid var(--teal);
}

/* ---------- Cursos dinámicos ---------- */
.course-listing h2 { max-width: 620px; }
.course-page-intro > :last-child { margin-bottom: 0; }
.course-more { margin-top: var(--space-2); }
.course-modules { max-width: 680px; margin: 0 auto; }
.course-content .post { padding-top: 0; padding-bottom: 0; }
.course-cta-copy { margin: 0 auto var(--space-3); color: #CFE3EC; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-visual { order: -1; max-width: 320px; margin: 0 auto; }
  .pillars, .proc-grid, .footer-grid, .two-col { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: 1fr 1fr; }
  .nav-links { position: fixed; inset: 62px 0 auto 0; background: var(--white); flex-direction: column;
    padding: var(--space-3); border-bottom: 1px solid var(--border); display: none; gap: var(--space-2); }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .nav > .btn { display: none; }
}
@media (max-width: 620px) {
  .card-grid { grid-template-columns: 1fr; }
  .post-card { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
