/* ============================================================
   CAR ACADEMY — CURSOS — styles.css
   Adaptado de caracademy-site/css/styles.css (mesma marca/design system)
   ============================================================ */

/* ============================================================
   REGION 1: DESIGN TOKENS
   ============================================================ */
:root {
  --c-bg:            #111114;
  --c-surface:       #1c1c21;
  --c-surface-alt:   #17171b;
  --c-elevated:      #222228;
  --c-brand:         #d40e1e;
  --c-brand-hover:   #a80b18;
  --c-brand-glow:    rgba(212, 14, 30, 0.18);
  --c-brand-dim:     rgba(212, 14, 30, 0.08);
  --c-brand-dim2:    rgba(212, 14, 30, 0.12);
  --c-text:          #e8e8e8;
  --c-text-sub:      #d0d0d0;
  --c-text-muted:    #888888;
  --c-border:        #2a2a30;
  --c-border-subtle: #1e1e24;

  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --sp-1:  0.5rem;
  --sp-2:  1rem;
  --sp-3:  1.5rem;
  --sp-4:  2rem;
  --sp-5:  2.5rem;
  --sp-6:  3rem;
  --sp-8:  4rem;
  --sp-12: 6rem;
  --sp-16: 8rem;

  --radius-sm:   0.25rem;
  --radius-md:   0.5rem;
  --radius-lg:   0.75rem;
  --radius-xl:   1.25rem;
  --radius-pill: 9999px;

  --shadow-sm:   0 1px 3px rgba(0,0,0,0.5);
  --shadow-md:   0 4px 16px rgba(0,0,0,0.4), 0 1px 3px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 0 1px var(--c-brand-glow), 0 8px 32px var(--c-brand-glow);

  --t-fast: 150ms ease;
  --t-base: 250ms ease;
  --t-slow: 400ms cubic-bezier(0.16, 1, 0.3, 1);

  --nav-height: 72px;
  --container:  1100px;
}

/* ============================================================
   REGION 2: RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  color: var(--c-text-sub);
  background-color: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: inherit; }

/* ============================================================
   REGION 3: TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4 {
  font-family: var(--font-body);
  color: var(--c-text);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 900; }
h2 { font-size: clamp(1.75rem, 4vw, 2.75rem); font-weight: 800; }
h3 { font-size: 1.125rem; font-weight: 700; letter-spacing: -0.01em; }

h1 span, h2 span { color: var(--c-brand); }

p { line-height: 1.7; }

/* ============================================================
   REGION 4: LAYOUT UTILITIES
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--sp-3);
}

@media (min-width: 640px)  { .container { padding-inline: var(--sp-4); } }
@media (min-width: 1024px) { .container { padding-inline: var(--sp-6); } }

.container--narrow { max-width: 760px; }
.container--mid    { max-width: 880px; }

.section { padding-block: var(--sp-12); }

@media (min-width: 1024px) {
  .section { padding-block: var(--sp-16); }
}

.section__header {
  text-align: center;
  margin-bottom: var(--sp-8);
}

.section__headline {
  margin-top: var(--sp-3);
}

.text-muted { color: var(--c-text-muted); }
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================================
   REGION 5: COMPONENTS
   ============================================================ */

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-brand);
  background: var(--c-brand-dim);
  border: 1px solid var(--c-brand-dim2);
  padding: 0.3em 0.85em;
  border-radius: var(--radius-pill);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 700;
  padding: 0.75em 1.5em;
  border-radius: var(--radius-lg);
  border: 2px solid transparent;
  transition: background var(--t-base), color var(--t-base), box-shadow var(--t-base), transform var(--t-fast), border-color var(--t-base);
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
}

