/* ========== Variables ========== */
:root {
  --background: 220 20% 97%;
  --foreground: 222 47% 11%;
  --card: 0 0% 100%;
  --card-foreground: 222 47% 11%;
  --popover: 0 0% 100%;
  --popover-foreground: 222 47% 11%;
  --primary: 222 47% 20%;
  --primary-foreground: 0 0% 100%;
  --secondary: 222 35% 14%;
  --secondary-foreground: 0 0% 100%;
  --muted: 220 15% 93%;
  --muted-foreground: 220 15% 42%;
  --accent: 145 63% 38%;
  --accent-foreground: 0 0% 100%;
  --destructive: 0 84.2% 60.2%;
  --destructive-foreground: 210 40% 98%;
  --border: 220 15% 88%;
  --input: 220 15% 88%;
  --ring: 222 47% 20%;
  --radius: 0.75rem;
  --hero-overlay: linear-gradient(
    160deg,
    hsla(222, 47%, 11%, 0.88),
    hsla(222, 47%, 18%, 0.8)
  );
  --glow-accent: 145 63% 45%;
  --surface-glass: hsla(0, 0%, 100%, 0.72);
  --font-display: "Space Grotesk", sans-serif;
  --font-body: "Inter", sans-serif;
}

/* ========== Base ========== */
[hidden] {
  display: none !important;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  border-width: 0;
  border-style: solid;
  border-color: hsl(var(--border));
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  color: hsl(var(--foreground));
  background-color: hsl(var(--background));
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  margin: 0;
}

p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ========== Layout ========== */
.min-h-screen {
  min-height: 100vh;
}

