/* ==========================================================================
   Adults Advantages Section - Hero Block з 2-колонковим layout
   ========================================================================== */

/* === ЗАГАЛЬНА СЕКЦІЯ ПЕРЕВАГ === */

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

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

/* === СТИЛІ ДЛЯ ЗАГОЛОВКІВ HERO СЕКЦІЇ === */

.section-title--hero {
  margin-bottom: 0.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 2.65rem;
  font-weight: 700;
  line-height: 1.2;
}

.section-subtitle--hero {
  text-align: center;
  font-size: 1.2rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
}

/* === HERO ВЕРСІЯ З ДВОМА КОЛОНКАМИ === */

.advantages-section--hero {
  position: relative;
  padding: 2rem 2rem 0 2rem;
  overflow: visible;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 2rem;
  max-width: 1400px;
  margin-top: calc(var(--header-height, 80px) + 1rem);
  margin-bottom: var(--section-spacing-desktop);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  align-items: stretch;
}

/* === ЗАГОЛОВКИ HERO СЕКЦІЇ (ЗАЙМАЮТЬ ВСЮ ШИРИНУ) === */

.advantages-section__header {
  grid-column: 1 / -1;
  margin-bottom: 1rem;
}

.advantages-section__header .section-title--hero {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.advantages-section__header .section-subtitle--hero {
  margin-top: 5px;
  margin-bottom: 0;
}

/* === ЛІВА КОЛОНКА З ЗОБРАЖЕННЯМ === */

.advantages-hero__left {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: visible;
  border-radius: 12px;
  align-items: stretch;
}

.advantages-hero__image-wrapper {
  margin-top: auto;
}

/* === КОНТЕЙНЕР ЗІ ЗОБРАЖЕННЯМ === */

.advantages-hero__image-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 5 / 3;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
}

.advantages-hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left bottom;
  display: block;
}

/* === КОНТЕЙНЕР З КНОПКАМИ У ПРАВОМУ ВЕРХНЬОМУ КУТІ === */

.advantages-hero__buttons {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 10;
}

/* === ІНДИВІДУАЛЬНА КНОПКА === */

.advantages-hero__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-white);
  text-decoration: none;
  text-align: center;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  cursor: pointer;
  transition: all var(--transition-normal) ease;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  white-space: nowrap;
  min-height: 44px;
}

/* iOS fallback */
@supports (-webkit-touch-callout: none) {
  .advantages-hero__button {
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
  }
}

/* Hover ефект на desktop */
@media (hover: hover) and (pointer: fine) {
  .advantages-hero__button:hover {
    background: rgba(231, 30, 20, 0.6);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 12px 40px rgba(231, 30, 20, 0.3);
    transform: translateY(-2px);
  }
}

/* Focus ефект для доступності */
.advantages-hero__button:focus-visible {
  outline: 2px solid var(--color-white);
  outline-offset: 2px;
}

/* Active ефект */
.advantages-hero__button:active {
  transform: translateY(0);
}

/* === ПРАВА КОЛОНКА З ФОРМОЮ === */

.advantages-hero__right {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
}

/* === ФОРМА ДЛЯ HERO БЛОКУ === */

.advantages-section__form--hero {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 1.5rem 1.5rem 1.75rem 1.5rem;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  width: 100%;
  box-sizing: border-box;
  overflow: visible;
}

/* iOS fallback для форми */
@supports (-webkit-touch-callout: none) {
  .advantages-section__form--hero {
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
  }
}

/* === ФОРМА ЗАГАЛЬНЕ === */

.advantages-section__form {
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-sizing: border-box;
  width: 100%;
}

@media (width >=1200px) {
  .advantages-section__form {
    padding-right: 2rem;
    padding-left: 1rem;
    padding-bottom: 1rem;
  }
}

.advantages-section__form-title {
  margin: 0 0 0.5rem 0;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--color-white);
  text-align: center;
  line-height: 1.3;
}

.advantages-section__form-subtitle {
  margin: 0 0 1.5rem 0;
  font-size: 1rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
  line-height: 1.4;
}

@media (width <=767px) {
  .advantages-section__form {
    padding: 1rem 1.2rem;
  }

  .advantages-section__form-title {
    font-size: 1.3rem;
  }

  .advantages-section__form-subtitle {
    font-size: 0.9rem;
  }
}

