:root {
  --primary: #1e3a5c;
  --primary-light: #2d5f8a;
  --accent: #f59e0b;
  --accent-hover: #d97706;
  --bg: #f8fafc;
  --surface: #ffffff;
  --border: #e2e8f0;
  --ink: #1e293b;
  --ink-muted: #64748b;
  --ink-light: #94a3b8;
  --green: #059669;
  --red: #dc2626;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-lg: 0 4px 12px rgba(0,0,0,0.1);
}

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

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

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

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1100px; margin: 0 auto; padding: 0 20px; height: 60px;
}
.logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.25rem; color: var(--primary); text-decoration: none; }
.logo-accent { color: var(--accent); }
.nav { display: flex; gap: 4px; }
.nav a { padding: 6px 14px; border-radius: 8px; font-size: 0.875rem; font-weight: 500; color: var(--ink-muted); transition: all 0.2s; }
.nav a:hover, .nav a.active { background: var(--primary); color: #fff; text-decoration: none; }
.menu-toggle { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; }

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff; padding: 60px 20px; text-align: center;
}
.hero h1 { font-size: 2.5rem; font-weight: 800; line-height: 1.2; max-width: 700px; margin: 0 auto; }
.hero p { font-size: 1.1rem; opacity: 0.9; max-width: 600px; margin: 16px auto 0; }
.hero-search {
  display: flex; max-width: 550px; margin: 28px auto 0;
  background: #fff; border-radius: 10px; overflow: hidden; box-shadow: var(--shadow-lg);
}
.hero-search input { flex: 1; padding: 14px 18px; border: none; font-size: 0.95rem; outline: none; color: var(--ink); }
.hero-search button { padding: 14px 24px; background: var(--accent); color: var(--primary); font-weight: 700; border: none; cursor: pointer; font-size: 0.95rem; }
.hero-search button:hover { background: var(--accent-hover); }

/* Section */
.section { padding: 48px 20px; }
.section-title { font-size: 1.75rem; font-weight: 800; text-align: center; margin-bottom: 8px; }
.section-subtitle { text-align: center; color: var(--ink-muted); max-width: 600px; margin: 0 auto 32px; }

/* Cards */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow); transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.card-icon { font-size: 2rem; margin-bottom: 12px; }
.card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.card p { font-size: 0.9rem; color: var(--ink-muted); line-height: 1.6; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 24px; border-radius: 8px; font-weight: 600; font-size: 0.95rem; text-decoration: none; transition: all 0.2s; border: none; cursor: pointer; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-light); text-decoration: none; }
.btn-accent { background: var(--accent); color: var(--primary); }
.btn-accent:hover { background: var(--accent-hover); text-decoration: none; }
.btn-secondary { background: transparent; color: var(--primary); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--bg); text-decoration: none; }

/* Regulaciones list */
.reg-list { display: flex; flex-direction: column; gap: 12px; }
.reg-item {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; display: flex; gap: 16px; align-items: flex-start;
}
.reg-icon { font-size: 1.5rem; flex-shrink: 0; margin-top: 2px; }
.reg-body { flex: 1; }
.reg-body h3 { font-size: 1rem; font-weight: 700; margin-bottom: 4px; }
.reg-body p { font-size: 0.875rem; color: var(--ink-muted); }
.reg-tag { display: inline-block; font-size: 0.7rem; font-weight: 600; padding: 2px 8px; border-radius: 4px; background: #eff6ff; color: var(--primary); margin-top: 8px; text-transform: uppercase; letter-spacing: 0.05em; }
.reg-link { font-size: 0.8rem; color: var(--primary); margin-top: 4px; display: inline-block; }

/* Provincia selector */
.prov-select { width: 100%; max-width: 400px; padding: 12px 16px; border-radius: 8px; border: 1px solid var(--border); font-size: 1rem; margin: 0 auto 24px; display: block; }
.prov-detail { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; max-width: 700px; margin: 0 auto; }

/* Flowchart */
.flowchart-container { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin: 24px 0; overflow-x: auto; }
.flowchart-title { font-size: 1rem; font-weight: 700; margin-bottom: 16px; text-align: center; }

/* Wizard */
.wizard { max-width: 600px; margin: 0 auto; }
.wizard-step { display: none; }
.wizard-step.active { display: block; }
.wizard-progress { display: flex; gap: 4px; margin-bottom: 32px; }
.wizard-progress span { flex: 1; height: 4px; border-radius: 2px; background: var(--border); }
.wizard-progress span.done { background: var(--accent); }
.wizard-options { display: flex; flex-direction: column; gap: 8px; }
.wizard-option { padding: 16px 20px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; font-size: 0.95rem; transition: all 0.2s; text-align: left; background: var(--surface); }
.wizard-option:hover { border-color: var(--primary); background: #f0f7ff; }
.wizard-result { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }

/* Footer */
.site-footer { background: var(--primary); color: #cbd5e1; padding: 40px 20px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 32px; max-width: 1100px; margin: 0 auto; }
.footer-col h4 { color: #fff; margin-bottom: 12px; font-size: 0.95rem; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 6px; }
.footer-col a { color: #94a3b8; font-size: 0.875rem; }
.footer-col a:hover { color: #fff; }
.footer-bottom { text-align: center; margin-top: 32px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.1); font-size: 0.8rem; }

/* Responsive */
@media (max-width: 768px) {
  .hero h1 { font-size: 1.75rem; }
  .cards-grid { grid-template-columns: 1fr; }
  .nav { display: none; flex-direction: column; position: absolute; top: 60px; left: 0; right: 0; background: var(--surface); border-bottom: 1px solid var(--border); padding: 12px; }
  .nav.open { display: flex; }
  .menu-toggle { display: block; }
  .header-inner { padding: 0 16px; }
}
