/*
  Plantilla base de articulo SEO para afiliacion
  Reutilizable para guias, comparativas y analisis
*/

:root {
  --bg-page: #f3f6fa;
  --bg-surface: #ffffff;
  --bg-muted: #edf2f7;
  --bg-highlight: linear-gradient(135deg, #fff4db 0%, #fff9ec 100%);
  --text-primary: #142133;
  --text-secondary: #536273;
  --text-soft: #7b8998;
  --brand: #16385b;
  --brand-strong: #0f2742;
  --accent: #f59e0b;
  --accent-strong: #d48100;
  --line: #d7e0ea;
  --success: #17803d;
  --danger: #c62828;
  --radius-sm: 14px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --shadow-sm: 0 10px 22px rgba(13, 23, 36, 0.06);
  --shadow-md: 0 20px 38px rgba(13, 23, 36, 0.09);
  --container: 1140px;
  --transition: 220ms ease;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--text-primary);
  background: radial-gradient(circle at top right, #ffffff 0%, var(--bg-page) 58%);
  line-height: 1.65;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

.container {
  width: min(var(--container), calc(100% - 2.4rem));
  margin-inline: auto;
}

.section {
  padding: 3.5rem 0;
}

.section + .section {
  padding-top: 0;
}

.section-header {
  display: grid;
  gap: 0.7rem;
  margin-bottom: 1.4rem;
}

.section-label {
  margin: 0;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-soft);
  font-weight: 800;
}

.section-title {
  margin: 0;
  font-family: "Rajdhani", sans-serif;
  font-size: clamp(1.6rem, 2.3vw, 2.2rem);
  line-height: 1.2;
  color: var(--brand);
}

.hero {
  padding: 4.4rem 0 2.4rem;
}

.hero-shell {
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: clamp(1.5rem, 3.5vw, 2.8rem);
  display: grid;
  gap: 1.3rem;
  width: min(100%, 960px);
  margin-inline: auto;
  padding-inline: clamp(1.3rem, 4vw, 3.1rem);
}

.hero h1 {
  margin: 0;
  font-family: "Rajdhani", sans-serif;
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  line-height: 1.05;
  color: var(--brand);
}

.hero-subtitle {
  margin: 0;
  font-size: clamp(1rem, 2vw, 1.16rem);
  color: var(--text-secondary);
  max-width: 72ch;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.hero-meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: var(--bg-muted);
  border: 1px solid var(--line);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.highlight {
  background: var(--bg-highlight);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: clamp(1.2rem, 2.4vw, 1.8rem);
}

.highlight h2,
.highlight h3 {
  margin: 0;
  font-family: "Rajdhani", sans-serif;
  color: var(--brand);
}

.highlight p {
  margin: 0.75rem 0 0;
  color: var(--text-secondary);
}

.highlight-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.2);
  color: #6b4000;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: #2c1a00;
  font-weight: 800;
  font-size: 0.95rem;
  padding: 1rem 1.55rem;
  min-height: 3.5rem;
  cursor: pointer;
  transition: transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1), background-color var(--transition), box-shadow var(--transition), filter var(--transition);
  box-shadow: 0 12px 24px rgba(245, 158, 11, 0.35);
  position: relative;
  overflow: hidden;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-4px) scale(1.04);
  background: #e8930a;
  box-shadow: 0 0 0 5px rgba(245, 158, 11, 0.2), 0 20px 40px rgba(245, 158, 11, 0.48);
  filter: brightness(1.05);
  outline: none;
}

.button-lg {
  padding: 1.1rem 1.85rem;
  font-size: 1.06rem;
  min-height: 3.75rem;
}

.button-cta {
  min-height: 3.75rem;
  padding: 1rem 1.75rem;
  font-size: 1rem;
  font-weight: 800;
}

.button-cta:hover,
.button-cta:focus-visible {
  box-shadow: 0 0 0 5px rgba(245, 158, 11, 0.22), 0 22px 44px rgba(245, 158, 11, 0.48);
}

