/* plus-dialog.ru — site CSS (lean, modern) */
:root {
  --brand: #cc2676;
  --brand-dark: #8a1950;
  --accent: #5c6294;
  --accent-light: #dbddff;
  --bg: #f4f5ff;
  --bg-soft: #fafbff;
  --text: #181818;
  --text-soft: #545454;
  --border: #e6e6e6;
  --success: #32d296;
  --warn: #faa05a;
  --radius: 14px;
  --shadow: 0 6px 20px rgba(26, 32, 80, 0.06);
  --shadow-hover: 0 12px 30px rgba(26, 32, 80, 0.12);
  --maxw: 1200px;
}

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

html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PT Sans", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

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

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

h1, h2, h3, h4 { font-weight: 700; line-height: 1.25; margin: 0 0 0.6em; color: var(--text); }
h1 { font-size: clamp(1.75rem, 3vw, 2.4rem); }
h2 { font-size: clamp(1.4rem, 2.2vw, 1.9rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.row { display: grid; gap: 24px; }

/* === Header === */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 24px;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text);
}
.brand:hover { text-decoration: none; color: var(--brand); }
.brand img { height: 44px; width: auto; }
.brand small { display: block; font-size: 0.75rem; font-weight: 500; color: var(--text-soft); }

.header-contacts {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.header-contacts a {
  color: var(--text);
  font-weight: 600;
  font-size: 1.05rem;
}
.header-contacts a:hover { color: var(--brand); }

.primary-nav {
  background: var(--bg);
  border-top: 1px solid var(--border);
}
.primary-nav ul {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 4px;
}
.primary-nav a {
  display: inline-block;
  padding: 14px 18px;
  color: var(--text);
  font-weight: 500;
}
.primary-nav a:hover,
.primary-nav a.active {
  color: var(--brand);
  text-decoration: none;
  background: #fff;
}

/* === Buttons === */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.2s, background 0.2s;
  text-align: center;
  font-size: 1rem;
  line-height: 1.3;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); color: #fff; text-decoration: none; box-shadow: var(--shadow-hover); }
.btn-outline { background: transparent; color: var(--brand); border-color: var(--brand); }
.btn-outline:hover { background: var(--brand); color: #fff; text-decoration: none; }
.btn-ghost { background: rgba(255,255,255,0.9); color: var(--text); border-color: transparent; }
.btn-lg { padding: 14px 30px; font-size: 1.1rem; }

/* === Hero / Slider === */
.hero {
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--accent) 0%, var(--brand) 100%);
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.28);
  pointer-events: none;
  z-index: 1;
}
.hero .container { position: relative; z-index: 2; padding: 60px 20px; }
.hero h1 { color: #fff; font-size: clamp(1.9rem, 3.4vw, 2.8rem); max-width: 720px; }
.hero p.lead { font-size: 1.2rem; max-width: 640px; margin-bottom: 1.5em; opacity: 0.95; }

.swiper { width: 100%; }

/* === Home hero slider (scoped to .hero-swiper) === */
.hero-slider-section {
  position: relative;
  margin: 0;
  padding: 0;
}
.hero-swiper {
  position: relative;
  width: 100%;
  min-height: 500px;
  height: 62vh;
  max-height: 640px;
  overflow: hidden;
  background: #1a1a2e;
}
.hero-swiper .swiper-wrapper,
.hero-swiper .swiper-slide { height: auto; }
.hero-slide {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 500px;
  height: 62vh;
  max-height: 640px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #fff;
}
.hero-slide-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 18, 40, 0.72) 0%, rgba(15, 18, 40, 0.45) 55%, rgba(15, 18, 40, 0.25) 100%),
    linear-gradient(180deg, rgba(10, 12, 30, 0.15) 0%, rgba(10, 12, 30, 0.55) 100%);
  z-index: 1;
  pointer-events: none;
}
.hero-slide-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 70px 20px;
}
.hero-slide-copy {
  max-width: 720px;
  color: #fff;
}
.hero-slide-title {
  color: #fff;
  font-weight: 800;
  font-size: clamp(1.75rem, 3.4vw, 2.85rem);
  line-height: 1.15;
  margin: 0 0 18px;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
}
.hero-slide-sub {
  color: rgba(255, 255, 255, 0.95);
  font-size: clamp(1rem, 1.3vw, 1.2rem);
  line-height: 1.55;
  margin: 0 0 28px;
  max-width: 640px;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35);
}
.hero-slide-cta {
  display: inline-block;
  padding: 14px 32px;
  font-size: 1.05rem;
  font-weight: 600;
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}

