/* --- VARIABLES & RESET --- */
:root {
  /* Holographic Palette */
  --color-bg: #f3f5f9;
  --color-text: #2d3440;
  --color-text-light: #6b7280;

  --color-accent-1: #ff9a9e; /* Pinkish */
  --color-accent-2: #a18cd1; /* Purple */
  --color-accent-3: #fbc2eb; /* Lavender */
  --color-accent-4: #84fab0; /* Mint */

  --gradient-holo: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%);
  --gradient-glass: rgba(255, 255, 255, 0.4);

  --font-main: "Inter", sans-serif;
  --font-header: "Space Grotesk", sans-serif;

  --header-height: 4.5rem;
  --border-radius-fluid: 20px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background-color: var(--color-bg);
  color: var(--color-text);
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

ul {
  list-style: none;
}

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- AURORA BACKGROUND (Global) --- */
.aurora-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  background: #ffffff;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.6;
  animation: move 20s infinite alternate;
}

.blob-1 {
  width: 60vw;
  height: 60vw;
  background: var(--color-accent-3);
  top: -10%;
  left: -10%;
}

.blob-2 {
  width: 50vw;
  height: 50vw;
  background: var(--color-accent-4);
  bottom: -10%;
  right: -10%;
  animation-delay: -5s;
}

.blob-3 {
  width: 40vw;
  height: 40vw;
  background: var(--color-accent-2);
  top: 30%;
  left: 40%;
  animation-delay: -10s;
}

@keyframes move {
  from {
    transform: translate(0, 0) scale(1);
  }
  to {
    transform: translate(50px, -50px) scale(1.1);
  }
}

/* --- TYPOGRAPHY UTILS --- */
h1,
h2,
h3 {
  font-family: var(--font-header);
  font-weight: 700;
}

/* --- BUTTONS --- */
.btn {
  display: inline-block;
  padding: 0.8rem 1.8rem;
  background: var(--gradient-holo);
  color: white;
  font-weight: 600;
  /* Fluid/Organic Shape */
  border-radius: 50px;
  box-shadow: 0 4px 15px rgba(161, 140, 209, 0.3);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #fbc2eb 0%, #a18cd1 100%);
  z-index: -1;
  transition: opacity 0.4s ease;
  opacity: 0;
}

.btn:hover {
  transform: scale(1.05) translateY(-2px);
  box-shadow: 0 8px 25px rgba(161, 140, 209, 0.5);
}

.btn:hover::before {
  opacity: 1;
}

/* --- HEADER --- */
/* --- HEADER --- */
.header {
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  background: rgba(
    255,
    255,
    255,
    0.7
  ); /* Більш насичений фон для читабельності */
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
  transition: all 0.4s ease;
}

.header__container {
  height: var(--header-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Logo Styles */
.logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  z-index: 102; /* Щоб лого було видно поверх меню */
}

.logo__text {
  font-family: var(--font-header);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
}

.logo__icon {
  transition: transform 0.4s ease;
}

.logo:hover .logo__icon {
  transform: rotate(15deg) scale(1.1);
}

/* Desktop Navigation */
.nav__menu {
  margin-left: auto; /* Зміщує меню вправо до кнопки */
  margin-right: 2rem;
}

.nav__list {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav__link {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--color-text);
  position: relative;
  padding: 5px 0;
}

.nav__link::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--gradient-holo);
  border-radius: 10px;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.nav__link:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Header Actions (Button + Toggle) */
.header__actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav__toggle,
.nav__close {
  display: none; /* За замовчуванням приховано на десктопі */
  font-size: 1.5rem;
  color: var(--color-text);
  cursor: pointer;
  transition: color 0.3s;
}

.nav__toggle:hover,
.nav__close:hover {
  color: var(--color-accent-2);
}

