/* ===== RVCC CSS Variables ===== */
:root {
  /* RVCC Brand Colors (matching logo) */
  --green: #2A6B48;
  --green-dark: #1E5038;
  --green-light: #E8F5EE;
  --yellow: #F0B429;
  --yellow-dark: #D99E1C;
  --yellow-light: #FEF9E7;
  /* Neutrals */
  --dark: #1A3A28;
  --gray-800: #1E293B;
  --gray-600: #475569;
  --gray-400: #94A3B8;
  --gray-200: #E2E8F0;
  --gray-100: #F1F5F9;
  --white: #FFFFFF;
  --success: #15803D;
  --shadow: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.06);
  --radius: 10px;
  --radius-sm: 6px;
  --transition: 0.18s ease;
  --nav-height: 64px;
}

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--dark);
  background: var(--gray-100);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ===== Typography ===== */
h1, h2, h3, h4 { font-weight: 700; line-height: 1.25; }
h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.25rem, 3vw, 1.75rem); }
h3 { font-size: 1.125rem; }
p { color: var(--gray-600); }
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== Navigation ===== */
nav {
  background: var(--dark);
  height: var(--nav-height);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.nav-inner {
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--white);
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.nav-logo:hover { text-decoration: none; opacity: 0.9; }
.nav-logo img {
  height: 44px;
  width: 44px;
  border-radius: 10px;
  object-fit: cover;
  object-position: 50% 20%;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(240,180,41,0.55);
}
.nav-logo .logo-badge {
  background: var(--yellow);
  color: var(--dark);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 4px;
}
.nav-links {
  display: flex;
  gap: 0.25rem;
  list-style: none;
}
.nav-links a {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 0.875rem;
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--yellow);
  background: rgba(240,180,41,0.12);
  text-decoration: none;
}

/* ===== Page Layout ===== */
.page-header {
  background: var(--dark);
  color: var(--white);
  padding: 2.5rem 1.5rem;
  text-align: center;
}
.page-header h1 { color: var(--white); margin-bottom: 0.5rem; }
.page-header p { color: rgba(255,255,255,0.65); max-width: 600px; margin: 0 auto; }
.page-header .badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--yellow);
  color: var(--dark);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 1rem;
}

.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}
.container-wide {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* ===== Cards ===== */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  overflow: hidden;
}
.card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--gray-200);
  background: var(--gray-100);
}
.card-header h2, .card-header h3 {
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.card-body { padding: 1.5rem; }

/* Section divider with number */
.section-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  margin-bottom: 1.5rem;
}
.section-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.125rem 1.5rem;
  border-bottom: 1px solid var(--gray-200);
  background: var(--gray-100);
  border-radius: var(--radius) var(--radius) 0 0;
}
.section-number {
  background: var(--green);
  color: var(--white);
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 700;
  flex-shrink: 0;
}
.section-title { font-size: 0.9375rem; font-weight: 600; }
.section-body { padding: 1.5rem; }

/* ===== Forms ===== */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}
.form-grid-2 { grid-template-columns: repeat(2, 1fr); }
.form-grid-3 { grid-template-columns: repeat(3, 1fr); }
.form-full { grid-column: 1 / -1; }

.form-group { display: flex; flex-direction: column; gap: 0.375rem; }
.form-group label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--gray-800);
  letter-spacing: 0.01em;
}
.form-group label .required { color: var(--green); margin-left: 2px; }
.form-group label .optional {
  color: var(--gray-400);
  font-weight: 400;
  font-size: 0.75rem;
  margin-left: 4px;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="time"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 0.5625rem 0.75rem;
  font-size: 0.9375rem;
  font-family: inherit;
  color: var(--dark);
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
  -webkit-appearance: none;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(42,107,72,0.12);
}
input::placeholder, textarea::placeholder { color: var(--gray-400); }
textarea { resize: vertical; min-height: 80px; }
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2394A3B8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 2rem;
  cursor: pointer;
}

