/* ============================================================
   KTED — Kit Espacios de Datos
   Complete Stylesheet — Blue/Green palette
   ============================================================ */

/* === RESET & BASE === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --red-900: #1E3A5F;
  --red-800: #1E40AF;
  --red-700: #1D4ED8;
  --red-600: #2563EB;
  --red-500: #3B82F6;
  --red-100: #DBEAFE;
  --red-50: #EFF6FF;
  --yellow-600: #047857;
  --yellow-500: #059669;
  --yellow-400: #10B981;
  --yellow-300: #34D399;
  --yellow-100: #D1FAE5;
  --yellow-50: #ECFDF5;
  --green: #047857;
  --green-light: #D1FAE5;
  --orange: #0369A1;
  --orange-light: #EFF6FF;
  --gray-900: #1A1A1A;
  --gray-700: #404040;
  --gray-500: #737373;
  --gray-300: #D4D4D4;
  --gray-200: #E5E5E5;
  --gray-100: #F5F5F5;
  --white: #FFFFFF;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.1);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --max-width: 1100px;
  --transition: 0.2s ease;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--gray-900);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a:hover {
  color: var(--red-900);
}

img {
  max-width: 100%;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* === TOOLTIP === */
[data-tooltip] {
  position: relative;
  cursor: help;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--gray-900);
  color: var(--white);
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 1.5;
  white-space: normal;
  width: max-content;
  max-width: 280px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  z-index: 100;
  box-shadow: var(--shadow-md);
}

[data-tooltip]:hover::after {
  opacity: 1;
}

/* === NAVIGATION === */
#main-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--red-800);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
}

.logo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: var(--red-700);
  color: var(--white);
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 0.7rem;
  letter-spacing: 1px;
}

.logo-text {
  display: none;
}

@media (min-width: 768px) {
  .logo-text {
    display: inline;
  }
}

.nav-links {
  display: none;
  list-style: none;
  gap: 0.25rem;
}

.nav-links.open {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 60px;
  left: 0;
  right: 0;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  box-shadow: var(--shadow-md);
  padding: 1rem;
  gap: 0.5rem;
}

@media (min-width: 900px) {
  .nav-links {
    display: flex;
    align-items: center;
  }
  .nav-links.open {
    position: static;
    flex-direction: row;
    box-shadow: none;
    border: none;
    padding: 0;
  }
}

.nav-links a {
  display: inline-block;
  padding: 0.45rem 0.7rem;
  color: var(--gray-700);
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--red-700);
  background: var(--red-50);
}

.nav-cta {
  background: var(--red-600) !important;
  color: var(--white) !important;
  font-weight: 600 !important;
}

.nav-cta:hover {
  background: var(--red-700) !important;
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--gray-700);
  border-radius: 1px;
}

@media (min-width: 900px) {
  .nav-toggle {
    display: none;
  }
}

/* === HERO === */
.hero {
  margin-top: 60px;
  background: var(--red-700);
  color: var(--white);
  padding: 4rem 1.5rem 3.5rem;
  text-align: center;
}

.hero-content {
  max-width: 720px;
  margin: 0 auto;
}

.hero h1 {
  font-size: clamp(1.75rem, 4.5vw, 2.75rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.25rem;
}

.highlight {
  color: var(--yellow-300);
}

.hero-subtitle {
  font-size: 1.05rem;
  line-height: 1.7;
  opacity: 0.92;
  margin-bottom: 2rem;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

/* === BUTTONS === */
.btn {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  text-align: center;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-lg {
  padding: 0.85rem 1.8rem;
  font-size: 1rem;
}

.btn-primary {
  background: var(--red-600);
  color: var(--white);
  border-color: var(--red-600);
}

.btn-primary:hover {
  background: var(--red-800);
  border-color: var(--red-800);
  color: var(--white);
}

.btn-secondary {
  background: rgba(255,255,255,0.15);
  color: var(--white);
  border-color: rgba(255,255,255,0.35);
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.25);
  color: var(--white);
}

.btn-accent {
  background: var(--yellow-400);
  color: var(--gray-900);
  border-color: var(--yellow-400);
  font-weight: 700;
}

.btn-accent:hover {
  background: var(--yellow-500);
  border-color: var(--yellow-500);
  color: var(--gray-900);
}

.btn-outline {
  background: transparent;
  color: var(--red-700);
  border-color: var(--red-700);
}

.btn-outline:hover {
  background: var(--red-700);
  color: var(--white);
}

.btn-full {
  width: 100%;
}

/* === STATS SECTION === */
.stats-section {
  padding: 2.5rem 0;
  background: var(--yellow-50);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.stat-card {
  background: var(--white);
  padding: 1.25rem;
  border-radius: var(--radius-md);
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--yellow-100);
  transition: box-shadow var(--transition);
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
}

.stat-number {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--red-700);
  margin-bottom: 0.2rem;
}

.stat-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-700);
}

