/* =========================================================================
   INOVA POLI — Design System
   Ambiente de Inovação da POLI/UPE
   Token architecture: primitives -> semantic -> component
   ========================================================================= */

/* ---------- 1. PRIMITIVE TOKENS ---------- */
:root {
  /* Brand primitives (sampled from the official Inova Poli identity) */
  --p-navy-900: #071c3f;
  --p-navy-800: #0a2657;
  --p-navy-700: #0e3170;
  --p-navy-600: #13408f;
  --p-navy-100: #e6ecf7;

  --p-red-700: #b80f24;
  --p-red-600: #d81328;
  --p-red-500: #e8122d;
  --p-red-100: #fde7e9;

  --p-blue-accent: #6fa3e0;

  --p-white: #ffffff;
  --p-gray-050: #f5f7fb;
  --p-gray-100: #eef1f8;
  --p-gray-300: #cdd4e2;
  --p-gray-500: #6b7690;
  --p-gray-700: #3a4258;
  --p-gray-900: #131826;

  /* Type primitives — Poppins em toda a plataforma (títulos e corpo de texto) */
  --f-display: 'Poppins', 'Montserrat', sans-serif;
  --f-body: 'Poppins', 'Segoe UI', sans-serif;

  /* Spacing / radius primitives */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 24px;
  --shadow-soft: 0 10px 30px rgba(7, 28, 63, 0.10);
  --shadow-card: 0 6px 24px rgba(7, 28, 63, 0.08);
}

/* ---------- 2. SEMANTIC TOKENS ---------- */
:root {
  --color-brand-primary: var(--p-navy-800);
  --color-brand-secondary: var(--p-red-600);
  --color-brand-accent: var(--p-blue-accent);

  --color-surface: var(--p-white);
  --color-surface-muted: var(--p-gray-050);
  --color-surface-dark: var(--p-navy-900);

  --color-text-body: var(--p-gray-700);
  --color-text-heading: var(--p-navy-900);
  --color-text-on-dark: rgba(255, 255, 255, 0.92);
  --color-text-on-dark-muted: rgba(255, 255, 255, 0.68);
  --color-text-muted: var(--p-gray-500);

  --color-border: var(--p-gray-300);
  --color-link: var(--p-red-600);

  --gradient-hero: linear-gradient(135deg, #0a2657 0%, #0e3170 45%, #13408f 100%);
}

/* ---------- 3. BASE / RESET ---------- */
* { box-sizing: border-box; }

body {
  font-family: var(--f-body);
  color: var(--color-text-body);
  background: var(--color-surface);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--f-display);
  color: var(--color-text-heading);
  font-weight: 700;
  letter-spacing: -0.01em;
}

a { color: var(--color-link); text-decoration: none; }
a:hover { color: var(--p-red-700); }

img { max-width: 100%; }

.container { max-width: 1440px; }

/* Eyebrow label used above section headings */
.ip-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--p-red-600);
  margin-bottom: 0.6rem;
}

.ip-section { padding: 88px 0; }
.ip-section-sm { padding: 56px 0; }
.ip-bg-muted { background: var(--color-surface-muted); }
.ip-bg-dark {
  background: var(--gradient-hero);
  color: var(--color-text-on-dark);
}
.ip-bg-dark h1, .ip-bg-dark h2, .ip-bg-dark h3, .ip-bg-dark h4, .ip-bg-dark h5 {
  color: #fff;
}
.ip-bg-dark p { color: var(--color-text-on-dark-muted); }

/* ---------- 4. COMPONENTS ---------- */

/* Buttons */
.btn-ip-primary,
.btn-ip-secondary,
.btn-ip-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 14px 30px;
  border-radius: 15px;
  border: 2px solid transparent;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, color .18s ease;
  white-space: nowrap;
}
.btn-ip-primary {
  background: var(--p-red-600);
  color: #fff;
}
.btn-ip-primary:hover {
  background: var(--p-red-700);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}
