/* ============================================================
   STYLES.CSS - AyudaFacil: Buscador de Ayudas y Subvenciones
   Mobile-first, patron institucional Beaver
   ============================================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --green-900: #1a4731;
  --green-800: #22543d;
  --green-700: #276749;
  --green-600: #2f855a;
  --green-500: #48bb78;
  --green-400: #68d391;
  --green-100: #c6f6d5;
  --green-50: #f0fff4;

  --blue-700: #2b6cb0;
  --blue-600: #3182ce;
  --blue-500: #4299e1;
  --blue-100: #ebf4ff;
  --blue-50: #f0f7ff;

  --orange-600: #dd6b20;
  --orange-500: #ed8936;
  --orange-100: #feebc8;

  --red-600: #c53030;
  --red-100: #fed7d7;

  --yellow-600: #d69e2e;
  --yellow-100: #fefcbf;

  --purple-600: #805ad5;
  --purple-100: #e9d8fd;

  --gray-900: #1a202c;
  --gray-800: #2d3748;
  --gray-700: #4a5568;
  --gray-600: #718096;
  --gray-500: #a0aec0;
  --gray-400: #cbd5e0;
  --gray-300: #e2e8f0;
  --gray-200: #edf2f7;
  --gray-100: #f7fafc;
  --gray-50: #fafbfc;

  --white: #ffffff;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --shadow-glow: 0 8px 30px rgba(47, 133, 90, 0.15);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-width: 1100px;
  --max-width-narrow: 720px;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  color: var(--gray-800);
  background: var(--gray-50);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--green-600); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }

/* --- Layout --- */
.container { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: var(--max-width-narrow); }

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  background: rgba(26, 71, 49, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.navbar .container { display: flex; align-items: center; justify-content: space-between; }

.nav-brand {
  color: var(--white);
  font-size: 1.05rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-brand:hover { text-decoration: none; }
.nav-brand span { opacity: 0.6; font-weight: 400; font-size: 0.85rem; }

.nav-links { display: flex; align-items: center; gap: 20px; }
.nav-links a { color: rgba(255,255,255,0.7); font-size: 0.88rem; font-weight: 500; transition: color 0.2s; }
.nav-links a:hover { color: var(--white); text-decoration: none; }

.nav-cta {
  background: var(--orange-500) !important;
  color: var(--white) !important;
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600 !important;
  transition: background 0.2s, transform 0.2s;
}
.nav-cta:hover { background: var(--orange-600) !important; transform: translateY(-1px); }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 110;
}
.hamburger span { display: block; width: 24px; height: 2px; background: var(--white); border-radius: 2px; transition: transform 0.3s ease, opacity 0.3s ease; }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 640px) {
  .hamburger { display: flex; }
  .nav-links {
    position: fixed; top: 0; right: -100%; width: 70%; max-width: 280px; height: 100vh;
    background: var(--green-900); flex-direction: column; align-items: flex-start;
    padding: 80px 28px 32px; gap: 0; transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -8px 0 30px rgba(0,0,0,0.3);
  }
  .nav-links.open { right: 0; }
  .nav-links a { font-size: 1.05rem; padding: 14px 0; width: 100%; border-bottom: 1px solid rgba(255,255,255,0.08); }
  .nav-cta { margin-top: 12px; text-align: center; width: 100%; display: block !important; }
  .nav-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 99;
    opacity: 0; pointer-events: none; transition: opacity 0.3s;
  }
  .nav-overlay.open { opacity: 1; pointer-events: auto; }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  background: linear-gradient(135deg, #1a4731 0%, #22543d 25%, #2f855a 50%, #276749 75%, #1a4731 100%);
  background-size: 300% 300%;
  animation: heroGradient 12s ease infinite;
  color: var(--white);
  padding: 56px 0 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

@keyframes heroGradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.hero-blob { position: absolute; border-radius: 50%; opacity: 0.08; pointer-events: none; }
.hero-blob-1 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(255,255,255,0.4), transparent 70%);
  top: -120px; right: -80px; animation: blobFloat1 18s ease-in-out infinite;
}
.hero-blob-2 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(237,137,54,0.5), transparent 70%);
  bottom: -100px; left: -60px; animation: blobFloat2 22s ease-in-out infinite;
}
.hero-blob-3 {
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(255,255,255,0.3), transparent 70%);
  top: 30%; left: 15%; animation: blobFloat3 15s ease-in-out infinite;
}

