/* Image-led carousel. Controls live in normal flow, outside the moving track. */
.hero-carousel-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #0b1220;
}

.carousel-track {
  display: flex;
  align-items: stretch;
  width: 100%;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.carousel-slide {
  flex: 0 0 100%;
  width: 100%;
  min-width: 0;
  min-height: 500px;
  position: relative;
  display: flex;
  align-items: center;
  box-sizing: border-box;
}

.carousel-bg-wrap {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(ellipse at 70% 30%, #164b61 0%, #101d34 50%, #0b1220 100%);
}

.carousel-bg-wrap picture {
  display: block;
  width: 100%;
  height: 100%;
}

.carousel-bg-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.carousel-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(7, 9, 14, 0.9) 0%, rgba(7, 9, 14, 0.78) 30%, rgba(7, 9, 14, 0.34) 62%, rgba(7, 9, 14, 0.12) 100%);
  z-index: 2;
}

.carousel-content {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 1280px;
  padding: 3.5rem 2rem;
}

.carousel-tagline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 100%;
  padding: 0.4rem 0.8rem;
  border: 1px solid rgba(0, 240, 255, 0.35);
  border-radius: 999px;
  background: rgba(7, 18, 30, 0.65);
  color: #a5f6ff;
  font-size: 0.875rem;
  line-height: 1.5;
  font-weight: 600;
  margin-bottom: 1rem;
}

.carousel-title {
  max-width: 20ch;
  margin: 0 0 1rem;
  color: #fff;
  font-size: clamp(2rem, 3.6vw, 3.25rem);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -0.025em;
  overflow-wrap: anywhere;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
}

.carousel-subtitle {
  max-width: 580px;
  margin: 0 0 1.75rem;
  font-size: clamp(1rem, 1.4vw, 1.125rem);
  line-height: 1.65;
  color: #e2e8f0;
}

.carousel-cta-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.carousel-controls {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: 44px 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.65rem 6rem;
  background: #0b1220;
}

.carousel-controls[hidden], .carousel-controls [hidden] {
  display: none !important;
}

.carousel-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: #e2e8f0;
  background: #152135;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.carousel-btn:hover, .carousel-pause-btn:hover:not(:disabled) {
  background: #183749;
  border-color: #00d9ed;
  color: #fff;
}

.carousel-dots {
  justify-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
}

.carousel-dot {
  flex: 0 0 36px;
  width: 36px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: radial-gradient(circle, #8491a6 4px, transparent 5px);
  cursor: pointer;
}

.carousel-dot.active {
  background: radial-gradient(circle, #00f0ff 6px, transparent 7px);
}

.carousel-pause-btn {
  display: flex;
  justify-self: end;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.55rem 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: #d6e2ed;
  background: #152135;
  font-size: 0.875rem;
  line-height: 1.4;
  cursor: pointer;
}

.carousel-pause-btn:disabled {
  cursor: default;
  color: #a9b8ca;
}

.carousel-btn:focus-visible, .carousel-dot:focus-visible, .carousel-pause-btn:focus-visible {
  outline: 3px solid #00f0ff;
  outline-offset: 3px;
}

.division-shortcuts {
  border-top: 1px solid rgba(0, 240, 255, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: #0e1726;
}

.division-shortcuts-inner {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.5rem;
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
}

.division-shortcuts a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.6rem;
  border-radius: 8px;
  color: #d1e4f1;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
}

.division-shortcuts a:hover {
  color: #8cf4ff;
  background: #162b3d;
}

@media (max-width: 768px) {
  .carousel-slide {
    min-height: 0;
    flex-direction: column;
    align-items: stretch;
  }

  .carousel-bg-wrap {
    position: relative;
    inset: auto;
    flex: 0 0 220px;
    width: 100%;
    height: 220px;
  }

  .carousel-overlay { display: none; }
  .carousel-slide--text-only .carousel-bg-wrap { display: none; }

  .carousel-content {
    flex: 1 0 auto;
    padding: 1.5rem 1.25rem 1.75rem;
    background: #0b1220;
  }

  .carousel-title {
    max-width: 24ch;
    font-size: clamp(1.75rem, 6vw, 2.25rem);
    line-height: 1.2;
    text-shadow: none;
  }

  .carousel-tagline { margin-bottom: 0.8rem; font-size: 0.875rem; }
  .carousel-subtitle { font-size: 1rem; line-height: 1.6; margin-bottom: 1.25rem; }
  .carousel-cta-group .btn { flex: 1 1 180px; padding: 0.8rem 1rem; }

  .carousel-controls {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    gap: 0.35rem 0.65rem;
    padding: 0.65rem 5rem;
  }

  .carousel-btn.prev { grid-column: 1; grid-row: 1; }
  .carousel-btn.next { grid-column: 3; grid-row: 1; }
  .carousel-pause-btn { grid-column: 1 / -1; grid-row: 3; justify-self: center; }
  .carousel-dots { grid-column: 1 / -1; grid-row: 2; }

  .division-shortcuts-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.25rem;
  }
  .division-shortcuts a { flex: 1 1 95px; min-height: 44px; font-size: 0.9rem; }
}

@media (prefers-reduced-motion: reduce) {
  .carousel-track { transition: none !important; }
}