.btn:focus-visible {
  outline: 2px solid var(--c-brand);
  outline-offset: 3px;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn--primary {
  background: var(--c-brand);
  color: #fff;
  border-color: var(--c-brand);
}

.btn--primary:hover {
  background: var(--c-brand-hover);
  border-color: var(--c-brand-hover);
  box-shadow: 0 4px 20px var(--c-brand-glow);
  transform: translateY(-1px);
}

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

.btn--ghost {
  background: transparent;
  color: var(--c-text);
  border-color: var(--c-border);
}

.btn--ghost:hover {
  border-color: var(--c-brand);
  color: var(--c-brand);
  background: var(--c-brand-dim);
}

.btn--lg { font-size: 1rem; padding: 0.875em 1.75em; }
.btn--full { width: 100%; }

/* Cards */
.card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-xl);
  padding: var(--sp-4);
  transition: box-shadow var(--t-slow), transform var(--t-slow), border-color var(--t-base);
}

.card:hover {
  box-shadow: var(--shadow-glow);
  border-color: var(--c-brand-glow);
  transform: translateY(-4px);
}

.card__icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-lg);
  background: var(--c-brand-dim);
  border: 1px solid var(--c-brand-dim2);
  margin-bottom: var(--sp-3);
  transition: background var(--t-base), box-shadow var(--t-base);
  flex-shrink: 0;
}

.card__icon-wrap i {
  font-size: 1.5rem;
  color: var(--c-brand);
}

.card:hover .card__icon-wrap {
  background: var(--c-brand-dim2);
  box-shadow: 0 0 16px var(--c-brand-glow);
}

.card__title {
  color: var(--c-text);
  margin-bottom: var(--sp-2);
}

.card__body {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--c-text-muted);
}

/* Product card (reutilizado no hub para os cards de curso) */
.card--product {
  display: flex;
  flex-direction: column;
  border-top: 3px solid var(--c-border);
  transition: box-shadow var(--t-slow), transform var(--t-slow), border-color var(--t-base);
}

.card--product:hover {
  border-top-color: var(--c-brand);
}

.card__badge {
  margin-bottom: var(--sp-2);
}

.card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  margin-top: auto;
  padding-top: var(--sp-3);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--c-brand);
  transition: gap var(--t-fast);
}

.card__link:hover { gap: 0.6em; }

/* Stat card */
.stat-card {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  background: var(--c-elevated);
  border: 1px solid var(--c-border);
  border-left: 3px solid var(--c-brand);
  border-radius: var(--radius-lg);
  padding: var(--sp-3) var(--sp-4);
  transition: box-shadow var(--t-slow), transform var(--t-slow);
}

.stat-card:hover {
  box-shadow: var(--shadow-glow);
  transform: translateX(4px);
}

.stat-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  background: var(--c-brand-dim);
  border-radius: var(--radius-md);
}

.stat-card__icon i { font-size: 1.25rem; color: var(--c-brand); }

.stat-card__content {
  display: flex;
  flex-direction: column;
  gap: 0.2em;
}

.stat-card__value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--c-text);
  line-height: 1.2;
}

.stat-card__label {
  font-size: 0.8125rem;
  color: var(--c-text-muted);
  line-height: 1.4;
}

/* Select (usado no seletor de sessão) */
.form__select {
  background: var(--c-elevated);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  color: var(--c-text);
  padding: 0.75em 1em;
  font-size: 0.9375rem;
  transition: border-color var(--t-base), box-shadow var(--t-base);
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24'%3E%3Cpath fill='%23888' d='m12 15-7-7h14l-7 7Z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1em center;
  padding-right: 2.5em;
  cursor: pointer;
}

.form__select:focus {
  outline: none;
  border-color: var(--c-brand);
  box-shadow: 0 0 0 3px var(--c-brand-dim);
}

.form__select option {
  background: var(--c-elevated);
  color: var(--c-text);
}

.form__label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--c-text);
  display: block;
  margin-bottom: 0.5em;
}

[hidden] { display: none !important; }

/* ============================================================
   REGION 6: SECTIONS
   ============================================================ */

/* NAV */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-height);
  transition: background var(--t-base), backdrop-filter var(--t-base), box-shadow var(--t-base);
}

.nav--scrolled {
  background: rgba(17, 17, 20, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--c-border);
}

.nav__inner {
  display: flex;
  align-items: center;
  height: var(--nav-height);
  gap: var(--sp-4);
}

.nav__logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.nav__logo img {
  height: 36px;
  width: auto;
  filter: brightness(0) invert(1);
}

