/* ==================================================
   BASE
================================================== */

body { background-color: #f8f9fa; }
.logo { max-height: 80px; }

/* ==================================================
   HEADER INSTITUCIONAL (STICKY)
================================================== */

.header-institucional {
  position: sticky;
  top: 0;
  z-index: 1050;

  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(6px);

  padding: 14px 0 16px 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  transition: padding .22s ease, box-shadow .22s ease, background-color .22s ease;
}

/* Barra vermelha sofisticada */
.header-institucional::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 5px;

  background: linear-gradient(
    90deg,
    #d71920 0%,
    #c4161c 40%,
    #d71920 100%
  );

  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 18px;
}

.header-brand .logo {
  max-height: 54px;
  max-width: min(280px, 58vw);
  height: auto;
  width: auto;
  display: block;
  transition: max-height .22s ease, max-width .22s ease;
}

.header-brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.header-content {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  align-items: flex-start;
}

.header-section {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 1.4px;
  color: #d71920;
  line-height: 1;
}

.header-title {
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  font-weight: 700;
  margin: 0;
  color: #222;
  line-height: 1.18;
  max-width: 760px;
}

.header-home-link {
  color: inherit;
  text-decoration: none;
}

.header-home-link:hover {
  color: #b4161c;
}

/* Efeito ao rolar */
.header-institucional.scrolled {
  padding: 9px 0 10px 0;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

.header-institucional.scrolled .header-brand .logo {
  max-height: 44px;
  max-width: min(240px, 52vw);
}

/* Responsivo */
@media (max-width: 768px) {
  .header-inner {
    align-items: flex-start;
    gap: 10px;
  }

  .header-brand .logo {
    max-height: 46px;
    max-width: min(240px, 72vw);
  }

  .header-title {
    font-size: 0.96rem;
  }

  .header-institucional.scrolled .header-brand .logo {
    max-height: 40px;
    max-width: min(210px, 68vw);
  }
}

@media (max-width: 480px) {
  .header-institucional {
    padding: 12px 0 14px 0;
  }

  .header-title {
    font-size: 0.9rem;
    line-height: 1.2;
  }

  .header-section {
    font-size: 0.68rem;
    letter-spacing: 1.2px;
  }
}


/* ==================================================
   SECTION TITLE (Escolha Evento)
================================================== */

.section-title {
  position: relative;
  padding-left: 14px;
  font-weight: 800;
  font-size: 1.55rem;
  color: #222;
  line-height: 1.2;
}

.section-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  height: 26px;
  width: 4px;
  background-color: #d71920;
  border-radius: 2px;
}

.list-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #222;
}

.list-count {
  color: #666;
  font-size: 0.95rem;
  font-weight: 600;
}


/* ==================================================
   DESTAQUE
================================================== */

.evento-destaque {
  border: 0;
  border-radius: 16px;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(215,25,32,0.12), transparent 38%),
    linear-gradient(135deg, #ffffff 0%, #fff7f7 100%);
  box-shadow: 0 18px 40px rgba(0,0,0,0.08);
}

.evento-destaque-thumb {
  position: relative;
  min-height: 230px;
  background: #111;
}

.evento-destaque-thumb img {
  width: 100%;
  height: 100%;
  min-height: 230px;
  object-fit: cover;
  display: block;
}

.evento-destaque-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  padding: 1.5rem 1.6rem;
}

.evento-destaque-titulo {
  font-size: clamp(1.5rem, 2.6vw, 2.3rem);
  line-height: 1.12;
  font-weight: 900;
  color: #1a1a1a;
  margin-bottom: 1rem;
}

.evento-destaque-info {
  font-size: 0.96rem;
  margin-bottom: 0.65rem;
}

.evento-destaque-descricao {
  margin: 1rem 0 0;
  color: #474747;
  line-height: 1.65;
  max-height: 9.8rem;
  overflow: hidden;
}

.evento-destaque-acoes {
  margin-top: 1.2rem;
}

.evento-destaque .btn-primary {
  background-color: #d71920;
  border-color: #d71920;
  border-radius: 12px;
  font-weight: 800;
  padding: 0.68rem 1rem;
  font-size: 0.95rem;
}

.evento-destaque .btn-primary:hover {
  background-color: #b4161c;
  border-color: #b4161c;
}

.btn-destaque-visualizar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 180px;
  min-height: 42px;
  border-width: 1px;
  box-shadow: 0 14px 24px rgba(215,25,32,0.18);
}

.btn-destaque-visualizar i {
  font-size: 1rem;
}

.evento-destaque-acoes .btn-share-event {
  min-height: 42px;
  padding: 0.68rem 0.95rem;
  font-size: 0.92rem;
}

