/* ЕГЭ-Центр — стили по макету */
:root {
  --brand: #514ae8;
  --brand-dark: #3f38c9;
  --brand-soft: #ecebff;
  --yellow: #efbf50;
  --yellow-soft: #fff4d6;
  --ink: #151a2d;
  --muted: #6b7285;
  --line: #e8ebf2;
  --bg-soft: #f3f6fb;
  --radius: 1.25rem;
  --radius-sm: 0.875rem;
  --shadow: 0 10px 30px rgba(21, 26, 45, 0.06);
  --font: "Manrope", "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: #fff;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  color: var(--brand-dark);
}

.container-narrow {
  max-width: 1140px;
}

/* Buttons */
.btn-brand {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--brand);
  --bs-btn-border-color: var(--brand);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--brand-dark);
  --bs-btn-hover-border-color: var(--brand-dark);
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: var(--brand-dark);
  --bs-btn-active-border-color: var(--brand-dark);
  --bs-btn-font-weight: 700;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
}

.btn-brand-outline {
  --bs-btn-color: var(--brand);
  --bs-btn-bg: transparent;
  --bs-btn-border-color: var(--brand);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--brand);
  --bs-btn-hover-border-color: var(--brand);
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: var(--brand-dark);
  --bs-btn-active-border-color: var(--brand-dark);
  --bs-btn-font-weight: 700;
  padding: 0.7rem 1.6rem;
  border-radius: 999px;
  border-width: 1.5px;
}

.btn-yellow {
  --bs-btn-color: var(--ink);
  --bs-btn-bg: var(--yellow);
  --bs-btn-border-color: var(--yellow);
  --bs-btn-hover-color: var(--ink);
  --bs-btn-hover-bg: #e5b13f;
  --bs-btn-hover-border-color: #e5b13f;
  --bs-btn-font-weight: 700;
  padding: 0.8rem 1.6rem;
  border-radius: 999px;
}

/* Header */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 1030;
}

.header-top {
  padding: 0.85rem 0 0.35rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  font-weight: 800;
  font-size: 0.98rem;
  line-height: 1.25;
}

.brand:hover {
  color: var(--ink);
}

