/* CMV Dialog 2026 — подключать после базовых стилей */
@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap");
@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.13.2/font/bootstrap-icons.min.css");

:root {
  --cmv-navy: #073d82;
  --cmv-blue: #007acb;
  --cmv-light: #e6f5fd;
  --cmv-text: #143451;
  --cmv-muted: #526d83;
  --cmv-border: #cee4f3;
  --cmv-orange: #ffad00;
  --cmv-red: #c73520;
  --cmv-shadow: 0 12px 40px rgba(7, 61, 130, 0.09);
  --cmv-width: 1160px;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}
body {
  margin: 0;
  font-family: "Manrope", Arial, sans-serif;
  color: var(--cmv-text);
  background: #f3f9fd;
  line-height: 1.6;
}
body > main {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}
[hidden] {
  display: none !important;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
a {
  color: var(--cmv-blue);
}
:focus-visible {
  outline: 3px solid #158ad5;
  outline-offset: 4px;
}

/* Menu — сохраняем штатную логику drawer */
header.site-header.event-menu {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 18px clamp(18px, 4vw, 64px);
  color: var(--cmv-navy);
  background: #fff;
  border-bottom: 1px solid var(--cmv-border);
  transition:
    padding 0.25s ease,
    background-color 0.25s ease,
    box-shadow 0.25s ease;
  z-index: 1000;
}
header.site-header.scrolled {
  padding-top: 10px;
  padding-bottom: 10px;
  background: #fff;
  box-shadow: 0 6px 24px #073d821a;
}
.site-header .brand {
  color: var(--cmv-navy);
  text-decoration: none;
}
.site-header .brand-title {
  font-weight: 800;
  font-size: clamp(14px, 1.35vw, 19px);
  line-height: 1.25;
}
.site-header .section-navigation a {
  color: var(--cmv-navy);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  transition: color 0.2s;
}
.site-header .section-navigation a:hover {
  color: var(--cmv-blue);
}
.site-header .menu-toggle {
  color: var(--cmv-navy);
  background: var(--cmv-light);
  border: 1px solid var(--cmv-border);
  border-radius: 10px;
}
.site-header .menu-icon i {
  background: var(--cmv-navy);
}
.site-header .menu-panel {
  color: var(--cmv-navy);
}

/* Hero — исходная композиция приглашения */
main > section#hero {
  position: relative;
  isolation: isolate;
  width: 100%;
  max-width: none;
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  height: auto;
  padding: clamp(50px, 9vh, 110px) 17% 15vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 18px;
  text-align: center;
  background: #bce9fc url("../Upload/76bb579639944ac49fec9560dfb198d3.png")
    center center / cover no-repeat;
  color: var(--cmv-navy);
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
#hero::before,
#hero::after {
  content: none;
}
#hero > * {
  position: relative;
  z-index: 1;
  max-width: 100%;
}
#hero .section-title {
  margin: 0;
  padding: 0;
  width: auto;
}
#hero .section-title h1 {
  display: inline-block;
  margin: 0;
  padding: 12px 28px;
  background: linear-gradient(110deg, #b82a17, #d74c28);
  border-radius: 100px;
  color: white;
  font-size: clamp(16px, 2.05vw, 29px);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  line-height: 1.25;
  box-shadow: 0 5px 18px #9d301426;
}
#hero .subtitle {
  width: 100%;
  max-width: 960px;
  margin: 5px auto 0;
  color: #092d59;
  font-weight: 800;
  font-size: clamp(24px, 3vw, 47px);
  line-height: 1.22;
  letter-spacing: -0.025em;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
#hero .event-meta {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 0;
}
#hero .event-meta span {
  color: var(--cmv-navy);
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 100px;
  background: #ffffffb8;
}
#hero .event-meta span + span {
  display: none;
} /* повторяющееся «Онлайн» */
#hero .event-meta span:first-child::before {
  font-family: bootstrap-icons;
  content: "\f4f3";
  margin-right: 0.45em;
}
#hero .event-days {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}
#hero .event-days li {
  margin: 0;
  padding: 9px 24px;
  color: white;
  background: var(--cmv-navy);
  border: none;
  border-radius: 100px;
  font-size: clamp(17px, 2vw, 25px);
  font-weight: 800;
}
#hero .event-days li::before {
  font-family: bootstrap-icons;
  content: "\f1f6";
  margin-right: 0.5em;
  font-weight: 400;
}
#hero .hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 8px 0 0;
  padding: 0;
}