.evento-link-thumb {
  display: block;
  width: 100%;
  height: 100%;
}

.evento-link-thumb img {
  transition: transform .25s ease;
}

.evento-link-thumb:hover img {
  transform: scale(1.02);
}

.evento-link-titulo {
  color: inherit;
  text-decoration: none;
  transition: color .2s ease;
}

.evento-link-titulo:hover {
  color: #b4161c;
}

.btn-share-card {
  width: 46px;
  min-width: 46px;
  border-radius: 0.375rem;
}

.share-modal {
  border: 0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.16);
}

.share-kicker {
  display: block;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #d71920;
  margin-bottom: 4px;
}

.share-copy {
  color: #555;
}

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

.share-network {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 14px;
  text-decoration: none;
  font-weight: 800;
  transition: transform .2s ease, box-shadow .2s ease;
}

.share-network:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}

.share-network i,
.share-x-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: rgba(255,255,255,0.18);
  font-size: 1rem;
  font-weight: 900;
}

.share-facebook {
  background: #1877f2;
  color: #fff;
}

.share-x {
  background: #111;
  color: #fff;
}

.share-whatsapp {
  background: #25d366;
  color: #fff;
}

.badge-destaque {
  position: absolute;
  left: 16px;
  top: 16px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: #fff;
  color: #d71920;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  box-shadow: 0 10px 24px rgba(0,0,0,0.14);
  text-transform: uppercase;
}

.destaque-encerrado {
  right: 16px;
  top: 16px;
}


/* ==================================================
   EVENTOS (CARDS)
================================================== */

.evento-card {
  position: relative;
  border: none;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  transition: transform .2s ease, box-shadow .2s ease;
  overflow: hidden;
}

.evento-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 26px rgba(0,0,0,0.10);
}

/* Imagem com proporção fixa */
.evento-thumb { position: relative; overflow: hidden; }
.evento-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Badge "Encerrado" */
.badge-encerrado {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 5;
  display: inline-block;
  background-color: #dc3545;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 6px;
  line-height: 1;
  box-shadow: 0 2px 6px rgba(0,0,0,0.18);
}

/* Só a imagem fica PB quando encerrado */
.evento-card.encerrado .evento-thumb img {
  filter: grayscale(100%) brightness(85%);
}

/* Título em até 2 linhas */
.text-truncate-2{
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Corpo */
.evento-card .card-body { padding: 1.4rem; }

/* Título do evento (melhorado) */
.evento-titulo {
  font-size: 1.15rem;
  font-weight: 800;
  color: #1f1f1f;
  line-height: 1.3;
  margin: 0;
}

/* Infos (data/local) */
.evento-info {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.92rem;
  color: #555;
  line-height: 1.4;
}

.evento-info i {
  color: #d71920;
  font-size: 1rem;
  margin-top: 2px;
  flex-shrink: 0;
}

.evento-info span {
  display: block;
}

/* Botão */
.evento-card .btn-primary {
  background-color: #d71920;
  border-color: #d71920;
  font-weight: 800;
  padding: 10px 14px;
  border-radius: 0.375rem;
}

.evento-card .btn-primary:hover {
  background-color: #b4161c;
  border-color: #b4161c;
}


/* ==================================================
   PAGINACAO
================================================== */

.eventos-pagination .page-link {
  border: 0;
  color: #5b5b5b;
  font-weight: 700;
  border-radius: 10px;
  margin: 0 4px;
  min-width: 42px;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.04);
}

.eventos-pagination .page-item.active .page-link {
  background-color: #d71920;
  color: #fff;
}

.eventos-pagination .page-item.disabled .page-link {
  color: #9b9b9b;
  box-shadow: none;
}


/* ==================================================
   FOOTER (mantido, só organizando classes)
================================================== */

footer { background-color: #e5e5e5; color: #000; padding: 30px 0; margin-top: 60px; }
footer a { color: #000; text-decoration: underline; }

.footer-title { font-size: 1rem; }
.footer-contact { font-size: .95rem; line-height: 1.6; }

.social-icons a { color: #000; font-size: 1.3rem; }

@media (max-width: 991px) {
  .evento-destaque-body {
    padding: 1.25rem 1.35rem;
  }

  .evento-destaque-thumb,
  .evento-destaque-thumb img {
    min-height: 200px;
  }
}

@media (max-width: 576px) {
  .section-title {
    font-size: 1.35rem;
  }

  .evento-destaque {
    border-radius: 14px;
  }

  .evento-destaque-body {
    padding: 1.25rem;
  }

  .badge-destaque,
  .badge-encerrado {
    font-size: 0.72rem;
  }
}
