/* ---------------------------
   RESET BÁSICO
--------------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,body{
    width: 100%;
}

body {
    font-family: 'Segoe UI', Tahoma, sans-serif;
    background: url('../css/img/fundo.jpg') no-repeat center center fixed;
    background-size: cover;
    min-height: 100dvh;
    width: 100%;;
    color: #333;
}

/*Botao*/

button a{
    text-decoration: none;
    color: inherit;
}

.trumbowyg-button {
    background: #fff !important;
    border-radius: 6px;
}

/* ---------------------------
   NAVBAR GLOBAL
--------------------------- */
.navbar {
    background: #721c24;
    padding: 1rem;
    display: flex;
    gap: 1.5rem;
    width: 100%;
    justify-content: flex-start;
}
.navbar span {
    margin-left: auto;
    color: #fff;
    font-weight: 500;
}
.navbar a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
}
.navbar a:hover {
    text-decoration: underline;
}

/* ---------------------------
   CONTAINER PRINCIPAL
--------------------------- */
.main-container {
    min-height: calc(100vh - 120px);
    padding: 2rem;
}

/* ---------------------------
   RODAPÉ GLOBAL
--------------------------- */
.footer {
    background: #721c24;
    color: #fff;
    text-align: center;
    padding: 1rem;
}

/* ---------------------------
   Missao
--------------------------- */

.missao-page {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh; /* ocupa a tela toda */
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  padding: 10px;
}

.missao-container {
  background: rgba(255, 255, 255, 0.92);
  padding: 2rem 3rem;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
  text-align: center;
  width: 100%;
  max-width: 600px;
}

.logo-container {
  text-align: center;
  margin-bottom: 10px;
}

.logo {
  width: 150px;
  height: auto;
}

.text-section {
  text-align: center;
  color: #333;
}

.text-section h1 {
  margin-top: 20px;
  font-size: 1.8rem;
  color: #800000; /* tom vinho */
}

.text-section p {
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.text-section ul {
  list-style: none;
  padding: 0;
  font-size: 1rem;
  line-height: 1.6;
}

.text-section ul li {
  margin-bottom: 6px;
}

/* ---------------------------
   LOGIN
--------------------------- */

.logo-container {
  text-align: center;
  margin-bottom: 15px;
}

.logo {
  width: 180px; /* ajuste o tamanho conforme quiser */
  height: auto;
}
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 500px;
    background: rgba(0, 0, 0,0.4);
    backdrop-filter: blur(4px);
    border-radius: 12px;
    max-width: 100%;
    text-wrap-style: auto;
}

.login-container {
    background: rgba(255, 255, 255, 0.9);
    padding: 2rem 3rem;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
    text-align: center;
    width: 100%;
    max-width: 360px;
}

.login-container h1 {
    margin-bottom: 1.5rem;
    color: #333;
}

.login-container .msgs {
    list-style: none;
    margin: 1rem 0;
    padding: 0;
    text-align: center;
    width: 100%;
    
}

.login-container .msgs li {
    padding: 0.7rem;
    margin-bottom: 0.5rem;
    border-radius: 6px;
    font-size: 0.9rem;
}

.login-container .msgs .success {
    background: #e0f7e9;
    color: #90191978;
}

.login-container .msgs .warning {
    background: #f8d7da;
    color: #a71832;
}

.login-form .input-group {
    text-align: left;
    margin-bottom: 1rem;
}

.login-form label {
    font-weight: 600;
    font-size: 0.9rem;
    display: block;
    margin-bottom: 0.5rem;
}

.login-form input {
    width: 100%;
    padding: 0.7rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
}

.login-form input:focus {
    border-color: #a71832;
    outline: none;
}