/* --- MOBILE RESPONSIVE --- */
@media screen and (max-width: 968px) {
  /* Приховуємо кнопку "Связаться" в хедері на мобільних, щоб не захаращувати, 
       можна додати її в саме меню, якщо потрібно */
  .mobile-hidden {
    display: none;
  }

  .nav__toggle {
    display: block;
    z-index: 102;
  }

  .nav__menu {
    position: fixed;
    top: 0;
    left: 0; /* Було -100%, тепер фіксуємо зліва, але ховаємо візуально */
    width: 100%;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    z-index: 101;

    /* Ключове виправлення для приховування */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);
  }

  .nav__list {
    flex-direction: column;
    gap: 2.5rem;
  }

  .nav__link {
    font-size: 1.5rem; /* Більший шрифт для мобільного */
    font-family: var(--font-header);
  }

  .nav__close {
    display: block;
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
  }

  /* Клас, який додає JS для показу меню */
  .show-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
}

/* --- FOOTER --- */
.footer {
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.5);
  padding: 4rem 0 1.5rem;
  margin-top: 4rem;
  position: relative;
  z-index: 10;
}

.footer__container {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer__title {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  color: var(--color-text);
}

.footer__desc {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--color-text-light);
  max-width: 250px;
}

.footer__links li {
  margin-bottom: 0.8rem;
}

.footer__link {
  font-size: 0.9rem;
  color: var(--color-text-light);
}

.footer__link:hover {
  color: var(--color-accent-2);
  padding-left: 5px; /* Micro-interaction: Translate */
}

.footer__contact-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--color-text-light);
}

.footer__icon {
  width: 18px;
  height: 18px;
  color: var(--color-accent-2);
  flex-shrink: 0;
  margin-top: 2px;
}

.footer__bottom {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  font-size: 0.8rem;
  color: var(--color-text-light);
}

/* Footer Responsive */
@media screen and (max-width: 900px) {
  .footer__container {
    grid-template-columns: 1fr 1fr;
  }
}

@media screen and (max-width: 600px) {
  .footer__container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* --- HERO SECTION --- */
.hero {
  position: relative;
  padding-top: calc(
    var(--header-height) + 4rem
  ); /* Відступ під фіксований хедер */
  padding-bottom: 5rem;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero__container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

/* Badge */
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-light);
  margin-bottom: 1.5rem;
  backdrop-filter: blur(5px);
}

.badge__dot {
  width: 8px;
  height: 8px;
  background-color: var(--color-accent-4);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--color-accent-4);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(132, 250, 176, 0.7);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(132, 250, 176, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(132, 250, 176, 0);
  }
}

/* Typography */
.hero__title {
  font-size: 3.5rem; /* Великий розмір */
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -0.03em;
}

.gradient-text {
  background: var(--gradient-holo);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.hero__desc {
  font-size: 1.1rem;
  color: var(--color-text-light);
  max-width: 500px;
  margin-bottom: 2.5rem;
}

/* Buttons & Actions */
.hero__actions {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.btn--hero {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  font-size: 1rem;
}

.btn--ghost {
  display: flex;
  align-items: center;
  padding: 1rem 2rem;
  background: transparent;
  border: 1px solid var(--color-text);
  color: var(--color-text);
  border-radius: 50px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn--ghost:hover {
  background: var(--color-text);
  color: white;
}

/* Stats */
.hero__stats {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-num {
  font-family: var(--font-header);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--color-text-light);
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: rgba(0, 0, 0, 0.1);
}

/* --- VISUAL (Right Column) --- */
.hero__visual {
  position: relative;
  perspective: 1000px; /* Для 3D ефекту */
  display: flex;
  justify-content: center;
  align-items: center;
}

.glass-card {
  width: 100%;
  max-width: 450px;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 30px;
  padding: 1.5rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.05);
  transform-style: preserve-3d;
  transition: transform 0.1s ease-out; /* Плавність для JS */
  position: relative;
  z-index: 2;
}

.hero__glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  height: 80%;
  background: var(--gradient-holo);
  filter: blur(60px);
  opacity: 0.4;
  border-radius: 50%;
  z-index: 1;
}

.glass-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.glass-dots {
  display: flex;
  gap: 6px;
}

.glass-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
}

.glass-tag {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-accent-2);
  background: rgba(255, 255, 255, 0.5);
  padding: 4px 10px;
  border-radius: 10px;
}

.glass-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 15px;
  margin-bottom: 1rem;
  opacity: 0.9;
}

.glass-info h4 {
  margin-bottom: 0.3rem;
}

.glass-info p {
  font-size: 0.9rem;
  color: var(--color-text-light);
}

