/* ============================================
   Components CSS
   BEM naming convention
   Mobile-first responsive design
   ============================================ */

/* ============================================
   Hero Banner
   ============================================ */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh; /* Modern browsers: respects dynamic viewport (address bar) */
  overflow: hidden;
}

/* Background image link wrapper (when hero has a link) */
.hero__bg-link {
  display: block;
  width: 100%;
  height: 100%;
  line-height: 0;
}

/* Background image — fills viewport, overflow clipped */
.hero__bg-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

/* Gradient overlay — transparent for light theme */
.hero__overlay {
  position: absolute;
  inset: 0;
  background: transparent;
  pointer-events: none;
}

/* Actions area: positioned at bottom of hero */
.hero__actions {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-md) var(--space-md) var(--space-lg);
  pointer-events: none;
}

/* Scroll-down arrow icon — centered at bottom */
.hero__scroll-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
  background: none;
  border: none;
  cursor: pointer;
  align-self: center;
  pointer-events: all;
  transition:
    transform var(--transition-fast),
    opacity var(--transition-fast);
  flex-shrink: 0;
}

.hero__scroll-icon:hover {
  transform: translateY(4px);
  opacity: 0.8;
}

.hero__scroll-icon svg {
  width: 62px;
  height: 62px;
}

/* Hero text menu — right-aligned overlay */
.hero__menu {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  z-index: 1;
}

.hero__menu-item {
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-normal);
  text-decoration: none;
  white-space: nowrap;
  transition: opacity var(--transition-fast);
}

.hero__menu-item:hover {
  opacity: 0.7;
}

/* ============================================
   Content Module (left/right promotional section)
   ============================================ */
.module {
  width: 100%;
  overflow-x: hidden;
  padding-top: var(--section-padding-v);
  padding-bottom: var(--section-padding-v);
}

.module__inner {
  max-width: var(--container-max-width);
  margin-left: auto;
  margin-right: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* LEFT type: image-left, text-right (default) */
/* RIGHT type (module--alt): image-right, text-left */

.module__media {
  width: 100%;
  flex-shrink: 0;
  display: flex;
  align-items: stretch;
  min-height: 300px;
  border-bottom: 1px solid var(--color-divider);
}

.module__media-img {
  width: 100%;
  object-fit: contain;
  display: block;
}

/* Optional: image link wrapper */
.module__media-link {
  display: block;
  width: 100%;
  line-height: 0;
}

.module__content {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  padding: var(--space-xs);
  justify-content: center;
  align-items: center;
  text-align: center;
}

.module__title {
  width: 100%;
  font-size: var(--font-size-h2);
  font-weight: var(--font-weight-black);
  line-height: var(--line-height-tight);
  margin-top: var(--space-lg);
}

.module__body {
  font-size: var(--font-size-body);
  line-height: var(--line-height-normal);
  white-space: pre-wrap;
}

/* Icon button group — flex, column on mobile, 10px gap */
.module__icon-btns {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  width: 100%;
}

.module__icon-btn {
  display: block;
  max-width: 300px;
  width: 100%;
  line-height: 0;
  transition: transform var(--transition-fast);
}

.module__icon-btn:hover {
  transform: translateY(-2px);
}

.module__icon-btn img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}

/* No-link button style (for footer buttons without downloadUrl) */
.footer__btn--no-link {
  cursor: default;
  opacity: 0.7;
}

.footer__btn--no-link:hover {
  opacity: 0.7;
  transform: none;
}

/* ============================================
   Footer
   ============================================ */
.footer {
  min-height: 120px;
  padding: var(--space-lg) var(--space-md);
}

.footer__inner {
  max-width: var(--container-max-width);
  margin-left: auto;
  margin-right: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

/* Button group — centered */
.footer__btn-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-md);
}

.footer__btn {
  display: inline-block;
  font-size: var(--font-size-btn);
  font-weight: var(--font-weight-normal);
  text-decoration: none;
  transition:
    opacity var(--transition-fast),
    transform var(--transition-fast);
  white-space: nowrap;
}

.footer__btn:hover {
  opacity: 0.8;
  transform: translateY(-1px);
}

/* Privacy text — centered */
.footer__privacy {
  text-align: center;
  font-size: var(--font-size-small);
  line-height: var(--line-height-normal);
}

/* ============================================
   Responsive: Tablet (768px+)
   ============================================ */
@media (min-width: 768px) {
  .hero__actions {
    padding: var(--space-md) var(--space-lg) var(--space-xl);
  }

  .hero__menu {
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
  }

  /* Side-by-side layout */
  .module__inner {
    flex-direction: row;
    align-items: stretch;
  }

  .module__media {
    width: 50%;
    flex-shrink: 0;
    position: relative;
    border-bottom: none;
  }

  .module__media-img {
    height: auto;
  }

  .module__icon-btns {
    flex-direction: row;
    align-items: stretch;
  }

  .module__icon-btn {
    max-width: none;
    flex: 1;
  }

  .module__content {
    width: 50%;
    flex-shrink: 1;
    padding: var(--space-xs);
    margin-bottom: var(--space-xl);
    text-align: left;
  }

  /* RIGHT type: image goes right, text goes left */
  .module--alt .module__inner {
    flex-direction: row-reverse;
  }
}

/* ============================================
   Responsive: Desktop (1024px+)
   ============================================ */
@media (min-width: 1024px) {
  /* Image fills container absolutely — does not affect flex height */
  .module__media-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: left center;
  }

  /* Image link wrapper also needs absolute fill so img stays absolute inside */
  .module__media-link {
    position: absolute;
    inset: 0;
  }

  /* RIGHT type: image aligns to right edge */
  .module--alt .module__media-img {
    object-position: right center;
  }
}
