/* ============================================================
   Página HeberFeron — estilos específicos
   Hereda variables y componentes de styles.css y SOBREESCRIBE
   la paleta principal con el color oficial de marca HeberFeron
   (magenta-rosado #b85ba2 extraído del empaque oficial del CIGB).
   Esta sobrescritura solo afecta a heberferon.html, NO al index.
   ============================================================ */

:root {
  /* Color principal: magenta-rosado oficial HeberFeron (#b85ba2)
     extraído del empaque del producto publicado por el CIGB. */
  --primary: #b85ba2;
  --primary-dark: #8a4479;        /* hover + texto sobre blanco (AA 6.6:1) */
  --primary-light: #e671ca;      /* variante clara para acentos suaves */
  --primary-foreground: #ffffff;
  --accent: #b85ba2;
  --accent-light: #e671ca;
  --accent-foreground: #4a1d3d;
}

/* ===== Hero HeberFeron ===== */
.hf-hero {
  position: relative;
  min-height: 60vh;
  display: flex;
  align-items: center;
  padding: 8rem 0 4rem;
  overflow: hidden;
}
.hf-hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 80% 30%, rgba(184, 91, 162, 0.95) 0%, transparent 60%),
    radial-gradient(ellipse at 20% 70%, rgba(138, 68, 121, 0.85) 0%, transparent 60%),
    linear-gradient(135deg, #8a4479 0%, #b85ba2 60%, #e671ca 100%);
  z-index: -1;
}
.hf-hero-content {
  position: relative;
  max-width: 720px;
  color: #ffffff;
}
.hf-hero h1 {
  color: #ffffff;
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: -0.03em;
}
.hf-hero h1 sup {
  font-size: 0.45em;
  font-weight: 500;
  vertical-align: super;
  margin-left: 0.125rem;
}
.hf-hero-sub {
  font-size: 1.125rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.92);
  max-width: 40rem;
  margin-bottom: 2rem;
}
.hf-hero-cta {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
@media (min-width: 640px) { .hf-hero-cta { flex-direction: row; align-items: center; } }
.hf-hero-cta .btn-link {
  color: #ffffff;
  padding: 0.625rem 0;
}
.hf-hero-cta .btn-link:hover { color: rgba(255, 255, 255, 0.8); }

/* ===== Subsecciones h3 dentro de section-main ===== */
.hf-subsection {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.875rem;
  color: var(--foreground);
}

/* ===== Lista de presentaciones ===== */
.hf-presentations {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  padding-left: 0;
}
.hf-presentations li {
  position: relative;
  padding-left: 1.5rem;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--foreground-soft);
}
.hf-presentations li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: bold;
}
.hf-presentations strong { color: var(--foreground); font-weight: 600; }

/* ===== Mecanismo (lista numerada) ===== */
.hf-mechanism {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.mech-item {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 1.5rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}
.mech-item:first-child { padding-top: 0; }
.mech-item:last-child { border-bottom: none; }
@media (min-width: 768px) {
  .mech-item { grid-template-columns: 80px 1fr; gap: 2rem; padding: 2.25rem 0; }
}
.mech-num {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.015em;
  line-height: 1;
}
.mech-content h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--foreground);
}
.mech-content p {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--foreground-soft);
}
.mech-content strong { color: var(--foreground); font-weight: 600; }

/* ===== Indicaciones — grid de cards ===== */
.indications-grid {
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 768px) { .indications-grid { grid-template-columns: repeat(2, 1fr); } }

.ind-card {
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: border-color 0.2s ease;
}
.ind-card:hover { border-color: var(--primary); }
.ind-card-primary {
  border-color: var(--primary);
  background: rgba(184, 91, 162, 0.03);
}
.ind-tag {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted-foreground);
  padding: 0.25rem 0.625rem;
  background: var(--muted);
  border-radius: var(--radius-sm);
}
.ind-tag-primary {
  background: var(--primary);
  color: var(--primary-foreground);
}
.ind-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--foreground);
}
.ind-detail {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--foreground-soft);
  flex: 1;
}
.ind-route {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  padding-top: 0.875rem;
  border-top: 1px solid var(--border);
}

/* ===== Tabla de dosis ===== */
.dosage-table-wrap {
  overflow-x: auto;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.dosage-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}
.dosage-table thead {
  background: var(--muted);
}
.dosage-table th {
  text-align: left;
  padding: 0.875rem 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted-foreground);
  border-bottom: 1px solid var(--border);
}
.dosage-table td {
  padding: 1rem;
  font-size: 0.875rem;
  color: var(--foreground-soft);
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.5;
}
.dosage-table tbody tr:last-child td { border-bottom: none; }
.dosage-table tbody tr:hover { background: rgba(184, 91, 162, 0.03); }
.dosage-table td strong { color: var(--foreground); font-weight: 600; }
.dosage-note {
  display: block;
  font-size: 0.6875rem;
  color: var(--muted-foreground);
  margin-top: 0.25rem;
  font-style: italic;
}