.card {
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1.2rem;
  box-shadow: var(--shadow-sm);
  height: 100%;
}

.quick-answer-list,
.content-list,
.faq-answer-list {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.55rem;
}

.quick-answer-list li,
.content-list li,
.faq-answer-list li {
  color: var(--text-secondary);
}

.content-grid {
  display: grid;
  gap: 1rem;
  align-items: stretch;
}

.content-grid > * {
  width: 100%;
}

.card h3 {
  margin: 0 0 0.65rem;
  font-family: "Rajdhani", sans-serif;
  font-size: 1.35rem;
  color: var(--brand);
}

.card p {
  margin: 0;
  color: var(--text-secondary);
}

.examples-grid {
  display: grid;
  gap: 1rem;
  align-items: stretch;
}

.examples-grid > * {
  width: 100%;
}

.example-card {
  overflow: hidden;
  padding: 0;
}

.example-media {
  aspect-ratio: 16/10;
  object-fit: cover;
}

.example-body {
  padding: 1.1rem;
  display: grid;
  gap: 0.6rem;
}

.example-body h3 {
  margin: 0;
  font-family: "Rajdhani", sans-serif;
  font-size: 1.22rem;
  color: var(--brand);
}

.example-body p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.cta {
  text-align: center;
  display: grid;
  gap: 1rem;
  padding: 2rem 1.4rem;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--brand) 0%, #214d78 100%);
  color: #f4f9ff;
  box-shadow: var(--shadow-md);
}

.cta h2 {
  margin: 0;
  font-family: "Rajdhani", sans-serif;
  font-size: clamp(1.7rem, 2.7vw, 2.2rem);
  line-height: 1.1;
}

.cta p {
  margin: 0;
  color: rgba(244, 249, 255, 0.9);
}

.cta .button {
  justify-self: center;
}

.faq {
  display: grid;
  gap: 0.75rem;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-surface);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--brand);
  font-family: "Rajdhani", sans-serif;
  font-size: 1.12rem;
  font-weight: 700;
  padding: 1rem 1.1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
}

.faq-icon {
  font-family: monospace;
  font-size: 1.2rem;
  line-height: 1;
  color: var(--accent-strong);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition);
}

.faq-answer-inner {
  padding: 0 1.1rem 1rem;
}

.faq-answer p {
  margin: 0;
  color: var(--text-secondary);
}

.faq-item.is-open .faq-answer {
  max-height: 500px;
}

.faq-item.is-open .faq-icon {
  transform: rotate(45deg);
}

.faq-icon,
.faq-question {
  transition: transform var(--transition), color var(--transition);
}

.conclusion {
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 1.3rem;
}

.conclusion p {
  margin: 0;
  color: var(--text-secondary);
}

.footer-note {
  margin-top: 2rem;
  padding: 1.1rem;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--text-soft);
}

.sticky-recommendation {
  position: fixed;
  z-index: 90;
  right: 1rem;
  bottom: 1rem;
  width: min(330px, calc(100% - 1.2rem));
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 38px rgba(13, 23, 36, 0.22);
  padding: 0.95rem 1rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(18px);
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
}

.sticky-recommendation.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.sticky-recommendation-product {
  margin: 0;
  font-family: "Rajdhani", sans-serif;
  font-size: 1.15rem;
  line-height: 1.1;
  color: var(--brand);
}

.sticky-recommendation-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.sticky-recommendation-label {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #111111;
  background: rgba(245, 158, 11, 0.38);
  border: 1px solid rgba(245, 158, 11, 0.55);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}

.sticky-recommendation-rating {
  margin: 0.5rem 0 0.75rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 700;
}

.sticky-recommendation-stars {
  color: var(--accent-strong);
  letter-spacing: 0.02em;
}

.sticky-recommendation .button {
  width: 100%;
  min-height: 2.8rem;
  font-size: 0.9rem;
  padding: 0.75rem 1rem;
}

@media (min-width: 1000px) {
  .sticky-recommendation {
    right: 1.15rem;
    bottom: 1.15rem;
    width: 300px;
  }
}