@keyframes blobFloat1 { 0%, 100% { transform: translate(0,0) scale(1); } 33% { transform: translate(-30px,20px) scale(1.1); } 66% { transform: translate(20px,-15px) scale(0.95); } }
@keyframes blobFloat2 { 0%, 100% { transform: translate(0,0) scale(1); } 33% { transform: translate(25px,-20px) scale(1.05); } 66% { transform: translate(-15px,15px) scale(0.9); } }
@keyframes blobFloat3 { 0%, 100% { transform: translate(0,0); } 50% { transform: translate(15px,-10px); } }

.hero .container { position: relative; z-index: 2; }
.hero h1 { font-size: 1.9rem; font-weight: 800; line-height: 1.2; margin-bottom: 16px; max-width: 640px; margin-left: auto; margin-right: auto; }
.hero p { font-size: 1.05rem; opacity: 0.85; max-width: 540px; margin: 0 auto 28px; line-height: 1.5; }

.hero-cta {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(90deg, var(--orange-600) 50%, var(--orange-500) 50%);
  background-size: 200% 100%; background-position: 100% 0;
  color: var(--white); padding: 14px 32px; border-radius: var(--radius-md);
  font-size: 1.1rem; font-weight: 700;
  transition: background-position 0.4s ease, transform 0.2s, box-shadow 0.3s;
  box-shadow: 0 4px 15px rgba(237,137,54,0.4); position: relative; overflow: hidden;
}
.hero-cta:hover { background-position: 0 0; transform: translateY(-2px); box-shadow: 0 8px 25px rgba(237,137,54,0.5); text-decoration: none; }
.hero-cta::after {
  content: ''; position: absolute; top: 0; left: -100%; width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  animation: ctaShimmer 4s ease-in-out infinite;
}
@keyframes ctaShimmer { 0%, 100% { left: -100%; } 50% { left: 150%; } }

.hero-trust { margin-top: 20px; font-size: 0.82rem; opacity: 0.55; }

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
.reveal.revealed { opacity: 1; transform: translateY(0); }
.reveal-stagger > .reveal:nth-child(1) { transition-delay: 0s; }
.reveal-stagger > .reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal-stagger > .reveal:nth-child(3) { transition-delay: 0.2s; }
.reveal-stagger > .reveal:nth-child(4) { transition-delay: 0.25s; }
.reveal-stagger > .reveal:nth-child(5) { transition-delay: 0.3s; }
.reveal-stagger > .reveal:nth-child(6) { transition-delay: 0.35s; }

/* ============================================================
   SECTIONS
   ============================================================ */
.section { padding: 56px 0; }
.section-alt { background: var(--white); }
.section-title { font-size: 1.5rem; font-weight: 800; color: var(--green-900); text-align: center; margin-bottom: 12px; }
.section-subtitle { text-align: center; color: var(--gray-600); max-width: 560px; margin: 0 auto 36px; font-size: 0.95rem; }

/* ============================================================
   STATS
   ============================================================ */
.stats-row { display: grid; grid-template-columns: 1fr; gap: 14px; margin-bottom: 36px; }

.stat-box {
  background: var(--white); border: 1px solid var(--gray-300); border-radius: var(--radius-md);
  padding: 24px; text-align: center;
  transition: transform 0.3s cubic-bezier(0.25,0.46,0.45,0.94), box-shadow 0.3s ease;
  position: relative; overflow: hidden;
}
.stat-box::before { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 3px; background: var(--green-600); transform: scaleX(0); transition: transform 0.4s ease; }
.stat-box:hover { transform: translateY(-4px); box-shadow: var(--shadow-glow); }
.stat-box:hover::before { transform: scaleX(1); }
.stat-box .stat-value { font-size: 2rem; font-weight: 800; color: var(--green-900); display: block; }
.stat-box .stat-desc { font-size: 0.88rem; color: var(--gray-600); margin-top: 4px; }
.stat-box.stat-blue .stat-value { color: var(--blue-700); }
.stat-box.stat-blue::before { background: var(--blue-600); }

/* ============================================================
   STEPS
   ============================================================ */
.steps-grid { display: grid; grid-template-columns: 1fr; gap: 20px; counter-reset: step; }

.step-card {
  background: var(--white); border: 1px solid var(--gray-300); border-radius: var(--radius-md);
  padding: 28px 24px; text-align: center; position: relative; counter-increment: step;
  transition: transform 0.3s cubic-bezier(0.25,0.46,0.45,0.94), box-shadow 0.3s ease, border-color 0.3s;
}
.step-card:hover { transform: translateY(-6px); box-shadow: 0 16px 32px rgba(0,0,0,0.1); border-color: var(--green-500); }