.brand-mark {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.brand span {
  max-width: 210px;
}

.header-contacts {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.header-phone {
  color: var(--ink);
  font-weight: 800;
  font-size: 1.05rem;
  white-space: nowrap;
}

.header-phone:hover {
  color: var(--brand);
}

.header-hours {
  color: var(--muted);
  font-size: 0.875rem;
  white-space: nowrap;
}

.nav-main {
  padding: 0.35rem 0 0.85rem;
  gap: 0.15rem 1.15rem;
}

.nav-main .nav-link {
  color: var(--ink);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.35rem 0;
}

.nav-main .nav-link:hover,
.nav-main .nav-link:focus {
  color: var(--brand);
}

.navbar-toggler {
  border: 0;
  padding: 0.25rem;
}

.navbar-toggler:focus {
  box-shadow: none;
}

/* Hero */
.hero {
  padding: 2.5rem 0 1.5rem;
  overflow: hidden;
}

.hero-title {
  font-size: clamp(1.75rem, 3.6vw, 2.65rem);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin-bottom: 1.1rem;
  color: var(--ink);
}

.hero-title .accent {
  color: var(--brand);
  position: relative;
  display: inline-block;
}

.hero-title .accent::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.08em;
  height: 0.22em;
  background: rgba(81, 74, 232, 0.22);
  border-radius: 2px;
  z-index: -1;
}

.hero-lead {
  color: var(--muted);
  font-size: 1rem;
  max-width: 34rem;
  margin-bottom: 1.6rem;
}

.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-visual img {
  width: min(100%, 560px);
  margin-inline: auto;
  object-fit: contain;
  border-radius: 0 0 0 2rem;
}

/* Stats */
.stats {
  padding: 1.5rem 0 2.75rem;
}

.stat-item {
  padding: 0.75rem 0.5rem;
}

.stat-value {
  color: var(--brand);
  font-weight: 800;
  font-size: clamp(1.5rem, 2.4vw, 1.9rem);
  line-height: 1.1;
  margin-bottom: 0.35rem;
}

.stat-label {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
  max-width: 11rem;
}

/* Sections */
.section {
  padding: 4rem 0;
}

.section-soft {
  background: var(--bg-soft);
}

.section-title {
  font-size: clamp(1.6rem, 2.8vw, 2.15rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
  color: var(--ink);
}

.section-lead {
  color: var(--muted);
  max-width: 40rem;
  margin-bottom: 2rem;
}

/* Program cards */
.program-card {
  height: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.35rem 1.25rem;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.program-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.program-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--yellow-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.program-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--ink);
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.program-card h3 {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 0.55rem;
}

.program-card p {
  color: var(--muted);
  font-size: 0.94rem;
  margin-bottom: 1.1rem;
}

.program-link {
  font-weight: 700;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

/* Atmosphere */
.feature-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
}

.feature-list li {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  margin-bottom: 0.95rem;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.98rem;
}

.check-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.check-icon svg {
  width: 14px;
  height: 14px;
}

.atmosphere-photo {
  border-radius: 1.5rem;
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
  box-shadow: var(--shadow);
}

/* Teachers */
.teacher-card {
  height: 100%;
  text-align: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem 1.25rem 1.5rem;
}

.teacher-photo-wrap {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 1.1rem;
}

.teacher-photo-wrap::after {
  content: "";
  position: absolute;
  right: -6px;
  bottom: -4px;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: var(--yellow-soft);
  z-index: 0;
}

.teacher-photo {
  position: relative;
  z-index: 1;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center center;
  background: #eef1f6;
}

.teacher-card h3 {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
}

.teacher-subject {
  color: var(--brand);
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 0.65rem;
}

.teacher-card p {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
}

/* Trial CTA */
.trial-cta {
  background: var(--brand);
  color: #fff;
  border-radius: 1.75rem;
  padding: 2.5rem 2rem;
  position: relative;
  overflow: hidden;
}

.trial-cta::before,
.trial-cta::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.trial-cta::before {
  width: 280px;
  height: 280px;
  right: -40px;
  top: -80px;
}

.trial-cta::after {
  width: 180px;
  height: 180px;
  right: 120px;
  bottom: -70px;
}

.trial-cta h2 {
  font-weight: 800;
  font-size: clamp(1.45rem, 2.5vw, 1.9rem);
  margin-bottom: 0.75rem;
}

.trial-cta p {
  opacity: 0.92;
  max-width: 34rem;
  margin-bottom: 1.4rem;
}

.trial-icon {
  width: 140px;
  height: 140px;
  margin-left: auto;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.trial-icon svg {
  width: 72px;
  height: 72px;
  stroke: #fff;
  fill: none;
  stroke-width: 1.5;
}

/* Reviews */
.review-card {
  height: 100%;
  background: #fff;
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid transparent;
}

.stars {
  color: var(--yellow);
  letter-spacing: 0.08em;
  font-size: 1.05rem;
  margin-bottom: 0.85rem;
}

.review-card p {
  color: var(--ink);
  font-size: 0.95rem;
  margin-bottom: 1.15rem;
}

.review-author {
  font-weight: 800;
  margin-bottom: 0.1rem;
}

.review-role {
  color: var(--muted);
  font-size: 0.86rem;
}

/* Contacts */
.contact-card,
.campuses-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.4rem 1.35rem;
  border: 1px solid var(--line);
  height: 100%;
}

.contact-card h3,
.campuses-card h3 {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.contact-row {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 0.85rem;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
}

.contact-row svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 0.15rem;
  stroke: var(--brand);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.campus-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.campus-list li {
  position: relative;
  padding-left: 1rem;
  margin-bottom: 0.55rem;
  font-size: 0.92rem;
  color: var(--ink);
}

.campus-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--yellow);
}

.map-wrap {
  border-radius: 1.5rem;
  overflow: hidden;
  height: 100%;
  min-height: 360px;
  border: 1px solid var(--line);
}

.map-wrap iframe {
  width: 100%;
  height: 100%;
  min-height: 360px;
  border: 0;
}

/* Gallery + enroll */
.gallery-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 1.25rem;
}

.enroll {
  text-align: center;
  padding-top: 1rem;
}

.enroll .section-lead {
  margin-inline: auto;
}

/* Footer */
.site-footer {
  padding: 3rem 0 1.5rem;
  border-top: 1px solid var(--line);
  background: #fff;
}

.footer-about {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0.85rem 0 1rem;
  max-width: 18rem;
}

