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

:root {
  --blue-900: #0f2b6b;
  --blue-700: #1a3fa0;
  --blue-600: #1a56db;
  --blue-500: #2563eb;
  --blue-400: #4a90e2;
  --blue-100: #dbeafe;
  --blue-50: #eff6ff;
  --gold: #d4a843;
  --white: #ffffff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-600: #4b5563;
  --gray-800: #1f2937;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Montserrat', Arial, sans-serif;
  color: var(--gray-800);
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

.section-title {
  text-align: center;
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 800;
  margin-bottom: 48px;
  color: var(--gray-800);
  letter-spacing: 0.02em;
}

.section-title span {
  color: var(--blue-600);
}

.section-title--light {
  color: var(--white);
}

.section-title--light span {
  color: var(--blue-100);
}

/* ========== HERO ========== */
.hero {
  line-height: 0;
}

.hero__img {
  width: 100%;
  height: auto;
  display: block;
}

/* ========== DIRECTIONS ========== */
.directions {
  padding: 80px 0;
  background: var(--blue-900);
}

.directions .section-title {
  color: var(--white);
}

.directions .section-title span {
  color: var(--blue-100);
}

.carousel__wrapper {
  position: relative;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.carousel__viewport {
  overflow: hidden;
  flex: 1;
  min-width: 0;
}

.carousel__track {
  display: flex;
  gap: 20px;
  will-change: transform;
}

.carousel__col {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.course-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.course-img:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 10px 32px rgba(26, 86, 219, 0.18);
}

.carousel__arrow {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--blue-100);
  background: var(--white);
  color: var(--blue-600);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
}

.carousel__arrow:hover {
  background: var(--blue-600);
  color: var(--white);
  border-color: var(--blue-600);
  transform: scale(1.08);
}

/* ========== FEATURED COURSES ========== */
.featured-courses {
  padding: 60px 0;
  background: var(--white);
}

.featured-courses__grid {
  display: flex;
  justify-content: center;
  gap: 24px;
}

.featured-courses__img {
  /* same height on both, width follows natural aspect ratio */
  height: clamp(400px, 50vw, 600px);
  width: auto;
  flex-shrink: 0;
  display: block;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

@media (max-width: 640px) {
  .featured-courses__grid {
    flex-direction: column;
  }

  .featured-courses__img {
    height: auto;
    width: 100%;
  }
}

/* ========== DIPLOMA + FRDO ========== */
.frdo-section {
  background: #eef2fb;
  background-image:
    radial-gradient(circle, #1a56db 1.5px, transparent 1.5px);
  background-size: 400px 400px, 22px 22px;
  background-position: top right, top right;
  background-repeat: no-repeat, repeat;
  overflow: hidden;
  position: relative;
}

/* top block */
.frdo-section__top {
  padding: 40px 0 0;
}

.frdo-section__top-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.frdo-section__heading {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  flex: 1;
  min-width: 0;
}

.frdo-section__shield {
  width: 80px;
  height: 90px;
  flex-shrink: 0;
  margin-top: 4px;
}

.frdo-section__title-wrap {
  display: flex;
  flex-direction: column;
}

.frdo-section__title {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.frdo-section__title-top {
  font-size: clamp(1.3rem, 2.4vw, 1.9rem);
  font-weight: 800;
  color: #0f2b6b;
  line-height: 1.25;
  text-transform: uppercase;
}

.frdo-section__title-accent {
  font-size: clamp(2rem, 4.5vw, 3.8rem);
  font-weight: 900;
  color: #1a3fa0;
  line-height: 1.05;
  text-transform: uppercase;
}

.frdo-section__book {
  flex: 0 0 auto;
  width: clamp(110px, 15vw, 190px);
  transform: rotate(8deg);
  transform-origin: bottom right;
  filter: drop-shadow(0 16px 32px rgba(0,0,0,0.18));
  align-self: flex-end;
  margin-bottom: -20px;
}

.frdo-section__book img {
  width: 100%;
  height: auto;
  display: block;
}

/* subtitle */
.frdo-section__subtitle {
  font-size: clamp(0.95rem, 1.6vw, 1.1rem);
  color: #2d3b55;
  line-height: 1.75;
  margin: 12px 0 0;
}

.frdo-section__subtitle strong {
  color: #1a56db;
  font-weight: 700;
}

/* divider */
.frdo-section__divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.frdo-section__divider-line {
  flex: 1;
  height: 2px;
  background: linear-gradient(to right, transparent, #1a56db55);
}

.frdo-section__divider-line:last-child {
  background: linear-gradient(to left, transparent, #1a56db55);
}

.frdo-section__divider-text {
  font-size: 1.05rem;
  font-weight: 800;
  color: #1a3fa0;
  white-space: nowrap;
  letter-spacing: 0.05em;
}

/* benefits */
.frdo-section__benefits {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
  padding-bottom: 56px;
}

.benefit {
  text-align: center;
}

.benefit__icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #dde6f8;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.benefit__icon svg {
  width: 38px;
  height: 38px;
}

.benefit__title {
  font-size: 0.78rem;
  font-weight: 800;
  color: #1a3fa0;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 10px;
  line-height: 1.4;
}

.benefit__title::after {
  content: '';
  display: block;
  width: 28px;
  height: 2px;
  background: #1a56db;
  margin: 8px auto 0;
}

.benefit__text {
  font-size: 0.82rem;
  color: #374151;
  line-height: 1.65;
  text-align: left;
}

/* bottom bar */
.frdo-section__bar {
  background: #0f2b6b;
  padding: 18px 0;
}

.frdo-section__bar-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.frdo-section__bar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 700;
  font-size: clamp(0.75rem, 1.4vw, 0.95rem);
  white-space: nowrap;
}

.frdo-section__bar-checks {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.frdo-section__bar-checks span {
  color: #fff;
  font-weight: 700;
  font-size: clamp(0.75rem, 1.4vw, 0.95rem);
  white-space: nowrap;
}

/* responsive */
@media (max-width: 900px) {
  .frdo-section__benefits {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 640px) {
  .frdo-section__top-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .frdo-section__heading {
    flex-direction: row;
    align-items: flex-start;
    max-width: 100%;
  }

  .frdo-section__shield {
    width: 52px;
    height: 60px;
  }

  .frdo-section__book {
    width: clamp(160px, 55vw, 260px);
    transform: rotate(6deg);
    align-self: center;
    margin: 16px auto -20px;
  }

  .frdo-section__divider {
    margin-top: 32px;
  }

  .frdo-section__benefits {
    grid-template-columns: repeat(2, 1fr);
  }

  .frdo-section__benefits .benefit:last-child {
    grid-column: 1 / -1;
    width: calc(50% - 12px);
    margin: 0 auto;
  }

  .frdo-section__bar-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .frdo-section__bar-checks {
    gap: 12px;
  }
}

/* ========== TRUST ========== */
.trust {
  padding: 80px 0;
  background-color: #f0f4fb;
  background-image:
    linear-gradient(rgba(26, 86, 219, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26, 86, 219, 0.07) 1px, transparent 1px);
  background-size: 32px 32px;
}

.trust__subtitle {
  text-align: center;
  font-size: 1rem;
  color: var(--gray-600);
  margin-top: -32px;
  margin-bottom: 48px;
}

.trust__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.trust__card {
  background: var(--white);
  border-radius: 16px;
  padding: 32px 28px;
  border: 1px solid #dbe4f7;
  box-shadow: 0 2px 12px rgba(26, 86, 219, 0.06);
}

.trust__card-icon {
  width: 72px;
  height: 72px;
  border-radius: 14px;
  background: #dde6f8;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.trust__card-stat {
  font-size: clamp(1.15rem, 2.2vw, 1.5rem);
  font-weight: 900;
  color: var(--blue-900);
  line-height: 1.2;
  margin-bottom: 4px;
}

.trust__card-label {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--blue-600);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 16px;
}

.trust__card-text {
  font-size: 0.88rem;
  color: var(--gray-600);
  line-height: 1.7;
}

@media (max-width: 768px) {
  .trust__grid {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin: 0 auto;
  }
}

/* ========== REVIEWS ========== */
.reviews {
  padding: 80px 0 72px;
  background: var(--blue-900);
}

.reviews__subtitle {
  text-align: center;
  font-size: 1rem;
  color: rgba(255,255,255,0.7);
  margin-top: -32px;
  margin-bottom: 48px;
}

.reviews__outer {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

.reviews__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* ---- card ---- */
.review-card {
  background: var(--white);
  border-radius: 16px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.review-card__quote {
  position: absolute;
  top: 10px;
  right: 16px;
  font-size: 5rem;
  line-height: 1;
  color: var(--blue-100);
  font-family: Georgia, serif;
  pointer-events: none;
  user-select: none;
}

.review-card__top {
  display: flex;
  align-items: center;
  gap: 14px;
}

.review-card__avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 1.2rem;
}

.rv-av--1 { background: linear-gradient(135deg, #f093fb, #f5576c); }
.rv-av--2 { background: linear-gradient(135deg, #4facfe, #00c6fb); }
.rv-av--3 { background: linear-gradient(135deg, #a18cd1, #fbc2eb); }
.rv-av--4 { background: linear-gradient(135deg, #11998e, #38ef7d); }
.rv-av--5 { background: linear-gradient(135deg, #f7971e, #ffd200); }
.rv-av--6 { background: linear-gradient(135deg, #667eea, #764ba2); }

.review-card__name {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--gray-800);
  margin-bottom: 3px;
}

.review-card__stars {
  color: #f59e0b;
  font-size: 0.9rem;
  letter-spacing: 1px;
}

.review-card__badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  align-self: flex-start;
}

.rc-badge--green  { background: #dcfce7; color: #16a34a; }
.rc-badge--blue   { background: #dbeafe; color: #1d4ed8; }
.rc-badge--purple { background: #ede9fe; color: #7c3aed; }
.rc-badge--teal   { background: #ccfbf1; color: #0f766e; }
.rc-badge--amber  { background: #fef3c7; color: #b45309; }
.rc-badge--red    { background: #fee2e2; color: #dc2626; }

.review-card__text {
  font-size: 0.88rem;
  color: var(--gray-600);
  line-height: 1.75;
  flex: 1;
}

.review-card__cta {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--blue-600);
}

/* ---- mobile horizontal scroll ---- */
@media (max-width: 640px) {
  .reviews__outer {
    padding: 0;
  }

  .reviews__grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 16px;
    padding: 0 20px 20px;
    scrollbar-width: none;
  }

  .reviews__grid::-webkit-scrollbar {
    display: none;
  }

  .review-card {
    flex: 0 0 82vw;
    scroll-snap-align: start;
  }
}

/* ========== CONTACT ========== */
.contact {
  padding: 80px 0;
  background: linear-gradient(135deg, var(--blue-900) 0%, var(--blue-600) 100%);
  color: var(--white);
}

.contact__subtitle {
  text-align: center;
  font-size: 1.05rem;
  opacity: 0.85;
  margin-bottom: 40px;
  margin-top: -24px;
}

.contact__links {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.contact__link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 32px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.contact__link:hover {
  transform: translateY(-2px);
}

.contact__link--vk {
  background: #4C75A3;
  color: var(--white);
  box-shadow: 0 4px 16px rgba(76, 117, 163, 0.4);
}

.contact__link--tg {
  background: #26A5E4;
  color: var(--white);
  box-shadow: 0 4px 16px rgba(38, 165, 228, 0.4);
}

.contact__link--wa {
  background: #25D366;
  color: var(--white);
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
}

/* ========== FOOTER ========== */
.footer {
  padding: 24px 0;
  background: var(--blue-900);
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
  font-size: 0.85rem;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 640px) {
  .carousel__arrow {
    display: none;
  }
}

@media (max-width: 768px) {
  .diploma__grid {
    grid-template-columns: 1fr;
  }

  .contact__links {
    flex-direction: column;
    align-items: center;
  }

  .contact__link {
    width: 100%;
    max-width: 300px;
    justify-content: center;
  }
}

/* ========== PLACEHOLDERS ========== */
.placeholder-img {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--blue-100), var(--blue-50));
  padding: 20px;
}

.placeholder-img svg {
  width: 80px;
  height: 80px;
  margin-bottom: 8px;
}

.placeholder-img span {
  font-size: 0.75rem;
  color: var(--blue-600);
  opacity: 0.5;
  font-weight: 500;
}

.placeholder-img--diploma {
  min-height: 200px;
  border-radius: 12px;
}

.placeholder-img--diploma svg {
  width: 160px;
  height: 120px;
}

.placeholder-img--tall {
  min-height: 360px;
  border-radius: 16px;
}

.placeholder-img--tall svg {
  width: 140px;
  height: 180px;
}



.diploma__icon-img {
  margin-bottom: 16px;
}

img {
  max-width: 100%;
}