.step-number {
  width: 48px; height: 48px;
  background: linear-gradient(135deg, var(--green-600), var(--green-500));
  color: var(--white); border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.1rem; font-weight: 800; margin-bottom: 14px;
  transition: transform 0.3s ease, box-shadow 0.3s;
}
.step-card:hover .step-number { transform: scale(1.1); box-shadow: 0 4px 15px rgba(47,133,90,0.4); }
.step-card h3 { font-size: 1.05rem; font-weight: 700; color: var(--green-900); margin-bottom: 6px; }
.step-card p { font-size: 0.9rem; color: var(--gray-600); }

/* ============================================================
   CATEGORY GRID (tipos de ayudas)
   ============================================================ */
.cat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.cat-card {
  background: var(--white); border: 1px solid var(--gray-300); border-radius: var(--radius-md);
  padding: 20px; display: flex; gap: 14px; align-items: flex-start;
  transition: transform 0.3s cubic-bezier(0.25,0.46,0.45,0.94), box-shadow 0.3s, border-color 0.3s;
}
.cat-card:hover { transform: translateY(-4px); box-shadow: 0 12px 24px rgba(0,0,0,0.08); border-color: var(--green-400); }

.cat-icon {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--green-100), var(--green-50));
  border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 1.3rem; transition: transform 0.3s ease;
}
.cat-card:hover .cat-icon { transform: scale(1.1) rotate(-3deg); }
.cat-card h3 { font-size: 0.95rem; font-weight: 700; color: var(--gray-900); margin-bottom: 4px; }
.cat-card p { font-size: 0.85rem; color: var(--gray-600); line-height: 1.5; }

/* ============================================================
   FAQ
   ============================================================ */
.faq-list { max-width: 700px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--gray-300); transition: background 0.2s; }
.faq-item:hover { background: var(--gray-50); }

.faq-question {
  width: 100%; background: none; border: none; padding: 18px 0;
  font-family: inherit; font-size: 1rem; font-weight: 600; color: var(--gray-800);
  text-align: left; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  transition: color 0.2s;
}
.faq-question:hover { color: var(--green-600); }
.faq-question::after {
  content: "+"; font-size: 1.4rem; color: var(--gray-500); flex-shrink: 0;
  transition: transform 0.35s ease, color 0.2s;
  display: inline-flex; width: 28px; height: 28px; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--gray-100);
}
.faq-item.open .faq-question::after { content: "-"; transform: rotate(180deg); background: var(--green-100); color: var(--green-600); }

.faq-answer { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.35s ease; }
.faq-answer > div, .faq-answer > p { overflow: hidden; }
.faq-item.open .faq-answer { grid-template-rows: 1fr; }
.faq-answer p { padding: 0 0 18px; font-size: 0.92rem; color: var(--gray-600); line-height: 1.6; }

/* ============================================================
   WIZARD
   ============================================================ */
.wizard-wrapper { min-height: calc(100vh - 56px); display: flex; flex-direction: column; }

.wizard-header {
  background: linear-gradient(135deg, var(--green-900), var(--green-800));
  padding: 24px 20px 16px;
  color: var(--white);
  text-align: center;
}
.wizard-header h1 { font-size: 1.2rem; font-weight: 700; margin-bottom: 12px; }

.progress-bar { background: rgba(255,255,255,0.15); border-radius: 20px; height: 8px; max-width: 400px; margin: 0 auto; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--green-500), var(--orange-500)); border-radius: 20px; transition: width 0.4s cubic-bezier(0.25,0.46,0.45,0.94); width: 0%; }
.progress-text { font-size: 0.78rem; opacity: 0.6; margin-top: 6px; }

.wizard-body { flex: 1; padding: 32px 20px 48px; max-width: 640px; margin: 0 auto; width: 100%; }

/* Question card */
.question-card { animation: fadeInUp 0.3s ease; }
.question-number { font-size: 0.78rem; font-weight: 600; color: var(--green-600); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 8px; }
.question-title { font-size: 1.4rem; font-weight: 800; color: var(--gray-900); margin-bottom: 6px; }
.question-subtitle { font-size: 0.92rem; color: var(--gray-600); margin-bottom: 28px; }

/* Options grid */
.options-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.options-grid-compact { grid-template-columns: 1fr 1fr; }
.options-grid-single { grid-template-columns: 1fr; }