/* Floating Elements */
.float-element {
  position: absolute;
  width: 50px;
  height: 50px;
  background: white;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  color: var(--color-accent-2);
  animation: float 4s ease-in-out infinite;
}

.float-1 {
  top: -20px;
  right: -20px;
  transform: translateZ(30px); /* Висунення вперед */
  animation-delay: 0s;
}

.float-2 {
  bottom: 30px;
  left: -25px;
  transform: translateZ(50px);
  animation-delay: 2s;
  color: var(--color-accent-4);
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) translateZ(30px);
  }
  50% {
    transform: translateY(-15px) translateZ(30px);
  }
}

/* --- RESPONSIVE --- */
@media screen and (max-width: 968px) {
  .hero__container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 3rem;
  }

  .hero__title {
    font-size: 2.5rem;
  }

  .hero__desc {
    margin: 0 auto 2rem;
  }

  .hero__actions {
    justify-content: center;
  }

  .hero__stats {
    justify-content: center;
  }

  .hero__visual {
    order: -1; /* Картинка зверху на мобільному */
    margin-bottom: 2rem;
  }
}

/* --- GLOBAL SECTION STYLES --- */
.section-padding {
  padding: 6rem 0;
}

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

.section-header {
  margin-bottom: 4rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--color-text);
}

.section-subtitle {
  color: var(--color-text-light);
  font-size: 1.1rem;
}

/* --- ABOUT CARDS --- */
.about__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.feature-card {
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 24px; /* Organic Soft Corners */
  padding: 2.5rem 2rem;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

/* Hover Effect: Lift & Pearl Glow */
.feature-card:hover {
  transform: translateY(-10px);
  background: rgba(255, 255, 255, 0.6);
  box-shadow: 0 20px 40px rgba(161, 140, 209, 0.15);
  border-color: var(--color-accent-3);
}

/* Holographic gradient overlay on hover */
.feature-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent 30%,
    rgba(255, 255, 255, 0.4) 50%,
    transparent 70%
  );
  transform: translateX(-100%);
  transition: transform 0.6s ease;
  z-index: -1;
}

.feature-card:hover::before {
  transform: translateX(100%);
}

.feature-icon-wrapper {
  width: 60px;
  height: 60px;
  background: white;
  border-radius: 50%; /* Circle shape */
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: var(--color-accent-2);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease;
}

.feature-icon-wrapper i {
  width: 28px;
  height: 28px;
}

.feature-card:hover .feature-icon-wrapper {
  transform: scale(1.1) rotate(5deg);
  color: var(--color-accent-1);
}

.feature-title {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--color-text);
}

.feature-desc {
  font-size: 0.95rem;
  color: var(--color-text-light);
  line-height: 1.7;
}

/* Mobile check */
@media screen and (max-width: 768px) {
  .section-title {
    font-size: 2rem;
  }
}

/* --- METHODOLOGY SECTION --- */
.methodology__row {
  display: flex;
  align-items: center;
  gap: 4rem;
  margin-bottom: 6rem;
}

.methodology__row:last-child {
  margin-bottom: 0;
}

/* Reverse order for the second row */
.methodology__row--reverse {
  flex-direction: row-reverse;
}

.methodology__content {
  flex: 1;
}

.methodology__visual {
  flex: 1;
  display: flex;
  justify-content: center;
}

/* Typography & Elements */
.tag {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(161, 140, 209, 0.1);
  color: var(--color-accent-2);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: 20px;
  margin-bottom: 1rem;
}

.methodology__title {
  font-size: 2.2rem;
  margin-bottom: 1.2rem;
  color: var(--color-text);
}

.methodology__text {
  font-size: 1.05rem;
  color: var(--color-text-light);
  margin-bottom: 2rem;
}

.methodology__text strong {
  color: var(--color-accent-2);
  font-weight: 600;
}

/* Link with Arrow Animation */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--color-text);
  position: relative;
}

.link-arrow i {
  width: 18px;
  transition: transform 0.3s ease;
}

.link-arrow:hover i {
  transform: translateX(5px);
  color: var(--color-accent-2);
}

/* Check List */
.check-list {
  margin-top: 1.5rem;
}

