@charset "UTF-8";
/* ============================================================
   GRID DOS CARDS E FIXES FOUNDATION/ROCKY
   ============================================================ */
#lista-1,
#lista-1.row {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 20px !important;
  padding: 0 !important;
  margin: 0 !important;
  width: 100% !important; }

.card_section {
  padding: 0 !important; }

/* ============================================================
   CARDS
   ============================================================ */
.card-galeria {
  flex: 0 0 calc(20% - 20px);
  background: white;
  border-radius: 8px;
  padding: 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
  text-align: center;
  cursor: pointer;
  transition: .25s;
  display: flex;
  flex-direction: column; }

.card-galeria:hover {
  transform: scale(1.05);
  box-shadow: 0px 5px 14px rgba(0, 0, 0, 0.25); }

.card-galeria img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  object-position: center 15%;
  border-radius: 6px;
  aspect-ratio: 16/9 !important; }

.card-galeria h6 {
  font-size: 12px;
  font-weight: 600;
  margin: 8px 2px 2px;
  min-height: 40px; }

.card-galeria p {
  font-size: 10px;
  color: #555;
  margin: 2px 0 10px; }

/* ============================================================
   RESPONSIVIDADE — GRID
   ============================================================ */
@media (max-width: 1280px) {
  .card-galeria {
    flex: 0 0 calc(25% - 20px); } }

@media (max-width: 980px) {
  .card-galeria {
    flex: 0 0 calc(33.33% - 20px); } }

@media (max-width: 767px) {
  .card-galeria {
    flex: 0 0 calc(50% - 20px); } }

@media (max-width: 420px) {
  .card-galeria {
    flex: 0 0 100%; } }

/* ============================================================
   MODAL — DESKTOP
   ============================================================ */
/* Modal escondido */
#modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  z-index: 9999;
  /* Vai centralizar quando estiver visível */
  justify-content: center;
  align-items: center; }

/* Modal ABERTO — ativado via classe */
#modal.open {
  display: flex !important;
  /* vira flex apenas quando abrir */ }

.modal-content {
  display: flex;
  justify-content: center;
  align-items: center;
  width: auto;
  height: 85vh;
  max-width: 90vw;
  max-height: 90vh;
  overflow: hidden;
  border-radius: 25px !important; }

#modal-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  display: block; }

/* botão fechar */
.close,
.close-modal {
  position: absolute;
  top: 12px;
  right: 15px;
  width: 44px;
  height: 44px;
  line-height: 42px;
  text-align: center;
  border-radius: 50%;
  background: #fff;
  color: #000;
  font-weight: 700;
  font-size: 20px;
  cursor: pointer;
  z-index: 10001;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  transition: transform .12s ease; }

.close:hover,
.close-modal:hover {
  transform: scale(1.06); }

/* botão menor no mobile */
@media (max-width: 768px) {
  .close,
  .close-modal {
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    font-size: 18px;
    line-height: 38px; } }

/* ============================================================
   MOBILE — MODAL EM TELA CHEIA
   ============================================================ */
@media (max-width: 768px) {
  #modal {
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    transform: none; }
  .modal-content {
    width: 100vw;
    height: 100vh;
    border-radius: 0; }
  #modal-img {
    width: 100vw;
    height: 100vh;
    object-fit: contain;
    background: black;
    object-position: center; }
  .modal-nav {
    bottom: 25px; }
  .modal-nav button {
    font-size: 22px;
    padding: 8px 14px; } }

/* ============================================================
   MODAL — NAV BUTTONS
   ============================================================ */
.modal-nav {
  position: absolute;
  bottom: 15px;
  width: 100%;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  z-index: 10000; }

.modal-nav button {
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border: 1px solid #fff;
  padding: 10px 20px;
  font-size: 20px;
  border-radius: 8px;
  cursor: pointer; }

/* ====== Corrige conflito com Foundation ====== */
#lista-1.row {
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 20px !important;
  width: 100% !important;
  align-items: stretch !important; }

/* ====== Cards ====== */
.card-galeria {
  flex: 0 0 calc(20% - 20px);
  background: white;
  border-radius: 8px;
  padding: 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  height: 100%; }

.card-galeria h6 {
  min-height: 48px; }

.card-galeria p {
  min-height: 32px; }

.card_section {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px; }

/* CARD */
.card-galeria {
  background: #fff;
  border-radius: 10px;
  padding: 15px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  height: 100%;
  max-width: 350px;
  /* <<<<<< impede o último card de se esticar */
  margin: 0 auto;
  /* centraliza quando sobrar espaço */ }

.temas-section {
  margin-bottom: 30px; }

.tema-card {
  padding: 20px;
  text-align: center;
  cursor: pointer;
  background: #fff;
  border-radius: 12px;
  transition: transform .2s, box-shadow .2s; }

.tema-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15); }

.tema-icon {
  width: 80px;
  opacity: 0.8; }

.temas-section {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  gap: 20px !important; }

/* Container da imagem com proporção fixa */
.card-galeria .img-wrapper {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 8px; }

/* A imagem preenche o container sem distorcer */
.card-galeria img,
.tema-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block; }

/* Cards normais (vídeo) */
.card-video {
  width: 280px !important; }

/* TEMA: 40% maior */
.tema-card {
  width: calc(280px * 1.4) !important;
  /* 40% maior */ }

/* Mantém 16:9 em todos os cards */
.card-galeria .img-wrapper {
  width: 100% !important;
  aspect-ratio: 16 / 9 !important;
  overflow: hidden !important;
  border-radius: 10px !important; }

/* Imagem ocupa 16:9 sem distorcer */
.card-galeria img,
.tema-card img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important; }

/* Card padrão: 20% da linha */
.card-galeria {
  flex: 0 0 calc(25% - 20px) !important; }

/* TEMA: 40% maior → 28% da linha */
.tema-card {
  flex: 0 0 calc(40% - 20px) !important; }
