/* Главная страница */

.hp-section {
  font-family: "Jost", sans-serif;
}

.hp-section .generic-title h6 {
  color: var(--light-purple-color);
}

/* ---------- Баннер ---------- */

.hp-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border-radius: 30px;
  padding: 8px 18px;
  margin-bottom: 18px;
  font-family: "Jost", sans-serif;
  font-size: 16px;
  line-height: 20px;
  color: var(--primary-color);
  box-shadow: 0 0 40px 0 #e3e8fb;
}

.hp-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2ecc71;
  animation: hp-pulse 1.8s infinite;
}

.hp-status.closed .hp-status-dot {
  background: var(--accent);
  animation: none;
}

@keyframes hp-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.55);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(46, 204, 113, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(46, 204, 113, 0);
  }
}

.hp-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
}

.hp-hero-actions .See-btn {
  margin-left: 0;
}

/* ---------- Объявление ---------- */

.hp-announce-con {
  padding-top: 50px;
}

.hp-announce {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  background: #fff;
  border-radius: 24px;
  border-left: 6px solid var(--accent);
  box-shadow: 0 0 85px 0 #e9eefc;
  padding: 22px 28px;
}

.hp-announce-icon {
  flex: 0 0 52px;
  height: 52px;
  border-radius: 50%;
  background: #fff4e0;
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.hp-announce-title {
  color: var(--primary-color);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}

.hp-announce-text {
  color: var(--text-color);
  font-size: 18px;
  line-height: 28px;
  white-space: pre-line;
}

/* ---------- Об олимпиаде ---------- */

.hp-intro {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 0 85px 0 #e9eefc;
  padding: 36px 40px 30px;
  margin-bottom: 30px;
}

.hp-intro p {
  margin: 0;
  color: var(--text-color);
  font-size: 18px;
  line-height: 30px;
}

.hp-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 28px;
  padding-top: 26px;
  border-top: 1px solid #eee9ff;
}

.hp-stat {
  text-align: center;
  padding: 0 10px;
}

.hp-stat + .hp-stat {
  border-left: 1px solid #eee9ff;
}

.hp-stat-value {
  color: var(--light-purple-color);
  font-size: 40px;
  line-height: 44px;
  font-weight: 700;
}

.hp-stat-label {
  color: var(--text-color);
  font-size: 15px;
  line-height: 20px;
  margin-top: 6px;
}

.hp-features .row {
  margin-bottom: 0 !important;
}

.hp-feature-col {
  margin-bottom: 30px;
}

.hp-features .service-box-item {
  height: 100%;
}

.hp-feature-icon {
  font-size: 50px;
  color: var(--light-purple-color);
  transition: transform 0.3s ease-out;
}

.service-box-item:hover .hp-feature-icon {
  transform: translateY(-8px);
}

/* ---------- Как принять участие ---------- */

.hp-how {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

.hp-how-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: #fff;
  border: 1px solid transparent;
  border-radius: 24px;
  box-shadow: 0 0 85px 0 #e9eefc;
  padding: 34px 24px 28px;
  transition: transform 0.3s ease-out, border-color 0.3s;
}

.hp-how-item:hover {
  transform: translateY(-8px);
  border-color: var(--light-purple-color);
}

.hp-how-item:not(:last-child)::after {
  content: "\f054";
  font-family: "Font Awesome 5 Pro";
  font-weight: 900;
  position: absolute;
  top: 50%;
  right: -22px;
  transform: translateY(-50%);
  color: #c9b6ff;
  font-size: 14px;
}

.hp-how-num {
  position: absolute;
  top: 16px;
  right: 22px;
  color: #f0ebff;
  font-size: 48px;
  line-height: 1;
  font-weight: 800;
}