.check-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0.8rem;
  color: var(--color-text);
  font-weight: 500;
}

.check-list i {
  color: var(--color-accent-4); /* Mint Green */
  width: 20px;
}

/* --- ORGANIC BLOB IMAGES --- */
.blob-image {
  width: 100%;
  max-width: 450px;
  height: 350px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
  transition: all 0.5s ease-in-out;
}

.blob-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

/* Shape 1 */
.blob-shape-1 {
  border-radius: 64% 36% 27% 73% / 55% 58% 42% 45%;
}

/* Shape 2 */
.blob-shape-2 {
  border-radius: 32% 68% 55% 45% / 37% 32% 68% 63%;
}

/* Hover Effects: Morphing & Zoom */
.blob-image:hover {
  /* Change shape slightly on hover */
  border-radius: 50%;
}

.blob-image:hover img {
  transform: scale(1.1);
}

/* --- RESPONSIVE --- */
@media screen and (max-width: 900px) {
  .methodology__row,
  .methodology__row--reverse {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
  }

  .check-list li {
    justify-content: center;
  }

  .link-arrow {
    justify-content: center;
  }
}

/* --- PROGRAMS SECTION --- */
.programs__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem;
  align-items: start; /* Щоб картки не розтягувались, якщо контенту мало */
}

.program-card {
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 30px;
  padding: 2.5rem 2rem;
  text-align: center;
  position: relative;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 500px;
}

/* Featured Card Styling */
.program-card--featured {
  background: rgba(255, 255, 255, 0.6);
  border-color: var(--color-accent-2);
  box-shadow: 0 15px 40px rgba(161, 140, 209, 0.2);
  transform: scale(1.05);
  z-index: 2;
}

.featured-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  background: var(--gradient-holo);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 20px;
  text-transform: uppercase;
}

/* Hover Effects */
.program-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
  background: rgba(255, 255, 255, 0.8);
}

.program-card--featured:hover {
  transform: translateY(-10px) scale(1.07);
}

/* Icons & Typography */
.program-icon {
  width: 70px;
  height: 70px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  color: var(--color-accent-2);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.program-icon i {
  width: 32px;
  height: 32px;
}

.program-title {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.program-desc {
  font-size: 0.9rem;
  color: var(--color-text-light);
  margin-bottom: 1.5rem;
  min-height: 3rem; /* Вирівнювання висоти описів */
}

.program-price {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 2rem;
  font-family: var(--font-header);
}

.price-period {
  font-size: 1rem;
  color: var(--color-text-light);
  font-weight: 400;
}

/* Features List */
.program-features {
  text-align: left;
  margin-bottom: 2rem;
}

.program-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0.8rem;
  font-size: 0.95rem;
  color: var(--color-text);
}

.program-features i {
  width: 16px;
  height: 16px;
  color: var(--color-accent-4);
  flex-shrink: 0;
}

/* Button Full Width */
.btn--full {
  width: 100%;
  display: block;
  text-align: center;
  border-radius: 15px; /* Troхи інша форма для кнопок всередині карток */
}

.btn--featured {
  background: var(--color-text); /* Чорна кнопка для контрасту */
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.btn--featured:hover {
  background: #000;
  transform: scale(1.02);
}

/* Responsive Fix */
@media screen and (max-width: 900px) {
  .program-card--featured {
    transform: scale(1); /* Скидаємо збільшення на мобільному */
  }
  .program-card--featured:hover {
    transform: translateY(-10px);
  }
}

/* --- REVIEWS MARQUEE --- */
.reviews {
  overflow: hidden; /* Ховаємо те, що виходить за межі екрану */
  padding-bottom: 8rem;
}

.marquee {
  display: flex;
  overflow: hidden;
  user-select: none;
  gap: 2rem;
  margin-bottom: 2rem;
  /* Mask gradient to fade out edges */
  mask-image: linear-gradient(
    to right,
    transparent,
    black 10%,
    black 90%,
    transparent
  );
  -webkit-mask-image: linear-gradient(
    to right,
    transparent,
    black 10%,
    black 90%,
    transparent
  );
}

.marquee__track {
  flex-shrink: 0;
  display: flex;
  gap: 2rem;
  min-width: 100%;
  /* Animation definition */
  animation: scroll 40s linear infinite;
}

.marquee--reverse .marquee__track {
  animation-direction: reverse;
  animation-duration: 45s; /* Трохи інша швидкість для природності */
}

/* Pause animation on hover */
.marquee:hover .marquee__track {
  animation-play-state: paused;
}

@keyframes scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(calc(-100% - 2rem)); /* -100% ширини + gap */
  }
}