.footer-phone {
  color: var(--ink);
  font-weight: 800;
  font-size: 1.15rem;
}

.footer-phone:hover {
  color: var(--brand);
}

.footer-col-title {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  color: var(--ink);
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links a {
  color: var(--muted);
  font-size: 0.92rem;
  display: inline-block;
  margin-bottom: 0.55rem;
}

.footer-links a:hover {
  color: var(--brand);
}

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.86rem;
}

.footer-bottom a {
  color: var(--muted);
}

.footer-bottom a:hover {
  color: var(--brand);
}

/* Cookie banner */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1040;
  padding: 1.1rem 0 calc(1.1rem + env(safe-area-inset-bottom));
  background: #fff;
  border-top: 1px solid var(--line);
  box-shadow: 0 -16px 40px rgba(21, 26, 45, 0.12);
  transform: translateY(110%);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.35s ease, opacity 0.35s ease, visibility 0.35s;
}

.cookie-banner.is-visible {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.cookie-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.cookie-banner-text {
  margin: 0;
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.5;
  max-width: 42rem;
}

.cookie-banner-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem 1rem;
  flex-shrink: 0;
}

.cookie-banner-actions .btn {
  padding: 0.55rem 1.4rem;
  font-size: 0.92rem;
}

.cookie-banner-link {
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cookie-settings-modal {
  border: 0;
  border-radius: var(--radius);
}

.cookie-settings-modal .modal-header,
.cookie-settings-modal .modal-footer {
  border-color: var(--line);
}

.cookie-settings-modal .modal-title {
  font-size: 1.2rem;
  font-weight: 800;
}

.settings-section {
  margin-bottom: 1.5rem;
}

.settings-section:last-child {
  margin-bottom: 0.25rem;
}

.settings-section-title {
  font-size: 1rem;
  font-weight: 800;
  margin: 0 0 0.75rem;
}

.current-settings-display {
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem;
  font-size: 0.92rem;
  line-height: 1.55;
}

.current-settings-display p {
  margin: 0 0 0.45rem;
}

.current-settings-display p:last-child {
  margin-bottom: 0;
}

.cookie-status {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-left: 0.25rem;
}

.cookie-status.active {
  background: #d4edda;
  color: #155724;
}

.cookie-status.inactive {
  background: #f8d7da;
  color: #721c24;
}

.cookie-status.mandatory {
  background: #d1ecf1;
  color: #0c5460;
}

.cookie-option {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--line);
  margin: 0;
}

.cookie-option-text label {
  margin: 0;
  cursor: pointer;
}

.cookie-option:last-of-type {
  padding-bottom: 0.15rem;
}

.cookie-option-text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.cookie-option-text strong {
  font-weight: 800;
}

.cookie-option-text small {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.cookie-option .form-check-input {
  width: 1.2rem;
  height: 1.2rem;
  margin-top: 0.2rem;
  flex-shrink: 0;
  cursor: pointer;
  border-color: #c5cad6;
}

.cookie-option .form-check-input:checked {
  background-color: var(--brand);
  border-color: var(--brand);
}

.cookie-option .form-check-input:disabled {
  opacity: 1;
  background-color: var(--brand);
  border-color: var(--brand);
  cursor: not-allowed;
}

.cookie-settings-footer {
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.cookie-settings-footer .btn {
  padding: 0.5rem 1.2rem;
}

/* Responsive */
@media (max-width: 991.98px) {
  .header-contacts {
    width: 100%;
    justify-content: flex-start;
    margin-top: 0.75rem;
  }

  .nav-main {
    padding-top: 0.5rem;
  }

  .nav-main .nav-link {
    padding: 0.45rem 0;
  }

  .trial-icon {
    margin: 1.5rem auto 0;
  }

  .map-wrap,
  .map-wrap iframe {
    min-height: 300px;
  }

  .cookie-banner-inner {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 575.98px) {
  .section {
    padding: 3rem 0;
  }

  .trial-cta {
    padding: 1.75rem 1.25rem;
    border-radius: 1.25rem;
  }

  .gallery-img {
    height: 200px;
  }

  .stat-item {
    text-align: center;
  }

  .stat-label {
    max-width: none;
    margin-inline: auto;
  }

  .cookie-banner-link {
    width: 100%;
  }
}