.stat-detail {
  font-size: 0.75rem;
  color: var(--gray-500);
  margin-top: 0.2rem;
}

/* === LANDING FLOW (How do I get money) === */
.landing-flow {
  padding: 4rem 0;
}

.landing-flow h2 {
  text-align: center;
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
  color: var(--gray-900);
}

.section-subtitle {
  text-align: center;
  color: var(--gray-500);
  margin-bottom: 2.5rem;
  font-size: 1rem;
}

/* === INFO SECTION === */
.info-section {
  padding: 4rem 0;
}

.info-section h2 {
  text-align: center;
  font-size: 1.75rem;
  margin-bottom: 2.5rem;
  color: var(--gray-900);
}

.steps-preview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.step-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  padding: 1.75rem;
  border-radius: var(--radius-md);
  transition: box-shadow var(--transition), border-color var(--transition);
}

.step-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--yellow-400);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: var(--yellow-100);
  color: var(--red-700);
  border-radius: 50%;
  font-weight: 800;
  font-size: 1rem;
  margin-bottom: 0.85rem;
}

.step-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
  color: var(--gray-900);
}

.step-card p {
  font-size: 0.88rem;
  color: var(--gray-500);
  margin-bottom: 0.85rem;
}

.link-arrow {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--red-600);
}

.link-arrow:hover {
  color: var(--red-800);
}

/* === CTA SECTION === */
.cta-section {
  padding: 3.5rem 0;
  background: var(--yellow-50);
  text-align: center;
}

.cta-section h2 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--gray-900);
}

.cta-section p {
  max-width: 560px;
  margin: 0 auto 1.5rem;
  color: var(--gray-700);
  font-size: 0.95rem;
}

/* === PAGE HEADER === */
.page-header {
  margin-top: 60px;
  background: var(--red-700);
  color: var(--white);
  padding: 2.5rem 1.5rem;
  text-align: center;
}

.page-header h1 {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.page-subtitle {
  font-size: 1rem;
  opacity: 0.85;
  max-width: 580px;
  margin: 0 auto;
}

/* === CONTENT SECTION === */
.content-section {
  padding: 2.5rem 0 3.5rem;
}

.content-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  margin-bottom: 1.25rem;
}

.content-card h2 {
  font-size: 1.25rem;
  color: var(--gray-900);
  margin-bottom: 0.85rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--yellow-100);
}

.content-card h3 {
  font-size: 1.05rem;
  margin: 0.85rem 0 0.4rem;
  color: var(--gray-900);
}

.content-card p {
  color: var(--gray-700);
  margin-bottom: 0.6rem;
  font-size: 0.92rem;
}

/* === TABLES === */
.info-table {
  overflow-x: auto;
}

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

.info-table th,
.info-table td {
  padding: 0.65rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--gray-200);
  font-size: 0.88rem;
}

.info-table th {
  background: var(--yellow-50);
  font-weight: 600;
  color: var(--gray-900);
}

.info-table tr:hover {
  background: var(--gray-100);
}

.highlight-row {
  background: var(--red-50) !important;
}

.highlight-row td {
  color: var(--red-700);
  font-weight: 600;
}

/* === AMOUNTS === */
.amounts-section {
  padding: 3.5rem 0;
  background: var(--white);
}

.amounts-section h2 {
  text-align: center;
  font-size: 1.75rem;
  color: var(--gray-900);
  margin-bottom: 0.5rem;
}

