:root {
  --bg: #000b2a;
  --bg-soft: #05183f;
  --text: #ffffff;
  --text-soft: #d7def1;
  --accent: #1cb8e9;
  --accent-2: #c824d8;
  --focus: #35c1ff;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(8px + env(safe-area-inset-top)) 12px 10px;
  background: linear-gradient(90deg, #8f0db4, #5f2ad7);
}

.brand {
  width: 96px;
  height: auto;
}

.cta {
  text-decoration: none;
  color: #fff;
  background: var(--accent);
  border-radius: 8px;
  padding: 9px 13px;
  font-weight: 700;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.section {
  padding: 22px 10px;
}

.section h2 {
  margin: 0 0 14px;
  font-size: 1.45rem;
  line-height: 1.2;
}

.hero {
  min-height: 64vh;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: calc(10px + env(safe-area-inset-top));
  padding-bottom: 22px;
}

.hero-slider {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transition: opacity 0.26s ease;
}

.hero-slide.active {
  opacity: 1;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 9, 36, 0.92), rgba(0, 9, 36, 0.42));
}

.hero-copy {
  position: relative;
  z-index: 2;
  padding: 0 10px;
}

.hero-brand {
  display: block;
  width: clamp(150px, 46vw, 220px);
  height: auto;
  margin: 0 0 14px;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.28));
}

.hero h1 {
  margin: 0 0 8px;
  max-width: 12ch;
  font-size: clamp(2rem, 8vw, 2.2rem);
  line-height: 1.08;
}

.hero-line-desktop {
  display: inline;
}

.hero p {
  margin: 0 0 14px;
  max-width: 320px;
  color: #ecf2ff;
  line-height: 1.34;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.35);
}

.hero-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

@media (max-width: 767px) {
  .hero {
    justify-content: center;
    padding-top: calc(10px + env(safe-area-inset-top));
    padding-bottom: 22px;
  }

  .hero-brand {
    margin: 0 0 20px;
  }

  .hero h1 {
    font-size: clamp(1.72rem, 7.1vw, 2rem);
    margin: 0 0 16px;
  }

  .hero p {
    margin: 0 0 20px;
  }

  .section-porque-text {
    margin: 0 0 -18px;
    padding: 70px 10px 14px;
  }

  .section-porque-media {
    padding-top: 18px;
  }
}

@media (max-width: 360px) {
  .hero {
    justify-content: center;
    padding-top: calc(10px + env(safe-area-inset-top));
  }
}

.section-porque {
  padding: 0 0 8px;
  background: #000f36;
}

.section-porque-text {
  position: relative;
  z-index: 2;
  margin: 0 0 -52px;
  padding: 70px 10px 30px;
  background: linear-gradient(180deg, rgba(0, 15, 56, 0.98) 0%, rgba(0, 15, 56, 0.55) 72%, rgba(0, 15, 56, 0) 100%);
}

.section-porque h2 {
  margin: 0 0 10px;
  font-size: 1.72rem;
  line-height: 1.16;
}

.section-porque p {
  margin: 0;
  max-width: 460px;
  color: #cfdbf5;
  font-size: 1.08rem;
  line-height: 1.44;
  font-weight: 500;
}

.section-porque-media {
  background: #000f36;
  padding-top: 52px;
}

.section-porque-media img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.section-cursos {
  background: #000f36;
}

.section-intro {
  margin: -6px 0 12px;
  color: #c8d6f1;
  font-size: 0.92rem;
}

.section-intro-long {
  margin-top: -2px;
  line-height: 1.45;
}