/* Buttons */
body .button,
#submitRegistration,
#submitLogin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 13px 26px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: linear-gradient(135deg, #007acb, #0751a3);
  color: white;
  text-decoration: none;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 6px 18px #0751a326;
  transition:
    transform 0.2s,
    box-shadow 0.2s,
    background-color 0.2s;
}
#hero .hero-actions a[href="#registration"],
#submitRegistration {
  background: linear-gradient(135deg, #d64827, #b62a18);
  color: white;
  box-shadow: 0 7px 20px #b62a182e;
}
body .button:hover,
#submitRegistration:hover,
#submitLogin:hover {
  transform: translateY(-2px);
  box-shadow: 0 9px 24px #073d8233;
  color: white;
}
body .button:disabled,
#submitRegistration:disabled,
#submitLogin:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}
#hero .hero-actions a[href="#registration"]::before,
#submitRegistration::before {
  font-family: bootstrap-icons;
  content: "\f4d1";
  font-weight: 400;
}

/* Content sections */
main > section:not(#hero) {
  width: min(calc(100% - 40px), var(--cmv-width));
  max-width: var(--cmv-width);
  margin: 36px auto;
  padding: clamp(24px, 4vw, 52px);
  background: white;
  border: 1px solid var(--cmv-border);
  border-radius: 22px;
  box-shadow: var(--cmv-shadow);
}
main > section:not(#hero) .section-title {
  text-align: center;
  margin: 0 auto 30px;
}
main > section:not(#hero) .section-title h2 {
  font-size: clamp(26px, 3vw, 40px);
  color: var(--cmv-navy);
  font-weight: 800;
  line-height: 1.2;
  margin: 5px 0 0;
}
main > section:not(#hero) .section-title .eyebrow {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #0066ad;
  margin: 0;
}
main > section:not(#hero) .section-title::after {
  content: "";
  display: block;
  width: 64px;
  height: 4px;
  border-radius: 4px;
  background: var(--cmv-orange);
  margin: 16px auto 0;
}

/* Programme */
#program .program-day > h3 {
  color: var(--cmv-navy);
  font-size: 23px;
  margin: 0 0 16px;
}
#program .program-hall {
  padding: clamp(16px, 3vw, 28px);
  border: 1px solid var(--cmv-border);
  border-radius: 14px;
  background: #f3f9fd;
}
#program .program-hall > h4 {
  margin: 0 0 12px;
  color: var(--cmv-navy);
  font-weight: 800;
}
#program .program-tabs button {
  border: 1px solid var(--cmv-border);
  border-radius: 10px;
  padding: 10px 20px;
  color: var(--cmv-navy);
  background: #f3f9fd;
  cursor: pointer;
}
#program .program-tabs button[aria-selected="true"] {
  background: var(--cmv-navy);
  color: white;
}

/* Registration */
#registrationStatus {
  text-align: center;
  color: var(--cmv-muted);
  margin: 0 auto 18px;
}
#publicRegistrationForm {
  max-width: 920px;
  margin: 24px auto 0;
}
#registrationControls {
  min-width: 0;
  border: 0;
  padding: 0;
  margin: 0;
}
#registrationControls .registration-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 22px;
}
#registration .rf-field {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
#registration .rf-divider {
  grid-column: 1 / -1;
}
#registration .rf-divider hr {
  border: 0;
  border-top: 1px solid var(--cmv-border);
  margin: 2px 0;
}
#registration label {
  font-size: 14px;
  color: var(--cmv-navy);
  font-weight: 700;
}
#registration .conf-required {
  color: var(--cmv-red);
}
#registration
  input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
#registration select,
#registration textarea {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 11px 14px;
  background: #f7fbfe;
  color: var(--cmv-text);
  border: 1px solid #bdd6e7;
  border-radius: 10px;
  outline: none;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