.option-card {
  background: var(--white); border: 2px solid var(--gray-300); border-radius: var(--radius-md);
  padding: 18px 16px; cursor: pointer; display: flex; flex-direction: column; align-items: center;
  gap: 8px; text-align: center;
  transition: all 0.2s ease; font-family: inherit; font-size: 0.92rem; font-weight: 600; color: var(--gray-700);
}
.option-card:hover { border-color: var(--green-500); background: var(--green-50); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.option-card.selected { border-color: var(--green-600); background: var(--green-50); color: var(--green-900); box-shadow: 0 0 0 3px rgba(47,133,90,0.15); }
.option-card .option-icon { font-size: 1.6rem; color: var(--gray-500); transition: color 0.2s; }
.option-card:hover .option-icon, .option-card.selected .option-icon { color: var(--green-600); }

/* Multi-select */
.option-card.multi-selected { border-color: var(--green-600); background: var(--green-50); color: var(--green-900); box-shadow: 0 0 0 3px rgba(47,133,90,0.15); }
.option-card.multi-selected .option-icon { color: var(--green-600); }

/* "Otra ciudad" option */
.option-card-other { border-style: dashed; }
.option-card-other .option-icon { color: var(--gray-400); }

/* Other city text input below grid */
#other-city-wrap .email-input { margin-bottom: 8px; }

.btn-continue {
  display: block; width: 100%; margin-top: 20px; padding: 14px;
  background: linear-gradient(135deg, var(--green-600), var(--green-500));
  color: var(--white); border: none; border-radius: var(--radius-md);
  font-family: inherit; font-size: 1.05rem; font-weight: 700;
  cursor: pointer; transition: transform 0.2s, box-shadow 0.3s, opacity 0.2s;
}
.btn-continue:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(47,133,90,0.3); }
.btn-continue:disabled { background: var(--gray-400); cursor: not-allowed; opacity: 0.7; }

/* Email step */
.email-step { text-align: center; }
.email-input-wrap { max-width: 400px; margin: 0 auto 16px; }
.email-input {
  width: 100%; padding: 14px 16px; border: 2px solid var(--gray-300); border-radius: var(--radius-sm);
  font-family: inherit; font-size: 1rem; color: var(--gray-800); outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.email-input:focus { border-color: var(--green-500); box-shadow: 0 0 0 3px rgba(47,133,90,0.15); }

.btn-skip {
  background: none; border: none; color: var(--gray-500); font-family: inherit;
  font-size: 0.88rem; cursor: pointer; padding: 8px; margin-top: 8px;
  transition: color 0.2s;
}
.btn-skip:hover { color: var(--gray-700); }

/* Wizard nav */
.wizard-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 24px; }
.btn-prev {
  background: none; border: 1px solid var(--gray-300); color: var(--gray-600);
  padding: 10px 20px; border-radius: var(--radius-sm); font-family: inherit;
  font-size: 0.88rem; font-weight: 500; cursor: pointer; transition: all 0.2s;
  display: flex; align-items: center; gap: 6px;
}
.btn-prev:hover { border-color: var(--gray-400); color: var(--gray-800); transform: translateY(-1px); }

/* ============================================================
   RESULTS
   ============================================================ */
.results-wrapper { min-height: calc(100vh - 56px); }

.results-header {
  background: linear-gradient(135deg, var(--green-900), var(--green-800));
  padding: 32px 20px; color: var(--white); text-align: center;
}
.results-header h1 { font-size: 1.5rem; font-weight: 800; margin-bottom: 8px; }
.results-header p { font-size: 0.95rem; opacity: 0.8; }
.results-count { font-size: 2.4rem; font-weight: 800; display: block; margin-bottom: 4px; }

.results-body { padding: 24px 20px 48px; max-width: 900px; margin: 0 auto; }

/* Filter pills */
.filter-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.filter-pill {
  background: var(--white); border: 1px solid var(--gray-300); border-radius: 20px;
  padding: 6px 16px; font-size: 0.82rem; font-weight: 600; color: var(--gray-600);
  cursor: pointer; transition: all 0.2s; font-family: inherit;
}
.filter-pill:hover { border-color: var(--green-500); color: var(--green-600); }
.filter-pill.active { background: var(--green-600); color: var(--white); border-color: var(--green-600); }

/* Grant cards */
.grants-list { display: flex; flex-direction: column; gap: 16px; }

.grant-card {
  background: var(--white); border: 1px solid var(--gray-300); border-radius: var(--radius-md);
  padding: 20px; transition: transform 0.3s cubic-bezier(0.25,0.46,0.45,0.94), box-shadow 0.3s, border-color 0.3s;
  position: relative;
}
.grant-card:hover { transform: translateY(-3px); box-shadow: 0 12px 24px rgba(0,0,0,0.08); border-color: var(--green-400); }
.grant-card.featured { border-color: var(--green-500); border-width: 2px; }
.grant-card.featured::before {
  content: 'Destacada'; position: absolute; top: -1px; right: 16px;
  background: var(--green-600); color: var(--white); font-size: 0.7rem; font-weight: 700;
  padding: 4px 12px; border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  text-transform: uppercase; letter-spacing: 0.03em;
}