.hp-how-icon {
  position: relative;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: #f4f9ff;
  color: var(--light-purple-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin-bottom: 20px;
}

.hp-how-item h4 {
  color: var(--primary-color);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 10px;
}

.hp-how-item p {
  flex: 1;
  color: var(--text-color);
  font-size: 17px;
  line-height: 26px;
  margin-bottom: 18px;
}

.hp-how-link {
  color: var(--accent) !important;
  font-size: 17px;
  font-weight: 500;
  text-decoration: none !important;
}

.hp-how-link:hover {
  color: var(--light-purple-color) !important;
}

.hp-how-item.done .hp-how-icon {
  background: #e9f9ef;
  color: #27ae60;
}

.hp-how-done {
  color: #27ae60;
  font-size: 17px;
  font-weight: 500;
}

/* ---------- Этапы ---------- */

.hp-stages-con .generic-title,
.hp-stages,
.hp-groups {
  position: relative;
  z-index: 1;
}

.hp-stages {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.hp-stages::before {
  content: "";
  position: absolute;
  top: 31px;
  left: 16%;
  right: 16%;
  border-top: 2px dashed rgba(255, 255, 255, 0.5);
}

.hp-stage {
  position: relative;
  text-align: center;
  color: #fff;
}

.hp-stage-dot {
  position: relative;
  z-index: 1;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #fff;
  color: var(--light-purple-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin: 0 auto 22px;
  box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.18);
}

.hp-stage.current .hp-stage-dot {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 8px rgba(252, 166, 31, 0.35);
}

.hp-stage-card {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 24px;
  padding: 24px 24px 26px;
  height: calc(100% - 86px);
}

.hp-stage.current .hp-stage-card {
  background: #fff;
  color: var(--primary-color);
  box-shadow: 0 30px 60px -30px rgba(7, 0, 59, 0.6);
}

.hp-stage-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
}

.hp-stage-date,
.hp-stage-now {
  display: inline-block;
  border-radius: 20px;
  padding: 4px 16px;
  font-size: 16px;
  font-weight: 600;
  line-height: 22px;
}

.hp-stage-date {
  background: rgba(255, 255, 255, 0.18);
}

.hp-stage.current .hp-stage-date {
  background: #f3eeff;
  color: var(--light-purple-color);
}

.hp-stage-now {
  background: var(--accent);
  color: #fff;
}

.hp-stage-card h4 {
  color: inherit;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 10px;
}

.hp-stage-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.85);
  font-size: 17px;
  line-height: 26px;
}

.hp-stage.current .hp-stage-card p {
  color: var(--text-color);
}

.hp-groups {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 44px;
  color: #fff;
  font-size: 18px;
}

.hp-group {
  background: #fff;
  color: var(--light-purple-color);
  border-radius: 30px;
  padding: 8px 20px;
  font-weight: 600;
  line-height: 22px;
}

/* ---------- Организаторы ---------- */

.hp-org-logos {
  max-width: 100%;
  margin-bottom: 18px;
}

.hp-org-list {
  display: grid;
  gap: 16px;
  margin: 0 0 30px;
}

.hp-org-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  text-align: left;
  color: var(--text-color);
  font-size: 18px;
  line-height: 26px;
}