.nav__links {
  display: none;
  align-items: center;
  gap: var(--sp-1);
  margin-left: auto;
}

@media (min-width: 768px) {
  .nav__links { display: flex; }
}

.nav__link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--c-text-sub);
  padding: 0.4em 0.75em;
  border-radius: var(--radius-md);
  transition: color var(--t-fast), background var(--t-fast);
}

.nav__link:hover,
.nav__link--active {
  color: var(--c-text);
  background: var(--c-elevated);
}

.nav__cta {
  display: none;
  margin-left: var(--sp-2);
  padding: 0.55em 1.2em;
  font-size: 0.875rem;
}

@media (min-width: 768px) {
  .nav__cta { display: inline-flex; }
}

/* Hamburger */
.nav__toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  margin-left: auto;
  border-radius: var(--radius-md);
  transition: background var(--t-fast);
}

@media (min-width: 768px) {
  .nav__toggle { display: none; }
}

.nav__toggle:hover { background: var(--c-elevated); }

.nav__toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--c-text);
  border-radius: 2px;
  transition: transform var(--t-base), opacity var(--t-base);
  transform-origin: center;
}

.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(2) {
  opacity: 0; transform: scaleX(0);
}
.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile menu */
.nav__links--open {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  position: fixed;
  top: var(--nav-height);
  left: 0; right: 0; bottom: 0;
  background: rgba(10, 10, 12, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: var(--sp-4);
  gap: var(--sp-1);
  overflow-y: auto;
  z-index: 99;
}

.nav__links--open .nav__link {
  font-size: 1.25rem;
  font-weight: 700;
  padding: 0.75em 1em;
  color: var(--c-text);
  border-radius: var(--radius-lg);
  border-bottom: 1px solid var(--c-border-subtle);
}

.nav__links--open .nav__link:last-child { border-bottom: none; }

.nav__links--open .nav__link:hover {
  background: var(--c-elevated);
  color: var(--c-brand);
}

/* HERO */
.hero {
  position: relative;
  min-height: 92svh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-height);
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 40%, rgba(212, 14, 30, 0.09) 0%, transparent 55%),
    radial-gradient(ellipse 50% 50% at 15% 85%, rgba(212, 14, 30, 0.04) 0%, transparent 50%),
    linear-gradient(160deg, #18181c 0%, #111114 50%, #0e0e11 100%);
  z-index: 0;
}

.hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--c-border-subtle) 1px, transparent 1px),
    linear-gradient(90deg, var(--c-border-subtle) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 20%, transparent 80%);
  opacity: 0.35;
}

.hero__glow {
  position: absolute;
  top: 25%;
  right: 5%;
  width: 560px;
  height: 560px;
  background: radial-gradient(circle, rgba(212, 14, 30, 0.1) 0%, transparent 65%);
  border-radius: 50%;
  filter: blur(40px);
  animation: pulse-glow 6s ease-in-out infinite alternate;
}

@keyframes pulse-glow {
  from { opacity: 0.6; transform: scale(1); }
  to   { opacity: 1;   transform: scale(1.1); }
}

.hero__content {
  position: relative;
  z-index: 1;
  padding-block: var(--sp-12);
  max-width: 800px;
}

.hero__badge {
  margin-bottom: var(--sp-4);
}

.hero__headline {
  margin-bottom: var(--sp-4);
  animation: fade-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: 0.1s;
}

.hero__sub {
  font-size: clamp(1rem, 2vw, 1.175rem);
  color: var(--c-text-sub);
  max-width: 560px;
  margin-bottom: var(--sp-6);
  animation: fade-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: 0.2s;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-bottom: var(--sp-8);
  animation: fade-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: 0.3s;
}

.hero__trust {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2) var(--sp-3);
  animation: fade-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: 0.4s;
}

.hero__trust-item {
  display: flex;
  align-items: center;
  gap: 0.4em;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--c-text-sub);
}

.hero__trust-item i { color: var(--c-brand); font-size: 1rem; }

.hero__trust-divider {
  width: 1px;
  height: 14px;
  background: var(--c-border);
  display: none;
}

