:root {
  --bg: #FAFBFC;
  --surface: #FFFFFF;
  --ink: #1A202C;
  --muted: #64748B;
  --accent: #F59E0B;
  --primary: #0D9488;
  --line: #CBD5E1;
  --soft: #E2E8F0;
  --success: #10B981;
  --error: #EF4444;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-hover: 0 4px 12px rgba(0,0,0,0.12);
  --space: 16px;
  --transition: 150ms ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  line-height: 1.2;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: #0a7a70;
}

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

.view {
  display: none;
}

.view.active {
  display: block;
}

/* Toast Notifications */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(120px);
  background: var(--error);
  color: white;
  padding: 16px 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-hover);
  z-index: 1000;
  max-width: 90%;
  transition: transform var(--transition);
  font-size: 14px;
  font-weight: 500;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}

/* Navigation */
.nav-tabs {
  display: flex;
  gap: 8px;
  padding: 16px 0;
  background: var(--surface);
  border-bottom: 2px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
}

.tab-btn {
  padding: 12px 24px;
  background: transparent;
  border: none;
  border-radius: var(--radius);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: all var(--transition);
}

.tab-btn:hover {
  background: var(--bg);
  color: var(--ink);
}

.tab-btn.active {
  background: var(--primary);
  color: white;
}

/* Hero Section */
.hero {
  position: relative;
  overflow: hidden;
  padding: 64px 0 48px;
  background: var(--surface);
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -200px;
  left: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(13,148,136,0.1) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero::before {
  content: '01';
  position: absolute;
  top: -20px;
  right: 10%;
  font-size: 180px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  color: transparent;
  -webkit-text-stroke: 2px var(--soft);
  text-stroke: 2px var(--soft);
  opacity: 0.4;
  pointer-events: none;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.brand {
  font-family: 'DM Sans', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 16px;
}

.headline {
  font-size: 48px;
  color: var(--ink);
  margin-bottom: 16px;
  max-width: 800px;
}

.subheadline {
  font-size: 20px;
  color: var(--muted);
  margin-bottom: 32px;
  max-width: 700px;
}

/* Form */
.form-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 32px;
  box-shadow: var(--shadow);
  max-width: 900px;
  transition: transform var(--transition), box-shadow var(--transition);
}

.form-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.form-card-title {
  margin-bottom: 24px;
  font-size: 28px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-select,
.form-input {
  height: 48px;
  padding: 0 16px;
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  color: var(--ink);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-select:focus,
.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(13,148,136,0.2);
}

.form-select:disabled,
.form-input:disabled {
  background: var(--bg);
  color: var(--muted);
  cursor: not-allowed;
}

/* Buttons */
.btn {
  height: 48px;
  padding: 0 32px;
  border: none;
  border-radius: var(--radius);
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: var(--shadow);
}

.btn-primary:hover:not(:disabled) {
  background: #0a7a70;
  box-shadow: var(--shadow-hover);
}

.btn-secondary {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(13,148,136,0.05);
}

.btn-accent {
  background: var(--accent);
  color: white;
}

.btn-accent:hover:not(:disabled) {
  background: #d97706;
}

.btn-full-width {
  width: 100%;
}

/* ROI Scoreboard */
.roi-scoreboard {
  display: flex;
  gap: 24px;
  padding: 32px;
  background: var(--surface);
  border: 2px solid var(--primary);
  border-radius: 12px;
  margin: 32px 0;
  position: relative;
  overflow: hidden;
}

.roi-scoreboard::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
}

.roi-metric {
  flex: 1;
  text-align: center;
  padding: 0 16px;
  border-right: 1px dashed var(--line);
}

.roi-metric:last-child {
  border-right: none;
}

.roi-value {
  font-family: 'DM Sans', sans-serif;
  font-size: 42px;
  font-weight: 700;
  color: var(--primary);
  display: block;
  margin-bottom: 4px;
  position: relative;
  font-variant-numeric: tabular-nums;
}

.roi-value.winner {
  color: var(--accent);
}

.roi-value.winner::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 3px;
  background: var(--accent);
  animation: slideIn 300ms ease forwards;
}

@keyframes slideIn {
  from {
    width: 0;
  }
  to {
    width: 80%;
  }
}

.roi-value-success {
  color: var(--success);
}

.roi-value-accent {
  color: var(--accent);
}