/* === RESPONSIVE: АДАПТАЦІЯ HERO БЛОКУ === */

/* Tablet */
@media (width >=768px) and (width < 1024px) {
  .advantages-section--hero {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    padding: 1.5rem;
    padding-top: 2rem;
  }

  .advantages-hero__buttons {
    top: 1rem;
    right: 1rem;
    gap: 0.8rem;
  }

  .advantages-hero__button {
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
  }

  .advantages-section__form--hero {
    padding: 1.5rem;
  }

  .section-title--hero {
    font-size: 1.8rem;
  }

  .section-subtitle--hero {
    font-size: 1.1rem;
  }
}

/* Mobile */
@media (width < 768px) {
  .advantages-section {
    margin-top: 1rem;
  }

  .advantages-section--hero {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 1rem 0.75rem;
    padding-top: 1rem;
    margin: 0 0.75rem;
    margin-bottom: var(--section-spacing-mobile);
    width: calc(100% - 1.5rem);
    max-width: 100%;
  }

  .advantages-section__header {
    grid-column: 1;
    margin-bottom: 1rem;
  }

  .advantages-section__header .section-title--hero {
    margin-bottom: 0.1rem;
    font-size: 1.65rem;
  }

  .advantages-hero__image-wrapper {
    aspect-ratio: 16 / 9;
    max-width: 100%;
    border-radius: 12px;
    margin-top: 5.5rem;
  }

  .advantages-hero__branding {
    top: 1rem;
    left: 1rem;
  }

  .advantages-hero__brand-title {
    font-size: 1.5rem;
  }

  .advantages-hero__brand-subtitle {
    font-size: 0.85rem;
  }

  .advantages-hero__image {
    object-position: center bottom;
  }

  .advantages-hero__buttons {
    top: 0rem;
    right: 1rem;
    gap: 0.6rem;
  }

  .advantages-hero__button {
    padding: 0rem 0.5rem;
    font-size: 0.8rem;
    width: auto;
  }

  .advantages-section__form--hero {
    padding: 1.2rem 1.2rem 1.5rem 1.2rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.15);
    overflow: visible;
  }

  .advantages-section__form-subtitle {
    font-size: 0.85rem;
  }

  .section-title--hero {
    font-size: 1.65rem;
  }

  .section-subtitle--hero {
    font-size: 1rem;
  }
}

/* Дуже малі мобільні */
@media (width < 360px) {
  .advantages-section--hero {
    padding: 0.75rem;
    gap: 1rem;
  }

  .advantages-section__header {
    margin-bottom: 1rem;
  }

  .advantages-hero__buttons {
    top: 0.5rem;
    right: 0.75rem;
    gap: 0.5rem;
  }

  .advantages-hero__button {
    padding: 0rem 0.5rem;
    font-size: 0.75rem;
  }

  .advantages-section__form--hero {
    padding: 1rem;
  }

  .section-title--hero {
    font-size: 1.3rem;
  }

  .section-subtitle--hero {
    font-size: 1rem;
  }
}

/* === BRANDING TEXT === */

.advantages-hero__branding {
  position: absolute;
  top: 0;
  left: 2rem;
  z-index: 10;
}

.advantages-hero__brand-title {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--color-white);
  margin: 0 0 0.5rem 0;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.advantages-hero__brand-subtitle {
  font-size: 1.1rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

/* === FALLBACK БЕЗ BACKDROP-FILTER === */

@supports not (backdrop-filter: blur(8px)) {
  .advantages-hero__button {
    background: rgba(0, 0, 0, 0.7);
  }

  .advantages-section__form--hero {
    background: rgba(0, 0, 0, 0.7);
  }

  .advantages-section--hero {
    background: rgba(0, 0, 0, 0.5);
  }
}

/* === ANIMATION: PREFERS-REDUCED-MOTION === */

@media (prefers-reduced-motion: reduce) {

  .advantages-hero__button,
  .advantages-section__form--hero {
    transition: none;
  }

  .advantages-hero__button:hover {
    transform: none;
  }
}

/* === PERFORMANCE OPTIMIZATION === */

.advantages-hero__button {
  will-change: auto;
}

@media (hover: hover) and (pointer: fine) {
  .advantages-hero__button:hover {
    will-change: transform;
  }

  .advantages-hero__button:not(:hover) {
    will-change: auto;
  }
}