/* Review Card Styling */
.review-card {
  width: 350px;
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.review-card:hover {
  background: rgba(255, 255, 255, 0.8);
  transform: translateY(-5px);
  border-color: var(--color-accent-2);
}

.review-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1rem;
}

.review-avatar {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.review-name {
  font-size: 1rem;
  color: var(--color-text);
}

.review-role {
  font-size: 0.8rem;
  color: var(--color-text-light);
  display: block;
}

.review-text {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--color-text);
  margin-bottom: 1rem;
  font-style: italic;
}

.review-stars {
  color: #ffd700; /* Gold */
  font-size: 1.1rem;
  letter-spacing: 2px;
}

/* Mobile Fix */
@media screen and (max-width: 768px) {
  .review-card {
    width: 280px;
  }
  .marquee__track {
    animation-duration: 25s; /* Швидше на мобільному, щоб було динамічніше */
  }
}

/* --- CONTACT SECTION --- */
.contact {
  position: relative;
  padding-bottom: 6rem;
}

.contact__container {
  display: flex;
  justify-content: center;
}

.contact-wrapper {
  width: 100%;
  max-width: 550px;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 30px;
  padding: 3rem;
  box-shadow: 0 30px 60px rgba(161, 140, 209, 0.15);
  position: relative;
  overflow: hidden;
}

/* Aurora glow inside form */
.contact-wrapper::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: var(--color-accent-3);
  filter: blur(80px);
  opacity: 0.3;
  pointer-events: none;
}

.contact-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.contact-title {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.contact-subtitle {
  font-size: 0.95rem;
  color: var(--color-text-light);
}

/* Form Inputs */
.form-group {
  margin-bottom: 1.5rem;
  position: relative;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--color-text);
}

.input-wrapper {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: var(--color-text-light);
  transition: color 0.3s ease;
}

.form-input {
  width: 100%;
  padding: 1rem 1rem 1rem 3rem; /* Space for icon */
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.5);
  font-family: var(--font-main);
  font-size: 1rem;
  color: var(--color-text);
  transition: all 0.3s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--color-accent-2);
  background: white;
  box-shadow: 0 0 0 4px rgba(161, 140, 209, 0.1);
}

.form-input:focus + .input-icon,
.input-wrapper:focus-within .input-icon {
  color: var(--color-accent-2);
}

/* Validation Error Styles */
.error-msg {
  display: none;
  font-size: 0.8rem;
  color: #e74c3c;
  margin-top: 5px;
  padding-left: 5px;
}

.form-group.error .form-input {
  border-color: #e74c3c;
  animation: shake 0.3s ease-in-out;
}

.form-group.error .error-msg {
  display: block;
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

/* Custom Checkboxes */
.custom-checkbox-container {
  display: flex;
  align-items: flex-start; /* Align top for multi-line text */
  gap: 12px;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--color-text-light);
  user-select: none;
}

.custom-checkbox-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  height: 22px;
  width: 22px;
  background-color: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
  position: relative;
  transition: all 0.3s ease;
}

.box-checkmark {
  border-radius: 6px;
}

.circle-checkmark {
  border-radius: 50%;
}

.custom-checkbox-container:hover .checkmark {
  background-color: rgba(255, 255, 255, 0.8);
  border-color: var(--color-accent-2);
}