.roi-label {
  font-size: 14px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Comparison */
.comparison-title {
  font-size: 32px;
  margin-bottom: 24px;
  position: relative;
}

.comparison-title::before {
  content: '02';
  position: absolute;
  top: -40px;
  right: 0;
  font-size: 160px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  color: transparent;
  -webkit-text-stroke: 2px var(--soft);
  text-stroke: 2px var(--soft);
  opacity: 0.4;
  pointer-events: none;
  z-index: 0;
}

.comparison-table {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  margin: 32px 0;
  position: relative;
}

.table-wrapper {
  overflow-x: auto;
  position: relative;
  z-index: 1;
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead {
  background: #F1F5F9;
  position: sticky;
  top: 0;
  z-index: 2;
}

th {
  padding: 16px;
  text-align: left;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--line);
}

td {
  padding: 20px 16px;
  border-bottom: 1px dashed var(--line);
}

tbody tr {
  border-bottom: 1px dashed var(--line);
}

tr:nth-child(even) {
  background: var(--bg);
}

tr:hover {
  background: rgba(13,148,136,0.03);
}

tr.best-option {
  border-left: 4px solid var(--primary);
  background: rgba(13,148,136,0.05) !important;
}

.program-name {
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}

.program-provider {
  font-size: 14px;
  color: var(--muted);
}

.td-strong-success {
  font-weight: 600;
  color: var(--success);
}

.td-strong-primary {
  font-weight: 600;
  color: var(--primary);
}

/* Badges */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-right: 4px;
}

.badge-free {
  background: var(--success);
  color: white;
}

.badge-best {
  background: var(--primary);
  color: white;
}

.badge-fast {
  background: var(--accent);
  color: white;
}

.badge-type {
  background: var(--soft);
  color: var(--ink);
}

/* Explanation Box */
.explanation-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 32px;
  margin-top: 32px;
}

.explanation-title {
  margin-bottom: 16px;
  font-size: 24px;
}

.explanation-text {
  color: var(--muted);
  margin-bottom: 16px;
}

.explanation-strong {
  color: var(--ink);
  font-weight: 600;
}

/* Detail Page */
.program-detail {
  padding: 48px 0;
}

.detail-hero {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 48px;
  margin-bottom: 32px;
  overflow: hidden;
}

.detail-hero::before {
  content: '03';
  position: absolute;
  top: -40px;
  right: 40px;
  font-size: 200px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  color: transparent;
  -webkit-text-stroke: 2px var(--soft);
  text-stroke: 2px var(--soft);
  opacity: 0.4;
  pointer-events: none;
}

.detail-content {
  position: relative;
  z-index: 1;
}

.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  margin-bottom: 32px;
}

.detail-title {
  font-size: 36px;
  margin-bottom: 8px;
}

.detail-provider {
  font-size: 18px;
  color: var(--muted);
}

.detail-badges {
  margin-top: 16px;
}

.detail-cta {
  flex-shrink: 0;
}

.btn-large {
  height: 56px;
  font-size: 18px;
}

.btn-xlarge {
  height: 56px;
  padding: 0 48px;
  font-size: 18px;
}

.detail-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg);
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.stat-value {
  font-family: 'DM Sans', sans-serif;
  font-size: 32px;
  font-weight: 700;
  color: var(--primary);
  display: block;
  margin-bottom: 4px;
  font-variant-numeric: tabular-nums;
}

.stat-value-success {
  color: var(--success);
}

.stat-label {
  font-size: 14px;
  color: var(--muted);
}

.detail-description {
  line-height: 1.8;
  color: var(--ink);
  margin-bottom: 32px;
}

.detail-section-title {
  margin-bottom: 16px;
  font-size: 20px;
  margin-top: 32px;
}

.detail-paragraph {
  margin-bottom: 16px;
}

.detail-list {
  margin-left: 24px;
  margin-bottom: 16px;
  color: var(--muted);
}

.detail-list li {
  margin-bottom: 8px;
}

.detail-savings {
  font-weight: 600;
  color: var(--success);
}

.testimonial {
  background: rgba(13,148,136,0.05);
  border-left: 4px solid var(--primary);
  padding: 24px;
  border-radius: var(--radius);
  font-style: italic;
  color: var(--muted);
  margin: 24px 0;
}

.testimonial-author {
  margin-top: 12px;
  font-style: normal;
  color: var(--ink);
  font-weight: 600;
}

.detail-cta-center {
  text-align: center;
  margin-top: 32px;
}

.detail-disclaimer {
  margin-top: 16px;
  color: var(--muted);
  font-size: 14px;
}

/* SEO Links */
.seo-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 32px 0;
}

.seo-link {
  padding: 8px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid transparent;
  border-radius: 6px;
  color: var(--primary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition);
  display: inline-block;
}

.seo-link:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  border-left-color: var(--primary);
  border-left-width: 3px;
  transform: translateX(2px);
}

/* Ad Slot */
.ad-slot {
  min-height: 250px;
  background: var(--bg);
  border: 2px dashed var(--line);
  border-radius: 12px;
  margin: 32px 0;
  padding: 24px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.ad-slot:empty {
  display: none;
}

/* Footer */
.footer {
  text-align: center;
  padding: 32px;
  color: var(--muted);
  font-size: 14px;
  border-top: 1px solid var(--line);
  margin-top: 64px;
}

.footer a {
  color: var(--primary);
}

/* FAQ Page */
.faq-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 48px var(--space);
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 16px;
  overflow: hidden;
}