.grant-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.grant-title { font-size: 1rem; font-weight: 700; color: var(--gray-900); line-height: 1.3; flex: 1; }

.grant-score {
  flex-shrink: 0; width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.88rem; font-weight: 800;
}
.grant-score.high { background: var(--green-100); color: var(--green-700); }
.grant-score.medium { background: var(--yellow-100); color: var(--yellow-600); }
.grant-score.low { background: var(--gray-200); color: var(--gray-600); }

.grant-org { font-size: 0.82rem; color: var(--gray-500); margin-bottom: 10px; }

.grant-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.grant-tag {
  font-size: 0.72rem; font-weight: 600; padding: 3px 10px; border-radius: 12px;
  text-transform: uppercase; letter-spacing: 0.03em;
}
.grant-tag.nacional { background: var(--blue-100); color: var(--blue-700); }
.grant-tag.ccaa { background: var(--purple-100); color: var(--purple-600); }
.grant-tag.municipal { background: var(--blue-100); color: var(--blue-700); }
.grant-tag.eu { background: var(--orange-100); color: var(--orange-600); }
.grant-tag.sector { background: var(--gray-200); color: var(--gray-700); }
.grant-tag.finalidad { background: var(--green-100); color: var(--green-700); }

.grant-desc { font-size: 0.88rem; color: var(--gray-600); line-height: 1.5; margin-bottom: 12px; }
.grant-desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.grant-footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.grant-deadline { font-size: 0.82rem; color: var(--red-600); font-weight: 600; }

/* Grant action buttons (no exit points) */
.grant-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.btn-grant-detail {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--gray-100); color: var(--gray-700); border: 1px solid var(--gray-300);
  padding: 7px 14px; border-radius: var(--radius-sm);
  font-family: inherit; font-size: 0.82rem; font-weight: 600; cursor: pointer;
  transition: all 0.2s;
}
.btn-grant-detail:hover { background: var(--gray-200); transform: translateY(-1px); }

.btn-grant-solicitar {
  display: inline-flex; align-items: center; gap: 4px;
  background: linear-gradient(135deg, var(--green-600), var(--green-500));
  color: var(--white); border: none;
  padding: 7px 14px; border-radius: var(--radius-sm);
  font-family: inherit; font-size: 0.82rem; font-weight: 700; cursor: pointer;
  transition: all 0.2s;
}
.btn-grant-solicitar:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(47,133,90,0.3); }

/* CTA box in results */
.results-cta-box {
  background: linear-gradient(135deg, var(--green-50), var(--blue-50));
  border: 2px solid var(--green-400);
  border-radius: var(--radius-lg); padding: 28px 24px; margin: 32px 0;
  text-align: center;
}
.results-cta-box h3 { font-size: 1.1rem; font-weight: 700; color: var(--green-900); margin-bottom: 8px; }
.results-cta-box p { font-size: 0.9rem; color: var(--gray-700); margin-bottom: 16px; line-height: 1.5; }

.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, var(--green-600), var(--green-500));
  color: var(--white); padding: 12px 28px; border-radius: var(--radius-md);
  font-family: inherit; font-size: 0.95rem; font-weight: 700; border: none; cursor: pointer;
  transition: transform 0.2s, box-shadow 0.3s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 15px rgba(47,133,90,0.3); text-decoration: none; }

.btn-secondary {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--gray-100); color: var(--gray-700); border: 1px solid var(--gray-300);
  padding: 10px 20px; border-radius: var(--radius-sm);
  font-family: inherit; font-size: 0.88rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s; text-decoration: none;
}
.btn-secondary:hover { background: var(--gray-200); transform: translateY(-1px); text-decoration: none; }

/* Empty state */
.empty-state { text-align: center; padding: 48px 20px; }
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 16px; opacity: 0.5; }
.empty-state h2 { font-size: 1.3rem; font-weight: 700; color: var(--gray-800); margin-bottom: 8px; }
.empty-state p { font-size: 0.95rem; color: var(--gray-600); margin-bottom: 24px; }