/* Checkboxes & Radios */
.checkbox-group, .radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  margin-top: 0.25rem;
}
.checkbox-row, .radio-row {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  cursor: pointer;
}
.checkbox-row input[type="checkbox"],
.radio-row input[type="radio"] {
  width: auto;
  margin-top: 2px;
  flex-shrink: 0;
  width: 1.0625rem;
  height: 1.0625rem;
  cursor: pointer;
  accent-color: var(--green);
}
.checkbox-row span, .radio-row span {
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--dark);
}

/* Radio card options */
.radio-cards {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.radio-card {
  flex: 1;
  min-width: 180px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1rem;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
}
.radio-card:hover { border-color: var(--green); }
.radio-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.radio-card.selected {
  border-color: var(--green);
  background: var(--green-light);
}
.radio-card-title { font-weight: 600; font-size: 0.9375rem; margin-bottom: 2px; }
.radio-card-sub { font-size: 0.8125rem; color: var(--gray-600); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--green); color: var(--white); }
.btn-primary:hover { background: var(--green-dark); color: var(--white); }
.btn-secondary {
  background: var(--white);
  color: var(--dark);
  border: 1.5px solid var(--gray-200);
}
.btn-secondary:hover { border-color: var(--green); color: var(--dark); }
.btn-yellow { background: var(--yellow); color: var(--dark); }
.btn-yellow:hover { background: var(--yellow-dark); color: var(--dark); }
.btn-dark { background: var(--dark); color: var(--white); }
.btn-dark:hover { background: var(--green-dark); color: var(--white); }
.btn-sm { padding: 0.375rem 0.875rem; font-size: 0.8125rem; }
.btn-lg { padding: 0.875rem 1.75rem; font-size: 1rem; }
.btn-icon {
  padding: 0.4375rem;
  border-radius: var(--radius-sm);
  line-height: 1;
}
.btn-danger {
  background: #FEF2F2;
  color: #DC2626;
  border: 1.5px solid #FECACA;
}
.btn-danger:hover { background: #FEE2E2; color: #DC2626; }

.btn-group {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ===== Tables ===== */
.table-wrapper { overflow-x: auto; border-radius: var(--radius-sm); }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
thead th {
  background: var(--gray-100);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--gray-600);
  padding: 0.625rem 0.75rem;
  text-align: left;
  border-bottom: 2px solid var(--gray-200);
}
tbody td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--gray-200);
  vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--gray-100); }
tbody td input { border: none; background: transparent; padding: 0.25rem 0; width: 100%; }
tbody td input:focus { outline: none; border-bottom: 2px solid var(--green); }

/* ===== Vote Row ===== */
.vote-section {
  background: var(--gray-100);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-top: 0.75rem;
}
.vote-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.625rem;
}
.vote-inputs {
  display: flex;
  gap: 0.75rem;
  align-items: flex-end;
  flex-wrap: wrap;
}
.vote-field { display: flex; flex-direction: column; gap: 0.25rem; flex: 1; min-width: 70px; }
.vote-field label { font-size: 0.75rem; font-weight: 600; color: var(--gray-600); }
.vote-field input[type="number"] {
  max-width: 100px;
  text-align: center;
  font-size: 1.125rem;
  font-weight: 700;
  padding: 0.375rem;
}
.vote-result {
  flex: 2;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-600);
  padding-bottom: 0.5rem;
}
.vote-result .adopted { color: var(--success); }
.vote-result .rejected { color: #DC2626; }

/* ===== Signature Pad ===== */
.signature-pad-wrapper {
  border: 2px dashed var(--gray-200);
  border-radius: var(--radius-sm);
  background: var(--gray-100);
  position: relative;
  overflow: hidden;
  cursor: crosshair;
}
.signature-pad-wrapper canvas {
  display: block;
  width: 100%;
  height: 140px;
  touch-action: none;
}
.signature-pad-hint {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--gray-400);
  font-size: 0.875rem;
  pointer-events: none;
  user-select: none;
  text-align: center;
}
.signature-pad-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.5rem;
}