@media (max-width: 999px) {
  .sticky-recommendation {
    left: 0.6rem;
    right: 0.6rem;
    bottom: 0.6rem;
    width: auto;
    border-radius: 14px;
  }
}

@media (min-width: 740px) {
  .section {
    padding: 4.2rem 0;
  }

  .section + .section {
    padding-top: 0;
  }

  .content-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .examples-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .sticky-recommendation {
    transform: none;
  }
}

/* ================================================================
   CRO — Microcopy · FOMO · Ripple · Social proof
   ================================================================ */

.btn-microcopy {
  display: block;
  margin-top: 0.48rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-soft);
  text-align: center;
}

.fomo-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.85rem;
}

.fomo-stock {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.38rem 0.72rem;
  border-radius: 999px;
  background: rgba(185, 28, 28, 0.07);
  border: 1px solid rgba(185, 28, 28, 0.2);
  color: #b91c1c;
  font-size: 0.77rem;
  font-weight: 800;
  animation: fomoFlickerArt 4s ease-in-out infinite;
}

@keyframes fomoFlickerArt {
  0%, 100% { opacity: 1; }
  48% { opacity: 1; }
  50% { opacity: 0.55; }
  52% { opacity: 1; }
}

.fomo-viewers {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.38rem 0.72rem;
  border-radius: 999px;
  background: rgba(22, 56, 91, 0.06);
  border: 1px solid rgba(22, 56, 91, 0.14);
  color: var(--brand);
  font-size: 0.77rem;
  font-weight: 800;
}

.social-proof-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
  padding: 0.75rem 1rem;
  margin-top: 0.9rem;
  border-radius: 10px;
  background: rgba(22, 163, 74, 0.05);
  border: 1px solid rgba(22, 163, 74, 0.18);
  font-size: 0.82rem;
  font-weight: 700;
  color: #15803d;
}

.social-proof-inline span::before {
  content: "✓ ";
  font-weight: 900;
}

.sticky-cta-bottom {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 210;
  padding: 0.82rem 1rem;
  background: rgba(9, 18, 30, 0.97);
  border-top: 2px solid rgba(245, 158, 11, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  transform: translateY(105%);
  transition: transform 380ms cubic-bezier(0.34, 1.3, 0.64, 1);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.35);
}

.sticky-cta-bottom.is-visible {
  transform: translateY(0);
}

.sticky-cta-bottom-label {
  display: none;
  font-size: 0.83rem;
  font-weight: 700;
  color: #ffffff;
}

.sticky-cta-bottom .button-primary {
  min-height: 3rem;
  font-size: 0.92rem;
  padding: 0.8rem 1.35rem;
  box-shadow: 0 10px 24px rgba(245, 158, 11, 0.45);
}

@media (min-width: 620px) {
  .sticky-cta-bottom-label {
    display: block;
  }
}

/* ================================================================
   Image placeholders (local media pipeline)
   ================================================================ */

.media-frame {
  position: relative;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 22px rgba(13, 23, 36, 0.09);
  background: #eef2f7;
}

.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 280ms ease;
}

.media-frame:hover img {
  transform: scale(1.04);
}

.image-placeholder {
  width: 100%;
  height: 220px;
  background: #eef2f7;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #7b8794;
  font-size: 0.9rem;
  font-weight: 700;
  text-align: center;
  padding: 0.8rem;
}

.media-frame.is-empty img {
  display: none;
}

.media-frame.is-empty .image-placeholder {
  display: flex;
}

.media-frame:not(.is-empty) .image-placeholder {
  display: none;
}

.product-media-wrap.media-frame .image-placeholder,
.product-image-wrapper.media-frame .image-placeholder {
  position: absolute;
  inset: 0;
  height: 100%;
  border-radius: 0;
}

.btn-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: scale(0);
  animation: btnRippleArt 600ms ease-out forwards;
  pointer-events: none;
}

@keyframes btnRippleArt {
  to { transform: scale(4); opacity: 0; }
}
