/* === css/components/advantages-grid.css === */
/* ==========================================================================
   Advantages Grid - 6 карток переваг (блок 2А)
   ========================================================================== */

.advantages-grid-section {
  padding: var(--section-padding-desktop);
  margin-bottom: var(--section-spacing-desktop);
  width: 100%;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

/* Br прихований на desktop - показується тільки на мобайлі */
.mobile-br { display: none; }

/* Золотий акцент "20 000+" */
.highlight-gold { color: #f5c842; }

.advantages-grid-section .section-title {
  text-align: center;
  margin-bottom: 0.75rem;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-white);
}

.advantages-grid-section__subtitle {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 2.75rem;
  font-size: 1.15rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.7;
  letter-spacing: 0.01em;
}

.advantages-grid-section__subtitle strong {
  color: var(--color-white);
  font-weight: 700;
}

/* === GRID === */

/* flex-wrap + justify-content:center - центрує неповний останній ряд (5 карток) */
.advantages-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
}

/* === FEATURE CARD === */

.feature-card {
  flex: 0 1 calc(33.333% - 1rem);
  min-width: 260px;
  padding: 1.5rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: transform var(--transition-normal) ease,
              border-color var(--transition-normal) ease;
  box-sizing: border-box;
}

/* іконка + заголовок в рядок */
.feature-card__header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.feature-card__icon {
  font-size: 1.8rem;
  flex-shrink: 0;
  line-height: 1;
}

.feature-card__title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-white);
  margin: 0;
  line-height: 1.3;
}

/* Текст на всю ширину картки - під заголовком і під іконкою */
.feature-card__text {
  font-size: 0.9rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.75);
  width: 100%;
  margin: 0;
  line-height: 1.55;
}

/* === HOVER (desktop only) === */

@media (hover: hover) and (pointer: fine) {
  .feature-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.2);
  }
}

/* === FOCUS === */

.feature-card:focus-visible {
  outline: 2px solid rgba(100, 149, 237, 0.8);
  outline-offset: 2px;
}

/* === TABLET === */

@media (width >= 768px) and (width < 1024px) {
  .advantages-grid-section {
    padding: var(--section-padding-desktop);
  }

  .advantages-grid-section .section-title {
    font-size: 2rem;
    margin-bottom: 0.6rem;
  }

  .advantages-grid-section__subtitle {
    font-size: 1.05rem;
    margin-bottom: 2rem;
  }

  .advantages-grid {
    gap: 1.25rem;
  }

  .feature-card {
    flex: 0 1 calc(50% - 0.625rem);
    min-width: 0;
  }
}

/* === MOBILE === */

@media (width < 768px) {
  .advantages-grid-section {
    padding: var(--section-padding-mobile);
    margin-bottom: var(--section-spacing-mobile);
    max-width: 100%;
    box-sizing: border-box;
  }

  .mobile-br { display: block; }

  .advantages-grid-section .section-title {
    font-size: clamp(1.35rem, 6.2vw, 1.7rem);
    margin-bottom: 0.5rem;
    white-space: normal;
    overflow-wrap: anywhere;
    text-wrap: balance;
  }

  .advantages-grid-section__subtitle {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    padding: 0 0.25rem;
    white-space: normal;
  }

  /* На мобайлі - 1 колонка, картки йдуть вертикально одна за одною */
  .advantages-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .feature-card {
    min-width: 0;
    padding: 0.875rem;
    border-radius: 10px;
  }

  .feature-card__header {
    gap: 0.5rem;
    margin-bottom: 0.5rem;
  }

  .feature-card__icon {
    font-size: 1.4rem;
  }

  .feature-card__title {
    font-size: 0.9rem;
  }

  .feature-card__text {
    font-size: 0.8rem;
    line-height: 1.4;
  }
}

/* === VERY SMALL MOBILE === */

@media (width < 360px) {
  .advantages-grid {
    gap: 0.625rem;
  }

  .feature-card {
    padding: 0.75rem;
  }
}

/* === iOS Safari === */

@supports (-webkit-touch-callout: none) {
  .feature-card {
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
  }
}

/* === FALLBACK === */