.btn-ip-secondary {
  background: #fff;
  color: var(--p-navy-800);
}
.btn-ip-secondary:hover {
  background: var(--p-navy-100);
  color: var(--p-navy-900);
  transform: translateY(-2px);
}
.btn-ip-ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.55);
  color: #fff;
}
.btn-ip-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* Navbar */
.ip-navbar {
  background: var(--p-navy-900);
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 999;
  box-shadow: 0 2px 18px rgba(0,0,0,0.18);
}
.ip-navbar .navbar-brand img { height: 56px; }
.ip-navbar .nav-link {
  color: rgba(255,255,255,0.85) !important;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 1.1rem;
  margin: 0 10px;
  padding: 8px 2px !important;
  border-bottom: 2px solid transparent;
}
.ip-navbar .nav-link:hover,
.ip-navbar .nav-link.active {
  color: #fff !important;
  border-bottom-color: var(--p-red-600);
}
.ip-navbar .navbar-toggler {
  border-color: rgba(255,255,255,0.4);
}
.ip-topbar {
  background: var(--p-navy-800);
  color: rgba(255,255,255,0.75);
  font-size: 0.85rem;
  padding: 8px 0;
}
.ip-topbar a { color: #fff; font-weight: 600; }
.ip-topbar .social a {
  color: rgba(255,255,255,0.75);
  margin-left: 16px;
}
.ip-topbar .social a:hover { color: #fff; }

/* Hero */
.ip-hero {
  background-image:
    linear-gradient(120deg, rgba(7, 28, 63, 0.94) 0%, rgba(10, 38, 87, 0.82) 40%, rgba(19, 64, 143, 0.45) 100%),
    url('../img/inova-poli-banner.png');
  background-size: cover;
  background-position: center right;
  background-repeat: no-repeat;
  color: #fff;
  position: relative;
  overflow: hidden;
  padding: 90px 0 70px;
}
.ip-hero::after {
  content: "";
  position: absolute;
  right: -10%;
  top: -20%;
  width: 620px;
  height: 620px;
  background: radial-gradient(circle, rgba(232,18,45,0.20) 0%, rgba(232,18,45,0) 70%);
  pointer-events: none;
}
.ip-hero .display-headline {
  font-size: clamp(2.1rem, 4.2vw, 3.4rem);
  font-weight: 800;
  line-height: 1.2;
  color: #fff;
}
.ip-hero .display-headline .accent { color: var(--p-red-500); }
.ip-hero p.lead { color: rgba(255,255,255,0.78); font-size: 1.12rem; }

/* Pillars strip (maratona / empreendedorismo / inovação aberta / projetos / negócios / impacto) */
.ip-pillars {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin-top: 44px;
}
@media (max-width: 991px) { .ip-pillars { grid-template-columns: repeat(3, 1fr); gap: 18px 10px; } }
@media (max-width: 560px) { .ip-pillars { grid-template-columns: repeat(2, 1fr); } }
.ip-pillar {
  text-align: center;
  color: rgba(255,255,255,0.92);
}
.ip-pillar .ip-pillar-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 10px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  color: #fff;
  background: rgba(255,255,255,0.06);
  transition: .25s;
}
.ip-pillar:hover .ip-pillar-icon {
  border-color: var(--p-red-500);
  background: var(--p-red-500);
}
.ip-pillar span {
  display: block;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Cards */
.ip-card {
  background: #fff;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-card);
  height: 100%;
  transition: transform .2s ease, box-shadow .2s ease;
}
.ip-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-soft); }

/* Desafio: cards da listagem */
.ip-desafio-card-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.ip-desafio-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
  color: var(--p-navy-800);
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 0.85rem;
}

.ip-desafio-card-footer i {
  transition: transform .18s ease;
}

.ip-card:hover .ip-desafio-card-footer i {
  transform: translateX(4px);
}

/* Desafio: conteúdo da página de detalhe */
.ip-desafio-content {
  background: #fff;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-card);
  padding: 32px;
}

.ip-desafio-block {
  margin-bottom: 26px;
}

.ip-desafio-block:last-child {
  margin-bottom: 0;
}

.ip-desafio-block-label {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--p-red-600);
  margin-bottom: 6px;
}

.ip-desafio-block p {
  white-space: pre-line;
  color: var(--color-text-body);
  line-height: 1.75;
  margin: 0;
}

.ip-desafio-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ip-desafio-links li {
  color: var(--color-text-body);
  line-height: 1.6;
}

.ip-desafio-links a {
  font-weight: 600;
  word-break: break-word;
}

