@import url('https://fonts.googleapis.com/css2?family=Rubik:wght@400;500;600;700&display=swap');

:root {
  --primary:      #00A2EA;
  --primary-dark: #007bbf;
  --ink:          #2C2F34;
  --paper:        #F7F7F7;
  --panel:        #00A2EA;
  --panel-text:   #ffffff;
  --line:         #D9D9D9;
  --muted:        #5B677D;
  --success:      #009E57;
  --error:        #C92C3C;
  --card:         #ffffff;
  --border:       #D9D9D9;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Rubik', sans-serif;
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
}

/* ── Top municipal header bar ── */
.city-header {
  background: var(--panel);
  color: var(--panel-text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 30;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.city-header .city-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: white;
}

.city-header .city-logo {
  height: 36px;
  width: auto;
}

.city-header .city-name {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.1;
}

.city-header .city-name small {
  display: block;
  font-weight: 400;
  font-size: 0.7rem;
  opacity: 0.85;
  letter-spacing: 0.02em;
}

/* ── Language switcher ── */
.lang-switch {
  display: flex;
  gap: 0.3rem;
}

.lang-btn {
  background: transparent;
  color: white;
  border: 1px solid rgba(255,255,255,0.55);
  padding: 0.25rem 0.65rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.78rem;
  font-family: 'Rubik', sans-serif;
  border-radius: 4px;
  letter-spacing: 0.04em;
  transition: background 0.15s, border-color 0.15s;
}

.lang-btn:hover { background: rgba(255,255,255,0.15); }

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

/* ── Page layout ── */
.page {
  display: grid;
  grid-template-columns: minmax(220px, 300px) 1fr;
  min-height: calc(100vh - 54px);
}

.intro-panel {
  background: var(--ink);
  color: #ffffff;
  padding: 2.5rem 1.75rem;
  position: sticky;
  top: 54px;
  height: calc(100vh - 54px);
  display: flex;
  flex-direction: column;
}

.kicker {
  font-family: 'Rubik', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.68rem;
  color: var(--primary);
  margin: 0 0 0.75rem;
  font-weight: 700;
}

.intro-panel h1 {
  font-size: 1.7rem;
  line-height: 1.2;
  margin: 0 0 0.9rem;
  font-weight: 700;
}

.intro-panel .lead {
  font-size: 0.9rem;
  line-height: 1.55;
  opacity: 0.8;
  margin: 0;
}

.step-nav {
  margin-top: auto;
  padding-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-family: 'Rubik', sans-serif;
}

.step-nav a {
  color: #ffffff;
  text-decoration: none;
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  font-size: 0.83rem;
  opacity: 0.65;
  border-left: 2px solid transparent;
  padding-left: 0.7rem;
  transition: opacity 0.15s, border-color 0.15s;
}

.step-nav a:hover {
  opacity: 1;
  border-left-color: var(--primary);
}

.step-num {
  font-size: 0.68rem;
  color: var(--primary);
  font-weight: 700;
}

/* ── Main form area ── */
main {
  padding: 2.5rem 2.5rem 4rem;
  max-width: 740px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.75rem 2rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.card h2 {
  font-size: 1.05rem;
  margin: 0 0 1.1rem;
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.75rem;
  font-weight: 600;
  color: var(--ink);
}

.card h2 .step-num { color: var(--primary); }

.sub-legend {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 1.5rem 0 0.6rem;
  font-weight: 600;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
}

.field { margin-top: 0; }
.field + .field { margin-top: 1rem; }
.field-row .field { margin-top: 0; }

label {
  display: block;
  margin-top: 1rem;
  font-weight: 500;
  font-size: 0.85rem;
  font-family: 'Rubik', sans-serif;
  color: var(--ink);
}

.field label, .field-row label { margin-top: 0; }

input, textarea, select {
  width: 100%;
  padding: 0.55rem 0.75rem;
  margin-top: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 0.95rem;
  font-family: 'Rubik', sans-serif;
  background: #fff;
  color: var(--ink);
  transition: border-color 0.15s;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0,162,234,0.12);
}

input[type="file"] {
  padding: 0.5rem 0.75rem;
  cursor: pointer;
}

.hint {
  color: var(--muted);
  font-size: 0.83rem;
  margin: 0 0 0.9rem;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 0.5rem;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.55rem 0.75rem;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.checkbox-item:has(input:checked) {
  border-color: var(--primary);
  background: rgba(0,162,234,0.06);
}

.checkbox-item input {
  width: auto;
  margin: 0;
  accent-color: var(--primary);
}

.checkbox-item label {
  margin: 0;
  font-weight: 400;
  cursor: pointer;
  font-size: 0.9rem;
}

.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.radio-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.5rem 0.85rem;
  font-weight: 400;
  margin-top: 0;
  cursor: pointer;
  background: #fff;
  font-size: 0.9rem;
  transition: border-color 0.15s, background 0.15s;
}

.radio-item:has(input:checked) {
  border-color: var(--primary);
  background: rgba(0,162,234,0.06);
}

.radio-item input {
  width: auto;
  margin: 0;
  accent-color: var(--primary);
}

.consent-item {
  align-items: flex-start;
  border: none;
  border-radius: 0;
  padding: 1.25rem 0 0;
  font-size: 0.87rem;
  line-height: 1.5;
  color: var(--muted);
  background: transparent;
}

.consent-item input {
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.language-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 1rem;
}

.language-item label { margin-top: 0; margin-bottom: 0.2rem; }

button[type="submit"] {
  margin-top: 1.5rem;
  width: 100%;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 0.85rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: 'Rubik', sans-serif;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 0.15s;
}

button[type="submit"]:hover { background: var(--primary-dark); }
button[type="submit"]:disabled { opacity: 0.6; cursor: not-allowed; }

#form-message {
  text-align: center;
  font-weight: 500;
  min-height: 1.2em;
  font-size: 0.9rem;
  margin-top: 0.75rem;
}

#form-message.success { color: var(--success); }
#form-message.error   { color: var(--error); }

/* ── GDPR notice ── */
.gdpr-notice {
  margin-top: 2rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--line);
  border-left: 4px solid var(--primary);
  border-radius: 4px;
  background: #fff;
  font-size: 0.83rem;
  color: var(--muted);
  line-height: 1.6;
}

.gdpr-notice h3 {
  margin: 0 0 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
}

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

/* ── Footer ── */
footer {
  color: var(--muted);
  font-size: 0.78rem;
  padding: 0.75rem 0 2rem;
}
.footer-links { margin-top: 0.6rem; }
.footer-links a { color: var(--primary); text-decoration: none; font-size: 0.85rem; }
.footer-links a:hover { text-decoration: underline; }
.footer-staff a { color: var(--muted); font-size: 0.78rem; }

/* ── Responsive ── */
@media (max-width: 860px) {
  .page { grid-template-columns: 1fr; }
  .intro-panel { position: static; height: auto; padding: 2rem 1.25rem 1.5rem; top: 0; }
  .step-nav { display: none; }
  main { padding: 1.5rem 1.25rem 3rem; }
  .card { padding: 1.25rem; }
  .field-row { grid-template-columns: 1fr; }
}
