/* ═══════════════════════════════════════════════════════════════════
   EduSaaS — carrossel principal da página inicial
   Carregado depois de edusaas.css
   ═══════════════════════════════════════════════════════════════════ */

.hcar {
  position: relative;
  min-height: 560px;
  height: 76vh;
  max-height: 700px;
  background: var(--navy-deep);
  overflow: hidden;
  isolation: isolate;
}

.hcar__track { position: absolute; inset: 0; }

.hcar__slide {
  position: absolute; inset: 0;
  display: flex; align-items: center;
  opacity: 0; visibility: hidden;
  transition: opacity .7s ease, visibility .7s ease;
}
.hcar__slide.is-active { opacity: 1; visibility: visible; z-index: 1; }

/* Fundo de recurso enquanto a imagem não existe */
.hcar__media {
  position: absolute; inset: 0; overflow: hidden;
  background: linear-gradient(125deg, var(--navy-deep) 0%, var(--accent) 220%);
}
.hcar__media img {
  width: 100%; height: 100%; object-fit: cover; object-position: center;
}
.hcar__slide.is-active .hcar__media img { animation: hcarZoom 9s ease-out forwards; }
@keyframes hcarZoom { from { transform: scale(1.06); } to { transform: scale(1); } }

.hcar__veil {
  position: absolute; inset: 0;
  background:
    linear-gradient(96deg, rgba(6,27,62,.94) 0%, rgba(6,27,62,.80) 38%, rgba(6,27,62,.30) 72%, rgba(6,27,62,.12) 100%),
    linear-gradient(180deg, rgba(6,27,62,.42) 0%, transparent 30%, rgba(6,27,62,.55) 100%);
}

.hcar__inner { position: relative; z-index: 2; width: 100%; }
.hcar__content { max-width: 620px; padding: 40px 0 80px; }

.hcar__eyebrow {
  display: inline-block; margin: 0 0 14px;
  font-size: .93rem; font-weight: 600; color: #fff;
  padding: 6px 15px; border-radius: 999px;
  background: var(--accent);
}
.hcar__title {
  color: #fff; margin: 0 0 16px;
  font-size: clamp(2.1rem, 1.3rem + 3vw, 3.5rem);
  line-height: 1.1; letter-spacing: -.028em;
  text-shadow: 0 2px 22px rgba(0,0,0,.32);
}
.hcar__text {
  color: #D5E3F5; font-size: 1.1rem; max-width: 54ch; margin: 0 0 28px;
  text-shadow: 0 1px 14px rgba(0,0,0,.3);
}
.hcar__actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Entrada do conteúdo do slide activo */
.hcar__slide.is-active .hcar__eyebrow,
.hcar__slide.is-active .hcar__title,
.hcar__slide.is-active .hcar__text,
.hcar__slide.is-active .hcar__actions {
  animation: hcarIn .6s cubic-bezier(.22,.8,.3,1) both;
}
.hcar__slide.is-active .hcar__title   { animation-delay: .08s; }
.hcar__slide.is-active .hcar__text    { animation-delay: .16s; }
.hcar__slide.is-active .hcar__actions { animation-delay: .24s; }
@keyframes hcarIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* Setas */
.hcar__arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 4;
  width: 50px; height: 50px; border-radius: 50%;
  background: rgba(255,255,255,.12); border: 1.5px solid rgba(255,255,255,.34);
  color: #fff; display: grid; place-items: center;
  backdrop-filter: blur(4px);
  transition: background-color .18s ease, border-color .18s ease;
}
.hcar__arrow svg { width: 22px; height: 22px; }
.hcar__arrow:hover { background: #fff; color: var(--navy); border-color: #fff; }
.hcar__arrow--prev { left: 18px; }
.hcar__arrow--next { right: 18px; }

/* Indicadores numerados */
.hcar__bottom {
  position: absolute; left: 0; right: 0; bottom: 26px; z-index: 4;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 20px;
}
.hcar__nums { display: flex; gap: 26px; }
.hcar__nums button {
  background: none; border: 0; padding: 0 0 10px;
  color: rgba(255,255,255,.5); font-size: .92rem; font-weight: 600;
  position: relative; min-width: 62px; text-align: left;
  transition: color .2s ease;
}
.hcar__nums button:hover { color: #fff; }
.hcar__nums button[aria-selected="true"] { color: #fff; }
.hcar__bar {
  position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: rgba(255,255,255,.26); display: block; overflow: hidden;
}
.hcar__bar::after {
  content: ''; position: absolute; inset: 0; width: 0;
  background: #fff;
}
.hcar__nums button[aria-selected="true"] .hcar__bar::after { width: 100%; }
.hcar.is-playing .hcar__nums button[aria-selected="true"] .hcar__bar::after {
  width: 0; animation: hcarFill var(--hcar-delay, 7s) linear forwards;
}
@keyframes hcarFill { to { width: 100%; } }

.hcar__note { margin: 0; color: rgba(255,255,255,.6); font-size: .88rem; }

@media (max-width: 900px) {
  .hcar { height: auto; min-height: 0; max-height: none; }
  .hcar__track { position: relative; }
  .hcar__slide { position: absolute; }
  .hcar__slide.is-active { position: relative; }
  .hcar__content { padding: 96px 0 130px; }
  .hcar__veil {
    background: linear-gradient(180deg, rgba(6,27,62,.86) 0%, rgba(6,27,62,.72) 45%, rgba(6,27,62,.92) 100%);
  }
  .hcar__arrow { display: none; }
  .hcar__note { display: none; }
  .hcar__bottom { bottom: 30px; }
  .hcar__nums { gap: 16px; }
  .hcar__nums button { min-width: 46px; font-size: .85rem; }
}

@media (prefers-reduced-motion: reduce) {
  .hcar__slide.is-active .hcar__media img,
  .hcar__slide.is-active .hcar__eyebrow,
  .hcar__slide.is-active .hcar__title,
  .hcar__slide.is-active .hcar__text,
  .hcar__slide.is-active .hcar__actions,
  .hcar.is-playing .hcar__nums button[aria-selected="true"] .hcar__bar::after {
    animation: none;
  }
  .hcar.is-playing .hcar__nums button[aria-selected="true"] .hcar__bar::after { width: 100%; }
}
