/* =========================================================
   HERO CAROUSEL
   ========================================================= */
.hero {
  position: relative;
  width: 100%;
  height: clamp(500px, 70vh, 650px);
  overflow: hidden;
  background: var(--dark);
  isolation: isolate;
}

/* Barra de progresso do autoplay */
.hero__progress {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.15);
  z-index: 5;
  overflow: hidden;
}
.hero__progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--secondary), var(--secondary-dark));
  transition: width 0.1s linear;
}
.hero.is-paused .hero__progress-bar {
  animation-play-state: paused;
}

/* Viewport dos slides */
.hero__viewport {
  position: relative;
  width: 100%;
  height: 100%;
}

/* Slide individual */
.hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity var(--hero-transition),
    visibility 0s linear var(--hero-transition);
  z-index: 1;
}
.hero__slide.is-active {
  opacity: 1;
  visibility: visible;
  z-index: 2;
  transition:
    opacity var(--hero-transition),
    visibility 0s;
}

/* Imagem de fundo com efeito Ken Burns subtil */
.hero__media {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.05);
  transition: transform 8s ease-out;
}
.hero__slide.is-active .hero__media {
  transform: scale(1.12);
}

/* Overlay com gradiente para legibilidade */
.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    rgba(10, 37, 64, 0.92) 0%,
    rgba(33, 37, 41, 0.78) 40%,
    rgba(33, 37, 41, 0.55) 75%,
    rgba(33, 37, 41, 0.35) 100%
  );
  z-index: 2;
}

/* Conteúdo do slide */
.hero__content {
  position: relative;
  z-index: 3;
  height: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: white;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--secondary);
  margin-bottom: 1.25rem;
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.8s ease 0.15s,
    transform 0.8s ease 0.15s;
}
.hero__eyebrow::before {
  width: 36px;
  height: 1px;
  background: var(--secondary);
}

.hero__title {
  font-family: "Playfair Display", serif;
  font-size: clamp(2rem, 4.5vw, 3.75rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.5px;
  max-width: 820px;
  margin-bottom: 1.25rem;
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.9s ease 0.3s,
    transform 0.9s ease 0.3s;
}

.hero__description {
  font-size: clamp(0.95rem, 1.3vw, 1.125rem);
  font-weight: 400;
  line-height: 1.65;
  max-width: 620px;
  color: var(--hero-text-muted);
  margin-bottom: 2.25rem;
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.9s ease 0.45s,
    transform 0.9s ease 0.45s;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.9s ease 0.6s,
    transform 0.9s ease 0.6s;
}

/* Animação de entrada quando o slide está ativo */
.hero__slide.is-active .hero__eyebrow,
.hero__slide.is-active .hero__title,
.hero__slide.is-active .hero__description,
.hero__slide.is-active .hero__actions {
  opacity: 1;
  transform: translateY(0);
}

/* Botões */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.95rem 2rem;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  border-radius: var(--hero-radius);
  transition: var(--transition);
  white-space: nowrap;
}
.btn--primary {
  border-radius: 30px 8px;
  background: var(--secondary);
  color: var(--primary);
}
.btn--primary:hover,
.btn--primary:focus-visible {
  background: var(--secondary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(201, 169, 97, 0.35);
}
.btn--secondary {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.4);
}
.btn--secondary:hover,
.btn--secondary:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--white);
  transform: translateY(-2px);
}
.btn:focus-visible {
  outline: 2px solid var(--secondary);
  outline-offset: 3px;
}

/* Controles de navegação (setas) */
.hero__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.hero__nav:hover,
.hero__nav:focus-visible {
  background: var(--secondary);
  color: var(--primary);
  border-color: var(--secondary);
  transform: translateY(-50%) scale(1.08);
}
.hero__nav:focus-visible {
  outline: 2px solid var(--secondary);
  outline-offset: 3px;
}
.hero__nav--prev {
  left: 2rem;
}
.hero__nav--next {
  right: 2rem;
}
.hero__nav svg {
  width: 20px;
  height: 20px;
}