.hp-org-icon {
  flex: 0 0 46px;
  height: 46px;
  border-radius: 50%;
  background: #f3eeff;
  color: var(--light-purple-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.hp-org-item b {
  display: block;
  color: var(--primary-color);
  font-weight: 600;
}

.hp-org-item a {
  color: var(--light-purple-color);
}

.hp-org-item a:hover {
  color: var(--accent);
}

.hp-org-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* ---------- Вопрос-ответ ---------- */

.hp-faq {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 16px;
  max-width: 920px;
  margin: 0 auto;
}

.hp-faq details {
  background: #fff;
  border: 1px solid transparent;
  border-radius: 20px;
  box-shadow: 0 0 85px 0 #e9eefc;
  transition: border-color 0.3s;
}

.hp-faq details[open] {
  border-color: #d9cdff;
}

.hp-faq summary {
  display: flex;
  align-items: center;
  gap: 16px;
  list-style: none;
  cursor: pointer;
  padding: 20px 26px;
  color: var(--primary-color);
  font-size: 19px;
  font-weight: 600;
  line-height: 26px;
  user-select: none;
}

.hp-faq summary::-webkit-details-marker {
  display: none;
}

.hp-faq summary:hover {
  color: var(--light-purple-color);
}

.hp-faq-toggle {
  flex: 0 0 36px;
  height: 36px;
  margin-left: auto;
  border-radius: 50%;
  background: #f3eeff;
  color: var(--light-purple-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  transition: transform 0.3s, background 0.3s, color 0.3s;
}

.hp-faq details[open] .hp-faq-toggle {
  transform: rotate(45deg);
  background: var(--accent);
  color: #fff;
}

.hp-faq-answer {
  padding: 0 26px 22px;
  color: var(--text-color);
  font-size: 17px;
  line-height: 27px;
}

.hp-faq-answer ul {
  margin: 0;
  padding-left: 20px;
}

.hp-faq-answer li + li {
  margin-top: 4px;
}

/* ---------- Призыв к участию ---------- */

.hp-cta {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 30px 40px;
  background: linear-gradient(135deg, #7b45ff 0%, #6f34fe 50%, #4b1cbd 100%);
  border-radius: 32px;
  padding: 56px 60px;
  color: #fff;
  box-shadow: 0 30px 80px -30px rgba(111, 52, 254, 0.6);
}

.hp-cta::before,
.hp-cta::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.hp-cta::before {
  width: 300px;
  height: 300px;
  top: -140px;
  right: -80px;
  background: rgba(255, 255, 255, 0.1);
}

.hp-cta::after {
  width: 220px;
  height: 220px;
  bottom: -120px;
  left: -60px;
  background: rgba(255, 255, 255, 0.08);
}

.hp-cta > * {
  position: relative;
  z-index: 1;
}

.hp-cta-text {
  flex: 1 1 420px;
}

.hp-cta-text h6 {
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 10px;
}

.hp-cta-text h2 {
  color: #fff;
  font-weight: 700;
  margin-bottom: 12px;
}

.hp-cta-text p {
  margin: 0;
  color: rgba(255, 255, 255, 0.85);
  font-size: 18px;
  line-height: 28px;
}

.hp-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* ---------- Адаптив ---------- */

@media (max-width: 1199px) {
  .hp-how {
    grid-template-columns: repeat(2, 1fr);
  }

  .hp-how-item:not(:last-child)::after {
    display: none;
  }
}

@media (max-width: 991px) {
  .hp-hero-actions,
  .hp-org-actions {
    justify-content: center;
  }

  .hp-org-list {
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
  }

  .hp-stages {
    grid-template-columns: 1fr;
    max-width: 520px;
    margin: 0 auto;
  }

  .hp-stages::before {
    display: none;
  }

  .hp-stage-card {
    height: auto;
  }

  .hp-cta {
    padding: 44px 36px;
    text-align: center;
    justify-content: center;
  }

  .hp-cta-actions {
    justify-content: center;
  }
}

@media (max-width: 767px) {
  .hp-stats {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 22px;
  }

  .hp-stat:nth-child(3) {
    border-left: none;
  }

  .hp-intro {
    padding: 28px 24px 24px;
  }

  .hp-stat-value {
    font-size: 32px;
    line-height: 36px;
  }
}

@media (max-width: 575px) {
  .hp-how {
    grid-template-columns: 1fr;
  }

  .hp-announce {
    padding: 18px 20px;
  }

  .hp-announce-icon {
    display: none;
  }

  .hp-faq summary {
    font-size: 17px;
    padding: 18px 20px;
  }

  .hp-faq-answer {
    padding: 0 20px 18px;
  }

  .hp-cta {
    padding: 36px 22px;
    border-radius: 24px;
  }
}
