/* ===== Variables ===== */
:root {
  --black: #0a0a0a;
  --red: #c41e3a;
  --red-dark: #9e1830;
  --yellow: #f5c518;
  --white: #ffffff;
  --gray-50: #f8f9fa;
  --gray-100: #f1f3f5;
  --gray-200: #e9ecef;
  --gray-400: #adb5bd;
  --gray-600: #6c757d;
  --gray-800: #343a40;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.12);
  --font-display: "Oswald", sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --header-h: 72px;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--black);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; border: none; font-family: inherit; }

/* ===== Typography ===== */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.15;
}
.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  color: var(--black);
  margin-bottom: 0.5rem;
}
.section-subtitle {
  color: var(--gray-600);
  font-size: 1.05rem;
  max-width: 560px;
}

/* ===== Layout ===== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.section { padding: 5rem 0; scroll-margin-top: var(--header-h); }
.section--gray { background: var(--gray-50); }
.section--dark { background: var(--black); color: var(--white); }

/* ===== Stars ===== */
.stars-row {
  display: flex;
  gap: 6px;
  justify-content: center;
}
.star {
  width: 14px;
  height: 14px;
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}
.star--white { background: var(--white); }
.star--yellow { background: var(--yellow); }
.star--red { background: var(--red); }
.star--lg { width: 20px; height: 20px; }

.star-pattern {
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 5 L33 20 L48 20 L36 30 L40 45 L30 36 L20 45 L24 30 L12 20 L27 20 Z' fill='%23f5c518' fill-opacity='0.07'/%3E%3C/svg%3E");
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.btn--primary {
  background: var(--red);
  color: var(--white);
}
.btn--primary:hover { background: var(--red-dark); transform: translateY(-1px); }
.btn--outline {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--white);
}
.btn--outline:hover { background: var(--white); color: var(--black); }
.btn--outline-dark {
  background: transparent;
  color: var(--black);
  border: 2px solid var(--gray-200);
}
.btn--outline-dark:hover { border-color: var(--black); }
.btn--sm { padding: 0.5rem 1rem; font-size: 0.8rem; }

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--header-h);
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  transition: box-shadow 0.3s;
}
.header.scrolled { box-shadow: var(--shadow); }
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.logo__img {
  height: 56px;
  width: auto;
  display: block;
}
.logo__shield { width: 44px; height: 52px; flex-shrink: 0; }
.logo__text { line-height: 1.1; }
.logo__name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
}
.logo__sub { font-size: 0.7rem; color: var(--gray-600); }

.nav { display: flex; align-items: center; gap: 2rem; }
.nav__link {
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-800);
  transition: color 0.2s;
  position: relative;
}
.nav__link:hover, .nav__link.active { color: var(--red); }
.nav__link.active::after {
  content: "";
  position: absolute;
  bottom: -4px; left: 0; right: 0;
  height: 2px;
  background: var(--red);
}
.header__actions { display: flex; gap: 0.75rem; align-items: center; }

.menu-toggle {
  display: none;
  background: none;
  width: 40px; height: 40px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.menu-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--black);
  transition: 0.3s;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  margin-top: var(--header-h);
  overflow: hidden;
  scroll-margin-top: var(--header-h);
}
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero__bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero__bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(10,10,10,0.82) 0%, rgba(196,30,58,0.5) 100%);
}
.hero__content {
  position: relative;
  z-index: 2;
  max-width: 700px;
  padding: 4rem 0;
}
.hero__stars { margin-bottom: 1.5rem; }
.hero__title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  color: var(--white);
  margin-bottom: 1rem;
}
.hero__subtitle {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.85);
  margin-bottom: 2rem;
  max-width: 500px;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; }
.hero__shield-deco {
  position: absolute;
  right: 5%;
  top: 50%;
  transform: translateY(-50%);
  width: 280px;
  opacity: 0.08;
  z-index: 1;
  pointer-events: none;
}