/* Indicadores (dots) */
.hero__indicators {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: rgba(10, 37, 64, 0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 40px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.hero__dot {
  width: 28px;
  height: 3px;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 2px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.hero__dot::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--secondary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}
.hero__dot.is-active {
  background: rgba(255, 255, 255, 0.2);
}
.hero__dot.is-active::after {
  transform: scaleX(1);
  transition: transform 6s linear;
}
.hero.is-paused .hero__dot.is-active::after {
  transition: none;
}
.hero__dot:hover {
  background: rgba(255, 255, 255, 0.6);
}
.hero__dot:focus-visible {
  outline: 2px solid var(--secondary);
  outline-offset: 3px;
}

/* Contador de slide */
.hero__counter {
  position: absolute;
  bottom: 2rem;
  right: 3rem;
  z-index: 4;
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 2px;
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
}
.hero__counter-current {
  font-family: "Playfair Display", serif;
  font-size: 1.5rem;
  color: var(--secondary);
}
.hero__counter-sep {
  opacity: 0.5;
}

/* =========================================================
   RESPONSIVIDADE
   ========================================================= */
@media (max-width: 1024px) {
  .hero__content {
    padding: 0 2.5rem;
  }
  .hero__nav--prev {
    left: 1rem;
  }
  .hero__nav--next {
    right: 1rem;
  }
  .hero__counter {
    right: 2rem;
  }
}

@media (max-width: 768px) {
  .hero {
    height: clamp(480px, 75vh, 580px);
  }
  .hero__content {
    padding: 0 1.5rem;
    text-align: left;
  }
  .hero__eyebrow {
    font-size: 0.72rem;
    letter-spacing: 2px;
  }
  .hero__description {
    font-size: 0.95rem;
    margin-bottom: 1.75rem;
  }
  .hero__actions {
    flex-direction: column;
    align-items: stretch;
  }
  .btn {
    width: 100%;
    padding: 0.9rem 1.5rem;
  }
  .hero__nav {
    width: 42px;
    height: 42px;
  }
  .hero__nav--prev {
    left: 0.75rem;
  }
  .hero__nav--next {
    right: 0.75rem;
  }
  .hero__indicators {
    bottom: 1.25rem;
  }
  .hero__counter {
    display: none;
  }
  .hero__overlay {
    background: linear-gradient(
      180deg,
      rgba(10, 37, 64, 0.55) 0%,
      rgba(33, 37, 41, 0.85) 60%,
      rgba(33, 37, 41, 0.95) 100%
    );
  }
}

@media (max-width: 480px) {
  .hero {
    height: clamp(460px, 80vh, 560px);
  }
  .hero__content {
    padding: 0 1.25rem;
  }
  .hero__nav {
    width: 38px;
    height: 38px;
  }
  .hero__nav svg {
    width: 16px;
    height: 16px;
  }
}

/* =========================================================
   ACESSIBILIDADE — prefers-reduced-motion
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .hero__media {
    transform: none !important;
  }
  .hero__slide.is-active .hero__eyebrow,
  .hero__slide.is-active .hero__title,
  .hero__slide.is-active .hero__description,
  .hero__slide.is-active .hero__actions {
    transform: none;
  }
}

/* Focus visível para navegação por teclado */
:focus:not(:focus-visible) {
  outline: none;
}

/* =========================================================
   CONTAINER (utilitário global)
   ========================================================= */
/* =========================================================
   PORTAL SECTION — Acesso Rápido (CORRIGIDO)
   ========================================================= */
.portal-section {
  position: relative;
  z-index: 30;
  margin-top: -60px;
  padding-bottom: 5rem;
}

.portal-wrapper {
  display: grid;
  grid-template-columns: 1.15fr 0.95fr 0.95fr 0.95fr;
  overflow: hidden;
  border-radius: 20px;
  background: var(--white);
  box-shadow: 
    0 30px 60px -15px rgba(10, 37, 64, 0.18),
    0 10px 25px -10px rgba(10, 37, 64, 0.08);
  border: 1px solid rgba(10, 37, 64, 0.06);
}

/* ---- Card de Introdução ---- */
.portal-intro {
  position: relative;
  padding: 2.5rem 2rem;
  color: var(--white);
  background-image: url(../img/ies.png);
  background-position: center 30%;
  background-repeat: no-repeat;
  background-size: cover;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: 300px; /* FIX: Garante altura suficiente para a imagem aparecer */
}

/* Overlay escuro para legibilidade do texto sobre a imagem */
.portal-intro::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.portal-intro__pattern {
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(circle at 20% 80%, rgba(201, 169, 97, 0.12) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
  pointer-events: none;
  z-index: 1;
}

.portal-intro__content {
  position: relative;
  z-index: 2;
}

.portal-intro__kicker {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  margin-bottom: 1.25rem;
  color: var(--secondary);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  background: rgba(201, 169, 97, 0.12);
  border: 1px solid rgba(201, 169, 97, 0.25);
  border-radius: 100px;
}

.portal-intro__title {
  margin-bottom: 0.85rem;
  font-family: 'Playfair Display', serif;
  font-size: 1.65rem;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.5px;
  color: var(--white);
}

.portal-intro__text {
  max-width: 280px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.85rem;
  line-height: 1.7;
  margin: 0;
}

.portal-intro__decoration {
  position: absolute;
  right: -30px;
  bottom: -30px;
  width: 180px;
  height: 180px;
  color: var(--secondary);
  opacity: 0.6;
  pointer-events: none;
  z-index: 2;
}

/* ---- Cards de Portal ---- */
.portal-card {
  position: relative;
  min-height: 220px;
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid rgba(10, 37, 64, 0.08);
  background: var(--white);
  transition: all 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  overflow: hidden;
}

.portal-card:last-child {
  border-right: none;
}

.portal-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--secondary), var(--secondary-dark));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.portal-card:hover {
  background: linear-gradient(180deg, #fafbfd 0%, #f5f7fa 100%);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -15px rgba(10, 37, 64, 0.15);
}

.portal-card:hover::before {
  transform: scaleX(1);
}

.portal-card__icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: var(--primary);
  background: linear-gradient(135deg, #f0f4f8 0%, #e8eef4 100%);
  transition: all 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 4px 12px rgba(10, 37, 64, 0.06);
}

.portal-card__icon svg {
  width: 22px;
  height: 22px;
}

.portal-card:hover .portal-card__icon {
  color: var(--secondary);
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  transform: translateY(-4px) rotate(-5deg);
  box-shadow: 0 8px 20px rgba(10, 37, 64, 0.2);
}

.portal-card__body {
  margin-top: 1.5rem;
}

.portal-card__title {
  margin: 0 0 0.5rem;
  color: var(--primary);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.2px;
  transition: color 0.3s ease;
}

.portal-card:hover .portal-card__title {
  color: var(--primary-dark);
}

.portal-card__text {
  color: var(--gray);
  font-size: 0.82rem;
  line-height: 1.65;
  margin: 0 0 1.25rem;
}

.portal-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: all 0.3s ease;
}

.portal-card__link svg {
  width: 14px;
  height: 14px;
  transition: transform 0.3s ease;
}

.portal-card__link:hover {
  color: var(--secondary-dark);
}

.portal-card__link:hover svg {
  transform: translate(3px, -3px);
}

.portal-card:hover .portal-card__link {
  color: var(--secondary-dark);
}

/* =========================================================
   RESPONSIVIDADE — PORTAL (CORRIGIDO)
   ========================================================= */
@media (max-width: 1024px) {
  .portal-wrapper {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
  }
  .portal-intro {
    grid-column: 1 / -1;
    padding: 2.5rem;
    min-height: 280px;
  }
  .portal-card {
    border-right: 1px solid rgba(10, 37, 64, 0.08);
    border-bottom: 1px solid rgba(10, 37, 64, 0.08);
  }
  .portal-card:nth-child(3) {
    border-right: none;
  }
  .portal-card:nth-child(n+3) {
    border-bottom: none;
  }
}

@media (max-width: 768px) {
  .portal-section {
    margin-top: -40px;
    padding-bottom: 3rem;
  }
  .portal-wrapper {
    grid-template-columns: 1fr;
    border-radius: 16px;
  }
  .portal-intro {
    padding: 2rem 1.75rem;
    min-height: 260px;
    background-position: center 25%;
  }
  .portal-intro__title {
    font-size: 1.4rem;
  }
  .portal-intro__decoration {
    width: 120px;
    height: 120px;
    right: -20px;
    bottom: -20px;
  }
  .portal-card {
    min-height: auto;
    padding: 1.75rem;
    border-right: none;
    border-bottom: 1px solid rgba(10, 37, 64, 0.08);
  }
  .portal-card:last-child {
    border-bottom: none;
  }
  .portal-card:hover {
    transform: none;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1.25rem;
  }
  .portal-section {
    margin-top: -30px;
  }
  .portal-intro {
    padding: 1.75rem 1.5rem;
    min-height: 240px;
    background-position: center 20%;
  }
  .portal-card {
    padding: 1.5rem;
  }
  .portal-intro__title {
    font-size: 1.25rem;
  }
}

@media (max-width: 360px) {
  .portal-intro {
    min-height: 260px;
    background-position: center 25%;
  }
  .portal-intro__text {
    max-width: 100%;
  }
}

/* =========================================================
   ACESSIBILIDADE — PORTAL
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  .portal-card,
  .portal-card__icon,
  .portal-card__link svg,
  .portal-card::before {
    transition: none !important;
    transform: none !important;
  }
  .portal-card:hover {
    transform: none;
  }
}
/* =========================================================
   WELCOME SECTION — Bem-vindo
   ========================================================= */
.welcome {
  position: relative;
  padding: 7rem 0;
  background: var(--white);
  overflow: hidden;
}

/* Fundo decorativo subtil */
.welcome::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 40%;
  height: 100%;
  background:
    radial-gradient(circle at 80% 20%, rgba(201, 169, 97, 0.06) 0%, transparent 50%),
    radial-gradient(circle at 20% 80%, rgba(26, 77, 122, 0.04) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.welcome__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

/* ---- Conteúdo textual ---- */
.welcome__content {
  max-width: 560px;
}

.welcome__kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  color: var(--secondary-dark);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
}

.welcome__kicker-line {
  display: inline-block;
  width: 32px;
  height: 1px;
  background: var(--secondary);
}

.welcome__title {
  margin-bottom: 1.75rem;
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 3.8vw, 3.25rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -1px;
  color: var(--primary);
}

.welcome__title span {
  color: var(--secondary-dark);
  font-style: italic;
  position: relative;
}

.welcome__title span::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 4px;
  width: 100%;
  height: 6px;
  background: rgba(201, 169, 97, 0.25);
  z-index: -1;
}

