:root {
  --navy: #052B5C;
  --blue: #005EB8;
  --cyan: #0096C7;
  --orange: #FF9E1B;
  --text: #17243A;
  --muted: #576274;
  --white: #FFFFFF;
  --light: #F7F9FC;
  --pale-blue: #EAF4F8;
  --interaction: #EEF6FB;
  --border: #DFE5EC;
  --focus: #FFB81C;
  --container: 1400px;
  --font-heading: "Montserrat", Arial, sans-serif;
  --font-body: "Roboto", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--white);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body.no-scroll {
  overflow: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--focus);
}

.svg-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.container {
  width: min(calc(100% - 64px), var(--container));
  margin-inline: auto;
}

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

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 3000;
  padding: 10px 16px;
  color: var(--white);
  background: var(--navy);
  border-radius: 4px;
  transform: translateY(-160%);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.section {
  padding-block: 64px;
}

.section--blue {
  background: var(--pale-blue);
}

.section-title {
  margin: 0 0 24px;
  color: var(--navy);
  font-family: var(--font-heading);
  font-size: clamp(28px, 2.2vw, 32px);
  font-weight: 700;
  line-height: 1.2;
}

.section-title::after {
  content: "";
  display: block;
  width: 52px;
  height: 4px;
  margin-top: 14px;
  background: var(--orange);
  border-radius: 99px;
}

.section-title--plain::after,
.section-title--compact::after {
  display: none;
}

.section-title--compact {
  margin-bottom: 18px;
  font-size: 28px;
}

.section-intro {
  max-width: 1180px;
  margin: -8px 0 24px;
  color: var(--text);
  font-size: 16px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  border: 2px solid transparent;
  border-radius: 4px;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease;
}

.button--primary {
  color: var(--white);
  background: var(--blue);
  border-color: var(--blue);
}

.button--primary:hover,
.button--primary:focus-visible {
  background: var(--navy);
  border-color: var(--navy);
}

.button--secondary {
  color: var(--blue);
  background: var(--white);
  border-color: var(--blue);
}

.button--secondary:hover,
.button--secondary:focus-visible {
  background: var(--interaction);
}

/* Barra utilitária */
.utility-bar {
  min-height: 36px;
  color: var(--white);
  background: var(--navy);
  font-size: 13px;
}

.utility-bar__inner,
.utility-bar__left {
  display: flex;
  align-items: center;
}

.utility-bar__inner {
  min-height: 36px;
  justify-content: space-between;
}

.utility-bar__left {
  gap: 14px;
}

.utility-link {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 7px;
  color: var(--white);
  background: transparent;
  border: 0;
  padding: 0;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  text-transform: uppercase;
}

.utility-link svg,
.language-select svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.utility-separator {
  width: 1px;
  height: 16px;
  background: rgba(255, 255, 255, 0.75);
}