.ip-info-list {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ip-info-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.ip-info-list .ip-info-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  background: var(--p-navy-100);
  color: var(--p-navy-800);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}

.ip-info-list .ip-info-body {
  padding-top: 4px;
}

.ip-info-list .ip-info-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  margin-bottom: 2px;
}

@media (max-width: 700px) {
  .ip-desafio-content {
    padding: 22px;
  }
}

.ip-logo-card {
  background: #fff;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-card);
  padding: 22px 14px;
  text-align: center;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.ip-logo-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-soft); }
.ip-logo-card img { max-height: 64px; max-width: 100%; object-fit: contain; }
.ip-logo-card h6 { margin: 0; font-size: 0.95rem; }
.ip-logo-card small { color: var(--color-text-muted); }

/* Stat / prize cards */
.ip-stat-card {
  background: #fff;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-card);
  padding: 28px 20px;
  text-align: center;
  height: 100%;
  border-top: 4px solid var(--p-red-600);
}
.ip-stat-card img { max-height: 90px; margin-bottom: 14px; }
.ip-stat-card h3 { font-size: 1.1rem; margin-bottom: 6px; }
.ip-stat-card p { margin: 0; font-size: 0.92rem; }

/* Team / people cards */
.ip-person-card {
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  background: #fff;
}
.ip-person-card img { width: 100%; height: 230px; object-fit: cover; display: block; }
.ip-person-card .body { padding: 16px; text-align: center; }
.ip-person-card h5 { font-size: 1rem; margin-bottom: 2px; }
.ip-person-card span { font-size: 0.85rem; color: var(--color-text-muted); }

/* Forms */
.ip-form-panel {
  background: #fff;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-soft);
  padding: 40px;
}
.ip-form-panel .form-control,
.ip-form-panel .form-select {
  border: 1px solid var(--color-border);
  border-radius: var(--r-sm);
}
.ip-form-panel .form-label,
.ip-form-panel .form-floating > label {
  font-size: 1.05rem;
  font-weight: 600;
}
.ip-form-panel .form-control:focus,
.ip-form-panel .form-select:focus {
  border-color: var(--p-navy-600);
  box-shadow: 0 0 0 3px rgba(14, 49, 112, 0.15);
}

/* Page header (internal pages) */
.ip-page-header {
  background: var(--gradient-hero);
  color: #fff;
  padding: 64px 0 48px;
}
.ip-page-header h1 {
  color: #fff;
  margin-bottom: 10px;
  font-size: clamp(2.4rem, 4vw, 3.2rem);
  font-weight: 800;
}
.ip-page-header .breadcrumb { margin: 0; }
.ip-page-header .breadcrumb a { color: rgba(255,255,255,0.75); }
.ip-page-header .breadcrumb-item.active { color: #fff; }
.ip-page-header .breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,0.5); }

/* Footer */
.ip-footer {
  background: var(--p-navy-900);
  color: rgba(255,255,255,0.68);
  padding: 64px 0 0;
}
.ip-footer h5 { color: #fff; font-size: 1.02rem; }
.ip-footer a { color: rgba(255,255,255,0.68); }
.ip-footer a:hover { color: #fff; }
.ip-footer .btn-square {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 50%;
  color: #fff;
  margin-right: 8px;
}
.ip-footer .btn-square:hover { background: var(--p-red-600); border-color: var(--p-red-600); }
.ip-footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  margin-top: 40px;
  padding: 20px 0;
  font-size: 0.85rem;
}
.ip-footer-bottom a { color: rgba(255,255,255,0.85); font-weight: 600; }

/* Back to top */
.ip-back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--p-red-600);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-soft);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: .25s;
  z-index: 999;
}
.ip-back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }

/* Utility */
.ip-badge-outline {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  font-size: 0.82rem;
  color: var(--color-text-muted);
}
.ip-divider { height: 1px; background: var(--color-border); border: 0; }

/* Scroll reveal */
.ip-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s ease, transform .6s ease;
}
.ip-reveal.ip-visible { opacity: 1; transform: none; }

@media (max-width: 767px) {
  .ip-section { padding: 60px 0; }
  .ip-hero { padding: 64px 0 44px; }
  .ip-form-panel { padding: 26px; }
}