.amounts-intro {
  text-align: center;
  color: var(--gray-500);
  max-width: 560px;
  margin: 0 auto 2rem;
  font-size: 0.95rem;
}

.amounts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.amount-card {
  background: var(--gray-100);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.amount-card.highlight-card {
  background: var(--yellow-50);
  border: 1px solid var(--yellow-500);
}

.amount-card h3 {
  margin-bottom: 0.25rem;
}

.amount-subtitle {
  font-size: 0.85rem;
  color: var(--gray-500);
  margin-bottom: 1rem;
}

.amount-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--gray-200);
  font-size: 0.9rem;
}

.amount-row:last-child {
  border-bottom: none;
}

.amount {
  font-weight: 700;
  color: var(--red-700);
}

/* === AMOUNTS COMPARISON (Landing) === */
.amounts-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  max-width: 800px;
  margin: 0 auto;
}

@media (max-width: 700px) {
  .amounts-comparison {
    grid-template-columns: 1fr;
  }
}

.amount-col {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.amount-col-header {
  padding: 1.25rem;
  text-align: center;
}

.amount-col-header.private {
  background: var(--yellow-50);
  border-bottom: 2px solid var(--yellow-500);
}

.amount-col-header.public {
  background: var(--red-50);
  border-bottom: 2px solid var(--red-600);
}

.amount-col-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.5rem;
}

.amount-col-header h3 {
  font-size: 1.05rem;
  color: var(--gray-900);
  margin-bottom: 0.2rem;
}

.amount-col-header p {
  font-size: 0.78rem;
  color: var(--gray-500);
  margin: 0;
}

.amount-col-body {
  padding: 0.5rem;
}

.amount-row-landing {
  padding: 0.85rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
}

.amount-row-landing:last-child {
  margin-bottom: 0;
}

.amount-row-landing.featured {
  background: var(--yellow-50);
  border: 1px solid var(--yellow-100);
}

.amount-row-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray-500);
  margin-bottom: 0.2rem;
}

.amount-row-value {
  font-size: 1.35rem;
  color: var(--red-700);
  margin-bottom: 0.2rem;
}

.amount-row-value strong {
  font-weight: 800;
}

.amount-row-desc {
  font-size: 0.78rem;
  color: var(--gray-500);
}

.amounts-note {
  max-width: 650px;
  margin: 1.25rem auto 0;
  text-align: center;
  padding: 0.85rem 1rem;
  background: var(--yellow-50);
  border-radius: var(--radius-sm);
  border: 1px solid var(--yellow-100);
}

.amounts-note p {
  font-size: 0.88rem;
  color: var(--gray-700);
  margin: 0;
}

.stats-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 600px) {
  .stats-grid-3 {
    grid-template-columns: 1fr;
  }
}

/* === FEATURE LIST === */
.feature-list {
  list-style: none;
  padding: 0;
}

.feature-list li {
  padding: 0.45rem 0 0.45rem 1.5rem;
  position: relative;
  font-size: 0.92rem;
  color: var(--gray-700);
}

.feature-list li::before {
  content: '●';
  position: absolute;
  left: 0;
  color: var(--red-600);
  font-size: 0.6rem;
  top: 0.7rem;
}

/* === CHECK LIST === */
.check-list {
  list-style: none;
  padding: 0;
}

.check-list li {
  padding: 0.5rem 0 0.5rem 1.75rem;
  position: relative;
  font-size: 0.92rem;
}

.check-yes::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 700;
  font-size: 1.1rem;
}

.check-no::before {
  content: '✕';
  position: absolute;
  left: 0;
  color: var(--red-600);
  font-weight: 700;
  font-size: 1.1rem;
}

.check-doc::before {
  content: '☐';
  position: absolute;
  left: 0;
  color: var(--red-700);
  font-size: 1rem;
}

/* === ALERT CARD === */
.alert-card {
  display: flex;
  gap: 0.85rem;
  padding: 1.1rem;
  border-radius: var(--radius-md);
  margin: 0.85rem 0;
}

.alert-card.warning {
  background: var(--red-50);
  border-left: 3px solid var(--red-600);
}

