/* ===== ESTILOS GLOBAIS ===== */
* {
  font-family: 'Montserrat', sans-serif;
  -webkit-tap-highlight-color: transparent;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

body {
  background-color: black;
  color: white;
}

/* ===== SCROLLBAR PERSONALIZADA ===== */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #D4AF37 0%, #FFD700 50%, #D4AF37 100%);
  border-radius: 3px;
}

/* ===== GLASSMORPHISM ===== */
.glass-dark {
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 215, 0, 0.1);
}

.glass-light {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 215, 0, 0.05);
}

/* ===== UTILITÁRIOS ===== */
.gold-gradient {
  background: linear-gradient(135deg, #D4AF37 0%, #FFD700 50%, #D4AF37 100%);
}

.gold-text-gradient {
  background: linear-gradient(135deg, #D4AF37 0%, #FFD700 50%, #D4AF37 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gold-border {
  border-color: rgba(212, 175, 55, 0.3);
}

.hover-glow:hover {
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.5);
}

.touch-target {
  min-height: 44px;
  min-width: 44px;
}

/* ===== CARDS DE NOTÍCIAS ===== */
.news-card {
  min-width: 300px;
  max-width: 300px;
  scroll-snap-align: start;
  background-color: #1F2937;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 6px 12px rgb(0 0 0 / 0.5);
  display: flex;
  flex-direction: column;
  height: 400px;
  transition: all 0.3s ease;
  border: 1px solid #374151;
}

.news-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgb(0 0 0 / 0.6);
  border-color: #D4AF37;
}

.news-image {
  position: relative;
  height: 180px;
  background-color: black;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.news-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition: transform 0.5s ease;
}

.news-card:hover .news-image img {
  transform: scale(1.05);
}

.news-no-image {
  color: #9CA3AF;
}

.news-content {
  padding: 1rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.news-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 9999px;
  padding: 0.25rem 0.75rem;
  margin-bottom: 0.5rem;
  user-select: none;
  align-self: flex-start;
  position: relative;
  z-index: 1;
}

.tag-moradores {
  background-color: #D4AF37;
  color: black;
}

.tag-publico {
  background-color: #3B82F6;
  color: white;
}

.news-content h3 {
  font-size: 1rem;
  font-weight: 700;
  color: white;
  margin-bottom: 0.5rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
}

.news-content p {
  color: #D1D5DB;
  font-size: 0.875rem;
  flex-grow: 1;
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
  min-height: 0;
}

.news-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: #9CA3AF;
  border-top: 1px solid #374151;
  padding-top: 0.75rem;
  flex-shrink: 0;
}

.news-footer .ler-mais {
  color: #D4AF37;
  cursor: pointer;
  font-weight: 600;
  user-select: none;
  transition: color 0.2s;
}

.news-footer .ler-mais:hover {
  color: #f3c54a;
}

/* Card "Ver todas" */
.view-all-card {
  min-width: 300px;
  max-width: 300px;
  scroll-snap-align: start;
  background: linear-gradient(135deg, #1F2937 0%, #111827 100%);
  border-radius: 0.75rem;
  box-shadow: 0 6px 12px rgb(0 0 0 / 0.5);
  display: flex;
  flex-direction: column;
  height: 400px;
  transition: all 0.3s ease;
  border: 2px dashed #374151;
  cursor: pointer;
}

.view-all-card:hover {
  border-color: #D4AF37;
  border-style: solid;
  background: linear-gradient(135deg, #1F2937 0%, #1a2231 100%);
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgb(0 0 0 / 0.6);
}

.view-all-content {
  padding: 2rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1.5rem;
}

.view-all-icon {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.1) 0%, rgba(212, 175, 55, 0.2) 100%);
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.view-all-text h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #D4AF37;
  margin-bottom: 0.5rem;
}

.view-all-text p {
  color: #D1D5DB;
  font-size: 0.875rem;
  line-height: 1.5;
}

.view-all-arrow {
  color: #D4AF37;
  font-size: 1.5rem;
  animation: pulse 2s infinite;
}

/* ===== GALERIA DE FOTOS ===== */
.photo-item {
  min-width: 280px;
  max-width: 280px;
  scroll-snap-align: start;
  position: relative;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 4px 8px rgb(0 0 0 / 0.5);
  background-color: black;
  border: 1px solid #374151;
}

.photo-item img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  object-position: top;
  cursor: pointer;
  transition: all 0.4s ease;
}

.photo-item:hover img {
  transform: scale(1.08);
}

.photo-item:hover {
  border-color: #D4AF37;
}

/* ===== ANIMAÇÕES EXISTENTES ===== */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: translateX(0);
  }
  50% {
    opacity: 0.7;
    transform: translateX(5px);
  }
}

/* ===== ANIMAÇÃO PARA O MODAL ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== MODAL DE NOTIFICAÇÃO EM PRIMEIRO PLANO (TAMANHO FLEXÍVEL) ===== */
/* Overlay bloqueia totalmente o site */
.notificacao-modal-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background-color: rgba(0, 0, 0, 0.85) !important;
  backdrop-filter: blur(5px);
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 10000 !important;
  pointer-events: auto !important;
  padding: 1rem;
}

