/* =========================================================
   VARIÁVEIS GLOBAIS
   ========================================================= */

:root {
  --nav-height: 52px;
  --bar-height: 40px;

  --color-primary: #9fd3c7;
  --color-primary-light: #cfeee8;

  --color-text-dark: #111;
  --color-bg-glass: rgba(255, 255, 255, 0.92);
  --color-bg-content: rgba(8, 20, 40, 0.85);

  --max-width: 1200px;
}


/* =========================================================
   BASE
   ========================================================= */

html,
body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #fff;
}

body {
  font-size: 18px;
}


/* =========================================================
   FAIXA INSTITUCIONAL
   ========================================================= */

.institutional-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--bar-height);
  background: rgba(255, 255, 255, 0.9);
  color: var(--color-text-dark);
  z-index: 40;
  font-size: 0.85rem;
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.institutional-inner {
  max-width: var(--max-width);
  height: 100%;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.institutional-bar a {
  color: #0055a5;
  text-decoration: none;
}

.institutional-bar a:hover {
  text-decoration: underline;
}


/* =========================================================
   MENU PRINCIPAL
   ========================================================= */

.main-nav {
  position: fixed;
  top: var(--bar-height);
  left: 0;
  width: 100%;
  height: var(--nav-height);
  z-index: 30;
  background: var(--color-bg-glass);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text-dark);
}

.nav-menu {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}

.nav-menu li a {
  text-decoration: none;
  color: var(--color-text-dark);
  font-size: 0.95rem;
}

.nav-menu li a:hover {
  text-decoration: underline;
}

.hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  color: var(--color-text-dark);
  padding: 0;
}


/* =========================================================
   VÍDEO DE FUNDO
   ========================================================= */

.bg-video {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}


/* =========================================================
   OVERLAY
   ========================================================= */

body.home::before {
  content: "";
  position: fixed;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.35),
    rgba(0, 0, 0, 0.25)
  );
  z-index: 1;
  pointer-events: none;
}


/* =========================================================
   CONTEÚDO
   ========================================================= */

.content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: calc(var(--bar-height) + var(--nav-height) + 2rem) auto 3rem auto;
  padding: 2rem;
}

body.home .content {
  background: none;
  box-shadow: none;
  border-radius: 0;
}

body.internal {
  background: url('/assets/img/background-clear.png');
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

body.internal .content {
  background: var(--color-bg-content);
  backdrop-filter: blur(6px);
  border-radius: 8px;
}


/* =========================================================
   HERO
   ========================================================= */

.hero-grid {
  position: fixed;
  top: calc(50% + (var(--bar-height) + var(--nav-height)) / 2);
  left: 10%;
  transform: translateY(-50%);
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  max-width: 900px;
  color: white;
  animation: heroFadeDesktop 1.2s ease-out forwards;
  opacity: 0;
  z-index: 2;
}

.hero-logo img {
  width: 220px;
  max-width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
}

.hero-text {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.65);
}

.hero-text h1 {
  font-size: clamp(2rem, 3.8vw, 2.6rem);
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.1;
  opacity: 0.85;
  margin: 0;
}

.hero-text h1::after {
  content: "";
  display: block;
  width: 48px;
  height: 2px;
  background: var(--color-primary);
  margin-top: 0.5rem;
}

.hero-text .ao {
  font-weight: 400;
  opacity: 0.7;
}

.hero-text h2 {
  font-size: clamp(1.8rem, 2.8vw, 2.4rem);
  font-weight: 500;
  line-height: 1.25;
  max-width: 640px;
  letter-spacing: 0.01em;
  margin: 0;
}

.hero-text p {
  margin: 0;
}

.hero-main {
  font-size: 1.1rem;
  opacity: 0.95;
  max-width: 520px;
  line-height: 1.35;
}

.hero-main strong {
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--color-primary);
}

.hero-dept {
  font-size: 0.95rem;
  opacity: 0.75;
  line-height: 1.35;
}


/* =========================================================
   ANIMAÇÃO
   ========================================================= */

@keyframes heroFadeDesktop {
  from {
    opacity: 0;
    transform: translateY(calc(-50% + 20px));
  }
  to {
    opacity: 1;
    transform: translateY(-50%);
  }
}


/* =========================================================
   LINKS
   ========================================================= */

.content a {
  color: var(--color-primary);
  text-decoration: underline;
}

.content a:hover {
  color: var(--color-primary-light);
}


/* =========================================================
   COMITÊ
   ========================================================= */

.committee-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.committee-card {
  text-decoration: none;
  color: white;
  text-align: center;
  transition: transform 0.2s ease;
}

.committee-card:hover {
  transform: translateY(-4px);
}

.committee-card img {
  width: 100%;
  max-width: 140px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.8);
  margin-bottom: 0.6rem;
}

.committee-card p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.2;
}


/* =========================================================
   AGENDA
   ========================================================= */

.agenda-container {
  margin-top: 2rem;
  border-radius: 8px;
  overflow: hidden;
}

.agenda-container iframe {
  background: white;
}

.inst-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.uff-logo {
  height: 22px;
  width: auto;
  object-fit: contain;
}

/* =========================================================
   RESPONSIVO
   ========================================================= */

@media (max-width: 768px) {
  body {
    font-size: 16px;
  }

  .institutional-bar {
    font-size: 0.75rem;
  }

  .institutional-inner {
    padding: 0 0.8rem;
  }

  .nav-inner {
    padding: 0 1rem;
  }

  .hamburger {
    display: block;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 1rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.9rem;
    min-width: 220px;
    padding: 1rem 1.1rem;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  }

  .nav-menu.active {
    display: flex;
  }

  .nav-menu li {
    width: 100%;
  }

  .nav-menu li a {
    display: block;
    width: 100%;
    font-size: 1.05rem;
    color: var(--color-text-dark);
  }

  .uff-logo {
    height: 18px;
  }

  .content {
    padding: 1.5rem 1.2rem;
  }

  .content h1,
  .content h2,
  .content h3 {
    line-height: 1.3;
  }

  .content p {
    font-size: 1rem;
    line-height: 1.5;
  }

  .content a {
    word-break: break-word;
  }

  .hero-grid {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-top: calc(var(--bar-height) + var(--nav-height) + 1.8rem);
    padding: 0 1.4rem;
    gap: 1.3rem;
    max-width: 100%;
    animation: none;
    opacity: 1;
  }

  .hero-logo img {
    width: 160px;
    border-width: 2px;
  }

  .hero-text {
    gap: 0.45rem;
  }

  .hero-text h1 {
    font-size: 1.7rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    opacity: 0.85;
  }

  .hero-text h1::after {
    width: 40px;
    margin-top: 0.4rem;
  }

  .hero-text .ao {
    font-weight: 400;
    opacity: 0.75;
  }

  .hero-text h2 {
    font-size: 1.35rem;
    line-height: 1.4;
    font-weight: 600;
    max-width: 100%;
  }

  .hero-main {
    font-size: 1rem;
    line-height: 1.5;
  }

  .hero-dept {
    font-size: 1rem;
    opacity: 0.8;
    line-height: 1.4;
  }

  .committee-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1.2rem;
  }
}