.section-faq {
  background: linear-gradient(180deg, #8f0db4 0%, #6f0d9a 100%);
}

.faq-list {
  display: grid;
  gap: 10px;
}

.faq-item {
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 12px;
  background: rgba(2, 15, 46, 0.25);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  padding: 12px 14px;
  cursor: pointer;
}

.faq-answer {
  padding: 0 14px 12px;
}

.faq-answer p {
  margin: 0;
  color: #f1eaff;
  line-height: 1.5;
}

.section-logos {
  background: #031235;
  text-align: center;
  padding-top: 24px;
  padding-bottom: 28px;
}

.logos-label {
  margin: 0 0 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.74rem;
  color: #c7d3ee;
}

.logos-composite {
  display: block;
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  height: auto;
}

.courses-grid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 68%;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.courses-grid::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.course-card {
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  overflow: hidden;
  background: #081840;
  scroll-snap-align: start;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.course-card:focus-visible {
  border-color: #ffffff;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.45);
}

@media (hover: hover) and (pointer: fine) {
  .course-card:hover {
    border-color: #ffffff;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.45);
  }
}

.course-card img,
.placeholder-fill {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
}

.course-card h3 {
  margin: 0;
  padding: 10px 8px;
  font-size: 0.9rem;
  line-height: 1.3;
  color: var(--text-soft);
}

.course-card.placeholder.p1 .placeholder-fill {
  background: #1cb8e9;
}

.course-card.placeholder.p2 .placeholder-fill {
  background: #5f2ad7;
}

.course-card.placeholder.p3 .placeholder-fill {
  background: #c824d8;
}

.course-card.placeholder.p4 .placeholder-fill {
  background: #0d6a95;
}

.courses-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}

.course-dot {
  width: 8px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  padding: 0;
}

.course-dot.active {
  background: var(--accent);
}

@media (min-width: 768px) {
  .topbar { padding: 12px 20px; }
  .section { padding: 28px 20px; }
  .brand { width: 124px; }

  .hero {
    min-height: 70vh;
    justify-content: flex-end;
    padding-bottom: 28px;
    background: linear-gradient(90deg, rgba(0, 10, 44, 0.9), rgba(0, 10, 44, 0.45)),
      url('../img/hero/hero-desktop.webp') center/cover no-repeat;
  }

  .hero-slider {
    display: none;
  }

  .hero-copy {
    padding: 0;
  }

  .hero h1 {
    font-size: 3rem;
  }

  .hero p {
    max-width: 420px;
  }

  .section-porque {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: stretch;
    padding: 0;
  }

  .section-porque-text {
    margin: 0;
    border-radius: 0;
    border: 0;
    padding: 30px 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .section-porque-media img {
    height: 100%;
    min-height: 360px;
  }

  .courses-grid {
    grid-auto-columns: 32%;
    gap: 14px;
  }

  .logos-composite {
    width: 94%;
    max-width: 1280px;
  }
}

@media (min-width: 1024px) {
  .topbar {
    padding: 14px 22px;
  }

  .hero {
    min-height: clamp(620px, 78vh, 840px);
    justify-content: flex-end;
    padding: 0 0 56px 56px;
    background: linear-gradient(90deg, rgba(0, 10, 44, 0.86) 0%, rgba(0, 10, 44, 0.62) 36%, rgba(0, 10, 44, 0.28) 62%, rgba(0, 10, 44, 0.18) 100%),
      url('../img/hero/hero-desktop.webp') center/cover no-repeat;
  }

  .hero-copy {
    max-width: 640px;
    padding: 0;
    margin: 0;
  }

  .hero-brand {
    width: clamp(210px, 16vw, 320px);
    margin: 0 0 20px;
  }

  .hero h1 {
    max-width: 12.5ch;
    font-size: clamp(2.8rem, 3.8vw, 4.1rem);
    line-height: 1;
    margin: 0 0 22px;
  }

  .hero-line-desktop {
    display: block;
    white-space: nowrap;
  }

  .hero p {
    max-width: 24ch;
    font-size: clamp(1.18rem, 1.55vw, 1.9rem);
    line-height: 1.24;
    margin: 0 0 24px;
    color: #eef3ff;
  }

  .hero .cta {
    padding: 14px 28px;
    font-size: clamp(1.05rem, 1.35vw, 1.45rem);
    border-radius: 16px;
  }

  .section-porque {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
    min-height: clamp(520px, 62vh, 680px);
    padding: 0;
    background: #000f36;
  }

  .section-porque-text {
    margin: 0;
    padding: clamp(40px, 4vw, 72px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #000f36;
    border: 0;
    border-radius: 0;
  }

  .section-porque h2 {
    max-width: 11.5ch;
    font-size: clamp(2.9rem, 3.8vw, 4.8rem);
    line-height: 1.08;
    margin: 0 0 24px;
  }

  .section-porque p {
    max-width: 34ch;
    font-size: clamp(1.22rem, 1.95vw, 2.05rem);
    line-height: 1.34;
    margin: 0;
  }

  .section-porque-media {
    position: relative;
    height: 100%;
    padding-top: 0;
    background: #000f36;
  }

  .section-porque-media img {
    width: 100%;
    height: 100%;
    min-height: clamp(520px, 62vh, 680px);
    object-fit: cover;
    object-position: center 30%;
  }

  .section-porque-media::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(0, 15, 54, 0.28) 0%, rgba(0, 15, 54, 0.1) 55%, rgba(0, 15, 54, 0.3) 100%);
  }

  .courses-grid {
    grid-auto-columns: calc((100% - 4 * 14px) / 5);
    gap: 14px;
  }

  .section-cursos {
    padding-top: 42px;
    padding-bottom: 22px;
    padding-left: clamp(40px, 4vw, 72px);
    padding-right: clamp(40px, 4vw, 72px);
  }

  .section-cursos h2 {
    max-width: 16ch;
    font-size: clamp(2.3rem, 3.1vw, 3.15rem);
    line-height: 1.1;
    margin: 0 0 16px;
  }

  .section-cursos .section-intro-long {
    max-width: 52ch;
    font-size: clamp(1.22rem, 1.45vw, 1.6rem);
    line-height: 1.34;
    margin: 0 0 24px;
  }

  .course-card h3 {
    font-size: 0.98rem;
    line-height: 1.25;
  }
}

@media (min-width: 1680px) {
  .hero {
    padding-left: 72px;
    padding-bottom: 64px;
  }

  .courses-grid {
    grid-auto-columns: calc((100% - 5 * 14px) / 6);
  }
}