.welcome__lead {
  margin-bottom: 1.25rem;
  color: var(--primary);
  font-size: 1.1rem;
  font-weight: 500;
  line-height: 1.6;
}

.welcome__text {
  margin-bottom: 2.5rem;
  color: var(--gray);
  font-size: 0.98rem;
  line-height: 1.8;
}

.welcome__actions {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

/* Assinatura da reitoria */
.welcome__signature {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding-left: 1.25rem;
  border-left: 2px solid var(--secondary);
  transition: var(--transition);
}

.welcome__signature:hover {
  border-left-color: var(--secondary-dark);
  transform: translateX(4px);
}

.welcome__signature-name {
  display: block;
  color: var(--primary);
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 600;
  font-style: italic;
}

.welcome__signature-role {
  display: block;
  color: var(--gray);
  font-size: 0.72rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-top: 2px;
}

/* ---- Visual / Imagem ---- */
.welcome__visual {
  position: relative;
}

.welcome__image {
  position: relative;
  margin: 0;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.welcome__image::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 50%,
    rgba(10, 37, 64, 0.35) 100%
  );
  z-index: 1;
  pointer-events: none;
}

.welcome__image img {
  width: 100%;
  height: 520px;
  object-fit: cover;
  display: block;
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.welcome__image:hover img {
  transform: scale(1.04);
}

/* Badge institucional circular */
.welcome__badge {
  position: absolute;
  top: 2rem;
  left: -2.5rem;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: var(--white);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: 0 15px 40px rgba(10, 37, 64, 0.2);
  z-index: 3;
  border: 4px solid var(--white);
}

.welcome__badge::before {
  content: '';
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  border: 1px dashed var(--secondary);
  opacity: 0.5;
}

.welcome__badge-number {
  font-family: 'Playfair Display', serif;
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.welcome__badge-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--secondary-dark);
  line-height: 1.3;
}