.container {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

@media (min-width: 640px) {
  .container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (min-width: 1280px) {
  .container {
    max-width: 1400px;
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

/* ========== Utilities ========== */
.text-gradient {
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  background-image: linear-gradient(
    135deg,
    hsl(145, 63%, 38%),
    hsl(145, 55%, 52%)
  );
}

.glass-card {
  background: var(--surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid hsla(220, 15%, 88%, 0.5);
}

.hero-gradient {
  background: var(--hero-overlay);
}

.glow-border {
  box-shadow: 0 0 24px -6px hsl(var(--glow-accent) / 0.35);
}

.touch-target {
  min-height: 44px;
  min-width: 44px;
}

.logo-white {
  filter: brightness(0) invert(1);
}

.icon-sm {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
}

/* ========== Keyframes ========== */
@keyframes float-up {
  0% {
    transform: translateY(100vh) scale(0);
    opacity: 0;
  }
  10% {
    opacity: 0.6;
  }
  90% {
    opacity: 0.3;
  }
  100% {
    transform: translateY(-10vh) scale(1);
    opacity: 0;
  }
}

@keyframes pulse-glow {
  0%,
  100% {
    opacity: 0.4;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.05);
  }
}

@keyframes chevron-bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(10px);
  }
}

@keyframes connector-scale {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

/* ========== Scroll reveal ========== */
.reveal-item {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.35s ease-out,
    transform 0.35s ease-out;
}

.reveal-item.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-item[data-reveal-delay="1"] { transition-delay: 0.06s; }
.reveal-item[data-reveal-delay="2"] { transition-delay: 0.12s; }
.reveal-item[data-reveal-delay="3"] { transition-delay: 0.18s; }
.reveal-item[data-reveal-delay="4"] { transition-delay: 0.24s; }
.reveal-item[data-reveal-delay="5"] { transition-delay: 0.3s; }

/* ========== Buttons ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  white-space: nowrap;
  border-radius: 0.375rem;
  font-family: var(--font-display);
  font-weight: 500;
  transition: color 0.2s, background-color 0.2s, border-color 0.2s;
  cursor: pointer;
  border: 1px solid transparent;
}

.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px hsl(var(--background)), 0 0 0 4px hsl(var(--ring));
}

.btn-lg {
  padding: 1rem 1.75rem;
  font-size: 1rem;
  min-height: 2.75rem;
}

.btn-accent {
  background-color: hsl(145, 63%, 32%);
  color: hsl(0, 0%, 100%);
}

.btn-accent:hover {
  background-color: hsl(145, 63%, 28%);
}

.btn-outline-accent {
  border: 2px solid hsl(0, 0%, 82.4%);
  color: hsl(222, 47%, 11%);
  background: hsl(0, 0%, 100%);
}

.btn-outline-accent:hover {
  background: hsl(220, 15%, 96%);
  border-color: hsl(220, 15%, 96%);
}

.btn-full {
  width: 100%;
}

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

/* ========== HERO ========== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg-wrap {
  position: absolute;
  inset: 0;
  will-change: transform;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 120%;
  object-fit: cover;
  top: 0;
  left: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-overlay-tint {
  background-color: hsl(var(--primary) / 0.6);
}

.hero-pulse {
  animation: pulse-glow 8s ease-in-out infinite;
}

.hero-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.hero-particles .particle {
  position: absolute;
  border-radius: 50%;
  background-color: hsl(var(--accent) / 0.3);
  animation: float-up var(--duration, 12s) var(--delay, 0s) linear infinite;
}

.hero-content {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  padding: 1.25rem 1.25rem 7rem;
  text-align: center;
}

@media (min-width: 640px) {
  .hero-content {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    padding-top: 2rem;
    padding-bottom: 6rem;
  }
}

.hero-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

@media (min-width: 640px) {
  .hero-logos {
    margin-bottom: 2.5rem;
  }
}

.hero-logo-inovatech {
  height: 6.75rem;
  width: auto;
}

@media (min-width: 640px) {
  .hero-logo-inovatech {
    height: 7rem;
  }
}

@media (min-width: 768px) {
  .hero-logo-inovatech {
    height: 9rem;
  }
}

.hero-logos-divider {
  height: 3rem;
  width: 1px;
  background-color: hsl(var(--primary-foreground) / 0.2);
  display: none;
}

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

.hero-logo-ifpi {
  height: 4.75rem;
  width: auto;
}

@media (min-width: 640px) {
  .hero-logo-ifpi {
    height: 4rem;
  }
}

@media (min-width: 768px) {
  .hero-logo-ifpi {
    height: 5rem;
  }
}

/* Título hero: Inter (já carregada), pesos como no logo: INOVA em negrito, TECH leve */
.hero-title {
  font-family: var(--font-body);
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 0.95;
  color: hsl(var(--primary-foreground));
  margin-bottom: 1.25rem;
  max-width: 56rem;
  margin-left: auto;
  margin-right: auto;
}

.hero-title .text-gradient {
  font-weight: 300;
}

@media (min-width: 640px) {
  .hero-title {
    font-size: 3rem;
    margin-bottom: 1.5rem;
  }
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 4.375rem;
  }
}

@media (min-width: 1024px) {
  .hero-title {
    font-size: 5rem;
  }
}

.hero-subtitle {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: hsl(var(--primary-foreground));
  margin-bottom: 1rem;
  padding: 0.25rem 0.75rem;
}

@media (min-width: 640px) {
  .hero-subtitle {
    font-size: 1rem;
    margin-bottom: 1.25rem;
  }
}

.hero-lead {
  font-size: 1rem;
  color: hsl(var(--primary-foreground) / 0.9);
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 0.75rem;
  padding: 0.5rem 1rem;
  line-height: 1.625;
}

@media (min-width: 640px) {
  .hero-lead {
    font-size: 1.125rem;
    margin-bottom: 1rem;
  }
}

@media (min-width: 768px) {
  .hero-lead {
    font-size: 1.25rem;
  }
}

.hero-desc {
  font-size: 0.875rem;
  color: hsl(var(--primary-foreground) / 0.8);
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 2rem;
  padding: 0.5rem 1rem;
}

@media (min-width: 640px) {
  .hero-desc {
    font-size: 1rem;
    margin-bottom: 2.5rem;
  }
}

.hero-ctas {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .hero-ctas {
    flex-direction: row;
    gap: 1rem;
  }
}

.hero-ctas .btn {
  width: 100%;
  white-space: normal;
  text-align: center;
}

@media (min-width: 640px) {
  .hero-ctas .btn {
    width: auto;
    white-space: nowrap;
  }
}

/* Card de sucesso no hero (inscricao-ok) */
.hero-success-card {
  background: hsla(222, 47%, 11%, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid hsl(var(--primary-foreground) / 0.2);
  border-radius: var(--radius);
  padding: 2.25rem 1.5rem;
  max-width: 28rem;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  box-shadow: 0 8px 32px hsla(0, 0%, 0%, 0.35);
}

@media (min-width: 640px) {
  .hero-success-card {
    padding: 2.75rem 2rem;
    max-width: 34rem;
  }
}

.hero-success-icon-wrap {
  margin-bottom: 1.5rem;
}

.hero-success-icon {
  color: hsl(var(--accent));
  margin-left: auto;
  margin-right: auto;
  display: block;
  filter: drop-shadow(0 0 12px hsl(var(--accent) / 0.4));
}

.hero-success-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: hsl(var(--primary-foreground));
  margin-bottom: 0.875rem;
  letter-spacing: -0.02em;
}

@media (min-width: 640px) {
  .hero-success-title {
    font-size: 1.875rem;
  }
}

.hero-success-text {
  font-size: 0.9375rem;
  color: hsl(var(--primary-foreground));
  line-height: 1.65;
  margin-bottom: 1.75rem;
}

@media (min-width: 640px) {
  .hero-success-text {
    font-size: 1.0625rem;
    margin-bottom: 2rem;
  }
}

.hero-success-ctas {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
}

@media (min-width: 640px) {
  .hero-success-ctas {
    flex-direction: row;
    justify-content: center;
    gap: 1rem;
  }
}

.hero-success-ctas .btn {
  width: 100%;
}

@media (min-width: 640px) {
  .hero-success-ctas .btn {
    width: auto;
  }
}

.hero-success-text-warning {
  color: hsl(var(--primary-foreground) / 0.9);
}

.hero-success-link-wrap {
  margin: 1rem 0 1.5rem;
  word-break: break-all;
}

.hero-success-link {
  color: hsl(var(--accent));
  text-decoration: underline;
  font-size: 0.875rem;
}

.hero-success-link:hover {
  text-decoration: none;
}

/* Mensagens flash (Django) no topo da landing */
.landing-messages {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.landing-alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.9375rem;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  color: hsl(var(--foreground));
  box-shadow: 0 2px 8px hsl(0 0% 0% / 0.08);
}

.landing-alert-success {
  border-color: hsl(var(--accent) / 0.5);
  background: hsl(var(--accent) / 0.08);
  color: hsl(var(--foreground));
}

.landing-alert-warning {
  border-color: hsl(38 92% 50% / 0.6);
  background: hsl(38 92% 50% / 0.1);
  color: hsl(var(--foreground));
}

.hero-scroll-indicator {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  text-align: center;
  z-index: 10;
  color: hsl(var(--accent) / 0.85);
}

.hero-scroll-indicator .chevron-bounce {
  display: inline-block;
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 2px 4px hsl(0 0% 0% / 0.3));
}

@media (max-width: 639px) {
  .hero-scroll-indicator {
    color: hsl(var(--accent));
  }

  .hero-scroll-indicator .chevron-bounce {
    width: 36px;
    height: 36px;
    filter: drop-shadow(0 2px 6px hsl(0 0% 0% / 0.4));
  }
}

.chevron-bounce {
  animation: chevron-bounce 2s ease-in-out infinite;
}

/* ========== Sections ========== */
.section {
  padding-top: 4rem;
  padding-bottom: 4rem;
}

@media (min-width: 640px) {
  .section {
    padding-top: 6rem;
    padding-bottom: 6rem;
  }
}

.section-about {
  background-color: hsl(220, 18%, 93%);
}

.section-about .card-glass {
  background: hsl(0, 0%, 100%);
  border: 1px solid hsl(var(--border));
  box-shadow: 0 1px 3px hsl(220, 15%, 88% / 0.4);
}

.section-benefits {
  background-color: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
}

.section-how {
  background-color: hsl(var(--background));
  overflow: hidden;
}

.section-trilhas {
  background-color: hsl(220, 18%, 93%);
}

/* Seção documentos: fundo claro para delimitar da seção "Acessar minha inscrição" */
.section-documentos {
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
}

.section-documentos .section-label {
  color: hsl(var(--accent));
}

.section-documentos .section-title {
  color: hsl(var(--foreground));
}

.section-documentos .section-desc,
.section-documentos .publicacao-data {
  color: hsl(var(--muted-foreground));
}

.section-documentos .publicacao-tipo {
  display: inline-block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: hsl(var(--muted-foreground));
  margin-right: 0.5rem;
}

.section-documentos .publicacao-link,
.section-documentos .publicacao-titulo {
  font-weight: 600;
}

.section-documentos .publicacao-link {
  color: hsl(var(--primary));
}

.section-documentos .publicacao-link:hover {
  color: hsl(var(--accent));
}

.section-documentos .publicacao-data {
  font-size: 0.875rem;
}

.section-documentos a.btn {
  color: inherit;
  padding: 0.5rem 1rem;
}

.section-trilhas .card-glass {
  background: hsl(0, 0%, 100%);
  border: 1px solid hsl(var(--border));
  box-shadow: 0 1px 3px hsl(220, 15%, 88% / 0.4);
}

.section-form {
  background-color: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
}

.portal-banner + .section.section-form {
  padding-top: 1rem;
  padding-bottom: 4rem;
}

@media (min-width: 640px) {
  .portal-banner + .section.section-form {
    padding-top: 1.25rem;
    padding-bottom: 6rem;
  }
}

.portal-banner + .section.section-form .section-head .section-title {
  margin-top: 0;
}

/* ========== Portal (Minha Inscrição) banner ========== */
.portal-banner {
  background-color: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
  padding-top: 2rem;
  padding-bottom: 1rem;
}

@media (min-width: 640px) {
  .portal-banner {
    padding-top: 2.5rem;
    padding-bottom: 1.25rem;
  }
}

.portal-banner-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.portal-banner-logos {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.portal-banner .portal-banner-logo {
  height: 4rem;
  width: auto;
}

.portal-banner .portal-banner-logos .portal-banner-logo:first-child {
  height: 4.5rem;
}

@media (min-width: 640px) {
  .portal-banner .portal-banner-logo {
    height: 4.5rem;
  }

  .portal-banner .portal-banner-logos .portal-banner-logo:first-child {
    height: 5.25rem;
  }
}

.portal-banner-divider {
  height: 2.25rem;
  width: 1px;
  background-color: hsl(var(--secondary-foreground) / 0.2);
}

@media (min-width: 640px) {
  .portal-banner-divider {
    height: 3rem;
  }
}

.portal-banner-label {
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  color: hsl(var(--accent));
}

.portal-banner + .section.section-form .section-head {
  margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
  .portal-banner + .section.section-form .section-head {
    margin-bottom: 2rem;
  }
}

.section-numbers {
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

@media (min-width: 640px) {
  .section-numbers {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }
}

.numbers-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (min-width: 640px) {
  .numbers-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
  }
}

.number-item {
  text-align: center;
  padding: 1rem 0.5rem;
  border-radius: 0.75rem;
  background-color: hsl(var(--primary-foreground) / 0.06);
}

.number-value {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: hsl(var(--accent));
}

@media (min-width: 640px) {
  .number-value {
    font-size: 1.75rem;
  }
}

.number-label {
  display: block;
  font-size: 0.75rem;
  color: hsl(var(--primary-foreground) / 0.8);
  margin-top: 0.25rem;
}

@media (min-width: 640px) {
  .number-label {
    font-size: 0.875rem;
  }
}

.section-head {
  margin-bottom: 2.5rem;
}

@media (min-width: 640px) {
  .section-head {
    margin-bottom: 4rem;
  }
}

.section-head-center {
  text-align: center;
}

.section-label {
  display: block;
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  color: hsl(var(--accent));
}

@media (min-width: 640px) {
  .section-label {
    font-size: 0.875rem;
  }
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: inherit;
  margin-top: 0.75rem;
}

@media (min-width: 640px) {
  .section-title {
    font-size: 1.875rem;
  }
}

@media (min-width: 768px) {
  .section-title {
    font-size: 3rem;
  }
}

.section-desc {
  margin-top: 1rem;
  max-width: 42rem;
  color: hsl(var(--muted-foreground));
  font-size: 0.875rem;
  line-height: 1.625;
}

.section-head-center .section-desc {
  margin-left: auto;
  margin-right: auto;
}

.section-desc-narrow {
  margin-left: auto;
  margin-right: auto;
  margin-top: 0.75rem;
  color: hsl(var(--secondary-foreground) / 0.6);
}

@media (min-width: 640px) {
  .section-desc {
    font-size: 1.125rem;
  }
}

/* ========== Cards (Sobre) ========== */
.cards-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 640px) {
  .cards-grid {
    gap: 2rem;
  }
}

.cards-grid-3 {
  grid-template-columns: 1fr;
}

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

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

.card-glass {
  border-radius: 1rem;
  padding: 1.5rem;
  height: 100%;
  transition: transform 0.3s, box-shadow 0.3s;
}

@media (min-width: 640px) {
  .card-glass {
    padding: 2rem;
  }
}

.card-glass:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 24px -6px hsl(var(--glow-accent) / 0.35);
}