/* ===== Divider ===== */
.divider { border: none; border-top: 1px solid var(--gray-200); margin: 1.5rem 0; }

/* ===== Alert / Info Box ===== */
.alert {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}
.alert-info { background: #EFF6FF; border-left: 4px solid #3B82F6; color: #1E40AF; }
.alert-success { background: var(--green-light); border-left: 4px solid var(--green); color: var(--green-dark); }
.alert-warning { background: var(--yellow-light); border-left: 4px solid var(--yellow); color: #78350F; }

/* ===== Footer ===== */
footer {
  background: var(--dark);
  color: rgba(255,255,255,0.5);
  text-align: center;
  padding: 1.5rem;
  font-size: 0.8125rem;
  margin-top: 3rem;
}
footer strong { color: rgba(255,255,255,0.8); }

/* ===== Sticky Action Bar ===== */
.sticky-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--white);
  border-top: 1px solid var(--gray-200);
  padding: 0.875rem 1.5rem;
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  z-index: 90;
  box-shadow: 0 -4px 12px rgba(0,0,0,0.08);
}
.sticky-spacer { height: 72px; }

/* ===== Accordion / Statuten Blocks ===== */
.statute-article {
  border-bottom: 1px solid var(--gray-200);
  padding: 1.25rem 1.5rem;
}
.statute-article:last-child { border-bottom: none; }
.statute-article h4 {
  font-size: 0.9375rem;
  font-weight: 700;
  margin-bottom: 0.625rem;
  color: var(--dark);
}
.statute-article p, .statute-article li {
  font-size: 0.9rem;
  color: var(--gray-600);
  margin-bottom: 0.375rem;
}
.statute-article ul, .statute-article ol {
  padding-left: 1.5rem;
  margin-top: 0.375rem;
}

/* ===== Language Toggle ===== */
.lang-toggle {
  background: rgba(240,180,41,0.15);
  border: 1.5px solid rgba(240,180,41,0.35);
  color: var(--yellow);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
  flex-shrink: 0;
  line-height: 1;
}
.lang-toggle:hover {
  background: rgba(240,180,41,0.28);
  border-color: var(--yellow);
}

/* ===== Nav right group ===== */
.nav-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* ===== Footer link ===== */
footer {
  background: var(--dark);
  color: rgba(255,255,255,0.5);
  text-align: center;
  padding: 1.5rem;
  font-size: 0.8125rem;
  margin-top: 3rem;
}
footer strong { color: rgba(255,255,255,0.8); }
.footer-link {
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  transition: color 0.15s;
}
.footer-link:hover {
  color: rgba(255,255,255,0.85);
  text-decoration: underline;
}