@supports not (backdrop-filter: blur(8px)) {
  .feature-card {
    background: rgba(0, 0, 0, 0.6);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

/* === REDUCED MOTION === */

@media (prefers-reduced-motion: reduce) {
  .feature-card {
    transition: none;
  }

  .feature-card:hover {
    transform: none;
  }
}

/* === css/components/kids-light.css === */
/* Світла сторінка дитячих програм */

.parallax-container--kids {
  display: none;
}

.kids-page {
  width: min(72rem, calc(100% - 2rem));
  margin: 2rem auto 4rem;
}

.kids-page h1,
.kids-page h2,
.kids-page h3 {
  font-family: var(--font-head);
  color: #1a1a1a;
}

.kids-page p,
.kids-page li {
  font-family: var(--font-body);
  color: #3a3a3a;
}

.kids-hero,
.kids-why,
.kids-ages,
.kids-grant,
.kids-cta {
  background: #fff;
  border: 1px solid #dadada;
  border-radius: 10px;
  padding: 2.5rem 2rem;
  margin-bottom: 1.5rem;
}

.kids-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: 1.5rem;
  text-align: left;
}

.kids-hero__photo {
  width: 100%;
  height: auto;
}

.kids-hero h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.15;
  margin: 0 0 0.75rem;
}

.kids-hero__subtitle {
  font-size: 1.15rem;
  margin: 0 0 1.5rem;
  max-width: 36rem;
}

.kids-why h2,
.kids-ages h2,
.kids-grant h2,
.kids-cta h2 {
  text-align: center;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  margin: 0 0 0.5rem;
}

.kids-why__lead,
.kids-ages__lead,
.kids-grant__lead,
.kids-cta p {
  text-align: center;
  max-width: 40rem;
  margin: 0 auto 2rem;
}

.kids-why .advantages-grid {
  margin-top: 0.5rem;
}

.kids-page .feature-card {
  background: #fff;
  color: #1a1a1a;
  border: 1px solid #dadada;
  box-shadow: none;
  backdrop-filter: none;
}

.kids-page .feature-card__title {
  font-family: var(--font-head);
  color: #1a1a1a;
}

.kids-page .feature-card__text {
  color: #3a3a3a;
}

.kids-ages__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.kids-age {
  border: 1px solid #dadada;
  border-radius: 10px;
  padding: 1.25rem;
  text-decoration: none;
}

.kids-age h3 {
  margin: 0 0 0.4rem;
  font-size: 1.35rem;
}

.kids-age p {
  margin: 0;
}

.kids-prices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  max-width: 46rem;
  margin: 0 auto 1.25rem;
}

.kids-price {
  border: 1px solid #dadada;
  border-radius: 10px;
  padding: 1.5rem 1.25rem;
  text-align: center;
}

.kids-price h3 {
  margin: 0 0 0.25rem;
  font-size: 1.5rem;
}

.kids-price__term,
.kids-price__old,
.kids-price__save,
.kids-grant__pay {
  margin: 0;
}

.kids-price__term {
  margin-bottom: 1rem;
}

.kids-price__old {
  color: #6b6b6b;
  text-decoration: line-through;
}

.kids-price__new {
  margin: 0.25rem 0;
  font-family: var(--font-head);
  font-size: 2rem;
  color: #1a1a1a;
}

.kids-price__pay {
  margin-top: 1rem;
  width: 100%;
}

.kids-price__save {
  color: #e5231b;
}

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

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

@media (hover: hover) and (pointer: fine) {
  .kids-page .feature-card:hover,
  .kids-age:hover {
    transform: none;
    border-color: #e5231b;
  }
}

@media (width <= 800px) {
  .kids-ages__grid,
  .kids-prices {
    grid-template-columns: 1fr;
  }

  .kids-hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .kids-hero__subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .kids-hero,
  .kids-why,
  .kids-ages,
  .kids-grant,
  .kids-cta {
    padding: 1.5rem 1rem;
  }
}

/* Фото між «Чому Speak Up» і «Програми за віком» */
.kids-photos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.kids-photos figure {
  margin: 0;
}

.kids-photos img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 10px;
}

.kids-photos figcaption {
  margin-top: 0.6rem;
  color: #6b6b6b;
  font-size: 0.95rem;
  text-align: center;
}

@media (width <= 640px) {
  .kids-photos {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

/* Ціни з підписами «Стандартна ціна» / «Ціна з грантом» */
.kids-price__pair {
  margin: 0.25rem 0;
}

.kids-price .price-pair__item--new .price-pair__value {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 400;
  color: #1a1a1a;
}

/* «Типи занять»: картка-кнопка (індивідуальні) виглядає як інші картки */
button.kids-age {
  font: inherit;
  color: inherit;
  text-align: inherit;
  background: inherit;
  cursor: pointer;
}

/* Безкоштовна мовна експертиза: що входить */
.kids-expertise {
  max-width: 40rem;
  margin: 0 auto 1.5rem;
  padding: 0;
  list-style: none;
  text-align: left;
  line-height: 1.5;
}

.kids-expertise li {
  position: relative;
  padding: 6px 0 6px 28px;
}

.kids-expertise li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--color-primary, #e5231b);
  font-weight: 700;
}

#expertise {
  scroll-margin-top: 110px;
}