/* Pagination */
.hero-swiper .swiper-pagination.hero-swiper-pagination {
  bottom: 22px;
  z-index: 3;
}
.hero-swiper .swiper-pagination-bullet {
  width: 10px;
  height: 10px;
  background: rgba(255, 255, 255, 0.55);
  opacity: 1;
  margin: 0 5px !important;
  transition: transform 0.2s, background 0.2s, width 0.2s;
}
.hero-swiper .swiper-pagination-bullet-active {
  background: #fff !important;
  width: 28px;
  border-radius: 5px;
}

/* Nav arrows */
.hero-swiper .hero-swiper-nav {
  width: 44px;
  height: 44px;
  margin-top: -22px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 50%;
  color: #fff;
  transition: background 0.2s, transform 0.15s;
  z-index: 3;
  cursor: pointer;
  padding: 0;
}
.hero-swiper .hero-swiper-nav:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}
.hero-swiper .hero-swiper-nav::after {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}
.hero-swiper .swiper-button-prev { left: 24px; }
.hero-swiper .swiper-button-next { right: 24px; }

@media (max-width: 900px) {
  .hero-swiper,
  .hero-slide {
    min-height: 420px;
    height: auto;
    max-height: none;
  }
  .hero-slide-inner { padding: 50px 18px 70px; }
  .hero-slide-title { font-size: clamp(1.5rem, 5vw, 2rem); }
  .hero-slide-sub { font-size: 1rem; }
  .hero-swiper .hero-swiper-nav { display: none; }
}
@media (max-width: 640px) {
  .hero-swiper,
  .hero-slide {
    min-height: 380px;
  }
}