/* Share button */
.share-bar { display: flex; gap: 12px; justify-content: center; margin-top: 24px; flex-wrap: wrap; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { background: var(--gray-900); color: var(--gray-500); padding: 32px 0; text-align: center; font-size: 0.82rem; }
.footer a { color: var(--gray-400); transition: color 0.2s; }
.footer a:hover { color: var(--white); }
.footer-links { display: flex; gap: 20px; justify-content: center; margin-bottom: 12px; flex-wrap: wrap; }
.footer-sources { margin-top: 12px; font-size: 0.78rem; opacity: 0.7; }

/* ============================================================
   ANIMATIONS
   ============================================================ */
.animate-in { animation: fadeInUp 0.3s ease; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

@keyframes staggerIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.grant-card { animation: staggerIn 0.3s ease backwards; }
.grant-card:nth-child(1) { animation-delay: 0s; }
.grant-card:nth-child(2) { animation-delay: 0.05s; }
.grant-card:nth-child(3) { animation-delay: 0.1s; }
.grant-card:nth-child(4) { animation-delay: 0.15s; }
.grant-card:nth-child(5) { animation-delay: 0.2s; }
.grant-card:nth-child(6) { animation-delay: 0.25s; }
.grant-card:nth-child(7) { animation-delay: 0.3s; }
.grant-card:nth-child(8) { animation-delay: 0.35s; }

/* ============================================================
   ACCESSIBILITY
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .hero { animation: none; background-size: 100% 100%; }
  .hero-blob { display: none; }
  .reveal { opacity: 1; transform: none; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (min-width: 640px) {
  .hero h1 { font-size: 2.4rem; }
  .stats-row { grid-template-columns: repeat(3, 1fr); }
  .steps-grid { grid-template-columns: repeat(3, 1fr); }
  .cat-grid { grid-template-columns: 1fr 1fr; }
  .options-grid { grid-template-columns: 1fr 1fr; }
  .results-header h1 { font-size: 1.8rem; }
}

@media (min-width: 960px) {
  .hero h1 { font-size: 2.7rem; }
  .hero { padding: 72px 0 64px; }
  .section { padding: 72px 0; }
  .section-title { font-size: 1.7rem; }
  .cat-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ============================================================
   GESTORES (inside solicitar modal)
   ============================================================ */
.gestores-empty { text-align: center; padding: 32px; color: var(--gray-500); background: var(--gray-100); border-radius: var(--radius-md); }

.solicitar-intro { font-size: 0.92rem; color: var(--gray-600); margin-bottom: 16px; }

.solicitar-gestores-list { display: flex; flex-direction: column; gap: 12px; }

/* Gestor selectable card */
.gestor-card-select {
  background: var(--white); border: 2px solid var(--gray-300); border-radius: var(--radius-md);
  padding: 18px; position: relative; cursor: pointer;
  transition: all 0.25s ease;
}
.gestor-card-select:hover { border-color: var(--green-500); background: var(--green-50); transform: translateY(-2px); box-shadow: var(--shadow-md); }

.gestor-featured { border-color: var(--green-500); }
.gestor-featured-tag {
  position: absolute; top: -1px; right: 16px;
  background: linear-gradient(135deg, var(--green-600), var(--green-500));
  color: var(--white); font-size: 0.68rem; font-weight: 700;
  padding: 3px 12px; border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  text-transform: uppercase; letter-spacing: 0.04em;
}

.gestor-header { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 8px; }

.gestor-avatar {
  width: 52px; height: 52px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.gestor-avatar span { color: var(--white); font-size: 1.1rem; font-weight: 700; }
.gestor-avatar img { width: 100%; height: 100%; object-fit: cover; }

.gestor-info { flex: 1; min-width: 0; }
.gestor-name { font-size: 0.95rem; font-weight: 700; color: var(--gray-900); display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.gestor-verified {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--green-600); color: var(--white); font-size: 0.6rem; font-weight: 700;
}
.gestor-empresa { font-size: 0.82rem; color: var(--gray-600); margin-top: 1px; }
.gestor-location { font-size: 0.78rem; color: var(--gray-500); display: flex; align-items: center; gap: 3px; margin-top: 3px; }

.gestor-rating-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.gestor-stars { display: flex; gap: 1px; }
.star { font-size: 0.88rem; }
.star.full { color: #f59e0b; }
.star.half { color: #f59e0b; opacity: 0.6; }
.star.empty { color: var(--gray-400); }
.gestor-rating-num { font-size: 0.82rem; font-weight: 700; color: var(--gray-800); }
.gestor-reviews { font-size: 0.78rem; color: var(--gray-500); }
.gestor-exp { font-size: 0.75rem; color: var(--gray-500); margin-left: auto; }

.gestor-badges { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.gestor-badge {
  font-size: 0.68rem; font-weight: 600; padding: 2px 8px; border-radius: 10px;
  background: var(--green-100); color: var(--green-700);
  transition: all 0.2s ease;
}
.gestor-badge-match {
  background: var(--blue-100); color: var(--blue-700); border: 1px solid var(--blue-500);
  font-weight: 700;
}

.gestor-afin-tag {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 0.7rem; font-weight: 700; color: var(--blue-700);
  background: var(--blue-50); border: 1px solid var(--blue-500);
  padding: 2px 10px; border-radius: 10px; margin-bottom: 6px;
}

.gestor-relevant { border-color: var(--blue-500); background: #f8fbff; }
.gestor-relevant:hover { border-color: var(--blue-600); background: var(--blue-50); }

.gestor-select-cta {
  display: flex; align-items: center; justify-content: center; gap: 4px;
  font-size: 0.85rem; font-weight: 700; color: var(--green-600);
  padding-top: 8px; border-top: 1px solid var(--gray-200);
}

/* Gestor card stagger */
.gestor-card-select { animation: staggerIn 0.3s ease backwards; }
.gestor-card-select:nth-child(1) { animation-delay: 0s; }
.gestor-card-select:nth-child(2) { animation-delay: 0.06s; }
.gestor-card-select:nth-child(3) { animation-delay: 0.12s; }
.gestor-card-select:nth-child(4) { animation-delay: 0.18s; }
.gestor-card-select:nth-child(5) { animation-delay: 0.24s; }

/* ============================================================
   MODALS (shared)
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 200;
  display: none; align-items: flex-start; justify-content: center;
  padding: 20px; padding-top: 40px; overflow-y: auto;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.modal-overlay.active { display: flex; }

.modal-content {
  background: var(--white); border-radius: var(--radius-lg); max-width: 520px; width: 100%;
  position: relative; margin-bottom: 40px;
  animation: modalIn 0.3s cubic-bezier(0.22,1,0.36,1);
}
.modal-content-wide { max-width: 600px; }
@keyframes modalIn { from { opacity: 0; transform: translateY(20px) scale(0.97); } to { opacity: 1; transform: translateY(0) scale(1); } }

.modal-close {
  position: sticky; top: 0; float: right; margin: 12px 12px 0 0; background: rgba(255,255,255,0.9);
  border: none; width: 32px; height: 32px; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; color: var(--gray-600); transition: all 0.2s; z-index: 2;
}
.modal-close:hover { background: var(--gray-200); color: var(--gray-900); }

.modal-header {
  background: linear-gradient(135deg, var(--green-900), var(--green-800));
  padding: 24px 28px; color: var(--white); border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.modal-header h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 4px; }
.modal-header .modal-gestor-info { font-size: 0.88rem; opacity: 0.8; }

.modal-body { padding: 24px 28px 28px; }

/* ============================================================
   GRANT DETAIL MODAL
   ============================================================ */
.detail-title { font-size: 1.2rem; font-weight: 800; color: var(--gray-900); margin-bottom: 6px; line-height: 1.3; }
.detail-org { font-size: 0.88rem; color: var(--gray-500); margin-bottom: 20px; }

.detail-meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
.detail-meta-item { background: var(--gray-100); border-radius: var(--radius-sm); padding: 12px; }
.detail-meta-label { display: block; font-size: 0.72rem; font-weight: 700; color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 3px; }
.detail-meta-value { font-size: 0.88rem; font-weight: 600; color: var(--gray-800); }
.detail-deadline { color: var(--red-600); }

.detail-description { font-size: 0.92rem; color: var(--gray-700); line-height: 1.6; margin-bottom: 20px; padding: 16px; background: var(--gray-50); border-radius: var(--radius-sm); border-left: 3px solid var(--green-500); }

.detail-curated-note {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.85rem; font-weight: 600; color: var(--green-700);
  background: var(--green-50); border: 1px solid var(--green-100);
  padding: 10px 16px; border-radius: var(--radius-sm); margin-bottom: 20px;
}

.btn-grant-solicitar-big {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 14px;
  background: linear-gradient(135deg, var(--green-600), var(--green-500));
  color: var(--white); border: none; border-radius: var(--radius-md);
  font-family: inherit; font-size: 1rem; font-weight: 700; cursor: pointer;
  transition: transform 0.2s, box-shadow 0.3s;
}
.btn-grant-solicitar-big:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(47,133,90,0.3); }

/* Requisitos checklist */
.detail-requisitos { margin-bottom: 20px; }
.detail-requisitos-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 1rem; font-weight: 700; color: var(--gray-900); margin-bottom: 4px;
}
.detail-requisitos-subtitle { font-size: 0.82rem; color: var(--gray-500); margin-bottom: 14px; }

.requisitos-list { display: flex; flex-direction: column; gap: 8px; }

.requisito-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px; background: var(--gray-50); border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm); cursor: pointer;
  transition: all 0.2s;
}
.requisito-item:hover { background: var(--green-50); border-color: var(--green-200); }

.requisito-item input[type="checkbox"] { display: none; }

.requisito-checkmark {
  width: 22px; height: 22px; min-width: 22px; border-radius: 4px;
  border: 2px solid var(--gray-400); background: var(--white);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s; margin-top: 1px;
}
.requisito-checkmark::after {
  content: ''; display: none; width: 6px; height: 10px;
  border: solid var(--white); border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg); margin-top: -2px;
}
.requisito-item input:checked ~ .requisito-checkmark {
  background: var(--green-600); border-color: var(--green-600);
}
.requisito-item input:checked ~ .requisito-checkmark::after { display: block; }
.requisito-item input:checked ~ .requisito-text { color: var(--green-700); }

.requisito-text { font-size: 0.88rem; color: var(--gray-700); line-height: 1.4; }

.requisitos-result {
  margin-top: 14px; padding: 10px 14px; border-radius: var(--radius-sm);
  font-size: 0.88rem; font-weight: 600;
  display: flex; align-items: center; gap: 8px;
}
.requisitos-result:empty { display: none; }
.result-good { background: var(--green-100); color: var(--green-700); }
.result-partial { background: var(--yellow-100); color: var(--yellow-600); }
.result-low { background: var(--red-100); color: var(--red-600); }

/* ============================================================
   SOLICITAR MODAL - Step 2 (contact form)
   ============================================================ */
.step2-grant-badge {
  display: flex; align-items: center; gap: 6px;
  background: var(--green-50); border: 1px solid var(--green-100);
  padding: 10px 14px; border-radius: var(--radius-sm);
  font-size: 0.85rem; font-weight: 600; color: var(--green-700);
  margin-bottom: 20px;
}

.lead-form-error { display: none; background: var(--red-100); color: var(--red-600); padding: 10px 14px; border-radius: var(--radius-sm); font-size: 0.88rem; margin-bottom: 14px; }

.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--gray-700); margin-bottom: 5px; }
.form-group label .required { color: var(--red-600); }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 10px 14px; border: 2px solid var(--gray-300); border-radius: var(--radius-sm);
  font-family: inherit; font-size: 0.95rem; color: var(--gray-800); outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  border-color: var(--green-500); box-shadow: 0 0 0 3px rgba(47,133,90,0.15);
}
.form-group textarea { min-height: 80px; resize: vertical; }

