/* ================================================================
   PAGES.CSS — Estilos para páginas internas (artículos SEO)
   Mobile-first · Responsive · SEO-optimized
   Importar DESPUÉS de styles.css
   ================================================================ */

/* ===== ARTICLE HERO (mini) ===== */
.article-hero {
  background: linear-gradient(135deg, var(--blue-deep) 0%, var(--blue-mid) 100%);
  padding: 100px 20px 48px;
  position: relative;
  overflow: hidden;
}

.article-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(31,175,90,.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255,255,255,.04) 0%, transparent 40%);
  pointer-events: none;
}

.article-hero-inner {
  max-width: 780px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* ===== BREADCRUMBS ===== */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 20px;
  font-size: .8rem;
}

.breadcrumbs a {
  color: rgba(255,255,255,.55);
  transition: color .2s;
}

.breadcrumbs a:hover {
  color: var(--green);
}

.breadcrumbs .sep {
  color: rgba(255,255,255,.3);
}

.breadcrumbs .current {
  color: rgba(255,255,255,.85);
  font-weight: 600;
}

/* ===== ARTICLE HERO CONTENT ===== */
.article-hero .badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(31,175,90,.18);
  border: 1px solid rgba(31,175,90,.35);
  color: #6EDEA0;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 50px;
  margin-bottom: 16px;
  width: fit-content;
}

.article-hero h1 {
  font-family: var(--ff-display);
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  line-height: 1.18;
  color: var(--white);
  margin-bottom: 16px;
}

.article-hero h1 .hl {
  color: var(--green);
}

.article-hero .lead {
  font-size: 1.05rem;
  color: rgba(255,255,255,.7);
  line-height: 1.65;
  max-width: 620px;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 20px;
  font-size: .8rem;
  color: rgba(255,255,255,.45);
}

.article-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ===== ARTICLE BODY ===== */
.article-body {
  max-width: 780px;
  margin: 0 auto;
  padding: 48px 20px 80px;
}

.article-body h2 {
  font-family: var(--ff-display);
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  color: var(--blue-deep);
  margin: 48px 0 16px;
  line-height: 1.25;
}

.article-body h2:first-child {
  margin-top: 0;
}

.article-body h3 {
  font-family: var(--ff-display);
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  color: var(--blue-deep);
  margin: 36px 0 12px;
  line-height: 1.3;
}

.article-body p {
  font-size: 1rem;
  color: var(--gray-mid);
  line-height: 1.8;
  margin-bottom: 18px;
}

.article-body strong {
  color: var(--gray-dark);
}

.article-body ul,
.article-body ol {
  margin: 0 0 20px 0;
  padding-left: 0;
  list-style: none;
}

.article-body ul li,
.article-body ol li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 10px;
  font-size: .95rem;
  color: var(--gray-mid);
  line-height: 1.7;
}

.article-body ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 50%;
}

.article-body ol {
  counter-reset: ol-counter;
}

.article-body ol li {
  counter-increment: ol-counter;
}

.article-body ol li::before {
  content: counter(ol-counter) '.';
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 700;
  color: var(--blue-light);
  font-size: .95rem;
}

/* ===== INFO BOX ===== */
.info-box {
  background: var(--gray-light);
  border-left: 4px solid var(--blue-light);
  border-radius: 0 12px 12px 0;
  padding: 20px 24px;
  margin: 28px 0;
}

.info-box p {
  margin-bottom: 0;
  font-size: .92rem;
}

.info-box.green {
  border-left-color: var(--green);
  background: rgba(31,175,90,.06);
}

.info-box.gold {
  border-left-color: var(--gold);
  background: rgba(201,168,76,.06);
}

/* ===== COMPARISON TABLE ===== */
.comparison-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 28px 0;
  font-size: .9rem;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(10,42,102,.1);
}

.comparison-table thead th {
  background: var(--blue-deep);
  color: var(--white);
  padding: 14px 18px;
  text-align: left;
  font-weight: 600;
  font-size: .85rem;
  letter-spacing: .02em;
}

.comparison-table tbody td {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(10,42,102,.07);
  color: var(--gray-mid);
  line-height: 1.5;
}