.alert-card.info {
  background: var(--yellow-50);
  border-left: 3px solid var(--yellow-500);
}

.alert-icon {
  font-size: 1.35rem;
  flex-shrink: 0;
}

.alert-card h3 {
  margin-bottom: 0.4rem;
  color: var(--gray-900);
  font-size: 1rem;
}

.alert-card p {
  font-size: 0.88rem;
  color: var(--gray-700);
}

/* === REQUIREMENTS GRID === */
.requirements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem;
}

.req-card {
  background: var(--gray-100);
  padding: 1.1rem;
  border-radius: var(--radius-sm);
}

.req-card h4 {
  font-size: 0.92rem;
  color: var(--red-800);
  margin-bottom: 0.4rem;
}

.req-card p {
  font-size: 0.85rem;
  color: var(--gray-700);
}

/* === MODALITY GRID === */
.modality-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.modality-card {
  background: var(--gray-100);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.modality-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--red-700);
  color: var(--white);
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 0.8rem;
  margin-bottom: 0.85rem;
}

.modality-card ul {
  padding-left: 1.25rem;
  margin-top: 0.5rem;
}

.modality-card li {
  font-size: 0.88rem;
  color: var(--gray-700);
  margin-bottom: 0.25rem;
}

/* === EXPENSE LIST === */
.expense-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.expense-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.85rem;
  background: var(--gray-100);
  border-radius: var(--radius-sm);
}

.expense-icon {
  font-size: 1.35rem;
  flex-shrink: 0;
}

.expense-item h4 {
  margin-bottom: 0.2rem;
  font-size: 0.92rem;
}

.expense-item p {
  font-size: 0.85rem;
  color: var(--gray-500);
}

.note {
  margin-top: 0.85rem;
  padding: 0.65rem;
  background: var(--yellow-50);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  border: 1px solid var(--yellow-100);
}

/* === SECTORS GRID === */
.sectors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.65rem;
  margin: 0.85rem 0;
}

.sector-card {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.65rem 0.85rem;
  background: var(--gray-100);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 500;
  transition: all var(--transition);
}

.sector-card:hover {
  background: var(--yellow-50);
  box-shadow: var(--shadow-sm);
  border-color: var(--yellow-400);
}

.sector-icon {
  font-size: 1.15rem;
}

/* === FACTORS GRID === */
.factors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem;
}

.factor-card {
  padding: 1.1rem;
  background: var(--gray-100);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--yellow-500);
}

.factor-card h4 {
  font-size: 0.92rem;
  color: var(--red-800);
  margin-bottom: 0.35rem;
}

.factor-card p {
  font-size: 0.85rem;
  color: var(--gray-700);
}

/* === EXTERNAL LINKS === */
.external-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

/* === TIMELINE === */
.timeline {
  position: relative;
  padding-left: 3rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 19px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--yellow-100);
}

.timeline-item {
  position: relative;
  margin-bottom: 1.75rem;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-marker {
  position: absolute;
  left: -3rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--red-700);
  color: var(--white);
  border-radius: 50%;
  font-weight: 800;
  font-size: 1rem;
  z-index: 1;
}

.timeline-content h3 {
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
  color: var(--gray-900);
}

.timeline-content p {
  font-size: 0.88rem;
  color: var(--gray-700);
}

/* === DOWNLOADS GRID === */
.downloads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.65rem;
}

.download-card {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem;
  background: var(--gray-100);
  border-radius: var(--radius-sm);
  color: var(--gray-900);
  font-size: 0.82rem;
  font-weight: 500;
  transition: all var(--transition);
}

.download-card:hover {
  background: var(--yellow-50);
  color: var(--red-700);
}

.download-icon {
  font-size: 1.15rem;
}

/* === FAQ === */
.faq-list {
  max-width: 750px;
  margin: 0 auto;
}

.faq-item {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  margin-bottom: 0.45rem;
  overflow: hidden;
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 0.85rem 1.1rem;
  background: var(--white);
  border: none;
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--gray-900);
  text-align: left;
  transition: background var(--transition);
  font-family: inherit;
}

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