/* ===== Warning box ===== */
.hf-warning {
  display: flex;
  gap: 0.875rem;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius);
  border-left: 3px solid var(--primary);
  background: rgba(184, 91, 162, 0.06);
}
.hf-warning-amber {
  border-left-color: #c2820b;
  background: rgba(194, 130, 11, 0.06);
}
.hf-warning .icon-svg {
  width: 24px;
  height: 24px;
  color: #c2820b;
  flex-shrink: 0;
  margin-top: 2px;
}
.hf-warning strong {
  display: block;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 0.25rem;
  font-size: 0.9375rem;
}
.hf-warning p {
  font-size: 0.8125rem;
  line-height: 1.65;
  color: var(--foreground-soft);
  margin-bottom: 0;
}

/* ===== Contraindicaciones — grid de cards de seguridad ===== */
.safety-grid {
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 1024px) { .safety-grid { grid-template-columns: repeat(3, 1fr); } }

.safety-card {
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}
.safety-card-danger { border-left: 3px solid #dc2626; }
.safety-card-warning { border-left: 3px solid #c2820b; }
.safety-card-info { border-left: 3px solid var(--primary); }

.safety-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--foreground);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.8125rem;
}
.safety-intro {
  font-size: 0.8125rem;
  margin-bottom: 0.75rem;
  color: var(--muted-foreground);
}
.safety-card ul {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}
.safety-card li {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--foreground-soft);
  padding-left: 1rem;
  position: relative;
}
.safety-card li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: bold;
}
.safety-card-danger li::before { color: #dc2626; }
.safety-card-warning li::before { color: #c2820b; }
.safety-card strong { color: var(--foreground); font-weight: 600; }

/* ===== Evidencia clínica ===== */
.evidence-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.evidence-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--border);
}
@media (min-width: 768px) {
  .evidence-card {
    grid-template-columns: 90px 1fr;
    gap: 1.5rem;
    padding: 2rem 0;
  }
}
.evidence-card:first-child { padding-top: 0; }
.evidence-card:last-child { border-bottom: none; }
.ev-year {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.015em;
  line-height: 1;
}
.ev-body h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: 0.375rem;
  color: var(--foreground);
  line-height: 1.4;
}
.ev-authors {
  font-size: 0.8125rem;
  color: var(--foreground-soft);
  margin-bottom: 0.25rem;
}
.ev-authors strong { color: var(--foreground); font-weight: 500; }
.ev-journal {
  font-size: 0.8125rem;
  color: var(--muted-foreground);
  font-style: italic;
  margin-bottom: 0.625rem;
}
.ev-body > p {
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--foreground-soft);
  margin-bottom: 0.75rem;
}
.ev-body > p strong { color: var(--foreground); font-weight: 600; }
.ev-link {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--primary);
  display: inline-block;
}
.ev-link:hover { color: var(--primary-dark); }

/* ===== Fuentes oficiales ===== */
.sources-grid {
  display: grid;
  gap: 1rem;
  margin-bottom: 2.5rem;
}
@media (min-width: 768px) { .sources-grid { grid-template-columns: repeat(3, 1fr); } }
.source-card {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  padding: 1.5rem;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color 0.2s ease, transform 0.2s ease;
  text-decoration: none;
}
.source-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  color: inherit;
}
.source-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.015em;
}
.source-full {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--foreground);
}
.source-detail {
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--muted-foreground);
  flex: 1;
}
.source-link {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--primary);
  padding-top: 0.625rem;
  border-top: 1px solid var(--border);
  margin-top: 0.625rem;
}

/* ===== Disclaimer final ===== */
.hf-disclaimer {
  padding: 1.5rem;
  background: var(--muted);
  border-radius: var(--radius-lg);
  border-left: 3px solid var(--foreground);
}
.hf-disclaimer p {
  font-size: 0.8125rem;
  line-height: 1.7;
  color: var(--foreground-soft);
  margin-bottom: 0;
}
.hf-disclaimer strong { color: var(--foreground); font-weight: 600; }

/* ===== Botón volver arriba ===== */
.back-to-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--primary-foreground);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 50;
}
.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}
.back-to-top:hover {
  transform: translateY(-2px);
  background: var(--primary-dark);
}
.back-to-top .icon-svg { width: 20px; height: 20px; }

/* ===== Sección de videos YouTube ===== */
.videos-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 640px) {
  .videos-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
}
@media (min-width: 1024px) {
  .videos-grid { grid-template-columns: repeat(3, 1fr); gap: 1.75rem; }
}

.video-card {
  display: flex;
  flex-direction: column;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.video-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  color: inherit;
}

.video-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--muted);
  overflow: hidden;
}
.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.video-card:hover .video-thumb img {
  transform: scale(1.04);
}
.video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(184, 91, 162, 0.95);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  transition: background 0.2s ease, transform 0.2s ease;
}
.video-play svg {
  width: 22px;
  height: 22px;
  margin-left: 3px; /* centrado visual del triángulo */
}
.video-card:hover .video-play {
  background: var(--primary-dark);
  transform: translate(-50%, -50%) scale(1.08);
}
/* Sombra sutil en la mitad inferior de la miniatura para legibilidad */
.video-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 60%, rgba(0, 0, 0, 0.15) 100%);
  pointer-events: none;
}

.video-body {
  padding: 1rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}
.video-body h3 {
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--foreground);
  margin-bottom: 0.25rem;
  /* Limitar a 2 líneas para mantener grid uniforme */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.7em;
}
.video-author {
  font-size: 0.75rem;
  color: var(--primary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: auto;
}