.form-success {
  display: none; text-align: center; padding: 32px 20px;
}
.form-success .success-icon { font-size: 3rem; color: var(--green-600); margin-bottom: 12px; }
.form-success h3 { font-size: 1.15rem; font-weight: 700; color: var(--gray-900); margin-bottom: 8px; }
.form-success p { font-size: 0.92rem; color: var(--gray-600); line-height: 1.5; margin-bottom: 16px; }

.btn-submit-lead {
  display: block; width: 100%; padding: 12px;
  background: linear-gradient(135deg, var(--green-600), var(--green-500));
  color: var(--white); border: none; border-radius: var(--radius-md);
  font-family: inherit; font-size: 1rem; font-weight: 700; cursor: pointer;
  transition: transform 0.2s, box-shadow 0.3s, opacity 0.2s;
}
.btn-submit-lead:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 6px 15px rgba(47,133,90,0.3); }
.btn-submit-lead:disabled { background: var(--gray-400); cursor: not-allowed; }

.form-disclaimer { font-size: 0.78rem; color: var(--gray-500); margin-top: 12px; text-align: center; }

.btn-back-step1 {
  display: flex; align-items: center; gap: 4px; justify-content: center;
  width: 100%; margin-top: 16px; padding: 10px;
  background: none; border: 1px solid var(--gray-300); border-radius: var(--radius-sm);
  font-family: inherit; font-size: 0.85rem; font-weight: 600; color: var(--gray-600);
  cursor: pointer; transition: all 0.2s;
}
.btn-back-step1:hover { border-color: var(--gray-400); color: var(--gray-800); }

/* ============================================================
   PRINT
   ============================================================ */
@media print {
  .navbar, .footer, .wizard-header, .wizard-nav, .filter-pills, .share-bar { display: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  body { background: white; }
}