.custom-checkbox-container input:checked ~ .checkmark {
  background-color: var(--color-accent-2);
  border-color: var(--color-accent-2);
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.custom-checkbox-container input:checked ~ .checkmark:after {
  display: block;
}

/* Checkmark draw */
.custom-checkbox-container .checkmark:after {
  left: 7px;
  top: 3px;
  width: 6px;
  height: 12px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-text a {
  color: var(--color-accent-2);
  text-decoration: underline;
}

/* Robot Specific */
.robot-group {
  background: rgba(255, 255, 255, 0.4);
  padding: 1rem;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.robot-check {
  align-items: center;
}

.robot-icon {
  margin-left: auto;
  width: 20px;
  color: var(--color-text-light);
}

/* Success Modal */
.modal {
  display: none; /* Hidden by default */
  position: fixed;
  z-index: 200;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(5px);
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.show {
  display: flex;
  opacity: 1;
}

.modal-content {
  background: white;
  padding: 2.5rem;
  border-radius: 24px;
  text-align: center;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  transform: scale(0.8);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal.show .modal-content {
  transform: scale(1);
}

.modal-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 1.5rem;
  color: var(--color-accent-4); /* Mint Green */
}

.modal-icon svg {
  width: 100%;
  height: 100%;
}

.modal-title {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.modal-text {
  color: var(--color-text-light);
  margin-bottom: 1.5rem;
}

.btn--modal {
  background: var(--color-text);
  color: white;
  border: none;
  width: 100%;
  border-radius: 12px;
  cursor: pointer;
}

/* Mobile Fix */
@media screen and (max-width: 600px) {
  .contact-wrapper {
    padding: 2rem 1.5rem;
  }
}

/* --- COOKIE POPUP --- */
/* --- COOKIE POPUP (Redesigned) --- */
/* --- COOKIE POPUP (Fail-safe Version) --- */
.cookie-popup {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: auto;
  z-index: 99999; /* Найвищий пріоритет */
  padding: 1.5rem;
  pointer-events: none; /* Щоб кліки проходили крізь пусті зони */

  /* Приховано за замовчуванням */
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.4s ease-out;
}

/* Клас, який додає JS для показу */
.cookie-popup.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.cookie-container {
  max-width: 600px;
  margin: 0 auto;
  background: #2d3440; /* Темний фон для контрасту */
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 50px; /* Pill shape */
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  pointer-events: auto; /* Вмикаємо кліки на самій плашці */
}

.cookie-text {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
}

.cookie-text i {
  color: #ff9a9e; /* Accent color */
  width: 20px;
  height: 20px;
}

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

.cookie-link {
  color: #ccc;
  font-size: 0.85rem;
  text-decoration: underline;
  transition: color 0.3s;
}

.cookie-link:hover {
  color: white;
}

.cookie-btn {
  background: white;
  color: #2d3440;
  border: none;
  padding: 0.6rem 1.5rem;
  border-radius: 20px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s;
}

.cookie-btn:hover {
  transform: scale(1.05);
}

/* Mobile Responsive */
@media screen and (max-width: 600px) {
  .cookie-popup {
    padding: 1rem;
  }
  .cookie-container {
    flex-direction: column;
    border-radius: 20px;
    text-align: center;
    gap: 1rem;
  }
  .cookie-text {
    flex-direction: column;
  }
  .cookie-actions {
    width: 100%;
    justify-content: space-between;
  }
  .cookie-btn {
    width: 100%;
  }
}

/* --- POLICY PAGES STYLING (.pages) --- */
/* Стилі для сторінок типу privacy.html */
.pages {
  padding-top: calc(var(--header-height) + 4rem);
  padding-bottom: 4rem;
  min-height: 80vh;
}

.pages .container {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(20px);
  border-radius: 30px;
  padding: 4rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.pages h1 {
  font-size: 3rem;
  margin-bottom: 2rem;
  background: var(--gradient-holo);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.pages h2 {
  font-size: 1.8rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: var(--color-text);
}

.pages p {
  font-size: 1.05rem;
  color: var(--color-text-light);
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

.pages ul {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.pages li {
  list-style: disc;
  margin-bottom: 0.8rem;
  color: var(--color-text);
}

.pages a {
  color: var(--color-accent-2);
  text-decoration: underline;
}

/* Mobile fix for pages */
@media screen and (max-width: 768px) {
  .cookie-popup {
    flex-direction: column;
    align-items: flex-start;
    bottom: 1rem;
  }
  .btn--sm {
    width: 100%;
  }
  .pages .container {
    padding: 2rem;
  }
  .pages h1 {
    font-size: 2rem;
  }
}