.comparison-table tbody tr:last-child td {
  border-bottom: none;
}

.comparison-table tbody tr:nth-child(even) {
  background: var(--gray-light);
}

/* Mobile scroll for tables */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 28px 0;
  border-radius: 12px;
}

/* ===== FAQ ACCORDION ===== */
.faq-section {
  margin: 48px 0;
}

.faq-section h2 {
  margin-bottom: 24px;
}

.faq-item {
  border: 1px solid rgba(10,42,102,.1);
  border-radius: 14px;
  margin-bottom: 12px;
  overflow: hidden;
  transition: box-shadow .2s;
}

.faq-item:hover {
  box-shadow: var(--shadow-sm);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  background: var(--white);
  border: none;
  cursor: pointer;
  font-family: var(--ff-body);
  font-size: .95rem;
  font-weight: 600;
  color: var(--blue-deep);
  text-align: left;
  line-height: 1.4;
}

.faq-question .faq-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--gray-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform .3s, background .3s;
}

.faq-question .faq-icon svg {
  width: 14px;
  height: 14px;
  stroke: var(--blue-deep);
  stroke-width: 2.5;
  fill: none;
  transition: transform .3s;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease, padding .35s ease;
}

.faq-answer-inner {
  padding: 0 22px 20px;
  font-size: .92rem;
  color: var(--gray-mid);
  line-height: 1.75;
}

.faq-answer-inner p {
  margin-bottom: 10px;
}

.faq-answer-inner p:last-child {
  margin-bottom: 0;
}

/* FAQ open state */
.faq-item.open .faq-question {
  color: var(--green);
}

.faq-item.open .faq-icon {
  background: rgba(31,175,90,.12);
  transform: rotate(180deg);
}

.faq-item.open .faq-answer {
  max-height: 600px;
}

/* ===== CTA BANNER (dentro del artículo) ===== */
.article-cta {
  background: linear-gradient(135deg, var(--blue-deep) 0%, var(--blue-mid) 100%);
  border-radius: 20px;
  padding: 40px 32px;
  text-align: center;
  margin: 48px 0;
  position: relative;
  overflow: hidden;
}

.article-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(31,175,90,.12) 0%, transparent 60%);
  pointer-events: none;
}

.article-cta h3 {
  font-family: var(--ff-display);
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  color: var(--white);
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

.article-cta p {
  color: rgba(255,255,255,.7);
  font-size: .95rem;
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.article-cta .btn-primary {
  position: relative;
  z-index: 1;
}

/* ===== RELATED ARTICLES ===== */
.related-articles {
  padding: 64px 20px;
  background: var(--gray-light);
}

.related-articles-inner {
  max-width: 780px;
  margin: 0 auto;
}

.related-articles h2 {
  font-family: var(--ff-display);
  font-size: 1.5rem;
  color: var(--blue-deep);
  margin-bottom: 28px;
}

.related-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.related-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--white);
  border: 1px solid rgba(10,42,102,.08);
  border-radius: 14px;
  padding: 18px 20px;
  transition: box-shadow .2s, transform .2s;
}

.related-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.related-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.related-card-text h4 {
  font-size: .95rem;
  font-weight: 600;
  color: var(--blue-deep);
  margin-bottom: 4px;
}

.related-card-text span {
  font-size: .8rem;
  color: var(--gray-mid);
}

/* ===== INTERNAL NAV OVERRIDE ===== */
.nav-internal .nav-links a,
.nav-internal .nav-cta {
  /* Override anchors to full URLs */
}

/* ===== RESPONSIVE ===== */
@media (min-width: 600px) {
  .related-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 768px) {
  .article-hero {
    padding: 120px 20px 56px;
  }

  .article-body {
    padding: 64px 20px 100px;
  }
}

@media (max-width: 480px) {
  .faq-question {
    padding: 16px 16px;
    font-size: .88rem;
  }

  .faq-answer-inner {
    padding: 0 16px 16px;
  }

  .article-cta {
    padding: 32px 20px;
  }

  .comparison-table thead th,
  .comparison-table tbody td {
    padding: 10px 12px;
    font-size: .82rem;
  }
}