@media (min-width: 640px) {
  .hero__trust-divider { display: block; }
}

/* PÚBLICO-ALVO (faixa destacada) */
.publico-alvo {
  background: var(--c-surface-alt);
  border-block: 1px solid var(--c-border);
  padding-block: var(--sp-8);
}

.publico-alvo__inner {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  max-width: 760px;
  margin-inline: auto;
}

.publico-alvo__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-lg);
  background: var(--c-brand-dim);
  border: 1px solid var(--c-brand-dim2);
}

.publico-alvo__icon i { font-size: 1.5rem; color: var(--c-brand); }

.publico-alvo__label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--c-brand);
  margin-bottom: 0.3em;
}

.publico-alvo__text {
  font-size: 1.0625rem;
  color: var(--c-text);
}

/* OBJETIVOS */
.objetivos {
  background: var(--c-bg);
}

.objetivos__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-3);
}

@media (min-width: 640px) {
  .objetivos__grid { grid-template-columns: repeat(2, 1fr); }
}

/* PROGRAMA */
.programa {
  background: var(--c-surface);
  border-top: 1px solid var(--c-border);
  border-bottom: 1px solid var(--c-border);
}

.programa__list {
  max-width: 640px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.programa__item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  background: var(--c-elevated);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: var(--sp-3);
  transition: border-color var(--t-base), transform var(--t-base);
}

.programa__item:hover {
  border-color: var(--c-brand-glow);
  transform: translateX(4px);
}

.programa__index {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--c-brand-dim);
  border: 1px solid var(--c-brand-dim2);
  color: var(--c-brand);
  font-size: 0.875rem;
  font-weight: 700;
}

.programa__text {
  color: var(--c-text-sub);
  font-size: 0.9375rem;
}

/* DATAS E LOCAIS */
.datas {
  background: var(--c-bg);
}

.datas__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-3);
  max-width: 900px;
  margin-inline: auto;
}

@media (min-width: 640px) {
  .datas__grid { grid-template-columns: repeat(3, 1fr); }
}

.datas__card {
  position: relative;
  display: block;
  cursor: pointer;
}

.datas__card input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.datas__card-body {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  background: var(--c-surface);
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: var(--sp-3) var(--sp-4);
  transition: border-color var(--t-fast), background var(--t-fast), box-shadow var(--t-fast);
}

.datas__card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--c-brand-dim);
}

.datas__card-icon i { font-size: 1.25rem; color: var(--c-brand); }

.datas__card-local {
  font-size: 1rem;
  font-weight: 700;
  color: var(--c-text);
  line-height: 1.3;
}

.datas__card-data {
  font-size: 0.8125rem;
  color: var(--c-text-muted);
}

.datas__card input[type="radio"]:checked + .datas__card-body {
  border-color: var(--c-brand);
  background: var(--c-brand-dim);
  box-shadow: 0 0 0 3px var(--c-brand-dim);
}

.datas__card input[type="radio"]:focus-visible + .datas__card-body {
  outline: 2px solid var(--c-brand);
  outline-offset: 2px;
}

.datas__select-wrap {
  max-width: 420px;
  margin: var(--sp-5) auto 0;
}

.datas__actions {
  text-align: center;
  margin-top: var(--sp-5);
}

.datas__hint {
  margin-top: var(--sp-2);
  font-size: 0.8125rem;
}

/* HUB — GRELHA DE CURSOS */
.hub-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-4);
}

@media (min-width: 640px) {
  .hub-grid { grid-template-columns: repeat(2, 1fr); }
}

.curso-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4em;
  margin-bottom: var(--sp-2);
}

.curso-card__title {
  margin-bottom: var(--sp-2);
}

/* ============================================================
   REGION 7: SCROLL REVEAL
   ============================================================ */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

[data-reveal-delay="1"].is-visible { transition-delay: 0.1s; }
[data-reveal-delay="2"].is-visible { transition-delay: 0.2s; }
[data-reveal-delay="3"].is-visible { transition-delay: 0.3s; }

@keyframes fade-up {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .hero__glow { animation: none; }
}