#grant {
  scroll-margin-top: 110px;
}

/* Що входить у пакет: розгортається стрілкою під ціною */
.kids-price__more {
  margin: 0.75rem 0 1rem;
  text-align: left;
}

.kids-price__more summary {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

.kids-price__more summary::-webkit-details-marker {
  display: none;
}

.kids-price__more summary::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid currentcolor;
  border-bottom: 2px solid currentcolor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform .2s;
}

.kids-price__more[open] summary::after {
  transform: rotate(-135deg) translateY(-2px);
}

.kids-price__features {
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.95rem;
  line-height: 1.45;
}

.kids-price__features li {
  position: relative;
  padding: 5px 0 5px 26px;
}

.kids-price__features li::before {
  content: "✅";
  position: absolute;
  left: 0;
  font-size: 0.85rem;
}

/* Дві групи цін: Стандарт і Premium з носієм мови */
.kids-prices__group {
  margin: 1.5rem 0 0.25rem;
  font-size: 1.5rem;
}

.kids-prices__group-lead {
  margin: 0 0 1rem;
}

/* === css/components/payment-components.css === */
/**
 * Payment Components Styles
 * Стилі для компонентів оплати (модалки, форми, лоадери)
 */

/* Installment Form Modal */
.payment-installment-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 1rem;
  backdrop-filter: blur(5px);
  animation: fadeIn 0.3s ease-out;
}

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

.payment-installment-modal {
  position: relative;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.98);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.payment-installment-modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  color: #666;
  transition: color 0.3s ease;
  padding: 0;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.payment-installment-modal__close:hover {
  color: #333;
}

.payment-installment-modal__title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 0.5rem;
}

.payment-installment-modal__subtitle {
  font-size: 1rem;
  color: #666;
  margin-bottom: 2rem;
}

.payment-installment-form .form-group {
  margin-bottom: 1.5rem;
}

.payment-installment-form label {
  display: block;
  font-weight: 600;
  color: #333;
  margin-bottom: 0.5rem;
}

.payment-installment-form input,
.payment-installment-form select {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.payment-installment-form input:focus,
.payment-installment-form select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.payment-installment-form small {
  display: block;
  margin-top: 0.375rem;
  font-size: 0.875rem;
  color: #666;
}

.payment-installment-info {
  background: #f0f7ff;
  padding: 1rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  border-left: 4px solid #667eea;
}

.payment-installment-info p {
  margin: 0.5rem 0;
  font-size: 0.875rem;
  color: #333;
}

/* Payment Loader */
.payment-loader-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  backdrop-filter: blur(8px);
}

.payment-loader {
  text-align: center;
  color: white;
}

.payment-loader__spinner {
  width: 60px;
  height: 60px;
  border: 5px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  margin: 0 auto 1.5rem;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.payment-loader__message {
  font-size: 1.125rem;
  font-weight: 500;
  margin: 0;
}

/* Payment Waiting (for payparts) */
.payment-waiting-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  padding: 1rem;
  backdrop-filter: blur(8px);
}

.payment-waiting {
  max-width: 500px;
  width: 100%;
  padding: 3rem 2rem;
  background: rgba(255, 255, 255, 0.98);
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.payment-waiting__icon {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  animation: pulse 2s ease-in-out infinite;
}

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

.payment-waiting__title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 1rem;
}

.payment-waiting__message {
  font-size: 1.125rem;
  color: #666;
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

.payment-waiting__hint {
  font-size: 0.875rem;
  color: #999;
  margin-bottom: 2rem;
}

.payment-waiting__spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(102, 126, 234, 0.3);
  border-top-color: #667eea;
  border-radius: 50%;
  margin: 0 auto 1.5rem;
  animation: spin 1s linear infinite;
}

.payment-waiting__order-id {
  font-size: 0.75rem;
  color: #999;
  margin: 0;
  font-family: monospace;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .payment-installment-modal {
    padding: 1.5rem;
    max-height: 95vh;
  }

  .payment-installment-modal__title {
    font-size: 1.5rem;
  }

  .payment-waiting {
    padding: 2rem 1.5rem;
  }

  .payment-waiting__title {
    font-size: 1.5rem;
  }
}

/* iOS Safari specific fixes */
@supports (-webkit-touch-callout: none) {
  .payment-installment-modal,
  .payment-waiting {
    max-height: 85vh;
  }
}
