/* ============================================
   ENLASSA — Subpage styles (shared across all subpages)
   ============================================ */

/* ---------- SUBPAGE HERO ---------- */
.sub-hero {
  padding: var(--s-16) 0 var(--s-12);
  position: relative;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.sub-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 80% 0%, rgba(43, 82, 161, 0.25) 0%, transparent 50%),
              radial-gradient(ellipse at 0% 0%, rgba(243, 146, 33, 0.15) 0%, transparent 50%);
  z-index: 0;
}
.sub-hero .container { position: relative; z-index: 1; }
.sub-breadcrumb {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  font-size: 12px; color: var(--fg-dim); font-family: var(--font-mono);
  margin-bottom: var(--s-5);
}
.sub-breadcrumb a { color: var(--fg-muted); }
.sub-breadcrumb a:hover { color: var(--fg); }
.sub-breadcrumb .sep { color: var(--fg-faint); }
.sub-breadcrumb .cur { color: var(--brand-orange); }

.sub-hero-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: var(--s-12); align-items: center; }
@media (max-width: 920px) { .sub-hero-grid { grid-template-columns: 1fr; } }
.sub-hero-copy { display: flex; flex-direction: column; gap: var(--s-5); max-width: 640px; }
.sub-hero-copy .h-display { font-size: clamp(2.2rem, 5vw, 3.6rem); }
.sub-hero-copy .lede { font-size: clamp(1rem, 1.3vw, 1.15rem); }
.sub-hero-stats { display: flex; flex-wrap: wrap; gap: var(--s-8); padding-top: var(--s-5); border-top: 1px solid var(--border); margin-top: var(--s-3); }
.shs { display: flex; flex-direction: column; gap: 2px; }
.shs-v { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; }
.shs-l { font-size: 11px; color: var(--fg-dim); text-transform: uppercase; letter-spacing: 0.08em; font-family: var(--font-mono); }
.sub-hero-visual {
  position: relative;
  aspect-ratio: 1/1;
  border-radius: var(--r-2xl);
  background: linear-gradient(135deg, var(--bg-elev), var(--bg-elev-2));
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-lift);
}
[data-theme="light"] .sub-hero-visual { background: linear-gradient(135deg, #FFFFFF, #F4F6F9); }

/* ---------- TOC / Page nav ---------- */
.page-nav {
  position: sticky; top: var(--header-h);
  background: var(--bg-glass-strong);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border);
  z-index: 30;
  padding: 8px 0;
}
.page-nav .container { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; overflow-x: auto; }
.page-nav a {
  font-size: 13px; color: var(--fg-muted); white-space: nowrap;
  padding: 6px 10px; border-radius: 6px;
}
.page-nav a:hover { color: var(--fg); background: var(--bg-elev); }
.page-nav a.active { color: var(--brand-orange); }

/* ---------- Subpage feature grid ---------- */
.feat-section {}
.feat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-4);
}
@media (max-width: 920px) { .feat-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .feat-grid { grid-template-columns: 1fr; } }
.feat-card {
  padding: var(--s-6);
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  display: flex; flex-direction: column; gap: var(--s-3);
}
.feat-num {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--bg-elev-2); border: 1px solid var(--border);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 12px; color: var(--brand-orange); font-weight: 600;
}
.feat-card h3 { font-size: 16px; letter-spacing: -0.015em; }
.feat-card p { font-size: 13.5px; color: var(--fg-muted); line-height: 1.5; text-wrap: pretty; }

/* ---------- Two-column content ---------- */
.split-section {}
.split-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-12); align-items: center; }
.split-grid.alt { direction: rtl; }
.split-grid.alt > * { direction: ltr; }
@media (max-width: 860px) { .split-grid { grid-template-columns: 1fr; gap: var(--s-8); } .split-grid.alt { direction: ltr; } }
.split-copy { display: flex; flex-direction: column; gap: var(--s-4); max-width: 540px; }
.split-copy h2 { letter-spacing: -0.025em; }
.split-copy p { color: var(--fg-muted); line-height: 1.6; font-size: 15px; }
.split-copy ul { display: flex; flex-direction: column; gap: 10px; margin-top: var(--s-3); }
.split-copy ul li { display: flex; gap: 10px; font-size: 14.5px; line-height: 1.45; color: var(--fg); }
.split-copy ul li::before { content: "✓"; color: var(--brand-mint); font-weight: 600; flex-shrink: 0; }

.split-visual {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
  position: relative;
  aspect-ratio: 4/3;
  box-shadow: var(--shadow-card);
}

