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

:root {
  /* Ottobock brand palette (matches ottobock.com) */
  --c-primary: #00157a;
  --c-primary-dark: #000c38;
  --c-accent: #1a6bbd;
  --c-accent-light: #f0f5f7;
  --c-aqua: #39b1c3;
  /* Ottobock keeps headings BLACK, brand blue used only for logo/buttons */
  --c-heading: #000;
  --c-text: #222;
  --c-text-muted: #707070;
  --c-border: #d6d6d6;
  --c-bg: #ffffff;
  --c-bg-soft: #f5f5f5;
  --c-success: #2d8746;
  --c-warning: #d78d00;
  --c-danger: #d11919;
  --radius: 8px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.04);
  --shadow: 0 2px 10px rgba(0,21,122,.08);
  --font: 'Work Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--c-text);
  background: var(--c-bg);
  line-height: 1.55;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

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

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

.header {
  border-bottom: 1px solid var(--c-border);
  background: #fff;
  position: sticky; top: 0; z-index: 10;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px;
  max-width: 1100px; margin: 0 auto;
}
.logo {
  display: flex; align-items: center; gap: 14px;
  text-decoration: none;
}
.logo img.brand-logo {
  height: 28px; width: auto; display: block;
}
.logo-text {
  display: flex; flex-direction: column;
  font-weight: 400;
  color: var(--c-text-muted);
  font-size: 12px;
  line-height: 1.25;
  letter-spacing: .2px;
  padding-left: 12px;
  border-left: 1px solid var(--c-border);
}
.logo-text span { display: block; }

.hero {
  position: relative;
  background-image: url('/images/hero-stripe.avif');
  background-size: cover;
  background-position: center;
  color: #fff;
  padding: 130px 20px 120px;
  min-height: 460px;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.18) 0%, rgba(0,0,0,.38) 100%);
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; width: 100%; }
.hero h1 { margin: 0 0 14px; font-size: 44px; line-height: 1.15; font-weight: 600; letter-spacing: -.5px; text-shadow: 0 2px 14px rgba(0,0,0,.45); }
.hero-logo { display: block; width: 285px; height: auto; max-width: 100%; margin: 0 0 22px; filter: drop-shadow(0 2px 14px rgba(0,0,0,.35)); }
.hero p { margin: 0 0 28px; color: #fff; font-size: 18px; max-width: 640px; line-height: 1.5; text-shadow: 0 1px 8px rgba(0,0,0,.55); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.section { padding: 48px 0; }
.section h2 { margin: 0 0 24px; font-size: 28px; color: var(--c-heading); font-weight: 600; letter-spacing: -.3px; }
.section-muted { background: var(--c-bg-soft); }

.events-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}
.event-card {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: 0;
  padding: 22px;
  transition: all .15s;
  display: flex; flex-direction: column; gap: 12px;
  box-shadow: var(--shadow-sm);
}
.event-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--c-accent);
}
.event-card .type-badge {
  display: inline-block;
  padding: 4px 12px;
  background: var(--c-accent-light); color: var(--c-accent);
  border-radius: 0; font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .5px;
}
.event-card h3 { margin: 0; font-size: 19px; color: var(--c-heading); font-weight: 600; }
.event-card .meta { color: var(--c-text-muted); font-size: 14px; display: flex; flex-direction: column; gap: 4px; }
.event-card .meta span { display: flex; align-items: center; gap: 6px; }
.event-card .description { color: #444; font-size: 14px; }
.ico { width: 18px; height: 18px; flex-shrink: 0; opacity: .7; vertical-align: middle; }
.ico-on-dark { opacity: 1; filter: brightness(0) invert(1); }

.empty-state {
  padding: 60px 20px;
  text-align: center;
  color: var(--c-text-muted);
  background: var(--c-bg-soft);
  border-radius: var(--radius);
}

/* Event page */
.event-header {
  position: relative;
  padding: 70px 0 50px;
  background-image: url('/images/hero-stripe.avif');
  background-size: cover;
  background-position: center;
  color: #fff;
  overflow: hidden;
}
.event-header::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(0,21,122,.6) 0%, rgba(0,12,56,.35) 100%);
  pointer-events: none;
}
.event-header > * { position: relative; z-index: 1; }
.event-header .type-badge {
  display: inline-block;
  background: rgba(255,255,255,.15);
  color: #fff;
  padding: 4px 12px; border-radius: 0; font-size: 12px;
  text-transform: uppercase; letter-spacing: .5px; font-weight: 600;
  margin-bottom: 16px;
}
.event-header h1 { margin: 0 0 12px; font-size: 36px; line-height: 1.2; font-weight: 600; letter-spacing: -.3px; }
.event-header .meta { color: rgba(255,255,255,.9); font-size: 15px; display: flex; flex-wrap: wrap; gap: 20px; }
.event-header .meta span { display: flex; align-items: center; gap: 8px; }