/* === Cards / grid === */
.section {
  padding: 60px 0;
}
.section-title {
  text-align: center;
  margin-bottom: 40px;
}
.section-title h2 { margin-bottom: 8px; }
.section-title p { color: var(--text-soft); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); }

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); text-decoration: none; }
.card-media { position: relative; aspect-ratio: 16/10; overflow: hidden; background: var(--bg); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.card:hover .card-media img { transform: scale(1.04); }
.card-body { padding: 18px 20px 20px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.card-title { font-size: 1.15rem; font-weight: 700; color: var(--text); margin: 0; }
.card-meta { font-size: 0.85rem; color: var(--text-soft); display: flex; gap: 10px; flex-wrap: wrap; }
.card-excerpt { color: var(--text-soft); font-size: 0.95rem; flex: 1; }

.card-tag {
  display: inline-block;
  padding: 2px 10px;
  background: var(--bg);
  color: var(--accent);
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* === Single post / page === */
.content-page { padding: 40px 0 60px; }
.content-page .breadcrumbs {
  font-size: 0.9rem;
  color: var(--text-soft);
  margin-bottom: 18px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.content-page .breadcrumbs a { color: var(--text-soft); }
.content-page .breadcrumbs a:hover { color: var(--brand); }
.content-page .breadcrumbs .sep { opacity: 0.5; }

.post-header { margin-bottom: 26px; }
.post-header h1 { margin-bottom: 8px; }
.post-meta {
  color: var(--text-soft);
  font-size: 0.95rem;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}
.post-featured {
  max-width: 720px;
  margin: 0 auto 28px;
  border-radius: var(--radius);
  overflow: hidden;
}
.post-featured img { display: block; width: 100%; height: auto; }

.prose {
  max-width: 820px;
  font-size: 1.05rem;
  line-height: 1.7;
}
.prose img { margin: 1em 0; border-radius: 10px; }
.prose figure { margin: 1em 0; }

/* Auto-formatted media from render_post_content filter */
.prose img.post-img,
.prose video.post-video {
  display: block;
  height: auto;
  margin: 1.2em auto;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(15, 30, 55, 0.08);
}
.prose img.post-img.is-landscape,
.prose video.post-video.is-landscape { max-width: min(100%, 520px); }
.prose img.post-img.is-square,
.prose video.post-video.is-square { max-width: min(100%, 400px); }
.prose img.post-img.is-portrait,
.prose video.post-video.is-portrait { max-width: min(100%, 320px); }

.prose .post-gallery {
  display: grid;
  gap: 10px;
  margin: 1.4em 0;
}
.prose .post-gallery.cols-2 { grid-template-columns: repeat(2, 1fr); }
.prose .post-gallery.cols-3 { grid-template-columns: repeat(3, 1fr); }
.prose .post-gallery.cols-4 { grid-template-columns: repeat(4, 1fr); }
.prose .post-gallery img {
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: none;
  cursor: zoom-in;
  transition: transform 0.2s ease;
}
.prose .post-gallery img:hover { transform: scale(1.02); }
@media (max-width: 640px) {
  .prose .post-gallery,
  .prose .post-gallery.cols-3,
  .prose .post-gallery.cols-4 { grid-template-columns: repeat(2, 1fr); gap: 6px; }
}
.prose h2 { margin-top: 1.4em; }
.prose h3 { margin-top: 1.2em; }
.prose ul, .prose ol { padding-left: 1.5em; margin: 0 0 1em; }
.prose li { margin-bottom: 0.4em; }
.prose blockquote {
  margin: 1.2em 0;
  padding: 1em 1.4em;
  border-left: 4px solid var(--brand);
  background: var(--bg);
  border-radius: 8px;
  color: var(--text-soft);
}
.prose a { border-bottom: 1px dotted var(--brand); }
.prose table { width: 100%; border-collapse: collapse; margin: 1em 0; }
.prose th, .prose td { padding: 10px 12px; border: 1px solid var(--border); text-align: left; }
.prose th { background: var(--bg); font-weight: 600; }

/* === Page layout with left sidebar === */
.page-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}
.page-main { min-width: 0; }
.page-main iframe,
.page-main .prose iframe { max-width: 100%; }
.page-sidebar { position: sticky; top: 100px; }

.page-sidebar-box {
  background: #fff;
  border-radius: 12px;
  border-left: 4px solid #b7f0e6;
  box-shadow: var(--shadow);
  padding: 18px 14px;
  margin-bottom: 24px;
}
.page-sidebar-box h3 {
  font-size: 1.05rem;
  color: var(--text);
  margin: 0 0 12px;
  padding-left: 6px;
}
.page-sidebar-box ul { list-style: none; margin: 0; padding: 0; }
.page-sidebar-box li { margin: 0; }
.page-sidebar-box a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.3;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.page-sidebar-box a:hover {
  background: var(--bg);
  color: var(--brand);
  text-decoration: none;
}
.page-sidebar-box a.active {
  background: linear-gradient(90deg, var(--brand), var(--brand-dark));
  color: #fff;
  box-shadow: 0 4px 12px rgba(204, 38, 118, 0.25);
}
.page-sidebar-box a.active:hover { color: #fff; }
.page-sidebar-box .sidebar-icon {
  width: 28px; height: 28px; flex: 0 0 28px;
  object-fit: contain; display: block;
}
.page-sidebar-box .sidebar-flag {
  width: 26px; height: 18px; flex: 0 0 26px;
  object-fit: cover; border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.08);
  display: block;
}

/* Prose tweaks inside the two-col layout */
.page-main .prose { max-width: none; }
.page-main .prose h2 {
  color: var(--brand);
  text-transform: uppercase;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  margin-top: 1.8em;
  margin-bottom: 0.8em;
}
.page-main .prose h3 {
  color: var(--brand-dark);
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.page-main .prose ul { list-style: none; padding-left: 0; }
.page-main .prose ul > li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 0.4em;
}
.page-main .prose ul > li::before {
  content: "›";
  color: var(--brand);
  font-weight: 700;
  position: absolute;
  left: 2px;
  top: -2px;
  font-size: 1.15rem;
  line-height: 1.4;
}
.page-main .prose ol { padding-left: 1.5em; }

@media (max-width: 900px) {
  .page-layout { grid-template-columns: 1fr; gap: 24px; }
  .page-sidebar { position: static; order: 2; }
}

/* === Reviews === */
.reviews-block { background: var(--bg); padding: 60px 0; }
.review-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.reviews-masonry {
  column-count: 3;
  column-gap: 24px;
}
.reviews-masonry > .review-card {
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
  display: block;
  margin: 0 0 24px;
  width: 100%;
}
@media (max-width: 960px) {
  .reviews-masonry { column-count: 2; }
}
@media (max-width: 640px) {
  .reviews-masonry { column-count: 1; }
}
.review-card .author {
  font-weight: 700;
  margin-top: 14px;
}
.review-card .review-role {
  font-size: 0.9rem;
  color: var(--text-soft);
}
.stars { color: #FFD93D; letter-spacing: 2px; }

/* === Teachers === */
.teacher-card .card-media { aspect-ratio: 3/4; }
.teacher-role {
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 600;
}

/* === Pagination === */
.pagination {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin: 40px 0;
  flex-wrap: wrap;
}
.pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 500;
}
.pagination .current {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}
.pagination a:hover { background: var(--bg); text-decoration: none; }
.pagination .ellipsis {
  border: none;
  min-width: 20px;
  padding: 0 4px;
  color: var(--text-soft);
}

/* === Footer === */
.site-footer {
  background: #1a1a2e;
  color: #bbb;
  padding: 50px 0 20px;
  margin-top: 60px;
}
.site-footer .container { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 30px; }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 14px; }
.site-footer a { color: #ccc; }
.site-footer a:hover { color: var(--brand); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.footer-copy {
  text-align: center;
  padding-top: 26px;
  margin-top: 30px;
  border-top: 1px solid #2b2b40;
  font-size: 0.85rem;
  color: #666;
}

/* === Contact form === */
.form-card {
  background: #fff;
  padding: 26px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.form-field { margin-bottom: 16px; }
.form-field label { display: block; font-weight: 500; margin-bottom: 6px; font-size: 0.95rem; }
.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
  transition: border-color 0.15s;
}
.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(204, 38, 118, 0.15); }
.form-field select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='none' stroke='%23666' stroke-width='1.6' d='M1 1l5 5 5-5'/></svg>"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; cursor: pointer; }
.form-field textarea { min-height: 100px; resize: vertical; }
.form-msg { padding: 12px 14px; border-radius: 10px; margin-bottom: 14px; }
.form-msg.ok { background: rgba(50, 210, 150, 0.1); color: #1a7048; border: 1px solid rgba(50, 210, 150, 0.3); }
.form-msg.err { background: rgba(204, 38, 118, 0.08); color: var(--brand-dark); border: 1px solid rgba(204, 38, 118, 0.2); }

/* === Util === */
.muted { color: var(--text-soft); }
.text-center { text-align: center; }
.mb-0 { margin-bottom: 0 !important; }
.mt-lg { margin-top: 40px; }
.hidden { display: none !important; }

/* === Mobile === */
.mobile-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 1.3rem;
}
@media (max-width: 768px) {
  .header-contacts { display: none; }
  .mobile-toggle { display: inline-block; }
  .primary-nav ul { flex-direction: column; display: none; }
  .primary-nav.open ul { display: flex; }
  .primary-nav a { padding: 12px 20px; border-top: 1px solid var(--border); }
}

/* === Review form: star rating === */
.stars-input {
  display: inline-flex;
  flex-direction: row-reverse;
  gap: 4px;
}
.stars-input .star-label {
  cursor: pointer;
  font-size: 2rem;
  line-height: 1;
  color: #d8d8e0;
  transition: color 0.12s;
  user-select: none;
}
.stars-input .star-label input {
  position: absolute;
  opacity: 0;
  width: 0; height: 0;
  pointer-events: none;
}
.stars-input .star-label:hover,
.stars-input .star-label:hover ~ .star-label,
.stars-input .star-label input:checked ~ .star-ico,
.stars-input .star-label:has(input:checked),
.stars-input .star-label:has(input:checked) ~ .star-label {
  color: #FFB400;
}
.stars-input .star-label input:focus-visible + .star-ico {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

/* === Thank-you banner (floating) === */
.thankyou-banner-floating {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translate(-50%, -40px);
  z-index: 2000;
  max-width: 420px;
  box-shadow: var(--shadow-hover);
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
}
.thankyou-banner-floating.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* === UIkit modal polish for our lead/review modals === */
#modal-signup-courses-form .uk-modal-dialog,
#modal-leave-review .uk-modal-dialog {
  border-radius: var(--radius);
}
#modal-signup-courses-form .form-card,
#modal-leave-review .form-card {
  padding: 0;
  border: none;
  box-shadow: none;
  background: transparent;
}