.btn-login {
    width: 100%;
    padding: 0.8rem;
    background: #a71832;
    color: #fff;
    font-size: 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-login:hover {
    background: #8f142a;
}

/* ---------------------------
   ADMIN / EDITAR
--------------------------- */
.admin-container {
    display: block;
    min-height: 100%;
    padding: 1vh;
    background: rgba(132, 41, 41, 0.827);
    border-radius: 12px;
    width: min(98%,900px);
    margin: 2vh auto;
    
}
.galeria-mini img {
    width: 80px;  /* define largura fixa */
    height: 80px; /* define altura fixa */
    object-fit: cover; /* mantém proporção e recorta o excesso */
    border-radius: 6px;
    margin: 3px;
}
.preview-imagem img {
    max-width: 80px;  /* capa */
    max-height: 80px;  /* galeria */
    object-fit: cover;
    border-radius: 6px;
    margin: 3px;
}
@media (min-width: 768px) {
    .admin-container {
        width: min(98%, 900px);
    }
}
.sidebar {
    display: none !important;
}

.sidebar h2 {
    margin-bottom: 2rem;
    text-align: center;
    font-weight: bold;
    color: #fff;
}

.sidebar ul {
    list-style: none;
    padding: 0;
}

.sidebar li {
    margin-bottom: 1rem;
}

.sidebar a {
    text-decoration: none;
    display: block;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    color: #333;
    font-weight: 500;
    transition: background 0.3s;
}

.sidebar a.active,
.sidebar a:hover {
    background: rgba(167,24,50,0.1);
    color: #a71832;
}

.admin-main {
    flex: 1;
    padding: 2rem;
    border-radius: 12px;
    background: rgb(255, 247, 226); /*cor mais clara do admin*/
}
.admin-form label,
.edit-form label {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.admin-form,
.edit-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 700px;
    margin-bottom: 2rem;
}

.admin-form input,
.admin-form textarea,
.admin-form select,
.edit-form input,
.edit-form textarea,
.edit-form select {
    padding: 0.8rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
    width: 100%;
    font-family: inherit;
    border-radius: 12px;
}

.admin-form textarea,
.edit-form textarea {
    min-height: 200px;
    resize: vertical;
}
/* Força o fundo do editor Trumbowyg ser branco */
.trumbowyg-box {
    background-color: #fff !important;
    border-radius: 12px;
}

.trumbowyg-editor {
    background-color: #fff !important;  /* fundo branco */
    color: #333 !important;            /* texto escuro */
    min-height: 200px;
    font-family: inherit;
    cursor: text;                       /* mostra o cursor ao passar */
}

.btn-add {
    display: inline-block;
    text-align: center;
    padding: 8px 16px;
    border-radius: 6px;
    background-color: #a71832;
    color: #fff;
    border: none;
    cursor: pointer;
    font-weight: bold;
    text-decoration: none;
}

.btn-add:hover {
    background-color: #c02140;
}


.conteudos-list {
    list-style: none;
    padding: 0;
    max-width: 700px;
}

.conteudos-list li {
    background: rgba(255,255,255,0.9);
    padding: 0.8rem 1rem;
    margin-bottom: 0.7rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
    gap: 1rem;
    flex-wrap: wrap;
}

.conteudos-list li .titulo {
    font-weight: 600;
}

.conteudos-list li .categoria {
    color: #666;
    font-size: 0.9rem;
    margin-left: 1rem;
}

.conteudos-list li .acoes a,
.conteudos-list li .acoes button {
    margin-left: 0.5rem;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    font-size: 0.85rem;
    border: none;
    cursor: pointer;
}

.btn-edit,
.btn-delete {
    background: #a71832;
    color: white;
}

.btn-edit:hover,
.btn-delete:hover {
    background: #8f142a;
}

.vazio {
    text-align: center;
    color: #666;
}

/* ---------------------------
   MURAL
--------------------------- */
/* ---------------------------
   MURAL - LIMITAR RESUMO
--------------------------- */
.texto-resumo, .texto-resumo-destaque {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3; /* mostra somente 2 linhas (WebKit) */
    line-clamp: 3;          /* fallback para compatibilidade futura */
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4em;     /* ajuste conforme seu design */
    max-height: calc(1.4em * 3);
    color: #333;
    margin-bottom: 0.5em;
}

.mural-container {
    max-width: 1600px;
    margin: 2rem auto;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(6px);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(71, 28, 28, 0.423);
}

.categorias {
    display: flex;
    flex-wrap: wrap;        /* permite que quebrem linha */
    justify-content: center; /* centraliza horizontalmente */
    gap: 10px;              /* espaço entre os botões */
    text-align: center;
    margin-bottom: 2rem;
}

.categorias a {
    padding: 8px 16px;
    background: #eee;
    border-radius: 6px;
    color: #333;
    font-weight: bold;
    text-decoration: none;
    transition: background 0.3s;
    white-space: nowrap; /* evita quebra dentro do texto do botão */
}

.categorias a:hover {
    background: #ddd;
}

.categorias a.ativo {
    background: #a71832;
    color: #fff;
}

/* Grid dos Cards */
.conteudos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

/* Card */
.card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: transform 0.3s, box-shadow 0.3s;
    min-height: 320px;
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.25);
}

/* Imagem do Card */
.imagem-card {
    width: 100%;
    height: 130px; /* ajusta altura do card */
    overflow: hidden;
    border-bottom: 1px solid #ddd;
}

.imagem-card img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* preenche o card mantendo proporção */
    display: block;
    transition: transform 0.3s ease;
}

/* efeito leve de zoom ao passar o mouse */
.card:hover .imagem-card img {
    transform: scale(1.05);
}