.language-select {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.language-select select {
  min-width: 44px;
  min-height: 32px;
  color: var(--white);
  background: var(--navy);
  border: 0;
  font-size: 13px;
  font-weight: 500;
}

/* Cabeçalho institucional */
.institutional-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.institutional-header__inner {
  display: flex;
  min-height: 108px;
  align-items: center;
}

.iee-brand {
  display: flex;
  width: 155px;
  height: 88px;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
}

.iee-brand img {
  width: auto;
  height: 88px;
  object-fit: contain;
  object-position: left center;
}

.brand-divider {
  width: 1px;
  height: 72px;
  margin: 0 30px 0 12px;
  background: #8A96A8;
}

.procam-brand {
  display: flex;
  min-width: 268px;
  flex-direction: column;
  color: var(--navy);
  text-decoration: none;
}

.procam-brand strong {
  font-family: var(--font-heading);
  font-size: 36px;
  font-weight: 700;
  line-height: 1;
}

.procam-brand span {
  margin-top: 8px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.35;
}

.main-nav {
  margin-left: auto;
}

.main-nav ul {
  display: flex;
  align-items: center;
  gap: clamp(24px, 2.5vw, 42px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.main-nav a {
  position: relative;
  min-width: 44px;
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: var(--navy);
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.main-nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 4px;
  left: 0;
  height: 3px;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.main-nav a:hover::after,
.main-nav a:focus-visible::after {
  transform: scaleX(1);
}

.header-search-button,
.mobile-menu-button {
  display: inline-flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--navy);
  background: transparent;
  border: 0;
}

.header-search-button {
  margin-left: 24px;
}

.header-search-button svg,
.mobile-menu-button svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.mobile-menu-button {
  display: none;
  margin-left: auto;
}

.mobile-menu-button__close {
  display: none;
}

.mobile-menu-button[aria-expanded="true"] .mobile-menu-button__open {
  display: none;
}

.mobile-menu-button[aria-expanded="true"] .mobile-menu-button__close {
  display: block;
}

/* Hero */
.hero {
  border-bottom: 1px solid var(--border);
}

.hero__grid {
  display: grid;
  grid-template-columns: 48% 52%;
  min-height: 460px;
}

.hero__content {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
  padding: 56px 52px 56px 0;
}

.hero h1 {
  max-width: 720px;
  margin: 0 0 24px;
  color: var(--navy);
  font-family: var(--font-heading);
  font-size: clamp(48px, 3.7vw, 54px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.hero p {
  max-width: 660px;
  margin: 0 0 30px;
  color: var(--text);
  font-size: 18px;
  line-height: 1.65;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.hero__image {
  min-height: 460px;
  overflow: hidden;
}

.hero__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Acesso rápido */
.quick-access {
  padding-block: 24px 40px;
}

.quick-access__grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

.quick-card {
  display: flex;
  min-height: 146px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  padding: 18px 12px;
  color: var(--navy);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.quick-card:hover,
.quick-card:focus-visible {
  background: var(--interaction);
  border-color: #9ABED8;
  box-shadow: 0 6px 16px rgba(5, 43, 92, 0.08);
}

.quick-card svg {
  width: 52px;
  height: 52px;
  color: var(--blue);
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

/* Conheça o PPGE */
.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 45fr) minmax(0, 55fr);
  gap: 56px;
  align-items: center;
}

.about__content p {
  max-width: 650px;
  margin: 0 0 20px;
  font-size: 18px;
  line-height: 1.65;
}

.outline-link {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  gap: 18px;
  margin-top: 8px;
  padding: 10px 18px;
  color: var(--blue);
  background: var(--white);
  border: 2px solid var(--blue);
  border-radius: 4px;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  text-transform: uppercase;
}

.outline-link:hover,
.outline-link:focus-visible {
  background: var(--interaction);
}

.outline-link svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.about__image {
  overflow: hidden;
  min-height: 370px;
  border-radius: 6px;
}

.about__image img {
  width: 100%;
  height: 100%;
  min-height: 370px;
  object-fit: cover;
  object-position: center;
}

/* Desafios */
.challenges {
  padding-bottom: 32px;
}

.challenges__grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.challenge-card {
  position: relative;
  display: flex;
  min-height: 330px;
  flex-direction: column;
  padding: 18px 16px 52px;
  color: var(--text);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 6px;
  text-decoration: none;
  transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.challenge-card:hover,
.challenge-card:focus-visible {
  background: var(--interaction);
  border-color: #9ABED8;
  box-shadow: 0 6px 16px rgba(5, 43, 92, 0.08);
}

.challenge-card__icon {
  display: flex;
  width: 72px;
  height: 72px;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  border-radius: 50%;
}

.challenge-card__icon svg {
  width: 46px;
  height: 46px;
  fill: none;
  stroke: #17243A;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.45;
}

.challenge-card__icon--green { background: #DDF0B2; }
.challenge-card__icon--lime { background: #E8F4B9; }
.challenge-card__icon--blue { background: #D9EFF6; }
.challenge-card__icon--orange { background: #FBE0A7; }
.challenge-card__icon--violet { background: #E8DCF2; }
.challenge-card__icon--cyan { background: #D4F1EF; }

.challenge-card h3 {
  margin: 0 0 14px;
  color: var(--navy);
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.32;
}

.challenge-card p {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
}

.challenge-card__arrow {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 24px;
  height: 24px;
  color: var(--blue);
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

/* Notícias */
.news {
  padding-top: 0;
}

.news__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.news-card {
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.news-card__image {
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 6;
}

.news-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 180ms ease;
}

.news-card:hover .news-card__image img {
  transform: scale(1.02);
}

.news-card__body {
  padding: 16px 18px 20px;
}

.news-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  font-size: 13px;
}

.category {
  font-weight: 700;
  text-transform: uppercase;
}

.category--event { color: #005EB8; }
.category--defense { color: #2F7427; }
.category--publication { color: #8A4AA6; }

.news-card time {
  color: var(--text);
}

.news-card h3 {
  margin: 0 0 14px;
  color: var(--navy);
  font-family: var(--font-heading);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.35;
}

.news-card h3 a {
  text-decoration: none;
}

.news-card p {
  margin: 0 0 18px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
}

.news-card__link,
.news__all a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--blue);
  font-family: var(--font-heading);
  font-weight: 600;
  text-decoration: none;
}

.news-card__link svg,
.news__all svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.news__all {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

/* Rodapé */
.site-footer {
  color: var(--white);
  background: var(--navy);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.05fr 1.45fr 1fr 0.85fr;
  gap: 0;
  padding-block: 34px 26px;
}

.footer__identity,
.footer__column {
  min-width: 0;
  padding-inline: 30px;
  border-left: 1px solid rgba(255, 255, 255, 0.78);
}

.footer__identity {
  padding-left: 0;
  border-left: 0;
}

.footer__identity img {
  width: 116px;
  height: 66px;
  margin-bottom: 8px;
  object-fit: contain;
  object-position: left center;
  filter: brightness(0) invert(1);
}

.footer__identity strong {
  display: block;
  margin-bottom: 8px;
  font-family: var(--font-heading);
  font-size: 20px;
}

.footer__identity p {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.5;
}

.footer__column h2 {
  margin: 0 0 16px;
  color: var(--white);
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 600;
  text-transform: uppercase;
}

.footer__column address {
  font-style: normal;
}

.footer__column address p {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.45;
}

.footer__column address svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  margin-top: 1px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.footer__column a {
  color: var(--white);
}

.footer__column ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer__column li {
  position: relative;
  margin-bottom: 10px;
  padding-left: 18px;
  font-size: 14px;
}

.footer__column li::before {
  content: "›";
  position: absolute;
  left: 0;
  font-size: 22px;
  line-height: 0.8;
}

.footer__column li a {
  text-decoration: none;
}

.back-to-top {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--white);
  text-decoration: none;
}

.back-to-top__icon {
  display: inline-flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--white);
  border-radius: 50%;
}

.back-to-top__icon svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.footer__legal {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.4);
  font-size: 13px;
}

.footer__legal p {
  margin: 0;
}

.footer__legal div {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer__legal div span {
  width: 1px;
  height: 16px;
  background: rgba(255, 255, 255, 0.7);
}

.footer__legal a {
  color: var(--white);
  text-decoration: none;
}

/* Busca */
.search-modal[hidden] {
  display: none;
}

.search-modal {
  position: fixed;
  z-index: 2000;
  inset: 0;
  display: grid;
  place-items: start center;
  padding: 88px 20px 20px;
}

.search-modal__backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: rgba(5, 24, 48, 0.78);
  border: 0;
}

.search-modal__panel {
  position: relative;
  width: min(720px, 100%);
  padding: 28px;
  color: var(--text);
  background: var(--white);
  border-radius: 6px;
}

.search-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.search-modal__header h2 {
  margin: 0;
  color: var(--navy);
  font-family: var(--font-heading);
  font-size: 28px;
}

.search-modal__close {
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  color: var(--navy);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 50%;
}

.search-modal__close svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.search-form {
  margin-top: 22px;
}

.search-form label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

.search-form > div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.search-form input {
  min-width: 0;
  min-height: 48px;
  padding: 10px 12px;
  color: var(--text);
  background: var(--white);
  border: 1px solid #8593A4;
  border-radius: 4px;
}

.search-form__message {
  min-height: 24px;
  margin: 10px 0 0;
  color: var(--muted);
}

/* Alto contraste */
body.high-contrast {
  --navy: #000000;
  --blue: #FFFF00;
  --cyan: #FFFF00;
  --orange: #FFFF00;
  --text: #FFFFFF;
  --muted: #FFFFFF;
  --white: #000000;
  --light: #000000;
  --pale-blue: #000000;
  --interaction: #1A1A1A;
  --border: #FFFFFF;
  --focus: #00FFFF;
  color: #FFFFFF;
  background: #000000;
}

body.high-contrast img {
  filter: contrast(1.18);
}

body.high-contrast .button--primary {
  color: #000;
}

body.high-contrast .challenge-card__icon svg {
  stroke: #000;
}


body.high-contrast .footer__identity img {
  filter: brightness(0) invert(1);
}


/* Refinamentos de homologação funcional e de acessibilidade */
#conteudo-principal:focus {
  outline: none;
}

.news-card h3 a,
.news-card__link,
.news__all a,
.footer__column a,
.footer__legal a {
  min-height: 44px;
}

.news-card h3 a,
.news-card__link,
.news__all a {
  display: inline-flex;
  align-items: center;
}

.footer__column a,
.footer__legal a {
  display: inline-flex;
  align-items: center;
}

@media (max-width: 767px) {
  .footer__column li {
    margin-bottom: 0;
  }

  .footer__column li a,
  .footer__column address a,
  .footer__legal a {
    min-height: 44px;
  }
}