.faq-arrow {
  font-size: 0.8rem;
  transition: transform var(--transition);
  flex-shrink: 0;
  margin-left: 0.85rem;
}

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

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

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

.faq-answer p {
  padding: 0 1.1rem 0.85rem;
  font-size: 0.88rem;
  color: var(--gray-700);
  line-height: 1.7;
}

/* === FORM === */
.form-wrapper {
  max-width: 750px;
  margin: 0 auto;
}

fieldset {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 1.35rem;
  margin-bottom: 1.25rem;
}

legend {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--red-800);
  padding: 0 0.4rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.85rem;
  margin-top: 0.5rem;
}

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

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 0.3rem;
}

.form-hint {
  font-size: 0.8rem;
  color: var(--gray-500);
  margin-bottom: 0.4rem;
  line-height: 1.5;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-family: inherit;
  color: var(--gray-900);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--red-600);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--gray-300);
}

textarea {
  resize: vertical;
  min-height: 100px;
}

.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.25rem;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--gray-700);
}

.radio-label input {
  accent-color: var(--red-600);
}

.form-consent {
  margin: 0.85rem 0 1.25rem;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  cursor: pointer;
  font-size: 0.82rem;
  color: var(--gray-700);
}

.checkbox-label input {
  margin-top: 0.15rem;
  accent-color: var(--red-600);
}

.form-actions {
  margin-top: 0.85rem;
}

.form-feedback {
  padding: 0;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  transition: all var(--transition);
  margin-bottom: 0.5rem;
}

.form-feedback.success {
  padding: 0.85rem;
  background: var(--green-light);
  color: var(--green);
  border: 1px solid var(--green);
}

.form-feedback.error {
  padding: 0.85rem;
  background: var(--red-50);
  color: var(--red-700);
  border: 1px solid var(--red-600);
}

/* === PAGE CTA === */
.page-cta {
  text-align: center;
  margin-top: 1.75rem;
}

/* === FOOTER === */
#main-footer {
  background: var(--gray-900);
  color: var(--gray-300);
  padding: 1.5rem 0;
}

.footer-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-info p {
  font-size: 0.78rem;
  color: var(--gray-500);
}

.footer-disclaimer {
  font-style: italic;
  font-size: 0.75rem !important;
  color: var(--gray-500) !important;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-links a {
  color: var(--gray-300);
  font-size: 0.8rem;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--white);
}

.footer-divider {
  display: block;
  height: 1px;
  background: rgba(255,255,255,0.15);
  margin: 0.25rem 0;
}

/* === LEGAL PAGES === */
.page-header-sm {
  padding: 1.75rem 1.5rem;
}

.legal-content .content-card {
  font-size: 0.88rem;
}

.legal-content code {
  background: var(--gray-100);
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  font-size: 0.85em;
}

/* === REFERIDOS STATS === */
.referidos-stats {
  padding: 2rem 0;
  background: var(--gray-100);
}

.stat-row-referidos {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.stat-box-referidos {
  background: var(--white);
  border: 1px solid var(--yellow-100);
  padding: 1.25rem 1.75rem;
  border-radius: var(--radius-md);
  text-align: center;
  min-width: 180px;
}

.stat-number-ref {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--red-700);
}

.stat-label-ref {
  font-size: 0.8rem;
  color: var(--gray-500);
  margin-top: 0.2rem;
}

/* === RESPONSIVE === */
@media (max-width: 600px) {
  .hero {
    padding: 3rem 1rem;
  }

  .hero-ctas {
    flex-direction: column;
  }

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

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

  .amounts-grid,
  .modality-grid {
    grid-template-columns: 1fr;
  }

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

  .timeline {
    padding-left: 2.5rem;
  }

  .timeline-marker {
    width: 32px;
    height: 32px;
    left: -2.5rem;
    font-size: 0.85rem;
  }

  .footer-container {
    flex-direction: column;
    align-items: flex-start;
  }

  [data-tooltip]::after {
    left: 0;
    transform: none;
    max-width: 220px;
  }
}

@media (max-width: 768px) {
  .footer-container {
    flex-direction: column;
    align-items: flex-start;
  }
}