/* Conteúdo do Card */
.conteudo-card {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Título */
.conteudo-card h3 {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #a71832;
}

/* Resumo */
.conteudo-card p {
    font-size: 0.95rem;               /* Tamanho da fonte */
    line-height: 1.2rem;              /* Altura da linha */
    color: #444;                      /* Cor do texto */
    margin-bottom: 0.5rem;            /* Espaço abaixo do parágrafo */

    display: -webkit-box;             /* Para funcionar com -webkit-line-clamp */
    -webkit-box-orient: vertical;     
    -webkit-line-clamp: 3;            /* Limita a 3 linhas */
      line-clamp: 3;          /* fallback para compatibilidade futura */
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Informações adicionais */
.conteudo-card small {
    font-size: 0.8rem;
    color: #777;
    margin-bottom: 0.8rem;
}

/* Botão Saiba Mais */
.saiba-mais {
    margin-top: auto;
    text-align: center;
}
.btn-saiba-mais {
    display: inline-block;
    padding: 6px 12px;
    background: #a71832;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.3s;
}
.btn-saiba-mais:hover {
    background: #8f142a;
}

/* ---------------------------
   DETALHE CONTEÚDO
--------------------------- */
.detalhe-conteudo {
    max-width: 1000px;
    margin: 2rem auto;
    background: rgba(255,255,255,0.95);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.detalhe-conteudo .meta {
    color: #555;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.detalhe-conteudo .imagem-principal img {
    max-width: 100%;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.btn-arquivo {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 14px;
    background: #f8b954;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
}
.btn-arquivo:hover {
    background: #f8b954;
}

.btn-voltar {
    display: inline-block;
    margin-top: 20px;
    padding: 8px 14px;
    background: #555;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
}
.btn-voltar:hover {
    background: #333;
}

/* ---------------------------
   GALERIA HORIZONTAL
--------------------------- */
.galeria-imagens .swiper {
    padding: 10px 0;
}
.galeria-imagens .swiper-slide {
    width: 150px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.galeria-imagens .swiper-slide img {
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}
.galeria-imagens .swiper-slide img:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* ---------------------------
   CARROSSEL DE DESTAQUES
--------------------------- */
.mural-destaques {
    margin-bottom: 2rem;
    position: relative;
    width: 100%;
    height: 420px;
    border-radius: 12px;
    overflow: hidden;
}

.destaque-card {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    overflow: hidden;
}

.destaque-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Área de texto sobre a imagem */
.destaque-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.759); /* fundo preto transparente */
    color: white;
    padding: 15px 20px;
    box-sizing: border-box;
}



.destaque-info h2 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

/*.destaque-info p {
    font-size: 1rem;
    line-height: 1.2rem;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-line-clamp: 3; /* limita a 3 linhas 
    margin-bottom: 12px;
    color: white;
}*/
.destaque-info p {
  font-size: 1rem;
  line-height: 1.2rem;
  color: white;
  margin-bottom: 12px;

  overflow: hidden;
  text-overflow: ellipsis;
  display: block;

  /* Limita a altura total a 3 linhas */
  max-height: calc(1.2rem * 3);
  /* Evita quebra de palavra no final */
  white-space: normal;
}

.destaque-info .btn-saiba-mais {
    display: inline-block;
    padding: 6px 12px;
    color: white;
    background: #a71832; /* botão na cor original */
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.3s ease;
}

.destaque-info .btn-saiba-mais:hover {
    background: #8f142a;
}

.swiper-button-next,
.swiper-button-prev {
    color: #fff;
    width: 40px;
    height: 40px;
}

.swiper-pagination-bullet-active {
    background: #a71832;
}

/* ---------------------------
   DETALHE CONTEÚDO - RESPONSIVO
--------------------------- */
.detalhe-conteudo img,
.detalhe-conteudo video,
.detalhe-conteudo iframe {
    max-width: 100%;    /* nunca ultrapassa a largura do container */
    height: auto;       /* mantém proporção */
    display: block;
    margin: 0 auto 12px auto; /* centraliza e dá espaçamento inferior */
    border-radius: 6px;
    word-wrap: break-word;    /* garante que texto longo em legendas não quebre */
}

/* Texto dentro do detalhe do conteúdo */
.detalhe-conteudo .texto-completo p {
    font-size: 1rem;
    line-height: 1.6rem;
    color: #333;
    overflow-wrap: break-word;
}

/* Responsividade para telas pequenas */
@media (max-width: 768px) {
    .detalhe-conteudo iframe,
    .detalhe-conteudo video,
    .detalhe-conteudo img {
        width: 100%;
        height: auto;
    }
    /* ---------------------------
   POPUP DE BOAS-VINDAS
--------------------------- */
.popup-overlay {
  position: fixed !important;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999999 !important; /* força a sobreposição máxima */
  backdrop-filter: blur(3px);
}

.popup {
  background: #fff;
  border-radius: 12px;
  padding: 2rem;
  max-width: 420px;
  width: 90%;
  box-shadow: 0 6px 25px rgba(0,0,0,0.3);
  text-align: center;
  color: #333;
  animation: fadeInPopup 0.4s ease;
}

.popup h2 {
  color: #900C3F; /* cor institucional */
  margin-bottom: 1rem;
}

.popup button {
  background-color: #900C3F;
  color: #fff;
  border: none;
  padding: 0.6rem 1.5rem;
  border-radius: 8px;
  margin-top: 1.5rem;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.3s;
}

.popup button:hover {
  background-color: #6d082f;
}

@keyframes fadeInPopup {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}


/* ---------------------------
   ADMIN - botoes
--------------------------- */

/* Botões do admin mantêm a identidade visual */
.btn-add, .btn-edit, .btn-delete {
    background: #a71832;
    color: #fff;
}

.btn-add:hover, .btn-edit:hover, .btn-delete:hover {
    background: #8f142a;
}
}