/* ===== Category Grid ===== */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 220px);
  gap: 1rem;
  margin-top: 2.5rem;
}
.category-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
}
.category-card:nth-child(1) { grid-row: 1 / 3; }
.category-card:nth-child(4) { grid-row: 1 / 3; }
.category-card__img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.category-card:hover .category-card__img { transform: scale(1.05); }
.category-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, transparent 60%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.25rem;
}
.category-card__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.category-card__title {
  font-size: 1.25rem;
  color: var(--white);
}
.category-card__arrow {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  backdrop-filter: blur(4px);
}
.category-card__tags { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.tag {
  background: rgba(255,255,255,0.2);
  color: var(--white);
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  font-size: 0.75rem;
  backdrop-filter: blur(4px);
}

/* ===== Program Cards ===== */
.programs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
}
.program-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: transform 0.2s;
}
.program-card:hover { transform: translateY(-4px); }
.program-card__tag {
  display: inline-block;
  background: var(--gray-100);
  color: var(--red);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  padding: 0.3rem 0.75rem;
  border-radius: 100px;
  margin-bottom: 1rem;
}
.program-card__title {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}
.program-card__text { color: var(--gray-600); font-size: 0.95rem; margin-bottom: 1.5rem; }
.program-card__img {
  border-radius: var(--radius);
  height: 180px;
  object-fit: cover;
  width: 100%;
}

/* ===== Facilities ===== */
.facilities {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.facilities__list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.facility-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.facility-item__icon {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
}
.facility-item__icon::after {
  content: "★";
  color: var(--yellow);
  font-size: 1.1rem;
}
.facility-item__title {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}
.facility-item__text { font-size: 0.85rem; color: var(--gray-600); }

/* ===== Timeline ===== */
.timeline {
  display: flex;
  align-items: flex-start;
  position: relative;
  margin-top: 3rem;
  padding-top: 0.5rem;
  overflow-x: auto;
  scrollbar-width: thin;
  gap: 0;
}
.timeline::before {
  content: "";
  position: absolute;
  top: 18px;
  left: calc(100% / 14);
  right: calc(100% / 14);
  height: 2px;
  background: var(--gray-200);
  z-index: 0;
}
.timeline__item {
  flex: 1;
  min-width: 130px;
  text-align: center;
  position: relative;
  z-index: 1;
  padding: 0 0.5rem;
}
.timeline__marker {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin: 0 auto 1rem;
  background: var(--gray-50);
  border-radius: 50%;
}
.section--gray .timeline__marker {
  background: var(--gray-50);
}
.timeline__marker .star {
  width: 16px;
  height: 16px;
}
.timeline__year {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--red);
  margin-bottom: 0.35rem;
}
.timeline__event {
  font-size: 0.82rem;
  color: var(--gray-600);
  line-height: 1.4;
  padding: 0 0.25rem;
}

/* ===== CTA ===== */
.cta-section {
  text-align: center;
  padding: 5rem 0;
  background: var(--black);
  color: var(--white);
  position: relative;
  overflow: hidden;
  scroll-margin-top: var(--header-h);
}
.cta-section .stars-row { margin-bottom: 1.5rem; }
.cta-section__title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: 1rem;
}
.cta-section__text {
  color: rgba(255,255,255,0.7);
  margin-bottom: 2rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}
.cta-section__actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ===== Footer ===== */
.footer {
  background: var(--black);
  color: rgba(255,255,255,0.7);
  padding: 3rem 0 1.5rem;
  border-top: 3px solid var(--red);
}
.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer__brand p { font-size: 0.9rem; margin-top: 1rem; max-width: 280px; }
.footer__heading {
  font-family: var(--font-display);
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 1rem;
  letter-spacing: 0.1em;
}
.footer__link {
  display: block;
  font-size: 0.85rem;
  padding: 0.3rem 0;
  transition: color 0.2s;
}
.footer__link:hover { color: var(--yellow); }
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ===== Transparency Page ===== */
.page-hero {
  margin-top: var(--header-h);
  padding: 4rem 0 3rem;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
}
.page-hero__title {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 0.75rem;
}
.page-hero__text { color: var(--gray-600); max-width: 600px; }

.documents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
}

/* Document Card */
.doc-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
}
.doc-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.doc-card__accent {
  height: 4px;
  background: linear-gradient(90deg, var(--red), var(--yellow));
}
.doc-card__body {
  padding: 1.5rem;
}
.doc-card__type {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--red);
  background: rgba(196, 30, 58, 0.08);
  padding: 0.25rem 0.65rem;
  border-radius: 100px;
  margin-bottom: 0.75rem;
}
.doc-card__title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  text-transform: uppercase;
  color: var(--black);
  margin-bottom: 0.5rem;
  letter-spacing: 0.02em;
}
.doc-card__desc {
  font-size: 0.9rem;
  color: var(--gray-600);
  margin-bottom: 1.25rem;
  line-height: 1.5;
}
.doc-card__meta {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--gray-50);
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
  border-left: 3px solid var(--yellow);
}
.doc-card__meta-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-600);
  margin-bottom: 0.15rem;
}
.doc-card__meta-value {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--black);
}
.doc-card__actions {
  display: flex;
  gap: 0.75rem;
}
.doc-card__actions .btn { flex: 1; justify-content: center; }

