/* CoursesPage.css — рефакторинг */
:root{
  /* palette */
  --color-lavix: #B7A3F6;
  --color-nebulyn: #6772E7;
  --color-abyss: #20184A;
  --color-aether: #F6F7FB;
  --color-frosted-aether: #EDEFF5;
  --color-charcoal: #282E3E;
  --color-aquor: #6FD6ED;
  --color-dusty-rouge: #D25656;
  --color-light-cinder: #929BB4;
  --aether-color: rgba(246, 247, 251, 1);

  /* layout tokens */
  --programme-card-bg: #F4F6FA;
  --programme-card-radius: 30px;
  --border-radius--medium: 30px;
  --border-radius--large: 3.75rem;
  --gap: 20px;
  --max-width: 1200px;

  /* aliases to keep backwards compatibility with templates */
  --card-bg: var(--programme-card-bg);
  --card-radius: var(--programme-card-radius);
  --heading-color: #111;
  --text-color: #333;

  /* compatibility with existing usages in markup */
  --charcoal-color: var(--color-charcoal);
  --nebulyn-color: var(--color-nebulyn);

  /* ===== DESIGN SYSTEM ===== */
  --color-primary: #6772E7;
  --color-secondary: #3FC5E3;
  --color-error: #d9534f;
  --color-text-primary: #333;
  --color-text-secondary: #586380;
  --color-background-overlay: rgba(0,0,0,0.5);
  --color-border-default: #dfe6f4;
  --color-border-hover: #b8c5d1;
  --color-border-focus: var(--color-primary);
  --color-shadow-light: rgba(0,0,0,0.12);
  --color-shadow-medium: rgba(0,0,0,0.2);
  --color-shadow-focus: rgba(103, 114, 231, 0.1);
  --color-shadow-error: rgba(217,83,79,0.12);
  --color-shadow-hover: rgba(0,0,0,0.15);
  --color-shadow-active: rgba(0,0,0,0.25);
  
  --spacing-xs: 6px;
  --spacing-sm: 10px;
  --spacing-md: 15px;
  --spacing-lg: 20px;
  --spacing-xl: 35px;
  
  --border-radius-sm: 8px;
  --border-radius-md: 15px;
  --border-radius-lg: 28px;
  --border-radius-xl: 30px;
  
  --font-size-sm: 11px;
  --font-size-md: 12px;
  --font-size-base: 14px;
  --font-size-lg: 18px;
  
  --z-index-modal: 10000;
  --z-index-floating: 9999;
  
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --transition-elastic: 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Reset basics */

:root {
  --ui-font: "Gilroy";
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html,body { height: 100%; }
body {   font-family: var(--ui-font); color: var(--charcoal-color); background: white; -webkit-font-smoothing:antialiased; }

/* ===== GLOBAL ANIMATIONS ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideInFromLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInFromRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200px 0;
  }
  100% {
    background-position: calc(200px + 100%) 0;
  }
}

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

@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 5px rgba(103, 114, 231, 0.3);
  }
  50% {
    box-shadow: 0 0 20px rgba(103, 114, 231, 0.6);
  }
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

@keyframes modalSlideIn {
  0% {
    opacity: 0;
    transform: translateY(-50px) scale(0.9);
  }
  50% {
    opacity: 0.8;
    transform: translateY(10px) scale(1.02);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes errorSlideIn {
  0% {
    opacity: 0;
    transform: translateY(-5px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes errorShake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-2px); }
  20%, 40%, 60%, 80% { transform: translateX(2px); }
}

/* ===== REDUCED MOTION SUPPORT ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Utility / layout */
.container {
  padding: 0px 30px;
  max-width: 9000px;
  margin: auto;
}

.section {
  margin-bottom: 100px;
}

/* GLOBAL elements */
hr { border: none; border-top: 2px solid var(--color-frosted-aether); }
.divider, .divider-footer-space { border-top: 2px solid var(--color-frosted-aether); border-radius: 5px; }
.accent { color: var(--color-nebulyn); }

/* Header / nav helpers (kept from original) */
.header-links { display:flex; gap:40px; align-items:center; }

.nav-link {
  cursor: pointer; position:relative; font-size:16px; font-weight:600; padding:10px;
  color: var(--color-abyss); text-decoration:none;
}
.nav-link::after {
  content:''; position:absolute; left:10px; bottom:5px; width:0; height:3px;
  background-color: var(--color-nebulyn); transition: width .3s ease;
}
.nav-link:hover::after{ width:50%; }

.mobile-header {
  display: none;
}

/* HERO */
.hero { 
  border-radius: 30px; 
  height: 75vh; 
  width: 100%;
  min-height: 500px;
  max-height: 800px;
  display: flex; 
  align-items: center; 
  position: relative; 
  overflow: hidden; 
  transition: all 0.3s ease;
}
.banner-image2 {
  border-radius: var(--border-radius--medium);
  object-fit: cover;
  background-color: var(--color-aether);
  width: 80%;
  height: auto;
  margin-left: 20%;
  min-height: 400px;
  max-height: 600px;
  transition: all 0.3s ease;
  display: block;
  margin-top: 0;
  margin-bottom: 0;
  padding: 0;
  border: none;
  outline: none;
}

/* hero title (kept absolute for overlap design) */
.hero-title-c {
  z-index: 100;
  position: absolute;
  color: white;
  max-width: 40%;
  min-width: 300px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-left: 60px;
  height: 85%;
  justify-content: center;
  padding: 20px;
  transition: all 0.3s ease;
}

/* Dots / features row */
.dot { height:40px; width:40px; border-radius:50%; display:inline-block; margin-bottom: 15px; }

/* PROGRAMMES / CARDS — общий стиль для .programme-card и .card (backwards compat) */
.programs { max-width: var(--max-width); width:100%; margin: 0 auto; }
.programs h2 { text-align:center; margin-bottom:40px; font-size:2rem; color:var(--heading-color); }

/* Responsive grid: auto-fit for flexible column count */
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
  padding: 0 30px;
}

/* Card base (applies to both class names used in markup) */
.programme-card, .card {
  text-decoration: none;
  color: var(--charcoal-color);
  transition: background-color .2s ease-in-out, color .2s ease-in-out;
  cursor: pointer;
  background: var(--card-bg);
  border-radius: var(--card-radius);
  overflow: hidden;
  display: flex;
  align-items: stretch;
  min-height: 220px;
}

/* hover / focus states */
.programme-card:hover, .card:hover,
.programme-card:focus-within, .card:focus-within {
  background-color: var(--nebulyn-color);
  color: white;
  outline: none;
}
.programme-card:hover .programme-card__img img,
.card:hover .card__img img { opacity: .85; transform: scale(1.02); }

/* alternate layout */
.programme-card.reverse, .card.reverse { flex-direction: row-reverse; }

/* image column */
.programme-card__img, .card__img {
  flex: 1 1 50%;
  min-width: 0;
  transition: opacity .2s ease-in-out, transform .25s ease;
  position: relative;
}
.programme-card__img img, .card__img img {
  display:block; width:100%; height:100%; object-fit:cover;
  /* keep custom clip on programme images if used */
  clip-path: ellipse(100% 140% at 100% 50%);
  transition: transform .25s ease, opacity .25s ease;
}

/* content column */
.programme-card__content, .card__content {
  flex: 1 1 50%;
  padding: 30px;
  display:flex; flex-direction:column; justify-content:center;
}
.programme-card__content h3, .card__content h3 { margin-bottom:10px; font-size:1.25rem; }
.programme-card__content p, .card__content p { font-size:1rem; }

.socialmedia {
  display: none;
}

.all-policies {
display: none;
}

/* hover caret/arrow inside content if any */
/* preserve spacing for smaller screens */
@media (max-width: 600px) {
  .programme-card, .card { flex-direction: column; }
  .programme-card.reverse, .card.reverse { flex-direction: column; }
  .programme-card__img, .programme-card__content, .card__img, .card__content {
    flex: none; width:100%;
  }
  .programme-card__content, .card__content { padding:20px; }
  .hero { 
    height: 60vh !important; 
    min-height: 400px !important; 
    max-height: 600px !important; 
    border-radius: 20px !important; 
  }
  .hero-title-c { 
    position: relative; 
    max-width: 90% !important; 
    min-width: auto !important; 
    margin-left: 20px !important; 
    padding: 15px !important; 
    color: var(--charcoal-color); 
    font-size: 0.9em !important;
  }
  .hero-title-c h1 {
    font-size: 28px !important;
    line-height: 32px !important;
  }
  .banner-image2 { 
    width: 100%; 
    margin-left: 0; 
    height: 60vh !important;
    min-height: 400px !important;
    max-height: 600px !important;
  }
}

/* Expertise / teaching section */
.expertise-container { display:flex; justify-content:space-between; align-items:center; gap: 30px; }
.expertise-block { width: 33%; margin-right: 100px; padding: 0 30px; }
.teaching-block { position: relative; right: 80px; }

/* special bubbles */
.bubble {
  background-color: var(--color-light-cinder);
  padding: 10px 25px;
  width: fit-content;
  font-weight: 500;
  color: white;
  border-radius: 30px;
}
.abyss-buble { background-color: var(--color-abyss); padding:20px; width:fit-content; color:white; border-radius:15px; }
.aquor-buble { background-color: var(--color-aquor); padding:20px; width:fit-content; color:var(--color-abyss); border-radius:15px; }

.woman {
  margin-left: -30px;
  margin-bottom: -53px;
  width: auto;
  height: 600px;
}
/* positioned small callouts in the teaching block */
.communicative-language-teaching {
  position: absolute; top:45px; left:-125px; width:264px; z-index: 1;
}
.lexical-approach {
  position: absolute; z-index:10; top:480px; right:-73px; width:258px;
}

/* image cutout / shadows kept */
.image_cutout2 {
  border-top-left-radius: var(--border-radius--medium);
  background-color: #ffffff;
  width: 205px; height: 90px; position: absolute; bottom: 4px; right: -1px;
}
.top-left-box-shadow, .bottom-left-box-shadow {
  width: var(--border-radius--medium); height: var(--border-radius--medium);
  border-bottom-right-radius: var(--border-radius--medium);
  box-shadow: .5rem .5rem 0 .5rem #ffffff; position:absolute;
}
.top-left-box-shadow { top:-1.9rem; right:0; }
.bottom-left-box-shadow { bottom:0; left:-1.9rem; }

/* fate block */
.fate-block { background-color: var(--color-aether); padding:50px 30px; border-radius:30px; display:flex; align-items:center; gap: 20px; }
.fate-definition { padding: 80px; }

/* CTA / signup button */
.signup-button {
  color: white; font-weight:600; text-decoration:none;
  background-color: var(--nebulyn-color); padding:15px 30px; border-radius:16px; width:fit-content;
}
.header-register-button { border-radius:30px; background-color: var(--color-aether); padding:15px 30px; cursor:pointer; }
.header-inquire-button { border-radius:15px; background-color: var(--color-aquor); padding:15px 30px; cursor:pointer; }

/* small layout helpers */
.banner-image { border-radius: var(--border-radius--medium); object-fit: cover; background-color:#ad9c8c; width:100%; height:100%; }
.image-container { position: relative; display:inline-block; margin-bottom:20px; }
.image-container::after { content:""; position:absolute; top:0; left:0; width:100%; height:100%; border-radius:30px; background: rgba(0,0,0,0.2); pointer-events:none; }

/* footer */
.footer { border-top: 2px solid var(--color-frosted-aether); background-color: var(--color-aether); padding:50px; }
.footer-group { display:flex; justify-content:space-between; align-items: center; }
.footer-lower-links { display:flex; gap:30px; font-weight: 400; }

/* forms & inputs (simple) */
.theme-input, input.theme-input, select.theme-input {
  width:100%; font-weight:500; padding:15px 20px; outline:none; border:none; border-radius:16px;
  color: var(--charcoal-color); background-color: white; transition: 0.12s all;
  font-family: "Gilroy"; font-weight: 600; font-size: 16px;
}

/* Стили только для select с theme-input */
select.theme-input {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg width='13' height='11' viewBox='0 0 13 11' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M5.36927 10C5.94662 11 7.38999 11 7.96734 10L12.2975 2.5C12.8748 1.5 12.1531 0.25 10.9984 0.25H2.33817C1.18347 0.25 0.461787 1.5 1.03914 2.5L5.36927 10Z' fill='%23929BB4'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 15px center;
  background-size: 13px;
  padding-right: 45px;
}

/* Стили только для input с theme-input (без стрелочки) */
input.theme-input {
  cursor: text;
  padding-right: 20px;
}
.theme-input::placeholder { color: var(--color-light-cinder); }

/* Убираем стандартную стрелку браузера для select */
select.theme-input::-ms-expand {
  display: none;
}

/* Hover эффект для select */
select.theme-input:hover {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg width='13' height='11' viewBox='0 0 13 11' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M5.36927 10C5.94662 11 7.38999 11 7.96734 10L12.2975 2.5C12.8748 1.5 12.1531 0.25 10.9984 0.25H2.33817C1.18347 0.25 0.461787 1.5 1.03914 2.5L5.36927 10Z' fill='%23444'/%3e%3c/svg%3e");
}

/* Focus эффект для select */
select.theme-input:focus {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg width='13' height='11' viewBox='0 0 13 11' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M5.36927 10C5.94662 11 7.38999 11 7.96734 10L12.2975 2.5C12.8748 1.5 12.1531 0.25 10.9984 0.25H2.33817C1.18347 0.25 0.461787 1.5 1.03914 2.5L5.36927 10Z' fill='%236772E7'/%3e%3c/svg%3e");
}

/* Стили для опций select */
select.theme-input option {
  padding: 12px 15px;
  background: white;
  color: var(--charcoal-color);
  font-family: "Gilroy";
  font-weight: 600;
  font-size: 16px;
}

select.theme-input option:hover {
  background: var(--color-aether);
}

select.theme-input option:checked {
  background: var(--color-nebulyn);
  color: white;
}

/* ===== FORM COMPONENTS ===== */
.form-input {
  width: 100%;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--color-border-default);
  font-size: var(--font-size-base);
  transition: all var(--transition-fast);
  background-color: white;
  color: var(--color-text-primary);
  position: relative;
  will-change: border-color, box-shadow, transform;
}

.form-input:hover {
  border-color: var(--color-border-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.form-input:focus {
  outline: none;
  border-color: var(--color-border-focus);
  box-shadow: 0 0 0 3px var(--color-shadow-focus), 0 4px 16px rgba(103, 114, 231, 0.15);
  transform: translateY(-2px);
}

.form-input:focus::placeholder {
  color: transparent;
  transition: color var(--transition-fast);
}

.form-select {
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg width='13' height='11' viewBox='0 0 13 11' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M5.36927 10C5.94662 11 7.38999 11 7.96734 10L12.2975 2.5C12.8748 1.5 12.1531 0.25 10.9984 0.25H2.33817C1.18347 0.25 0.461787 1.5 1.03914 2.5L5.36927 10Z' fill='%23929BB4'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 15px center;
  background-size: 13px;
  padding-right: 45px;
  transition: all var(--transition-fast);
}

.form-select:hover {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg width='13' height='11' viewBox='0 0 13 11' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M5.36927 10C5.94662 11 7.38999 11 7.96734 10L12.2975 2.5C12.8748 1.5 12.1531 0.25 10.9984 0.25H2.33817C1.18347 0.25 0.461787 1.5 1.03914 2.5L5.36927 10Z' fill='%23444'/%3e%3c/svg%3e");
}

.form-select:focus {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg width='13' height='11' viewBox='0 0 13 11' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M5.36927 10C5.94662 11 7.38999 11 7.96734 10L12.2975 2.5C12.8748 1.5 12.1531 0.25 10.9984 0.25H2.33817C1.18347 0.25 0.461787 1.5 1.03914 2.5L5.36927 10Z' fill='%236772E7'/%3e%3c/svg%3e");
}

/* Убираем стандартную стрелку браузера */
.form-select::-ms-expand {
  display: none;
}

/* Стили для опций select */
.form-select option {
  padding: 12px 15px;
  background: white;
  color: var(--color-text-primary);
  font-family: "Gilroy";
  font-weight: 600;
  font-size: 16px;
}

.form-select option:hover {
  background: var(--color-aether);
}

.form-select option:checked {
  background: var(--color-primary);
  color: white;
}

/* ===== ERROR STATES ===== */
.form-error {
  color: var(--color-error);
  font-size: var(--font-size-base);
  margin-top: var(--spacing-xs);
  display: block;
  font-weight: 600;
  text-align: left;
  animation: errorSlideIn 0.3s ease-out;
  transform: translateY(0);
  opacity: 1;
  animation-fill-mode: forwards;
}

.form-input--error {
  box-shadow: 0 0 0 2px var(--color-shadow-error);
  border-color: var(--color-error) !important;
  animation: errorShake 0.5s ease-in-out;
}

/* focus states accessibility */
button:focus, a:focus, .programme-card:focus, .card:focus {
  box-shadow: 0 0 0 4px rgba(103,114,231,0.12); outline: none;
}

.faq-block {
padding: 0px 30px;
display: flex;
flex-direction: row;
align-items: center;
}

.faq-header {
width: 100%;
margin-right: 100px;
}

.cta-container {
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:20px;
}

.cta-form {
  background-color:#F6F7FB; border-radius:30px; padding:20px; display:flex; gap:20px; align-items:center;
}
/* responsive adjustments for medium screens */
@media (max-width: 768px) {
  .callme-modal {
    margin-inline: 40px;
  }
  .castle {
    width: 100%; height: auto;
  }
  .woman {
    width: 100%; height: auto;
  }
  .butterfly {
    display: none;
  }
  .cta-form {
    flex-direction: column;
  }
  
  /* Мобильные стили для select */
  select.theme-input {
    font-size: 16px !important;
    padding: 12px 15px !important;
    padding-right: 45px !important;
  }
  .cta-image {
    order: 2;
  }
  .cta-container {
    display:flex;
    flex-direction: column;
    gap:20px;
  }

      .arrow {
        width: 50px;
        margin-left: 40px;
    }
        .footer-group {
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
    }

        .footer-upper-links {
        margin-top: 30px;
        gap: 40px !important;
        align-items: center !important;
                flex-direction: column !important;
    }

    .nav-link {
        padding: 0px !important;
    }

    .faq-header {
        margin-right: 0px;
    }

      .mobile-wrapper * {
        box-sizing: border-box !important;
        max-width: 100% !important;
        /* overflow-x: hidden !important; */
    }

        .footer-lower-links {
        display: none !important;
    }

    .socialmedia {
        display: flex;
        flex-direction: row;
        gap: 15px;
    }

        .socialmedia_desk {
        display: none !important;
    }

  .hero-title-c { margin-left:0 !important; padding:20px; position: relative !important; color: var(--charcoal-color); max-width: 100%; }
  .fate-definition { padding: 0; order: -1; }
  .fate-block { padding: 0; flex-direction: column; gap: 15px; }
  .expertise-container { flex-direction: column; gap: 30px; }
  .bg-color { background-color: transparent; }
  .grid { padding: 0; }
  .expertise-block { order:1; width: auto; margin-right: 0; overflow: hidden !important; padding: 0; }
  .signup-button { display:block; width:auto; text-align:center; }
  .teaching-block { display:flex; flex-direction:column; gap:10px; right:0; }
  .communicative-language-teaching, .lexical-approach { position: static; width: auto; }
  .image_cutout2 { display:none; }

  

      .woman {
        margin-left: 0px !important;
        margin-bottom: 0px !important;
    }

        .faq-block {
        flex-direction: column;
        padding: 0px;
        gap: 20px;
    }

      .communicative-language-teaching {
        position: unset;
        top: 0;
        left: 0;
        width: auto;
    }


  .mobile-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 20px;
    justify-content: space-between;
    overflow-x: unset !important;
  }

  .header {
    display: none !important;
  }

      .existing-students {
        display: none !important;
    }
    

        .scroll-me {
        overflow-x: auto !important;
    }

        .dots-mobile {
        width: 2000px;
        max-width: fit-content !important;
    }

        .dot-container {
        width: 200px !important;
        max-width: none !important;
        overflow-x: auto !important;
    }

        .grid {
        grid-template-columns: 1fr;
        padding: 0px;
    }

        .programme-card.reverse {
        flex-direction: column;
    }

        .programme-card__img img {
        clip-path: none !important;
    }
    
}

/* small cosmetic helpers used across page */
.stats { display:flex; gap:50px; justify-content:flex-end; }
.stat { width:110px; }
.spoilers, .spoiler { display:flex; flex-direction:column; gap:15px; background-color: var(--color-aether); padding:30px; border-radius:30px; }
.badge { z-index:100; color:#fff; background-color:#00000010; padding:10px 20px; border-radius:30px; position:absolute; right:0; margin:40px 20px; }

/* fallback for any remaining legacy names (keeps compatibility) */
.programme-card__img img[style], .programme-card__img img { 
  /* preserve custom clip if inline set */
  display: block;
}



.spoiler-container {
  background-color: var(--aether-color);
  border-radius: 30px;
  padding: 30px;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out;
}

.spoiler-container-active {
  background-color: #F0F1FD;
}

.spoiler-header {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  transition: color 0.2s ease-in-out;
}

.spoiler-header-active {
  color: var(--nebulyn-color);
}

.shown-spoiler-description {
    margin-top: 30px;
  display: block;
  width: 55%;
}

.hidden-spoiler-description {
  margin-top: 30px;
  display: none;
}


.arrow {
  transition: rotate 0.5s ease-in-out;
}

.arrow-active {
  rotate: -90deg;
}


.existing-students {
  background-color: var(--color-abyss);
  display: flex;
  flex-direction: row;
  justify-content: end;
}

.existing-students-login {
  background-color: var(--color-nebulyn);
  padding: 7px 50px;
  text-decoration: none;
  color: white;
  font-weight: 600;
}

.header {
  padding: 20px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: white;
}

.feswee {
  width: 156px;
  height: auto;
}

.header-links {
  display: flex;
  flex-direction: row;
  gap: 40px;
}

.nav-link {
  cursor: pointer;
  position: relative;
  font-size: 16px;
  font-weight: 600;
  padding: 10px;
  margin-left: 10px;
  margin-right: 10px;
  
  color: var(--abyss-color);
  
  text-decoration: none;
}

/* Underline effect */
.nav-link::after {
  content: '';
  position: absolute;
  left: 10px;
  bottom: 5px; /* Adjust distance from text */
  width: 0;
  height: 3px; /* Adjust underline thickness */
  background-color: #6c63ff; /* Match the purple color */
  transition: width 0.3s ease;
}

/* Hover effect */
.nav-link:hover::after {
  width: 50%;
}

.header-buttons {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;

  font-weight: 600;
}

.header-register-button {
  border-radius: 30px;
  background-color: var(--color-aether);
  padding: 15px 30px;

  cursor: pointer;
}

.header-inquire-button {
  border-radius: 15px;
  background-color: var(--color-aquor);
  padding: 15px 30px;

  cursor: pointer;
  color: var(--charcoal-color);
  text-decoration: none;
}

.header-enroll-button {
  border-radius: 15px;
  background-color: var(--color-aether);
  padding: 15px 30px;

  cursor: pointer;
  color: var(--charcoal-color);
  text-decoration: none;
}

.nav-link-active:after {
  content:''; position:absolute; left:10px; bottom:5px; width:0; height:3px;
  background-color: var(--color-nebulyn); 
  width:50%;
}

.btn {
  box-sizing: border-box;
margin: 0;
min-width: 0;
-webkit-appearance: none;
-moz-appearance: none;
-ms-appearance: none;
appearance: none;
display: inline-block;
text-align: center;
line-height: inherit;
-webkit-text-decoration: none;
text-decoration: none;
font-size: inherit;
padding-left: 16px;
padding-right: 16px;
padding-top: 8px;
padding-bottom: 8px;
color: white;
background-color: primary;
border: 0;
border-radius: 4px;
outline: none;
-webkit-transition: 0.1s all;
transition: 0.1s all;
cursor: pointer;
border-radius: 16px;
font-weight: bold;
font-size: 16px;
padding: 15px 30px;
width: 100%;
color: var(--nebulyn-color);
background-color: #6772E720;
}

.btn:hover {
  background-color: #6772E740;
}

.btn-cpa {
  background-color: var(--nebulyn-color);
  color: white;
}

.btn-cpa:hover {
  background-color: #545dc1;
}


/* ===== MODAL SYSTEM ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--color-background-overlay);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: var(--z-index-modal);
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity var(--transition-smooth);
}

.modal-overlay--open { 
  display: flex;
  animation: fadeIn 0.3s ease-out forwards;
}

.modal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-md);
  width: 100%;
  max-width: 480px;
  background: #fff;
  border-radius: var(--border-radius-xl);
  padding: 22px;
  box-shadow: 0 20px 60px var(--color-shadow-medium);
  position: relative;
  transform: translateY(-50px) scale(0.9);
  opacity: 0;
  transition: all var(--transition-elastic);
  will-change: transform, opacity;
}

.modal-overlay--open .modal {
  animation: modalSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.modal__close {
  position: absolute;
  top: var(--spacing-sm);
  right: var(--spacing-sm);
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: var(--font-size-lg);
  color: var(--color-text-secondary);
  transition: all var(--transition-fast);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  will-change: transform, background-color, color;
}

.modal__close:hover {
  color: var(--color-text-primary);
  background-color: rgba(0, 0, 0, 0.05);
  transform: scale(1.1) rotate(90deg);
}

.modal__close:active {
  transform: scale(0.95) rotate(90deg);
  background-color: rgba(0, 0, 0, 0.1);
}

.modal__title {
  margin-top: 0;
  margin-bottom: 12px;
}

.modal__success {
  text-align: center;
  padding: var(--spacing-lg) var(--spacing-sm);
}

/* ===== HERO CTA FORM ===== */
.hero-cta-form {
  z-index: 101;
  position: absolute;
  bottom: var(--spacing-xl);
  left: var(--spacing-xl);
  right: var(--spacing-xl);
  background: white;
  border-radius: 25px;
  padding: var(--spacing-lg);
  box-shadow: 0 8px 32px var(--color-shadow-light);
  animation: fadeInUp 0.8s ease-out 0.3s both;
  will-change: transform, opacity;
}

.hero-cta-form__inputs {
  display: flex;
  flex-direction: row;
  gap: 12px;
  width: 100%;
  align-items: end;
}

/* Применяем стили theme-input к hero CTA элементам */
.hero-cta-form__select,
.hero-cta-form__name,
.hero-cta-form__phone {
  width: 100%;
  font-weight: 500;
  padding: 15px 20px;
  outline: none;
  border: none;
  border-radius: 16px;
  color: var(--charcoal-color);
  background-color: #F6F7FB;
  transition: 0.12s all;
  font-family: "Gilroy";
  font-weight: 600;
  font-size: 16px;
}

.hero-cta-form__select {
  flex: 1;
  min-width: 150px;
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg width='13' height='11' viewBox='0 0 13 11' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M5.36927 10C5.94662 11 7.38999 11 7.96734 10L12.2975 2.5C12.8748 1.5 12.1531 0.25 10.9984 0.25H2.33817C1.18347 0.25 0.461787 1.5 1.03914 2.5L5.36927 10Z' fill='%23929BB4'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 15px center;
  background-size: 13px;
  padding-right: 45px;
}

.hero-cta-form__select:hover {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg width='13' height='11' viewBox='0 0 13 11' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M5.36927 10C5.94662 11 7.38999 11 7.96734 10L12.2975 2.5C12.8748 1.5 12.1531 0.25 10.9984 0.25H2.33817C1.18347 0.25 0.461787 1.5 1.03914 2.5L5.36927 10Z' fill='%23444'/%3e%3c/svg%3e");
}

.hero-cta-form__select:focus {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg width='13' height='11' viewBox='0 0 13 11' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M5.36927 10C5.94662 11 7.38999 11 7.96734 10L12.2975 2.5C12.8748 1.5 12.1531 0.25 10.9984 0.25H2.33817C1.18347 0.25 0.461787 1.5 1.03914 2.5L5.36927 10Z' fill='%236772E7'/%3e%3c/svg%3e");
}

.hero-cta-form__select::-ms-expand {
  display: none;
}

.hero-cta-form__select option {
  padding: 12px 15px;
  background: #F6F7FB;
  color: var(--charcoal-color);
  font-family: "Gilroy";
  font-weight: 600;
  font-size: 16px;
}

.hero-cta-form__select option:hover {
  background: var(--color-aether);
}

.hero-cta-form__select option:checked {
  background: var(--color-nebulyn);
  color: white;
}

.hero-cta-form__name {
  flex: 1;
  min-width: 0;
}

.hero-cta-form__phone {
  flex: 1;
  min-width: 0;
}

.hero-cta-form__name::placeholder,
.hero-cta-form__phone::placeholder {
  color: var(--color-light-cinder);
}

.hero-cta-form__trust-indicators {
  margin-top: 12px;
  padding: 12px;
  background: rgba(76, 175, 80, 0.1);
  border-radius: 8px;
  border-left: 3px solid #4CAF50;
}

.hero-cta-form__button {
  /* Применяем стили btn и btn-cpa */
  box-sizing: border-box;
  margin: 0;
  min-width: 0;
  -webkit-appearance: none;
  -moz-appearance: none;
  -ms-appearance: none;
  appearance: none;
  display: inline-block;
  text-align: center;
  line-height: inherit;
  -webkit-text-decoration: none;
  text-decoration: none;
  font-size: inherit;
  padding-left: 16px;
  padding-right: 16px;
  padding-top: 8px;
  padding-bottom: 8px;
  color: white;
  background-color: var(--nebulyn-color);
  border: 0;
  border-radius: 4px;
  outline: none;
  -webkit-transition: 0.1s all;
  transition: 0.1s all;
  cursor: pointer;
  border-radius: 16px;
  font-weight: bold;
  font-size: 16px;
  padding: 15px 30px;
  white-space: nowrap;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  will-change: transform, box-shadow;
}

.hero-cta-form__button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.hero-cta-form__button:hover {
  background-color: #545dc1;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.hero-cta-form__button:hover::before {
  width: 300px;
  height: 300px;
}

.hero-cta-form__button:active {
  transform: translateY(0);
  transition: all 0.1s ease;
}

.hero-cta-form__button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
  animation: pulse 1.5s infinite;
}

.hero-cta-form__disclaimer {
  font-size: 12px;
  color: #586380;
  margin-top: 10px;
  text-align: right;
}

/* ===== HERO CTA FORM ERROR STYLES ===== */
.hero-cta-form__select-container,
.hero-cta-form__name-container,
.hero-cta-form__phone-container {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.hero-cta-form .form-error {
  position: absolute;
  top: 50px;
  color: var(--color-error);
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  padding: 4px 8px;
  z-index: 10;
  animation: errorSlideIn 0.3s ease-out;
  transform: translateY(-5px);
  opacity: 0;
  animation-fill-mode: forwards;
}

      @keyframes bubbleBackdrop {
        from { opacity: 0; }
        to { opacity: 1; }
      }
      @keyframes bubbleAppear {
        from {
          opacity: 0;
          transform: translateY(-20px) scale(0.95);
        }
        to {
          opacity: 1;
          transform: translateY(0) scale(1);
        }
      }

/* ===== HERO CTA MOBILE STYLES ===== */
@media (max-width: 768px) {
  .hero-cta-form {
    left: 10px;
    right: 10px;
    width: calc(100% - 20px);
  }
  
  .hero-cta-form__inputs {
    flex-direction: column;
    gap: 12px;
    width: 100%;
  }
  
  .hero-cta-form__select-container,
  .hero-cta-form__name-container,
  .hero-cta-form__phone-container {
    width: 100%;
    flex: none;
    position: relative;
    margin-bottom: 8px;
  }
  
  .hero-cta-form__select,
  .hero-cta-form__name,
  .hero-cta-form__phone {
    width: 100%;
    flex: none;
  }
  
  .hero-cta-form__button {
    width: 100%;
    flex: none;
  }
  
  /* Исправляем отображение ошибок на мобильных устройствах */
  .hero-cta-form .form-error {
    position: static !important;
    top: auto !important;
    margin-top: 4px !important;
    margin-bottom: 4px !important;
    padding: 4px 0 !important;
    font-size: 11px !important;
    line-height: 1.3 !important;
    z-index: auto !important;
    transform: none !important;
    opacity: 1 !important;
    animation: errorSlideIn 0.3s ease-out;
    animation-fill-mode: forwards;
  }
  
  /* Добавляем отступ снизу для контейнеров с ошибками */
  .hero-cta-form__select-container:has(.form-error),
  .hero-cta-form__name-container:has(.form-error),
  .hero-cta-form__phone-container:has(.form-error) {
    margin-bottom: 12px;
  }
  
  /* Fallback для браузеров без поддержки :has() */
  .hero-cta-form__select-container.has-error,
  .hero-cta-form__name-container.has-error,
  .hero-cta-form__phone-container.has-error {
    margin-bottom: 12px;
  }
}

/* Дополнительные стили для очень маленьких экранов */
@media (max-width: 480px) {
  .hero-cta-form .form-error {
    font-size: 10px !important;
    margin-top: 2px !important;
    margin-bottom: 2px !important;
    padding: 2px 0 !important;
    opacity: 1 !important;
  }
  
  .hero-cta-form__select-container.has-error,
  .hero-cta-form__name-container.has-error,
  .hero-cta-form__phone-container.has-error {
    margin-bottom: 8px;
  }
}

/* Tablet styles */
@media (min-width: 769px) and (max-width: 1024px) {
  .hero { 
    height: 70vh !important; 
    min-height: 500px !important; 
    max-height: 700px !important; 
  }
  .hero-title-c { 
    max-width: 45% !important; 
    margin-left: 40px !important; 
    padding: 20px !important; 
  }
  .hero-title-c h1 {
    font-size: 36px !important;
    line-height: 40px !important;
  }
  .banner-image2 { 
    height: 70vh !important;
    min-height: 500px !important;
    max-height: 700px !important;
  }
}

/* Large screens styles */
@media (min-width: 1400px) {
  .hero { 
    height: 80vh !important; 
    min-height: 600px !important; 
    max-height: 900px !important; 
  }
  .hero-title-c { 
    max-width: 40% !important; 
    margin-left: 20px !important; 
    padding: 30px !important; 
  }
  .hero-title-c h1 {
    font-size: 48px !important;
    line-height: 52px !important;
  }
  .banner-image2 { 
    height: 80vh !important;
    min-height: 600px !important;
    max-height: 900px !important;
  }
}

/* ===== PAGE ELEMENTS ANIMATIONS ===== */
/* Initial state - elements are hidden */
.hero-title-c {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-title-c h1 {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.1s;
}

.hero-title-c p {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.2s;
}

.banner-image2 {
  opacity: 0;
  transform: scale(0.9);
  transition: all 1s cubic-bezier(0.4, 0, 0.2, 1) 0.3s;
}

.programme-card {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.programme-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.communicative-language-teaching {
  z-index: 1;
}

.bubble {
  opacity: 0;
  transform: scale(0.9);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.bubble::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: shimmer 3s infinite;
}

.dot {
  opacity: 0;
  transform: scale(0);
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.dot.animate-in {
  animation: pulse 2s infinite;
}

.castle {
  opacity: 0;
  transform: translateY(20px);
  transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.castle.animate-in {
  animation: float 6s ease-in-out infinite;
}

.image_cutout2 {
  z-index: 2;
  opacity: 1;
}

.image_cutout2.animate-in {
  animation: float 6s ease-in-out infinite;
}

.woman {
  opacity: 0;
  transform: translateX(30px);
  transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.butterfly {
  opacity: 0;
  transform: translateY(20px);
  transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.butterfly.animate-in {
  animation: float 4s ease-in-out infinite;
}

/* Animated state - triggered by scroll */
.hero-title-c.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.hero-title-c.animate-in h1 {
  opacity: 1;
  transform: translateY(0);
}

.hero-title-c.animate-in p {
  opacity: 1;
  transform: translateY(0);
}

.banner-image2.animate-in {
  opacity: 1;
  transform: scale(1);
}

.programme-card.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.bubble.animate-in {
  opacity: 1;
  transform: scale(1);
}

.dot.animate-in {
  opacity: 1;
  transform: scale(1);
}

.castle.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.image_cutout2.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.woman.animate-in {
  opacity: 1;
  transform: translateX(0);
}

.butterfly.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* ===== INTERACTIVE ELEMENTS ===== */
.btn {
  transition: all var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.btn:active {
  transform: translateY(0);
  transition: all 0.1s ease;
}

/* ===== SCROLL ANIMATIONS ===== */
.section {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.section.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.section:nth-child(1) { transition-delay: 0s; }
.section:nth-child(2) { transition-delay: 0.1s; }
.section:nth-child(3) { transition-delay: 0.2s; }
.section:nth-child(4) { transition-delay: 0.3s; }
.section:nth-child(5) { transition-delay: 0.4s; }

/* ===== ADDITIONAL ANIMATION CLASSES ===== */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in-up.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-scale {
  opacity: 0;
  transform: scale(0.9);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in-scale.animate-in {
  opacity: 1;
  transform: scale(1);
}

.fade-in-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in-left.animate-in {
  opacity: 1;
  transform: translateX(0);
}

.fade-in-right {
  opacity: 0;
  transform: translateX(30px);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in-right.animate-in {
  opacity: 1;
  transform: translateX(0);
}