/* Decoração geométrica */
.welcome__decoration {
  position: absolute;
  bottom: -2rem;
  right: -2rem;
  width: 180px;
  height: 180px;
  border: 2px solid var(--secondary);
  border-radius: 18px;
  opacity: 0.35;
  z-index: -1;
}

/* ---- Estatísticas ---- */
.welcome__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
  padding: 1.75rem;
  background: var(--light);
  border-radius: 14px;
  border: 1px solid rgba(10, 37, 64, 0.06);
}

.welcome__stat {
  position: relative;
  text-align: center;
}

.welcome__stat:not(:last-child)::after {
  content: '';
  position: absolute;
  right: -0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 60%;
  background: rgba(10, 37, 64, 0.12);
}

.welcome__stat-number {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 0.4rem;
  letter-spacing: -0.5px;
}

.welcome__stat-number span {
  color: var(--secondary-dark);
  font-size: 1.25rem;
  margin-left: 2px;
}

.welcome__stat-label {
  display: block;
  color: var(--gray);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

/* =========================================================
   RESPONSIVIDADE — WELCOME
   ========================================================= */
@media (max-width: 1024px) {
  .welcome { padding: 5rem 0; }
  .welcome__grid {
    gap: 3rem;
  }
  .welcome__image img { height: 460px; }
  .welcome__badge {
    width: 110px;
    height: 110px;
    left: -1.5rem;
    top: 1.5rem;
  }
  .welcome__badge-number { font-size: 1.85rem; }
}

@media (max-width: 900px) {
  .welcome__grid {
    grid-template-columns: 1fr;
    gap: 3.5rem;
  }
  .welcome__content {
    max-width: 100%;
    text-align: center;
  }
  .welcome__kicker {
    justify-content: center;
  }
  .welcome__actions {
    justify-content: center;
  }
  .welcome__signature {
    border-left: none;
    border-top: 2px solid var(--secondary);
    padding-left: 0;
    padding-top: 0.85rem;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }
  .welcome__decoration { display: none; }
}

@media (max-width: 768px) {
  .welcome { padding: 4rem 0; }
  .welcome__image img { height: 380px; }
  .welcome__badge {
    width: 95px;
    height: 95px;
    left: 1rem;
    top: 1rem;
  }
  .welcome__badge-number { font-size: 1.5rem; }
  .welcome__badge-label { font-size: 0.58rem; }
  .welcome__stats {
    padding: 1.25rem;
    gap: 1rem;
  }
  .welcome__stat-number { font-size: 1.6rem; }
  .welcome__stat-label { font-size: 0.65rem; }
}

@media (max-width: 480px) {
  .welcome__title { font-size: 1.85rem; }
  .welcome__lead { font-size: 1rem; }
  .welcome__actions {
    flex-direction: column;
    align-items: stretch;
  }
  .welcome__actions .btn {
    width: 100%;
    justify-content: center;
  }
  .welcome__signature {
    align-items: center;
    text-align: center;
  }
  .welcome__image img { height: 320px; }
}

/* =========================================================
   ACESSIBILIDADE — WELCOME
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  .welcome__image img,
  .welcome__signature,
  .welcome__badge {
    transition: none !important;
    transform: none !important;
  }
  .welcome__image:hover img { transform: none; }
}


/*  NUMBERS / VALUES */
/* =========================================================
   SECÇÃO DE VALORES
   ========================================================= */
.values {
  padding: 10px 60px;
  justify-content: space-around;
  background: linear-gradient(100deg, rgba(6, 26, 42, 0.98), rgba(8, 48, 70, 0.94));
  background-size: cover;
  background-position: center;
  color: var(--white, #ffffff);
}

/* --- AQUI ESTÁ A SOLUÇÃO PARA O LAYOUT HORIZONTAL --- */
.values-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* Divide em 4 colunas iguais */
  width: 100%;
}

.value {
  display: flex;
  flex-direction: column; /* Garante que ícone, título e texto ficam empilhados */
  min-height: 120px; /* 90px era muito pouco para o conteúdo caber bem */
  padding: 30px 25px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  transition: background-color 0.3s ease;
}

.value:last-child {
  border-right: none; /* Remove a borda do último item à direita */
}

.value:hover {
  background-color: rgba(255, 255, 255, 0.03); /* Efeito subtil ao passar o rato */
}

.value-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  border-radius: 12px;
  color: var(--secondary, #c9a961); /* Usa o dourado da tua paleta */
  background: rgba(255, 255, 255, 0.07);
}

.value-icon svg {
  width: 24px;
  height: 24px;
}

.value h3 {
  margin: 0 0 10px 0;
  color: #fff;
  font-family: "Playfair Display", serif;
  font-size: 1.25rem; /* ~20px, mais elegante que 21px fixos */
  font-weight: 600;
  letter-spacing: -0.3px;
}

.value p {
  color: rgba(255, 255, 255, 0.65); /* Melhor contraste que 0.42 */
  font-size: 14px; /* CORREÇÃO CRÍTICA: 9px é ilegível. 14px é o padrão profissional */
  line-height: 1.6;
  margin: 0;
}

/* =========================================================
   RESPONSIVIDADE (Para não quebrar em tablets e telemóveis)
   ========================================================= */
@media (max-width: 992px) {
  .values-grid {
    grid-template-columns: repeat(2, 1fr); /* 2 colunas em tablets */
  }
  
  /* Ajuste das bordas para o layout 2x2 */
  .value {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
  .value:nth-child(2n) {
    border-right: none;
  }
  .value:nth-last-child(-n+2) {
    border-bottom: none; /* Remove borda inferior dos 2 últimos */
  }
}

@media (max-width: 576px) {
  .values {
    padding: 60px 0;
  }
  .values-grid {
    grid-template-columns: 1fr; /* 1 coluna em telemóveis */
  }
  .value {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    min-height: auto;
  }
  .value:last-child {
    border-bottom: none;
  }
}

/* =========================================================
   SECÇÃO NOTÍCIAS & EVENTOS
   ========================================================= */
.news-events {
  padding: 6rem 0;
  background: var(--light, #f8f9fa);
}

/* ---- Cabeçalho ---- */
.news-events__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  margin-bottom: 4rem;
  flex-wrap: wrap;
}

.news-events__title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  font-weight: 600;
  color: var(--primary, #0a2540);
  margin: 0.75rem 0 0.75rem;
  letter-spacing: -0.5px;
}

.news-events__subtitle {
  font-size: 1rem;
  color: var(--gray, #6c757d);
  margin: 0;
  max-width: 500px;
  line-height: 1.6;
}

.news-events__view-all {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--primary, #0a2540);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border: 1px solid rgba(10, 37, 64, 0.15);
  border-radius: 100px;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.news-events__view-all svg {
  width: 16px;
  height: 16px;
  transition: transform 0.3s ease;
}

.news-events__view-all:hover {
  background: var(--primary, #0a2540);
  color: var(--white);
  border-color: var(--primary, #0a2540);
}

.news-events__view-all:hover svg {
  transform: translateX(4px);
  color: var(--secondary, #c9a961);
}

/* ---- Layout principal ---- */
.news-events__layout {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 3.5rem;
  margin-bottom: 4rem;
}

/* =========================================================
   COLUNA DE NOTÍCIAS
   ========================================================= */
.news-column {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* ---- Notícia em destaque ---- */
.news-card--featured {
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(10, 37, 64, 0.06);
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  border: 1px solid rgba(10, 37, 64, 0.04);
}

.news-card--featured:hover {
  transform: translateY(-6px);
  box-shadow: 0 25px 60px rgba(10, 37, 64, 0.12);
}

.news-card--featured .news-card__media {
  position: relative;
  margin: 0;
  height: 340px;
  overflow: hidden;
}

.news-card--featured .news-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.news-card--featured:hover .news-card__media img {
  transform: scale(1.05);
}

.news-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(10, 37, 64, 0.4) 100%);
  pointer-events: none;
}

.news-card__category {
  position: absolute;
  top: 1.25rem;
  left: 1.25rem;
  padding: 0.4rem 0.9rem;
  background: var(--secondary, #c9a961);
  color: var(--primary, #0a2540);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  border-radius: 100px;
  z-index: 2;
}

.news-card__category--research {
  background: var(--accent, #1a4d7a);
  color: var(--white);
}

.news-card__category--academic {
  background: var(--primary, #0a2540);
  color: var(--white);
}

.news-card__category--partnership {
  background: #2d5f3f;
  color: var(--white);
}

.news-card--featured .news-card__content {
  padding: 2rem 2.25rem 2.25rem;
}

.news-card__meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.82rem;
  color: var(--gray, #6c757d);
}

.news-card__meta time {
  font-weight: 600;
  color: var(--secondary-dark, #a88a42);
  letter-spacing: 0.3px;
}

.news-card__author::before {
  content: '·';
  margin-right: 1rem;
  color: var(--gray, #6c757d);
}

.news-card__title {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary, #0a2540);
  margin: 0 0 1rem;
  line-height: 1.3;
  letter-spacing: -0.3px;
}

.news-card--featured .news-card__title {
  font-size: 1.75rem;
}

.news-card__description {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--gray, #6c757d);
  margin: 0 0 1.5rem;
}

.news-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary, #0a2540);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  padding-top: 1rem;
  border-top: 1px solid rgba(10, 37, 64, 0.08);
}

.news-card__link svg {
  width: 16px;
  height: 16px;
  transition: transform 0.3s ease;
}

.news-card__link:hover {
  color: var(--secondary-dark, #a88a42);
}

.news-card__link:hover svg {
  transform: translateX(4px);
}

/* ---- Notícias secundárias (horizontais) ---- */
.news-secondary {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.news-card--horizontal {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 1.5rem;
  background: var(--white);
  border-radius: 14px;
  overflow: hidden;
  padding: 1rem;
  transition: all 0.3s ease;
  border: 1px solid rgba(10, 37, 64, 0.04);
}

.news-card--horizontal:hover {
  transform: translateX(6px);
  box-shadow: 0 10px 30px rgba(10, 37, 64, 0.08);
  border-color: rgba(201, 169, 97, 0.2);
}

.news-card--horizontal .news-card__media {
  position: relative;
  margin: 0;
  border-radius: 10px;
  overflow: hidden;
  height: 140px;
}

.news-card--horizontal .news-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-card--horizontal .news-card__category {
  top: 0.75rem;
  left: 0.75rem;
  font-size: 0.6rem;
  padding: 0.3rem 0.65rem;
}

.news-card--horizontal .news-card__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0.25rem 0.5rem 0.25rem 0;
}

.news-card--horizontal .news-card__meta {
  margin-bottom: 0.5rem;
}

.news-card--horizontal .news-card__title {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
  line-height: 1.35;
}

.news-card--horizontal .news-card__description {
  font-size: 0.85rem;
  margin: 0;
  line-height: 1.55;
  color: var(--gray, #6c757d);
}

/* =========================================================
   COLUNA DE EVENTOS
   ========================================================= */
.events-column {
  background: var(--white);
  border-radius: 16px;
  padding: 2.25rem;
  box-shadow: 0 10px 40px rgba(10, 37, 64, 0.06);
  border: 1px solid rgba(10, 37, 64, 0.04);
  align-self: start;
  position: sticky;
  top: 100px;
}

.events-column__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(10, 37, 64, 0.08);
}

.events-column__title {
  font-family: 'Playfair Display', serif;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--primary, #0a2540);
  margin: 0;
  letter-spacing: -0.3px;
}

.events-column__link {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--secondary-dark, #a88a42);
  text-decoration: none;
  letter-spacing: 0.5px;
  transition: color 0.3s ease;
}

.events-column__link:hover {
  color: var(--primary, #0a2540);
}

.events-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.event-item {
  display: flex;
  gap: 1.25rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px dashed rgba(10, 37, 64, 0.1);
  transition: transform 0.3s ease;
}

.event-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.event-item:hover {
  transform: translateX(4px);
}

.event-item:hover .event-item__date {
  background: var(--secondary, #c9a961);
  color: var(--primary, #0a2540);
  border-color: var(--secondary, #c9a961);
}

.event-item__date {
  flex-shrink: 0;
  width: 60px;
  height: 64px;
  background: var(--primary, #0a2540);
  color: var(--white);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.event-item__day {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 2px;
}

.event-item__month {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  opacity: 0.85;
}

.event-item__content {
  flex: 1;
  min-width: 0;
}

.event-item__type {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--secondary-dark, #a88a42);
  margin-bottom: 0.35rem;
}

.event-item__title {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary, #0a2540);
  margin: 0 0 0.6rem;
  line-height: 1.35;
  letter-spacing: -0.2px;
}

.event-item__meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  font-size: 0.75rem;
  color: var(--gray, #6c757d);
}

.event-item__meta svg {
  width: 13px;
  height: 13px;
  color: var(--secondary, #c9a961);
  flex-shrink: 0;
}

.event-item__meta span:not(:last-child)::after {
  content: '·';
  margin-left: 0.4rem;
  color: var(--gray, #6c757d);
}

/* =========================================================
   NEWSLETTER
   ========================================================= */
.news-events__newsletter {
  background: linear-gradient(135deg, var(--primary, #0a2540) 0%, var(--accent, #1a4d7a) 100%);
  border-radius: 20px;
  padding: 3rem;
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.news-events__newsletter::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(circle at 80% 20%, rgba(201, 169, 97, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

.news-events__newsletter-content {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 3rem;
  flex-wrap: wrap;
}

.news-events__newsletter h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  letter-spacing: -0.3px;
}

.news-events__newsletter p {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.75);
  margin: 0;
}

.news-events__newsletter-form {
  display: flex;
  gap: 0;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 100px;
  overflow: hidden;
  min-width: 380px;
  transition: all 0.3s ease;
}

.news-events__newsletter-form:focus-within {
  border-color: var(--secondary, #c9a961);
  background: rgba(255, 255, 255, 0.15);
}

.news-events__newsletter-form input {
  flex: 1;
  padding: 0.85rem 1.5rem;
  background: transparent;
  border: none;
  color: var(--white);
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  min-width: 0;
}

.news-events__newsletter-form input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.news-events__newsletter-form .btn {
  border-radius: 100px;
  padding: 0.85rem 1.75rem;
  white-space: nowrap;
}

/* =========================================================
   RESPONSIVIDADE
   ========================================================= */
@media (max-width: 1100px) {
  .news-events__layout {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .events-column {
    position: static;
  }
}

@media (max-width: 768px) {
  .news-events {
    padding: 4rem 0;
  }
  
  .news-events__header {
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 3rem;
  }
  
  .news-card--featured .news-card__media {
    height: 240px;
  }
  
  .news-card--featured .news-card__content {
    padding: 1.5rem;
  }
  
  .news-card--featured .news-card__title {
    font-size: 1.35rem;
  }
  
  .news-card--horizontal {
    grid-template-columns: 130px 1fr;
    gap: 1rem;
    padding: 0.75rem;
  }
  
  .news-card--horizontal .news-card__media {
    height: 110px;
  }
  
  .news-card--horizontal .news-card__title {
    font-size: 0.95rem;
  }
  
  .events-column {
    padding: 1.75rem;
  }
  
  .news-events__newsletter {
    padding: 2rem 1.5rem;
  }
  
  .news-events__newsletter-content {
    flex-direction: column;
    align-items: stretch;
    gap: 1.5rem;
  }
  
  .news-events__newsletter-form {
    min-width: 0;
    width: 100%;
    flex-direction: column;
    border-radius: 14px;
  }
  
  .news-events__newsletter-form .btn {
    border-radius: 0 0 14px 14px;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .news-card--horizontal {
    grid-template-columns: 1fr;
  }
  
  .news-card--horizontal .news-card__media {
    height: 180px;
  }
  
  .event-item {
    gap: 1rem;
  }
  
  .event-item__date {
    width: 54px;
    height: 58px;
  }
  
  .event-item__day {
    font-size: 1.3rem;
  }
}

/* =========================================================
   ACESSIBILIDADE
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  .news-card--featured,
  .news-card--horizontal,
  .event-item,
  .news-events__view-all,
  .news-card__link {
    transition: none !important;
    transform: none !important;
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* =========================================================
   PAGE LOADER (Ecrã de Carregamento)
   ========================================================= */

.page-loader {
    position: fixed;
    inset: 0;
    /* Fundo semitransparente */
    background: rgba(3, 35, 64, 0.92);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

/* Logo/imagem de carregamento */
.page-loader::before {
    content: "";
    width: 100px;
    height: 100px;
    background-image: url("../img/ucc1.png");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    margin-bottom: 20px;
    border-radius: 50%;
}

/* Estado quando a página termina de carregar */
.page-loader.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Círculo de processamento */
.loader-spinner {
    width: 38px;
    height: 38px;
    border: 3px solid rgba(255, 255, 255, 0.15);
    border-top-color: var(--secondary, #c9a961);
    border-radius: 50%;
    animation: loader-spin 0.8s linear infinite;
}

@keyframes loader-spin {
    to {
        transform: rotate(360deg);
    }
}