/* ============ tokens ============ */
:root {
  --bg: #0a0a0d;
  --bg-alt: #111114;
  --surface: #1b1b1f;
  --surface-2: #232327;
  --border: #2c2c31;
  --text: #f5f5f7;
  --text-muted: #a7a7b0;
  --brand: #e5121f;
  --brand-hover: #ff2836;
  --brand-soft: rgba(229, 18, 31, 0.16);
  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.35);
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Arial, sans-serif;
}

/* global setting */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-weight: 400;
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

ul {
  list-style: none;
}

a {
  color: inherit;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

button,
input {
  font-family: inherit;
}

.lg {
  font-size: 1.5rem;
}

/* button style */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  color: #fff;
  padding: 11px 22px;
  background: var(--brand);
  border: none;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 14px rgba(229, 18, 31, 0.25);
}

.btn:hover {
  background: var(--brand-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(229, 18, 31, 0.35);
  color: #fff;
}

.btn:active {
  transform: translateY(0);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  box-shadow: none;
}

.btn-outline:hover {
  background: var(--surface-2);
  border-color: var(--surface-2);
}

/* inner container title and text style */

.inner-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  line-height: 1.3;
}
.inner-title {
  font-size: clamp(1.7rem, 4.2vw, 3.1rem);
  width: 90%;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.inner-title h1 {
  margin-bottom: 1rem;
  line-height: 1.2;
}

.inner-title .highlight {
  background: var(--brand);
  padding: 0.05em 0.35em;
  border-radius: 6px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.inner-text {
  font-size: clamp(1rem, 1.8vw, 1.3rem);
  width: 90%;
  color: var(--text-muted);
}

/* header */
.header {
  min-height: 92vh;
  position: relative;
  background-image: linear-gradient(
      180deg,
      rgba(6, 6, 8, 0.72) 0%,
      rgba(6, 6, 8, 0.86) 55%,
      var(--bg) 100%
    ),
    url("bgnet.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  border-bottom: 1px solid var(--border);
}

/* navbar */

.logo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(10, 10, 13, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
}

.logo > a {
  display: flex;
  align-items: center;
}

.logo > a > img {
  width: 190px;
  max-width: 45vw;
  height: auto;
  display: block;
}

/* header text, cta */

.header .inner-container {
  min-height: 74vh;
  padding: 2rem 1rem;
}

.header .inner-title {
  width: 60%;
  text-align: center;
}

.header .inner-text {
  width: 55%;
  text-align: center;
  margin-top: 0.75rem;
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 2rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* courses section */

#cursos {
  padding: 3rem 0 4rem;
  background: var(--bg);
}

.section-heading {
  padding: 0 2rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-heading h2 {
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  font-weight: 800;
}

.section-heading p {
  color: var(--text-muted);
  margin-top: 0.35rem;
  font-size: 0.95rem;
}

/* ---------- carousel (scroll-snap, no library) ---------- */

.carousel {
  position: relative;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 3.25rem;
}

.carousel-viewport {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.carousel-viewport::-webkit-scrollbar {
  display: none;
  height: 0;
}

.carousel-track {
  display: flex;
  align-items: stretch;
  gap: 20px;
  padding: 6px 6px 12px;
}

.carousel-slide {
  flex: 0 0 auto;
  width: 290px;
  scroll-snap-align: start;
  display: flex;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 1rem;
  cursor: pointer;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.carousel-btn:hover {
  background: var(--brand);
  border-color: var(--brand);
}

.carousel-btn.prev {
  left: 0;
}

.carousel-btn.next {
  right: 0;
}

/* ---------- course card ---------- */

.course-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.course-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: var(--surface-2);
}

.course-pic {
  position: relative;
  line-height: 0;
  flex: none;
}

.course-pic img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  background: var(--surface-2);
}

.course-price-badge {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(10, 10, 13, 0.85);
  backdrop-filter: blur(4px);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 0.8rem;
  line-height: 1.35;
}

.course-price-badge .old {
  display: block;
  color: var(--text-muted);
  text-decoration: line-through;
  font-size: 0.72rem;
}

.course-price-badge .new {
  display: block;
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
}

.course-price-badge .new b {
  color: #4ade80;
}

.course-item-text {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.course-meta {
  margin-bottom: 10px;
}

.course-author {
  display: inline-block;
  background: var(--brand-soft);
  color: #ff6b73;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  letter-spacing: 0.2px;
}

.course-title {
  flex: 1;
  margin-bottom: 14px;
}

.course-title h3 {
  font-size: 1.05rem;
  line-height: 1.35;
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.course-title a {
  text-decoration: none;
  color: var(--text);
}

.course-details-btn {
  margin-top: auto;
}

.course-details-btn .btn {
  width: 100%;
  border-radius: var(--radius-sm);
}

.starcurso {
  padding: 0 0 8px;
  text-align: center;
}
.starcurso li {
  display: inline-block;
  color: #f2ae14;
  font-size: 0.85rem;
}

/* ---------- course detail view ---------- */

.course-detail-box {
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr;
  gap: 2.5rem;
  max-width: 1000px;
  margin: 0 auto;
  padding: 32px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-lg);
  color: var(--text);
  text-align: left;
}

.course-detail-media {
  text-align: center;
}

.course-detail-media img#capaCurso {
  display: block;
  width: 100%;
  max-width: 260px;
  height: 195px;
  max-height: 195px;
  overflow: hidden;
  object-fit: cover;
  background: var(--surface-2);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin: 0 auto 10px;
}

.course-detail-info h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.course-detail-media > .btn {
  margin-top: 14px;
}

.modal-box-lg .course-detail-box {
  max-width: none;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  border-radius: 0;
  gap: 2rem;
}

/* ---------- modal (framework-free) ---------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 4, 6, 0.72);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
}

.modal-overlay.is-open {
  display: flex;
}

.modal-box {
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.modal-box-lg {
  max-width: 880px;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.modal-head h2 {
  font-size: 1.15rem;
  font-weight: 700;
}

.modal-x {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}

.modal-x:hover {
  color: var(--text);
}

.modal-body {
  padding: 24px;
}

.modal-foot {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
}

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9rem;
  font-weight: 600;
}

.field-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.field-row .field {
  flex: 1 1 140px;
  min-width: 0;
}

.field-row .field-uf {
  flex: 0 0 70px;
}

.pay-methods {
  display: flex;
  gap: 10px;
}

.pay-method {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text-muted);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.pay-method.is-active {
  border-color: var(--brand);
  color: var(--text);
  background: var(--brand-soft);
}

select.input {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-muted) 50%),
    linear-gradient(135deg, var(--text-muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) center, calc(100% - 13px) center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.input {
  width: 100%;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.input:focus {
  border-color: var(--brand);
}

.input::placeholder {
  color: var(--text-muted);
}

.notice {
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.85rem;
  line-height: 1.5;
}

.notice-info {
  background: rgba(96, 165, 250, 0.12);
  border: 1px solid rgba(96, 165, 250, 0.35);
  color: #93c5fd;
  margin-top: 8px;
}

.notice-danger {
  background: rgba(229, 18, 31, 0.12);
  border: 1px solid rgba(229, 18, 31, 0.4);
  color: #ff8790;
  margin-top: 12px;
}

/* footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.site-footer strong {
  color: var(--text);
}

/* ===================== responsive ===================== */

@media (max-width: 950px) {
  .header .inner-title,
  .header .inner-text {
    width: 90%;
  }

  .logo > a > img {
    width: 150px;
  }

  .course-detail-box {
    grid-template-columns: 1fr;
  }

  .course-detail-media img#capaCurso {
    max-width: 220px;
    height: 165px;
    max-height: 165px;
  }
}

@media (max-width: 768px) {
  .header {
    min-height: 78vh;
  }

  .header .inner-container {
    padding: 2.5rem 1rem;
  }

  .btn {
    font-size: 0.95rem;
    padding: 10px 18px;
  }

  .carousel {
    padding: 0 2.75rem;
  }

  .carousel-btn {
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
  }
}

@media (max-width: 600px) {
  .logo {
    padding: 0.85rem 1rem;
    gap: 0.5rem;
  }

  .logo > a > img {
    width: 130px;
  }

  #minhacontapc {
    padding: 9px 14px;
    font-size: 0.85rem;
    white-space: nowrap;
  }

  #cursos {
    padding-top: 1.5rem !important;
  }

  #capaCurso {
    width: 100% !important;
    max-width: 280px;
    height: 210px;
    max-height: 210px;
  }

  .section-heading {
    padding: 0 1.25rem 1rem;
  }

  .carousel {
    padding: 0 2.25rem;
  }

  .carousel-slide {
    width: 82vw;
    max-width: 320px;
  }

  .course-detail-box {
    padding: 22px;
  }
}

@media (max-width: 375px) {
  .header .inner-title {
    width: 95%;
  }
  .header .inner-text {
    width: 95%;
  }
}