.transparency-empty {
  text-align: center;
  padding: 3rem 1.5rem;
  background: var(--gray-50);
  border-radius: var(--radius-lg);
  border: 1px dashed var(--gray-200);
  color: var(--gray-600);
  font-size: 1rem;
}

.doc-card__desc p:last-child { margin-bottom: 0; }

/* ===== About ===== */
.about-text {
  color: var(--gray-600);
  margin-bottom: 1rem;
  line-height: 1.7;
}
.about-image {
  border-radius: var(--radius-lg);
  width: 100%;
  height: 400px;
  object-fit: cover;
}
.about-details {
  color: var(--gray-600);
  line-height: 2;
}
.about-details li { list-style: none; }

/* ===== Contact Instagram ===== */
.contact-instagram {
  margin-bottom: 2rem;
}
.contact-instagram__link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--white);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  transition: color 0.2s;
}
.contact-instagram__link:hover { color: var(--yellow); }
.contact-instagram__address {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}
.about-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}
.stat-card {
  background: var(--gray-50);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
}
.stat-card__number {
  font-family: var(--font-display);
  font-size: 2.5rem;
  color: var(--red);
}
.stat-card__label {
  font-size: 0.85rem;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.titles-list { margin-top: 2rem; margin-bottom: 2.5rem; }
.titles-list__group { margin-bottom: 1.5rem; }
.titles-list__heading {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.titles-list__years {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.year-badge {
  background: var(--black);
  color: var(--yellow);
  padding: 0.35rem 0.85rem;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
}

/* ===== Photo Gallery ===== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 220px;
  gap: 1rem;
}
.gallery-item {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: block;
  box-shadow: var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s;
}
.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.gallery-item--featured {
  grid-column: span 2;
  grid-row: span 2;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10,10,10,0.8) 0%, transparent 50%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.3s;
}
.gallery-item:hover .gallery-item__overlay { opacity: 1; }
.gallery-item__icon {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
}
.gallery-item__caption {
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.3;
}

/* ===== Lightbox ===== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(10, 10, 10, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}
.lightbox.open {
  opacity: 1;
  visibility: visible;
}
.lightbox__close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  color: var(--white);
  font-size: 2.5rem;
  line-height: 1;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}
.lightbox__close:hover { color: var(--yellow); }
.lightbox__content {
  text-align: center;
  max-width: 800px;
  width: 100%;
}
.lightbox__content img {
  max-height: 70vh;
  width: auto;
  max-width: 100%;
  margin: 0 auto 1rem;
  border-radius: var(--radius);
  object-fit: contain;
}
.lightbox__caption {
  color: rgba(255,255,255,0.8);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

/* ===== Section CTA row ===== */
.section-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}

/* ===== Reveal animation ===== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .programs-grid { grid-template-columns: 1fr 1fr; }
  .facilities { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .documents-grid { grid-template-columns: 1fr; }
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 200px;
  }
  .gallery-item--featured {
    grid-column: span 2;
    grid-row: span 1;
  }
}

@media (max-width: 768px) {
  .nav {
    position: fixed;
    top: var(--header-h); left: 0; right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 1.5rem;
    gap: 1rem;
    border-bottom: 1px solid var(--gray-200);
    transform: translateY(-120%);
    opacity: 0;
    transition: all 0.3s;
    pointer-events: none;
  }
  .nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }
  .menu-toggle { display: flex; }
  .header__actions .btn--outline-dark { display: none; }
  .programs-grid { grid-template-columns: 1fr; }
  .facilities__list { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  .doc-card__actions { flex-direction: column; }
  .hero__shield-deco { display: none; }
  .timeline::before { left: 40px; right: 40px; }
  .gallery-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 240px;
  }
  .gallery-item--featured {
    grid-column: span 1;
    grid-row: span 1;
  }
}

/* Acessibilidade — link de pular navegação */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

.skip-link:focus {
  background: var(--red);
  clip: auto;
  clip-path: none;
  color: #fff;
  display: block;
  font-weight: 600;
  height: auto;
  left: 1rem;
  padding: 0.75rem 1rem;
  position: absolute;
  top: 1rem;
  width: auto;
  z-index: 100000;
}