/* Container do modal: tamanho automático, limitado pela viewport */
.notificacao-modal-container {
  width: auto;
  max-width: min(90vw, 600px);  /* Largura máxima: 90% da viewport ou 600px */
  max-height: 90vh;              /* Altura máxima: 90% da viewport */
  background: linear-gradient(135deg, #1F2937 0%, #111827 100%);
  border-radius: 1rem;
  border: 1px solid #D4AF37;
  box-shadow: 0 25px 40px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: fadeInUp 0.3s ease-out;
  margin: auto;
}

/* Cabeçalho */
.notificacao-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(212, 175, 55, 0.3);
  background: rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
}

.notificacao-modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #D4AF37;
  margin: 0;
  font-family: 'Montserrat', sans-serif;
  word-break: break-word;
  padding-right: 1rem;
}

.notificacao-modal-close {
  background: none;
  border: none;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  color: #9CA3AF;
  transition: color 0.2s;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  flex-shrink: 0;
}

.notificacao-modal-close:hover {
  color: white;
  background-color: rgba(255, 255, 255, 0.1);
}

/* Corpo do modal: rola se conteúdo ultrapassar max-height */
.notificacao-modal-body {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Imagem: sem cortes, tamanho máximo responsivo */
.notificacao-modal-image {
  width: 100%;
  display: flex;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.3);
  border-radius: 0.5rem;
  padding: 0.5rem;
}

.notificacao-modal-image img {
  max-width: 100%;
  max-height: 40vh;     /* imagem ocupa no máximo 40% da altura da tela */
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 0.5rem;
}

/* Mensagem com scroll individual se necessário (já tem overflow-y no body) */
.notificacao-modal-message {
  color: #E5E7EB;
  font-size: 1rem;
  line-height: 1.5;
  margin: 0;
  word-break: break-word;
  white-space: pre-wrap;
}

/* Rodapé fixo */
.notificacao-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
}

.notificacao-modal-btn {
  padding: 0.5rem 1.25rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  font-family: 'Montserrat', sans-serif;
}

.notificacao-modal-btn-secondary {
  background-color: #374151;
  color: white;
}

.notificacao-modal-btn-secondary:hover {
  background-color: #4B5563;
}

.notificacao-modal-btn-primary {
  background-color: #D4AF37;
  color: black;
}

.notificacao-modal-btn-primary:hover {
  background-color: #e6c347;
  transform: translateY(-1px);
}

/* Responsivo: telas muito pequenas */
@media (max-width: 480px) {
  .notificacao-modal-container {
    max-width: 95vw;
    max-height: 95vh;
  }
  
  .notificacao-modal-header {
    padding: 0.75rem 1rem;
  }
  
  .notificacao-modal-title {
    font-size: 1rem;
  }
  
  .notificacao-modal-body {
    padding: 1rem;
  }
  
  .notificacao-modal-message {
    font-size: 0.875rem;
  }
  
  .notificacao-modal-btn {
    padding: 0.4rem 1rem;
  }
}

/* ===== SUBMENUS (compatibilidade com módulos) ===== */
.submenu-transition {
  transition: all 0.2s ease;
  max-height: 0;
  overflow: hidden;
}

.submenu-open {
  max-height: 500px;
}

.menu-subheader {
  @apply hover:bg-white/5 transition-colors cursor-pointer;
}

.menu-subheader:hover {
  @apply bg-gray-800/50;
}

.submenu-inner {
  @apply ml-6 space-y-1 max-h-0 overflow-hidden transition-all duration-300;
}

.submenu-inner.submenu-open {
  @apply max-h-96;
}

.menu-subheader .fa-chevron-right {
  transition: transform 0.3s ease;
}

.menu-subheader.active .fa-chevron-right {
  transform: rotate(90deg);
}

/* ===== RESPONSIVIDADE GERAL ===== */
@media (max-width: 767px) {
  .news-card,
  .view-all-card {
    min-width: 280px;
    max-width: 280px;
    height: 380px;
  }
  
  .photo-item {
    min-width: 260px;
    max-width: 260px;
  }
  
  .news-content h3 {
    font-size: 0.95rem;
  }
  
  .news-content p {
    font-size: 0.85rem;
  }
}

/* ===== BADGES E TAGS ===== */
.badge, [class*="badge"] {
  position: relative;
  z-index: 1;
}

/* Cores de status */
.bg-orange-500 {
  background-color: #f97316 !important;
}

.bg-blue-600 {
  background-color: #2563eb !important;
}

.bg-yellow-600 {
  background-color: #ca8a04 !important;
}

.bg-green-600 {
  background-color: #16a34a !important;
}

/* ===== MENU MOBILE (complementar) ===== */
.mobile-menu-link {
  display: flex;
  align-items: center;
  width: 100%;
  text-align: left;
}

.mobile-menu-section-title {
  user-select: none;
}