.card-icon-wrap {
  height: 3rem;
  width: 3rem;
  border-radius: 0.75rem;
  background-color: hsl(var(--accent) / 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  transition: background-color 0.3s;
}

@media (min-width: 640px) {
  .card-icon-wrap {
    height: 3.5rem;
    width: 3.5rem;
    margin-bottom: 1.5rem;
  }
}

.card-glass:hover .card-icon-wrap {
  background-color: hsl(var(--accent) / 0.2);
}

.card-icon {
  color: hsl(var(--accent));
}

.card-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: hsl(var(--foreground));
  margin-bottom: 0.5rem;
}

@media (min-width: 640px) {
  .card-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
  }
}

.card-text {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  line-height: 1.625;
}

@media (min-width: 640px) {
  .card-text {
    font-size: 1rem;
  }
}

/* ========== Benefits ========== */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .benefits-grid {
    gap: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .benefits-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.card-benefit {
  border-radius: 1rem;
  border: 1px solid hsl(var(--secondary-foreground) / 0.1);
  background-color: hsl(var(--secondary-foreground) / 0.05);
  padding: 1.25rem;
  height: 100%;
  transition: transform 0.3s, background-color 0.3s;
}

@media (min-width: 640px) {
  .card-benefit {
    padding: 1.75rem;
  }
}

.card-benefit:hover {
  transform: translateY(-4px);
  background-color: hsl(var(--secondary-foreground) / 0.1);
}

.card-benefit-icon {
  color: hsl(var(--accent));
  margin-bottom: 0.75rem;
}

@media (min-width: 640px) {
  .card-benefit-icon {
    margin-bottom: 1.25rem;
  }
}

.card-benefit-title {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

@media (min-width: 640px) {
  .card-benefit-title {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
  }
}

.card-benefit-text {
  font-size: 0.75rem;
  color: hsl(var(--secondary-foreground) / 0.7);
  line-height: 1.625;
}

@media (min-width: 640px) {
  .card-benefit-text {
    font-size: 0.875rem;
  }
}

/* ========== How it works ========== */
.steps-wrap {
  position: relative;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  position: relative;
  z-index: 10;
}

@media (min-width: 640px) {
  .steps-grid {
    gap: 2rem;
  }
}

@media (min-width: 768px) {
  .steps-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.step-card {
  position: relative;
}

.step-number {
  display: block;
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 700;
  color: hsl(var(--accent) / 0.2);
}

@media (min-width: 640px) {
  .step-number {
    font-size: 3rem;
  }
}

.step-title {
  font-size: 1rem;
  font-weight: 600;
  color: hsl(var(--foreground));
  margin-top: 0.25rem;
  margin-bottom: 0.25rem;
}

@media (min-width: 640px) {
  .step-title {
    font-size: 1.25rem;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
  }
}

.step-text {
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
  line-height: 1.625;
}

@media (min-width: 640px) {
  .step-text {
    font-size: 0.875rem;
  }
}

/* ========== Form ========== */
.form-container {
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
}

.form-inscricao {
  border-radius: 1rem;
  border: 1px solid hsl(var(--secondary-foreground) / 0.1);
  background-color: hsl(var(--secondary-foreground) / 0.05);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .form-inscricao {
    padding: 2.5rem;
  }
}

.section-form .form-inscricao {
  background-color: hsl(var(--secondary-foreground) / 0.08);
  border-color: hsl(var(--secondary-foreground) / 0.15);
  box-shadow: 0 4px 24px hsla(0, 0%, 0%, 0.25);
}

.form-row {
  display: grid;
  gap: 1rem;
}

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: hsl(var(--secondary-foreground) / 0.8);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  border-radius: 0.375rem;
  border: 1px solid hsl(var(--secondary-foreground) / 0.15);
  background-color: hsl(var(--secondary-foreground) / 0.05);
  color: hsl(var(--secondary-foreground));
  padding: 0.5rem 0.75rem;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: hsl(var(--secondary-foreground) / 0.3);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: hsl(var(--ring));
  box-shadow: 0 0 0 2px hsl(var(--ring) / 0.2);
}

.form-input,
.form-select {
  min-height: 2.5rem;
}

.form-textarea {
  resize: none;
  min-height: 6rem;
}

.form-error {
  font-size: 0.75rem;
  color: hsl(var(--destructive));
}

.form-success {
  text-align: center;
  max-width: 32rem;
  margin-left: auto;
  margin-right: auto;
}

.form-success[hidden] {
  display: none !important;
}

.form-success-icon {
  color: hsl(var(--accent));
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 1.5rem;
}

.form-success-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

@media (min-width: 640px) {
  .form-success-title {
    font-size: 2.25rem;
  }
}

.form-success-text {
  font-size: 0.875rem;
  color: hsl(var(--secondary-foreground) / 0.7);
}

@media (min-width: 640px) {
  .form-success-text {
    font-size: 1rem;
  }
}

.portal-greeting {
  margin-bottom: 1.25rem;
  font-size: 1rem;
  font-weight: 500;
  color: hsl(var(--secondary-foreground) / 0.9);
}

.inscricao-dados {
  display: grid;
  gap: 1rem;
}

.inscricao-dados-item {
  margin: 0;
}

.inscricao-dt {
  font-weight: 600;
  color: hsl(var(--secondary-foreground) / 0.8);
  font-size: 0.875rem;
}

.inscricao-dd {
  margin-top: 0.25rem;
  margin-bottom: 0;
}

.portal-ctas {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid hsl(var(--secondary-foreground) / 0.12);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .portal-ctas {
    flex-direction: row;
    gap: 1rem;
  }
}

.portal-ctas .btn {
  width: 100%;
}

@media (min-width: 640px) {
  .portal-ctas .btn {
    width: auto;
  }
}

/* ========== Página Publicações (portal) ========== */
.publicacoes-lista-portal {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.publicacao-card {
  background-color: hsl(var(--secondary-foreground) / 0.06);
  border: 1px solid hsl(var(--secondary-foreground) / 0.12);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  transition: border-color 0.2s, background-color 0.2s;
}

.publicacao-card:hover {
  background-color: hsl(var(--secondary-foreground) / 0.09);
  border-color: hsl(var(--secondary-foreground) / 0.18);
}

.publicacao-card-tipo {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: hsl(var(--accent));
  margin-bottom: 0.375rem;
}

.publicacao-card-body {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
}

.publicacao-card-titulo {
  font-weight: 600;
  color: hsl(var(--secondary-foreground));
  text-decoration: none;
  flex: 1 1 auto;
  min-width: 0;
}

.publicacao-card-titulo:hover {
  color: hsl(var(--accent));
}

.publicacao-card-titulo-plain {
  color: hsl(var(--secondary-foreground) / 0.95);
}

.publicacao-card-data {
  font-size: 0.875rem;
  color: hsl(var(--secondary-foreground) / 0.65);
  flex-shrink: 0;
}

.publicacoes-empty {
  text-align: center;
  padding: 2.5rem 1.25rem;
  background-color: hsl(var(--secondary-foreground) / 0.05);
  border: 1px dashed hsl(var(--secondary-foreground) / 0.15);
  border-radius: var(--radius);
}

.publicacoes-empty-text {
  font-weight: 600;
  font-size: 1rem;
  color: hsl(var(--secondary-foreground) / 0.9);
  margin-bottom: 0.5rem;
}

.publicacoes-empty-desc {
  font-size: 0.875rem;
  color: hsl(var(--secondary-foreground) / 0.65);
  max-width: 26rem;
  margin: 0 auto;
  line-height: 1.5;
}

.btn-submit-content,
.btn-loading {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-loading[hidden] {
  display: none !important;
}

.btn-submit-content[hidden] {
  display: none !important;
}

.spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid hsl(var(--accent-foreground) / 0.3);
  border-top-color: hsl(var(--accent-foreground));
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes footer-logos-scroll {
  to {
    transform: translateX(-400%);
  }
}

/* ========== Footer ========== */
.footer {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  padding-top: 3rem;
  padding-bottom: 4rem;
}

@media (min-width: 640px) {
  .footer {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }
}

.footer-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .footer-main {
    gap: 2rem;
  }
}

/* Container dos logos: no mobile overflow hidden para o carrossel */
.footer-logos {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  position: relative;
}

/* Camada sobre os logos para suavizar o contraste (mantém o branco) */
.footer-logos::after {
  content: "";
  position: absolute;
  inset: 0;
  background: hsl(var(--primary) / 0.4);
  pointer-events: none;
}

@media (max-width: 639px) {
  .footer-logos {
    overflow: hidden;
  }
}

@media (min-width: 640px) {
  .footer-logos {
    justify-content: center;
  }
}

/* Track do carrossel: no mobile duas cópias em linha com animação */
.footer-logos-track {
  display: flex;
  align-items: center;
  gap: 1rem;
}

@media (max-width: 639px) {
  .footer-logos-track {
    animation: footer-logos-scroll 80s linear infinite;
    width: max-content;
    gap: 0; /* Sem gap entre as duas cópias = loop contínuo sem “quebra” */
    will-change: transform;
  }

  /* Ajuste no conjunto para garantir simetria perfeita no loop */
  .footer-logos-set {
    padding-right: 1rem; /* Espaço após o divisor final (igual ao gap interno) */
  }

  /* Adiciona o divisor final que falta no HTML original */
  .footer-logos-set::after {
    content: "";
    display: block;
    height: 2rem;
    width: 1px;
    background-color: hsl(var(--primary-foreground) / 0.15);
    flex-shrink: 0; /* Impede que o divisor seja esmagado */
  }
}

@media (prefers-reduced-motion: reduce) {
  .footer-logos-track {
    animation: none;
  }

  .footer-logos {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }
}

@media (min-width: 640px) {
  .footer-logos-track {
    animation: none;
  }

  .footer-logos-set:not(:first-of-type) {
    display: none;
  }
}

.footer-logos-set {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

.footer-logo {
  height: 3.5rem;
  width: auto;
}

.footer-logo-inovatech {
  height: 7rem;
}

.footer-logo-ifpi {
  height: 4rem;
}

.footer-logo-piauigovtech {
  height: 3rem;
}

.footer-logo-faifpi {
  height: 3.5rem;
}

.footer-logos-divider {
  height: 2rem;
  width: 1px;
  background-color: hsl(var(--primary-foreground) / 0.15);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  font-size: 0.875rem;
  color: hsl(var(--primary-foreground) / 0.6);
}

@media (max-width: 639px) {
  .footer-nav {
    gap: 0.5rem;
  }
}

.footer-link:hover {
  color: hsl(var(--accent));
  transition: color 0.2s;
}

.footer-contact {
  width: 100%;
  text-align: center;
  margin-top: 1rem;
}

@media (min-width: 640px) {
  .footer-contact {
    margin-top: 1.5rem;
  }
}

.footer-contact-title {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
  color: hsl(var(--primary-foreground));
  margin-bottom: 0.5rem;
}

.footer-address {
  font-style: normal;
  font-size: 0.8125rem;
  color: hsl(var(--primary-foreground) / 0.8);
  line-height: 1.6;
}

.footer-address a {
  color: inherit;
  text-decoration: underline;
}

.footer-address a:hover {
  color: hsl(var(--accent));
}

.footer-ods {
  margin-top: 1rem;
  font-size: 0.6875rem;
  color: hsl(var(--primary-foreground) / 0.55);
  text-align: center;
}

.footer-copy {
  border-top: 1px solid hsl(var(--primary-foreground) / 0.15);
  margin-top: 2rem;
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.75rem;
  color: hsl(var(--primary-foreground) / 0.72);
}

@media (min-width: 640px) {
  .footer-copy {
    margin-top: 2.5rem;
  }
}