/* ---------- Comparison table ---------- */
.compare-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
}
.compare-table th, .compare-table td {
  padding: 14px 18px;
  text-align: left;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.compare-table thead th {
  font-size: 12px; color: var(--fg-dim); font-family: var(--font-mono);
  text-transform: uppercase; letter-spacing: 0.1em; font-weight: 500;
  background: var(--bg-elev-2);
}
.compare-table tbody tr:hover { background: var(--bg-elev); }
.compare-table tbody tr:last-child td { border-bottom: none; }
.compare-table .enlassa-col { background: rgba(243, 146, 33, 0.06); position: relative; }
.compare-table .enlassa-col::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--brand-orange); }
.compare-table th.enlassa-col { color: var(--brand-orange); font-weight: 600; font-family: var(--font-sans); text-transform: none; letter-spacing: -0.01em; font-size: 14px; }
.compare-table .ok { color: var(--brand-mint); font-weight: 600; }
.compare-table .ko { color: var(--fg-faint); }
.compare-table .partial { color: var(--brand-orange); font-size: 12.5px; }
.compare-table caption { caption-side: bottom; padding-top: var(--s-3); font-size: 12px; color: var(--fg-dim); text-align: left; }

/* ---------- Subpage CTA ---------- */
.sub-cta {
  padding: var(--s-16) 0;
  background: linear-gradient(135deg, rgba(43, 82, 161, .12), transparent 60%);
  border-top: 1px solid var(--border);
}
.sub-cta-card {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--s-4);
  padding: var(--s-10);
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-2xl);
}
.sub-cta h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); letter-spacing: -0.025em; }