#registration input:focus,
#registration select:focus,
#registration textarea:focus {
  border-color: var(--cmv-blue);
  box-shadow: 0 0 0 3px #007acb20;
}
#registration input[type="checkbox"],
#registration input[type="radio"] {
  accent-color: var(--cmv-blue);
}
#submitRegistration {
  display: flex;
  margin: 28px auto 0;
  min-width: min(100%, 280px);
}
#openLogin,
#logoutRegistration,
#retryStatus,
#closeLogin {
  color: var(--cmv-navy);
  background: white;
  border: 1px solid #9cc9e5;
  border-radius: 10px;
  padding: 11px 18px;
  font-weight: 700;
  cursor: pointer;
}
#openLogin:not([hidden]),
#logoutRegistration:not([hidden]),
#retryStatus:not([hidden]) {
  display: block;
  margin: 12px auto;
}
#registrationErrors:not([hidden]),
#loginError:not([hidden]) {
  color: #9f2016;
  background: #fff2ef;
  border: 1px solid #f2c6bd;
  border-radius: 10px;
  padding: 12px 16px;
  margin: 12px 0;
}
#registrationLogin {
  width: min(460px, calc(100% - 32px));
  max-height: 90vh;
  overflow: auto;
  padding: 28px;
  border: 1px solid var(--cmv-border);
  border-radius: 20px;
  background: white;
  color: var(--cmv-text);
  box-shadow: 0 20px 80px #073d8240;
}
#registrationLogin::backdrop {
  background: #092c58a6;
  backdrop-filter: blur(4px);
}
#registrationLogin h2 {
  color: var(--cmv-navy);
  margin-top: 0;
}
#registrationLoginForm {
  display: grid;
  gap: 10px;
}
#registrationLogin .login-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

/* Venue */
#venue .venue-location {
  text-align: center;
  padding: 25px;
  background: var(--cmv-light);
  border: 1px solid var(--cmv-border);
  border-radius: 16px;
}
#venue .venue-address {
  color: var(--cmv-navy);
  font-size: 23px;
  font-weight: 800;
  margin: 0;
}
#venue .venue-address::before {
  font-family: bootstrap-icons;
  content: "\f4f3";
  margin-right: 0.5em;
  font-weight: 400;
}

/* Footer and loader */
body > footer#footer {
  width: 100%;
  max-width: none;
  margin: 48px 0 0;
  padding: 30px 20px;
  border-radius: 0;
  border: 0;
  border-top: 4px solid var(--cmv-orange);
  text-align: center;
  background: linear-gradient(120deg, #073d82, #0065b4);
  color: white;
  font-weight: 600;
}
#footer a {
  color: white;
}
#eventLoader {
  background: #e6f5fd;
  color: var(--cmv-navy);
}
#eventLoader .loader-symbol i {
  background-color: var(--cmv-blue);
  border-color: var(--cmv-blue);
}
#eventLoader .loader-symbol i:nth-child(2) {
  background-color: var(--cmv-navy);
}
#eventLoader .loader-symbol i:nth-child(3) {
  background-color: var(--cmv-orange);
}

/* Mobile portrait — отдельная подложка 9:16 */
@media (max-width: 767px) {
  html {
    scroll-padding-top: 75px;
  }
  header.site-header.event-menu {
    padding: 12px 16px;
  }
  header.site-header.scrolled {
    padding-top: 8px;
    padding-bottom: 8px;
  }
  .site-header .menu-panel {
    background-color: white;
  }
  main > section#hero {
    min-height: 100vh;
    min-height: 100svh;
    padding: clamp(30px, 7vh, 65px) 16px 38vh;
    gap: 12px;
    background-image: url("../Upload/6f2b5819ac0e4781b0c460c71d57bd4f.png");
    background-size: cover;
    background-position: center bottom;
  }
  #hero .section-title h1 {
    font-size: clamp(12px, 3.6vw, 19px);
    padding: 10px 16px;
  }
  #hero .subtitle {
    width: 100%;
    font-size: clamp(21px, 5.5vw, 30px);
    line-height: 1.25;
    padding: 12px 9px;
    margin: 0;
    border-radius: 15px;
    background: #eff9ffb8;
    text-shadow: 0 1px 1px #ffffff80;
  }
  #hero .event-days li {
    font-size: 16px;
    padding: 8px 15px;
  }
  #hero .event-meta span {
    font-size: 13px;
    padding: 4px 12px;
  }
  #hero .hero-actions {
    margin-top: 2px;
    width: 100%;
  }
  #hero .hero-actions .button {
    font-size: 15px;
    padding: 11px 20px;
  }
  main > section:not(#hero) {
    width: calc(100% - 24px);
    margin: 20px auto;
    padding: 24px 16px;
    border-radius: 16px;
  }
  #registrationControls .registration-fields {
    grid-template-columns: minmax(0, 1fr);
    gap: 15px;
  }
  #registration input:not([type="checkbox"]):not([type="radio"]),
  #registration select {
    font-size: 16px;
  }
  #submitRegistration {
    width: 100%;
  }
  body > footer#footer {
    margin-top: 24px;
  }
}
@media (max-width: 767px) and (max-height: 680px) {
  main > section#hero {
    padding-top: 24px;
    padding-bottom: 32vh;
  }
  #hero .subtitle {
    font-size: clamp(19px, 5vw, 25px);
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  header.site-header.event-menu,
  body .button {
    transition: none;
  }
}