.faq-question {
  padding: 24px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  transition: background var(--transition);
}

.faq-question:hover {
  background: var(--bg);
}

.faq-toggle {
  font-size: 24px;
  transition: transform var(--transition);
}

.faq-item.open .faq-toggle {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 24px 24px;
  color: var(--muted);
  display: none;
  border-top: 1px solid var(--line);
}

.faq-item.open .faq-answer {
  display: block;
}

/* Guide Page */
.guide-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 48px var(--space);
}

.guide-section {
  margin-bottom: 48px;
}

.guide-section h2 {
  font-size: 28px;
  margin-bottom: 16px;
  margin-top: 32px;
}

.guide-section h3 {
  font-size: 20px;
  margin-bottom: 12px;
  margin-top: 24px;
}

.guide-section p {
  margin-bottom: 16px;
  line-height: 1.8;
  color: var(--ink);
}

.guide-section ul,
.guide-section ol {
  margin-left: 24px;
  margin-bottom: 16px;
}

.guide-section li {
  margin-bottom: 8px;
  color: var(--ink);
}

.guide-highlight {
  background: rgba(13,148,136,0.05);
  border-left: 4px solid var(--primary);
  padding: 16px;
  border-radius: var(--radius);
  margin: 16px 0;
}

/* Metodologia Page */
.metodologia-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 48px var(--space);
}

.metodologia-section {
  margin-bottom: 48px;
}

.metodologia-section h2 {
  font-size: 28px;
  margin-bottom: 16px;
  margin-top: 32px;
}

.metodologia-section h3 {
  font-size: 20px;
  margin-bottom: 12px;
  margin-top: 24px;
}

.metodologia-section p {
  margin-bottom: 16px;
  line-height: 1.8;
  color: var(--ink);
}

.formula-box {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  margin: 16px 0;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  overflow-x: auto;
}

/* Directory Grid */
.directory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.directory-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
  transition: all var(--transition);
}

.directory-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary);
}

.directory-card-title {
  font-size: 18px;
  margin-bottom: 8px;
  font-weight: 600;
}

.directory-card-provider {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 12px;
}

.directory-card-meta {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
  font-size: 14px;
}

.directory-card-meta-item {
  display: flex;
  flex-direction: column;
}

.directory-card-meta-label {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.directory-card-meta-value {
  color: var(--ink);
  font-weight: 600;
}

.directory-card-badges {
  margin-top: 12px;
}

/* Categoria Page */
.categoria-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px var(--space);
}

.categoria-hero {
  margin-bottom: 48px;
}

.categoria-title {
  font-size: 36px;
  margin-bottom: 16px;
}

.categoria-description {
  font-size: 18px;
  color: var(--muted);
  margin-bottom: 24px;
}

.categoria-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.categoria-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
  transition: all var(--transition);
  cursor: pointer;
}

.categoria-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary);
}

.categoria-card-title {
  font-size: 20px;
  margin-bottom: 8px;
}

.categoria-card-provider {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 12px;
}

.categoria-card-meta {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
  font-size: 14px;
}

.categoria-card-meta-item {
  display: flex;
  flex-direction: column;
}

.categoria-card-meta-label {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.categoria-card-meta-value {
  color: var(--ink);
  font-weight: 600;
}

.categoria-card-badges {
  margin-top: 12px;
}

.categoria-card-cta {
  margin-top: 16px;
  display: inline-block;
}

/* Responsive */
@media (max-width: 768px) {
  .headline {
    font-size: 32px;
  }

  .subheadline {
    font-size: 18px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .roi-scoreboard {
    flex-direction: column;
  }

  .roi-metric {
    border-right: none;
    border-bottom: 1px dashed var(--line);
    padding: 16px 0;
  }

  .roi-metric:last-child {
    border-bottom: none;
  }

  .detail-header {
    flex-direction: column;
  }

  .detail-title {
    font-size: 28px;
  }

  .detail-stats {
    grid-template-columns: 1fr;
  }

  .table-wrapper {
    overflow-x: auto;
  }

  table {
    font-size: 14px;
  }

  th, td {
    padding: 12px 8px;
  }

  .seo-links {
    flex-direction: column;
  }

  .seo-link {
    width: 100%;
    text-align: center;
  }

  .nav-tabs {
    overflow-x: auto;
  }

  .tab-btn {
    padding: 10px 16px;
    font-size: 12px;
    white-space: nowrap;
  }

  .categoria-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .headline {
    font-size: 24px;
  }

  .form-card {
    padding: 20px;
  }

  .form-card-title {
    font-size: 20px;
  }

  .roi-scoreboard {
    padding: 20px;
  }

  .roi-value {
    font-size: 32px;
  }

  .comparison-title {
    font-size: 24px;
  }

  .detail-title {
    font-size: 24px;
  }

  .btn {
    height: 44px;
    padding: 0 24px;
    font-size: 14px;
  }

  .categoria-title {
    font-size: 28px;
  }
}