/* ---------- Pillar visual (mock window in hero) ---------- */
.pillar-mock {
  width: 88%; max-width: 460px;
  background: var(--bg-glass-strong);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lift);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
}
.pillar-mock .pm-bar {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px;
  background: var(--bg-elev-2); border-bottom: 1px solid var(--border);
  font-size: 11px; font-family: var(--font-mono); color: var(--fg-dim);
}
.pillar-mock .pm-bar .dots { display: inline-flex; gap: 4px; }
.pillar-mock .pm-bar .dots i { width: 8px; height: 8px; border-radius: 999px; }
.pillar-mock .pm-bar .dots i:nth-child(1) { background: #FF5F57; }
.pillar-mock .pm-bar .dots i:nth-child(2) { background: #FEBC2E; }
.pillar-mock .pm-bar .dots i:nth-child(3) { background: #28C840; }
.pm-body { padding: var(--s-5); display: flex; flex-direction: column; gap: var(--s-3); min-height: 280px; }

/* ---------- Stats strip ---------- */
.stats-strip {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: var(--s-5);
  padding: var(--s-8) var(--s-6);
  border: 1px solid var(--border);
  background: var(--bg-glass);
  border-radius: var(--r-xl);
}
@media (max-width: 760px) { .stats-strip { grid-template-columns: repeat(2, 1fr); } }
.stat-cell { display: flex; flex-direction: column; gap: 6px; padding-left: var(--s-4); border-left: 2px solid var(--brand-orange); }
.stat-cell:nth-child(2) { border-color: var(--brand-sky); }
.stat-cell:nth-child(3) { border-color: var(--brand-mint); }
.stat-cell:nth-child(4) { border-color: var(--brand-blue); }
.stat-v { font-size: 32px; font-weight: 600; letter-spacing: -0.03em; }
.stat-l { font-size: 12px; color: var(--fg-muted); line-height: 1.4; }

/* ---------- Detail rows ---------- */
.detail-rows { display: flex; flex-direction: column; gap: var(--s-4); }
.detail-row {
  display: grid; grid-template-columns: 200px 1fr;
  gap: var(--s-6);
  padding: var(--s-6) 0;
  border-bottom: 1px dashed var(--border);
}
.detail-row:last-child { border-bottom: none; }
@media (max-width: 760px) { .detail-row { grid-template-columns: 1fr; gap: var(--s-2); } }
.dr-label { display: flex; flex-direction: column; gap: 4px; }
.dr-num { font-size: 11px; color: var(--brand-orange); font-family: var(--font-mono); letter-spacing: 0.1em; }
.dr-title { font-size: 15px; font-weight: 600; letter-spacing: -0.015em; }
.dr-desc { font-size: 14px; color: var(--fg-muted); line-height: 1.55; text-wrap: pretty; }

/* ---------- Resource cards ---------- */
.resource-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-4); }
@media (max-width: 860px) { .resource-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .resource-grid { grid-template-columns: 1fr; } }
.resource-card {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: border-color .2s, transform .2s var(--ease-out);
}
.resource-card:hover { transform: translateY(-3px); border-color: var(--border-strong); }
.rc-cover {
  aspect-ratio: 16/10;
  background: var(--bg-elev-2);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.rc-cover.g1 { background: linear-gradient(135deg, #2B52A1, #1A3B8B); }
.rc-cover.g2 { background: linear-gradient(135deg, #F39221, #FFB84C); }
.rc-cover.g3 { background: linear-gradient(135deg, #2BB695, #1F8A6E); }
.rc-cover.g4 { background: linear-gradient(135deg, #6BC5E8, #2B52A1); }
.rc-cover.g5 { background: linear-gradient(135deg, #1A3B8B, #0A0F1F); }
.rc-cover.g6 { background: linear-gradient(135deg, #0E1428, #2B52A1); }
.rc-cover-label {
  position: absolute; top: 14px; left: 14px;
  font-family: var(--font-mono); font-size: 10px;
  background: rgba(0, 0, 0, .4);
  color: #fff;
  padding: 4px 8px; border-radius: 999px;
  letter-spacing: 0.1em;
}
.rc-cover-title {
  position: absolute; bottom: 14px; left: 14px; right: 14px;
  font-size: 22px; font-weight: 700; color: #fff; line-height: 1.1; letter-spacing: -0.025em;
}
.rc-body { padding: var(--s-5); display: flex; flex-direction: column; gap: var(--s-3); flex: 1; }
.rc-body h3 { font-size: 15.5px; letter-spacing: -0.015em; }
.rc-body p { font-size: 13px; color: var(--fg-muted); line-height: 1.5; flex: 1; }
.rc-meta { display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: var(--fg-dim); font-family: var(--font-mono); padding-top: var(--s-3); border-top: 1px solid var(--border); }

/* ---------- Roadmap / Changelog ---------- */
.timeline { display: flex; flex-direction: column; gap: var(--s-6); }
.tl-entry {
  display: grid; grid-template-columns: 140px 1fr;
  gap: var(--s-6);
  padding-bottom: var(--s-8);
  border-bottom: 1px dashed var(--border);
}
.tl-entry:last-child { border-bottom: none; }
@media (max-width: 640px) { .tl-entry { grid-template-columns: 1fr; gap: var(--s-2); } }
.tl-meta { display: flex; flex-direction: column; gap: 4px; }
.tl-date { font-family: var(--font-mono); font-size: 12px; color: var(--brand-orange); }
.tl-tag { font-family: var(--font-mono); font-size: 10px; color: var(--fg-dim); }
.tl-body h3 { font-size: 18px; margin-bottom: 8px; letter-spacing: -0.02em; }
.tl-body p { font-size: 14px; color: var(--fg-muted); line-height: 1.55; }
.tl-body ul { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.tl-body ul li { font-size: 13.5px; color: var(--fg-muted); display: flex; gap: 8px; }
.tl-body ul li::before { content: "→"; color: var(--brand-orange); }
.tl-body .badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

/* ---------- Industry vertical hero ---------- */
.industry-hero {
  padding: var(--s-20) 0 var(--s-12);
  position: relative;
  overflow: hidden;
}
.industry-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse at top right, var(--ind-halo, rgba(243,146,33,.18)) 0%, transparent 50%),
    radial-gradient(ellipse at bottom left, rgba(43, 82, 161, .2) 0%, transparent 50%);
}

/* ---------- Vs Hero ---------- */
.vs-hero {
  padding: var(--s-16) 0 var(--s-12);
  text-align: center;
}
.vs-hero-row {
  display: flex; align-items: center; justify-content: center; gap: var(--s-6);
  margin-top: var(--s-8);
}
.vs-hero-logo {
  width: 120px; height: 120px; border-radius: var(--r-xl);
  background: var(--bg-elev); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 700;
  letter-spacing: -0.03em;
  padding: var(--s-3);
  text-align: center;
}
.vs-hero-logo.enlassa { border-color: var(--brand-orange); box-shadow: 0 0 0 1px var(--brand-orange), 0 24px 60px -24px rgba(243,146,33,.4); background: linear-gradient(180deg, rgba(243,146,33,.06), transparent), var(--bg-elev); }
.vs-hero-vs {
  font-size: 24px; color: var(--fg-dim); font-family: var(--font-mono); font-weight: 600;
}
@media (max-width: 540px) { .vs-hero-logo { width: 92px; height: 92px; font-size: 16px; } }

/* ---------- Recursos magnet ---------- */
.magnet-form-section {}
.magnet-form-card {
  padding: var(--s-8);
  border-radius: var(--r-xl);
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-8); align-items: center;
}
@media (max-width: 760px) { .magnet-form-card { grid-template-columns: 1fr; } }
.magnet-form { display: flex; flex-direction: column; gap: var(--s-3); }
.magnet-form input, .magnet-form button { width: 100%; }

/* ---------- Integrations grid ---------- */
.integration-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-3); }
@media (max-width: 760px) { .integration-grid { grid-template-columns: 1fr 1fr; } }
.integration-card {
  padding: var(--s-5);
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  display: flex; flex-direction: column; gap: 8px;
}
.ic-logo {
  width: 36px; height: 36px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; color: #fff; font-size: 14px;
}
.ic-name { font-size: 14px; font-weight: 500; }
.ic-cat { font-size: 11px; color: var(--fg-dim); font-family: var(--font-mono); }
.ic-status { margin-top: auto; padding-top: 8px; }

/* ---------- Security cards ---------- */
.sec-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-4); }
@media (max-width: 760px) { .sec-grid { grid-template-columns: 1fr; } }
.sec-card {
  padding: var(--s-6);
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  display: flex; flex-direction: column; gap: var(--s-3);
}
.sec-card h3 { font-size: 17px; }
.sec-card p { font-size: 14px; color: var(--fg-muted); line-height: 1.55; }
.sec-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--brand-mint);
}

/* ---------- Pricing detail table (precios.html) ---------- */
.pricing-detail-table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
}
.pricing-detail-table th, .pricing-detail-table td {
  padding: 12px 16px; text-align: center;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
}
.pricing-detail-table th:first-child, .pricing-detail-table td:first-child { text-align: left; }
.pricing-detail-table thead th {
  font-family: var(--font-sans);
  font-size: 14px; font-weight: 600; letter-spacing: -0.015em;
  background: var(--bg-elev-2); color: var(--fg);
  position: sticky; top: var(--header-h); z-index: 5;
}
.pricing-detail-table thead th .price-small { display: block; font-size: 11px; color: var(--fg-dim); font-family: var(--font-mono); font-weight: 500; margin-top: 2px; }
.pricing-detail-table tbody tr.cat-row td {
  background: var(--bg-elev); color: var(--brand-orange);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; font-weight: 500; padding: 10px 16px;
  text-align: left;
}
.pricing-detail-table .ok { color: var(--brand-mint); font-weight: 600; }
.pricing-detail-table .ko { color: var(--fg-faint); }
.pricing-detail-table tbody tr.popular-col-cell { background: rgba(243, 146, 33, 0.04); }

/* ---------- Helper: section-spacer ---------- */
.section-spacer { height: var(--s-12); }

/* ---------- Agency reseller calc ---------- */
.reseller-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-6); }
@media (max-width: 760px) { .reseller-grid { grid-template-columns: 1fr; } }
.reseller-card { padding: var(--s-8); background: var(--bg-glass); border: 1px solid var(--border); border-radius: var(--r-lg); }
.reseller-tier { display: grid; grid-template-columns: 80px 1fr 100px; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--border); align-items: center; font-size: 13.5px; }
.reseller-tier:last-child { border-bottom: none; }
.rt-n { font-family: var(--font-mono); color: var(--brand-orange); font-weight: 600; }
.rt-m { color: var(--brand-mint); font-weight: 600; text-align: right; font-family: var(--font-mono); }

/* ---------- FAQ accordion (compartido subpáginas) ---------- */
.faq-list { display: flex; flex-direction: column; gap: var(--s-2); }
.faq-item { border: 1px solid var(--border); border-radius: var(--r-md); background: var(--bg-glass); overflow: hidden; }
.faq-q {
  width: 100%; padding: var(--s-5) var(--s-6);
  display: flex; justify-content: space-between; align-items: center; gap: var(--s-4);
  font-size: 16px; font-weight: 500; text-align: left;
  letter-spacing: -0.01em;
  color: var(--fg);
}
.faq-icon { font-size: 18px; color: var(--brand-orange); transition: transform .2s; font-weight: 400; }
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-a {
  max-height: 0; overflow: hidden;
  transition: max-height .35s var(--ease-out);
}
.faq-a p { padding: 0 var(--s-6) var(--s-5); color: var(--fg-muted); font-size: 14.5px; line-height: 1.6; text-wrap: pretty; }
.faq-item.open .faq-a { max-height: 520px; }

/* ---------- Print-friendly fallback ---------- */
@media print {
  .header, .sticky-cta, .exit-modal, .mobile-menu, .ambient { display: none !important; }
  body { background: #fff; color: #000; }
}