.event-body {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  padding: 48px 0;
}
.event-body .description { font-size: 16px; color: #333; white-space: pre-wrap; }
.event-body h2 { font-size: 22px; color: var(--c-heading); margin: 32px 0 14px; font-weight: 600; }
.event-body h3 { font-size: 17px; color: var(--c-heading); margin: 18px 0 6px; font-weight: 600; }

.sidebar {
  position: sticky; top: 80px;
  align-self: start;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  display: flex; flex-direction: column; gap: 12px;
}
.sidebar .btn,
.sidebar .btn-pill {
  width: 100%;
  border-radius: 999px;
  padding: 14px 22px;
  font-size: 15px;
  font-weight: 600;
}
.share-block {
  display: none;
  margin-top: 4px;
  padding: 16px;
  background: var(--c-bg-soft);
  border: 1px solid var(--c-border);
  text-align: center;
}
.share-block.is-open { display: block; }
.share-block img.qr {
  width: 180px; height: 180px;
  image-rendering: pixelated;
  background: #fff;
  border: 1px solid var(--c-border);
  display: block;
  margin: 0 auto 12px;
}
.share-block .copy-row {
  display: flex; gap: 8px;
  background: #fff;
  border: 1px solid var(--c-border);
  padding: 4px 4px 4px 10px;
  align-items: center;
}
.share-block .copy-row input {
  flex: 1;
  border: none; outline: none;
  font-family: inherit; font-size: 13px;
  background: transparent;
  color: var(--c-text);
  min-width: 0;
}
.share-block .copy-row .btn {
  width: auto;
  padding: 8px 14px;
  font-size: 13px;
  border-radius: 999px;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: var(--c-primary); color: #fff;
  font-family: inherit;
  font-size: 15px; font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  transition: background-color .25s ease, color .25s ease, border-color .25s ease, transform .2s ease, box-shadow .25s ease, padding-left .3s ease;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}
.btn:hover {
  text-decoration: none;
}
.btn-accent { background: var(--c-accent); }
.btn-outline {
  background: transparent; color: var(--c-primary); border-color: var(--c-primary);
}
.btn-outline:hover { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }
.btn-secondary {
  background: #fff;
  color: var(--c-text);
  border-color: var(--c-border);
  border-radius: 999px;
}
.btn-secondary:hover { background: var(--c-bg-soft); color: var(--c-text); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-pill {
  border-radius: 999px;
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .1px;
  border: 1px solid transparent;
  box-shadow: 0 4px 14px rgba(0,0,0,.18);
  transition: background-color .25s ease, color .25s ease, transform .2s ease, box-shadow .25s ease, padding-left .3s ease;
}
.btn-pill-primary { background: var(--c-primary); color: #fff; }
.btn-pill-light { background: #fff; color: var(--c-heading); }
.btn-pill-light:hover { background: #f3f5f8; color: var(--c-heading); }

/* ---------------------------------------------------------------------------
   Hover-стрелка для синих заполненных CTA (как на ottobock.com/ru-ru)
   - .btn-pill-primary  — основные pill-кнопки в hero и сайдбаре
   - .btn-accent        — голубой accent-CTA
   - .btn-cta           — обычные .btn, помеченные как CTA (например, «Отправить заявку»)
   .btn-secondary, .btn-outline, .btn-pill-light, .btn-sm — без стрелки.
   --------------------------------------------------------------------------- */
.btn-pill-primary,
.btn-accent,
.btn-cta { position: relative; overflow: hidden; }

.btn-pill-primary::before,
.btn-accent::before,
.btn-cta::before {
  content: '→';
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%) translateX(-14px);
  opacity: 0;
  font-weight: 700;
  font-size: 1em;
  font-family: inherit;
  pointer-events: none;
  transition: transform .3s ease, opacity .3s ease;
  color: inherit;
}
.btn-pill-primary:hover,
.btn-accent:hover,
.btn-cta:hover {
  /* Сдвигаем содержимое вправо, освобождая место для стрелки.
     Цвет фона и положение кнопки — без изменений (only the arrow + content shift). */
  padding-left: 42px;
}
.btn-pill-primary:hover::before,
.btn-accent:hover::before,
.btn-cta:hover::before {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

/* Schedule */
.schedule-day { border-left: 3px solid var(--c-accent); padding-left: 18px; margin: 20px 0; }
.schedule-day h4 { margin: 0 0 8px; color: var(--c-heading); font-size: 15px; font-weight: 600; }
.schedule-item { display: grid; grid-template-columns: 90px 1fr; gap: 12px; padding: 6px 0; border-bottom: 1px dashed var(--c-border); font-size: 14px; }
.schedule-item:last-child { border-bottom: none; }
.schedule-item .time { color: var(--c-text-muted); font-variant-numeric: tabular-nums; font-weight: 600; }
.schedule-item .title { color: #333; }
.schedule-item .speaker { color: var(--c-text-muted); font-size: 13px; }

/* Form (Ottobock powered-wheelchairs style) */
.page-form { background: var(--c-bg-soft); padding: 40px 0 60px; }
.form-wrapper {
  max-width: 720px; margin: 0 auto;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0 4px;
  box-shadow: none;
}
.form-wrapper h1 { margin: 0 0 8px; color: var(--c-heading); font-size: 28px; font-weight: 600; letter-spacing: -.3px; text-align: left; }
.form-wrapper .subtitle { color: var(--c-text-muted); margin: 0 0 28px; text-align: left; }
.field { margin-bottom: 20px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 14px; text-align: left; }
.field .hint { display: block; color: var(--c-text-muted); font-size: 13px; margin-top: 4px; }
.field input[type=text],
.field input[type=email],
.field input[type=tel],
.field input[type=number],
.field input[type=date],
.field textarea,
.field select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--c-border);
  border-radius: 8px;
  font-family: inherit; font-size: 15px;
  background: #fff;
  color: var(--c-text);
  transition: border-color .12s, box-shadow .12s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px var(--c-accent-light);
}
.field textarea { resize: vertical; min-height: 90px; }
.field.required label::after { content: ' *'; color: var(--c-danger); }
.field.has-error input, .field.has-error textarea, .field.has-error select {
  border-color: var(--c-danger);
}

.form-actions { display: flex; justify-content: flex-end; margin-top: 24px; }
.form-actions .btn { border-radius: 999px; padding-top: 11px; padding-bottom: 11px; padding-right: 26px; font-size: 14px; font-weight: 600; min-width: 260px; }
/* Organization autocomplete */
.org-autocomplete { position: relative; }
.org-dropdown {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px);
  z-index: 20;
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  max-height: 320px;
  overflow-y: auto;
}
.org-item {
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
}
.org-item:last-child { border-bottom: none; }
.org-item:hover { background: var(--c-accent-light); }
.org-item .org-short { font-weight: 600; font-size: 14px; color: var(--c-heading); }
.org-item .org-full { font-size: 12px; color: var(--c-text-muted); }
.org-empty { padding: 14px; color: var(--c-text-muted); font-size: 13px; }

.consents { margin: 20px 0 24px; border-top: 1px solid var(--c-border); padding-top: 20px; }
.consent-item { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; }
.consent-item input[type=checkbox] { margin-top: 4px; flex-shrink: 0; }
.consent-item label { font-size: 14px; line-height: 1.5; }

.footer {
  background: #2b2b2b;
  color: rgba(255,255,255,.78);
  font-size: 13px;
  margin-top: 60px;
  padding: 36px 0 28px;
  line-height: 1.6;
}
.footer a { color: rgba(255,255,255,.92); text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.25); }
.footer a:hover { color: #fff; border-bottom-color: rgba(255,255,255,.6); text-decoration: none; }
.footer-top {
  display: flex; flex-wrap: wrap; gap: 18px 32px;
  align-items: center; justify-content: space-between;
  padding-bottom: 16px;
  margin-bottom: 16px;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.footer-disclaimer { color: rgba(255,255,255,.55); font-size: 12px; }
.footer-contacts { color: rgba(255,255,255,.85); font-size: 13px; }
.footer-contacts a { border-bottom: none; }
.footer-contacts a:hover { border-bottom: 1px solid rgba(255,255,255,.6); }
.footer-contacts:empty { display: none; }
.footer-social { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.footer-social a { border-bottom: none; display: inline-flex; opacity: .85; transition: opacity .2s ease; }
.footer-social a:hover { opacity: 1; border-bottom: none; }
.footer-social img { width: 28px; height: 28px; display: block; }

.alert {
  padding: 14px 18px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 14px;
}
.alert-success { background: #e8f7ee; color: #1f6e3e; border: 1px solid #b9e3c6; }
.alert-danger { background: #fbebeb; color: #8a2a2a; border: 1px solid #f0c1c1; }
.alert-info { background: var(--c-accent-light); color: var(--c-accent); border: 1px solid #c7dfef; }

.success-card {
  text-align: center;
  padding: 50px 30px;
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--c-border);
  max-width: 520px; margin: 40px auto;
}
.success-card .icon { font-size: 52px; color: var(--c-success); margin-bottom: 14px; }
.success-card h2 { margin: 0 0 12px; color: var(--c-heading); font-weight: 600; }
.success-card p { margin: 0 0 20px; color: var(--c-text-muted); }

.materials-list { display: grid; gap: 10px; margin-top: 14px; }
.material-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; background: #fff;
  border: 1px solid var(--c-border); border-radius: 8px;
}
.material-item .meta { display: flex; flex-direction: column; }
.material-item .title { font-weight: 600; font-size: 14px; }
.material-item .sub { color: var(--c-text-muted); font-size: 12px; }
.material-item .ext { text-transform: uppercase; font-size: 11px; color: var(--c-accent); font-weight: 700; background: var(--c-accent-light); padding: 3px 8px; border-radius: 4px; }

/* Materials grouped by section — accordion (Ottobock product page style) */
.materials-grouped { display: flex; flex-direction: column; }
.materials-section { border-top: 1px solid var(--c-border); }
.materials-grouped > .materials-section:last-child { border-bottom: 1px solid var(--c-border); }
.materials-section[open] { background: #fafafa; }
.materials-summary {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 18px 4px;
  cursor: pointer;
  list-style: none;
  font-size: 17px;
  font-weight: 600;
  color: var(--c-heading);
  user-select: none;
}
.materials-summary::-webkit-details-marker { display: none; }
.materials-summary::after {
  content: '';
  width: 12px; height: 12px;
  border-right: 2px solid var(--c-heading);
  border-bottom: 2px solid var(--c-heading);
  transform: rotate(45deg);
  transition: transform .2s ease;
  flex-shrink: 0;
  margin-right: 6px;
}
.materials-section[open] > .materials-summary::after {
  transform: rotate(-135deg);
}
.materials-summary:hover { color: var(--c-primary); }
.materials-summary .count {
  font-weight: 400;
  color: var(--c-text-muted);
  font-size: 14px;
  margin-left: 8px;
}
.materials-section-body {
  padding: 4px 4px 22px;
}

/* Video grid */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}
.video-card {
  display: flex; flex-direction: column;
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: all .15s;
  box-shadow: var(--shadow-sm);
}
.video-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--c-accent);
  text-decoration: none;
  color: inherit;
}
.video-thumb {
  position: relative;
  aspect-ratio: 16/9;
  background: #0d1b3d;
  overflow: hidden;
}
.video-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.video-thumb-fallback {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.5); font-size: 36px;
}
.video-play {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 56px; height: 56px;
  border-radius: 50%;
  background: rgba(0,21,122,.85);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  padding-left: 4px;
}
.video-meta { padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.video-title { font-weight: 600; font-size: 14px; color: var(--c-heading); }
.video-host { font-size: 12px; color: var(--c-text-muted); }

.loading { color: var(--c-text-muted); padding: 40px 0; text-align: center; }

/* Стоимость участия — таблица вариантов на странице мероприятия */
.tickets-table {
  border: 1px solid var(--c-border);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  margin: 8px 0 4px;
}
.tickets-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--c-border);
}
.tickets-row:last-child { border-bottom: 0; }
.tickets-name  { color: var(--c-text); }
.tickets-price { font-weight: 600; color: var(--c-heading); white-space: nowrap; }

/* Выбор билета на форме регистрации */
.form-section-title { margin: 24px 0 12px; font-size: 15px; color: var(--c-primary); }
.ticket-options { display: flex; flex-direction: column; gap: 8px; }
.ticket-option {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--c-border);
  border-radius: 8px;
  cursor: pointer;
  background: #fff;
  transition: border-color .15s, background-color .15s;
}
.ticket-option:hover { border-color: var(--c-primary); }
.ticket-option input[type="radio"] { margin: 0; }
.ticket-option .ticket-name  { flex: 1; }
.ticket-option .ticket-price { font-weight: 600; color: var(--c-heading); white-space: nowrap; }
.ticket-option:has(input[type="radio"]:checked) {
  border-color: var(--c-primary);
  background: var(--c-accent-light, #f0f4ff);
}
.field#ticket-field.has-error .ticket-options { border-color: var(--c-danger); }

@media (max-width: 820px) {
  .event-body { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .hero { padding: 70px 20px 60px; min-height: 360px; }
  .hero h1 { font-size: 28px; }
  .hero-logo { width: auto; height: auto; max-width: 230px; margin-bottom: 16px; }
  .hero p { font-size: 16px; }
  .btn-pill { padding: 12px 22px; font-size: 14px; }
  .form-wrapper { padding: 22px; }
  .event-header h1 { font-size: 24px; }
  /* «Обучение и сертификация» оставляем только на главной — иначе шапка не помещается */
  body:not(.is-home) .logo-text { display: none; }
  body:not(.is-home) .logo { gap: 0; }
  /* Соц-иконки в мобиле — над текстом (©, политика, согласие) */
  .footer-social { order: -1; width: 100%; justify-content: flex-start; }
}
