/* MyClub public website renderer — base + two templates.
 * Colors come from CSS variables the renderer sets from the club config, with
 * sensible per-template fallbacks below. */

:root {
  --mc-primary: #1a73e8;
  --mc-secondary: #34a853;
  --mc-bg: #ffffff;
  --mc-text: #1f2430;
  --mc-accent: #ff6d3b;
  --mc-max: 1080px;
  --mc-radius: 14px;
  --mc-font: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--mc-font);
  color: var(--mc-text);
  background: var(--mc-bg);
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--mc-primary); text-decoration: none; }

.mc-loading { padding: 4rem 1rem; text-align: center; color: #888; }
.mc-error { max-width: 640px; margin: 4rem auto; padding: 0 1rem; text-align: center; }
.mc-error h1 { color: var(--mc-primary); }

/* Header / nav */
.mc-header { background: var(--mc-bg); position: sticky; top: 0; z-index: 10; }
.mc-header-inner {
  max-width: var(--mc-max); margin: 0 auto; padding: 0 1.25rem;
  display: flex; align-items: center; justify-content: space-between;
  min-height: 64px; gap: 1rem; flex-wrap: wrap;
}
.mc-brand { font-weight: 800; font-size: 1.25rem; color: var(--mc-text); }
.mc-nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.mc-nav a { color: var(--mc-text); font-weight: 600; padding: 0.25rem 0; }
.mc-nav a.active, .mc-nav a:hover { color: var(--mc-primary); }

/* Main / blocks */
.mc-main { max-width: var(--mc-max); margin: 0 auto; padding: 1.5rem 1.25rem 3rem; }
.mc-block { margin: 1.5rem 0; }
.mc-text :first-child { margin-top: 0; }
.mc-image figcaption { color: #777; font-size: 0.9rem; margin-top: 0.4rem; text-align: center; }
.mc-line { border: 0; border-top: 2px solid #e3e6ec; }
.mc-line--dashed { border-top-style: dashed; }
.mc-line--dotted { border-top-style: dotted; }

.mc-section { margin: 2rem 0; }
.mc-section-inner { max-width: var(--mc-max); margin: 0 auto; }
.mc-section h2 { margin: 0 0 0.25rem; }
.mc-section--primary {
  background: var(--mc-primary); color: #fff; border-radius: var(--mc-radius);
  padding: 2.5rem 1.5rem; text-align: center;
}
.mc-section--primary a { color: #fff; text-decoration: underline; }

/* Lists (events / news) */
.mc-events ul, .mc-news ul { list-style: none; margin: 0; padding: 0; }
.mc-events li, .mc-news li {
  display: flex; flex-direction: column; gap: 0.15rem;
  padding: 0.85rem 0; border-bottom: 1px solid #e8ebf1;
}
.mc-list-date { font-size: 0.85rem; color: var(--mc-primary); font-weight: 700; }
.mc-list-title { font-weight: 600; }
.mc-list-text { color: #555; }
.mc-list-empty { color: #999; }

/* Forms */
.mc-form { display: flex; flex-direction: column; gap: 0.5rem; max-width: 520px; }
.mc-form label { font-weight: 600; font-size: 0.95rem; margin-top: 0.5rem; }
.mc-form input, .mc-form textarea {
  padding: 0.7rem 0.8rem; border: 1px solid #cdd2dc; border-radius: 8px;
  font: inherit; width: 100%;
}
.mc-form textarea { min-height: 120px; resize: vertical; }
.mc-form button {
  align-self: flex-start; margin-top: 0.75rem; padding: 0.7rem 1.4rem;
  background: var(--mc-primary); color: #fff; border: 0; border-radius: 999px;
  font-weight: 700; cursor: pointer;
}
.mc-form button:hover { filter: brightness(0.95); }
.mc-form-status { color: var(--mc-secondary); font-weight: 600; }

/* Footer */
.mc-footer { border-top: 1px solid #e8ebf1; margin-top: 2rem; }
.mc-footer-inner {
  max-width: var(--mc-max); margin: 0 auto; padding: 1.5rem 1.25rem;
  color: #888; font-size: 0.9rem;
}

/* =========================================================================
 * Template 1 — "modern" (sporty clubs): bold, rounded, energetic.
 * ========================================================================= */
body.tpl-modern {
  --mc-font: "Segoe UI", system-ui, Roboto, Arial, sans-serif;
}
body.tpl-modern .mc-header {
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.06);
}
body.tpl-modern .mc-brand { letter-spacing: -0.02em; text-transform: uppercase; }
body.tpl-modern .mc-nav a { text-transform: uppercase; font-size: 0.85rem; letter-spacing: 0.03em; }
body.tpl-modern .mc-section--primary {
  background: linear-gradient(135deg, var(--mc-primary), var(--mc-accent));
}
body.tpl-modern h1, body.tpl-modern h2 { font-weight: 800; letter-spacing: -0.02em; }
body.tpl-modern .mc-image img { border-radius: var(--mc-radius); }
body.tpl-modern .mc-form button { box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15); }

/* =========================================================================
 * Template 2 — "classic" (alternative, less modern): serif, understated,
 * traditional. A calmer, more conventional club look.
 * ========================================================================= */
body.tpl-classic {
  --mc-font: Georgia, "Times New Roman", "Iowan Old Style", serif;
  --mc-radius: 4px;
}
body.tpl-classic .mc-header { border-bottom: 3px double var(--mc-primary); }
body.tpl-classic .mc-brand { font-weight: 700; letter-spacing: 0.02em; }
body.tpl-classic .mc-nav a { font-weight: 600; }
body.tpl-classic h1, body.tpl-classic h2 { font-weight: 700; }
body.tpl-classic .mc-section--primary { border-radius: 4px; }
body.tpl-classic .mc-form button,
body.tpl-classic .mc-brand { border-radius: 2px; }
body.tpl-classic .mc-form button { border-radius: 2px; }
body.tpl-classic .mc-line { border-top-color: var(--mc-primary); opacity: 0.5; }

@media (max-width: 640px) {
  .mc-header-inner { min-height: 56px; }
  .mc-nav { gap: 0.85rem; }
}