/* ===== CAPTCHA widget ===== */
.captcha-box {
  background: var(--gray-50, #f8fafc);
  border: 1px solid var(--gray-200, #e2e8f0);
  border-radius: 10px;
  padding: 0.875rem 1.25rem;
  margin: 1.25rem 0 0.25rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.625rem;
}
.captcha-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--dark, #111827);
}
.captcha-question {
  font-family: monospace;
  font-size: 1rem;
  font-weight: 700;
  color: var(--dark, #111827);
  letter-spacing: 0.04em;
}
.captcha-input {
  width: 68px;
  padding: 0.3rem 0.5rem;
  border: 1.5px solid var(--gray-200, #e2e8f0);
  border-radius: 6px;
  font-size: 1rem;
  text-align: center;
  font-family: inherit;
}
.captcha-input:focus {
  outline: none;
  border-color: var(--green, #2A6B48);
  box-shadow: 0 0 0 3px rgba(42,107,72,0.12);
}
.captcha-hint {
  font-size: 0.75rem;
  color: rgba(0,0,0,0.35);
  margin-left: auto;
  letter-spacing: 0.02em;
}
.captcha-error {
  width: 100%;
  color: #dc2626;
  font-size: 0.8125rem;
  margin: 0.125rem 0 0;
}

/* ===== Social icon links ===== */
.nav-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  color: rgba(255,255,255,0.65);
  border-radius: 6px;
  transition: color var(--transition), background var(--transition);
  text-decoration: none;
  flex-shrink: 0;
}
.nav-social:hover {
  color: var(--white);
  background: rgba(255,255,255,0.1);
}
.nav-social svg { display: block; }

/* ===== Hamburger button ===== */
.nav-burger {
  display: none;
  background: none;
  border: 1.5px solid rgba(255,255,255,0.18);
  cursor: pointer;
  padding: 5px 7px;
  border-radius: 6px;
  color: var(--white);
  flex-shrink: 0;
  line-height: 0;
  transition: all var(--transition);
}
.nav-burger:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.35);
}
.nav-burger svg { display: block; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  /* Hide club name text, keep logo image */
  .nav-logo .nav-club-name { display: none; }

  /* Show hamburger */
  .nav-burger { display: flex; align-items: center; justify-content: center; }

  /* Nav links become a full-width dropdown panel */
  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--dark);
    flex-direction: column;
    padding: 0.625rem 1rem 1rem;
    gap: 0.125rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.45);
    z-index: 98;
    border-top: 1px solid rgba(255,255,255,0.08);
    animation: navSlideDown 0.18s ease;
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border-radius: var(--radius-sm);
    display: block;
    border-bottom: 1px solid rgba(255,255,255,0.05);
  }
  .nav-links li:last-child a { border-bottom: none; }

  @keyframes navSlideDown {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
  }
}

@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
  .form-grid-2 { grid-template-columns: 1fr; }
  .form-grid-3 { grid-template-columns: 1fr; }
  .vote-inputs { flex-direction: column; }
  .radio-cards { flex-direction: column; }
  .btn-group { flex-direction: column; }
  .btn-group .btn { width: 100%; }
}

/* ===== Loading Overlay ===== */
.loading-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(26, 58, 40, 0.88);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 300;
  align-items: center;
  justify-content: center;
}
.loading-overlay.visible { display: flex; }
.loading-box {
  background: var(--white);
  border-radius: 16px;
  padding: 2.5rem 3rem;
  text-align: center;
  box-shadow: 0 24px 64px rgba(0,0,0,0.35);
  max-width: 340px;
  width: 90%;
}
.loading-spinner {
  width: 52px;
  height: 52px;
  border: 5px solid var(--green-light);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: rvcc-spin 0.75s linear infinite;
  margin: 0 auto 1.25rem;
}
@keyframes rvcc-spin { to { transform: rotate(360deg); } }
.loading-box h3 { font-size: 1.0625rem; color: var(--dark); margin-bottom: 0.375rem; }
.loading-box p  { font-size: 0.875rem; color: var(--gray-600); margin: 0; }

/* ===== Print Styles ===== */
@media print {
  nav, .sticky-bar, .btn-group, .no-print { display: none !important; }
  body { background: white; }
  .section-card, .card { box-shadow: none; border: 1px solid #ccc; page-break-inside: avoid; }
  .page-header { background: var(--dark); color: white; border-bottom: 3px solid var(--green); padding: 1rem 0; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .page-header h1 { color: white; }
  .page-header p { color: rgba(255,255,255,0.7); }
  .section-number { background: var(--green); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  input, select, textarea { border: 1px solid #ccc !important; box-shadow: none !important; }
  .vote-section { background: #f8f8f8; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .signature-pad-wrapper { border: 1px solid #ccc; min-height: 80px; }
  a { color: inherit; }
  @page { margin: 1.5cm; }
}
