/* estilo.css */

/* === Variáveis de cor === */
:root {
  --vermelho: #b10000;
  --vermelho-hover: #8b0000;
  --vermelho-claro: #e60000;
  --preto: #1a1a1a;
  --cinza: #f2f2f2;
  --branco: #ffffff;
  --fundo-modal: #fefefe;
  --azul-escuro: #2c3e50;
}

/* === Reset e base tipográfica === */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Suporte a prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Transições mais rápidas para melhor responsividade */
:root {
  --transition-fast: 0.2s ease;
  --transition-medium: 0.3s ease;
}

body {
  font-family: 'Inter', sans-serif;
  background: #f8f9fa;
  color: var(--preto);
  line-height: 1.6;
  padding-top: 140px; /* Espaço para a logo sobreposta */
  transition: background-color var(--transition-fast);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* === Top-bar === */
.top-bar {
  background-color: var(--branco);
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--cinza);
}

.small-btn {
  background: var(--vermelho);
  color: #fff;
  padding: 0.25rem 0.75rem;
  border-radius: 0.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s;
}

.small-btn:hover {
  background: var(--vermelho-hover);
}

.main-header {
  background-color: var(--azul-escuro);
  padding: 1rem 0 3rem;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 4px 18px rgba(44,62,80,0.08);   /* Azul escuro, bem sutil */
}


.logo-container {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1001;
  text-align: center;
}

.header-logo {
  height: 110px;
  width: auto;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3));
  transition: transform 0.2s ease;
}

.header-logo:hover {
  transform: scale(1.05);
}

/* Menu principal */
.main-nav {
  padding-top: 70px; /* Espaço para a logo */
}

.main-nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}

.main-nav li {
  position: relative;
}

.main-nav a {
  color: var(--branco);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.5rem 0.8rem;
  position: relative;
  transition: all var(--transition-fast) cubic-bezier(0.4, 0, 0.2, 1);
  display: block;
  border-radius: 8px;
}

.main-nav a:hover,
.main-nav a:focus {
  color: var(--vermelho-claro);
  background-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.main-nav a:focus {
  outline: 2px solid var(--vermelho-claro);
  outline-offset: 2px;
}

/* Linha decorativa abaixo dos itens do menu */
.main-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: var(--vermelho-claro);
  transition: width 0.3s ease;
}

.main-nav a:hover::after {
  width: 100%;
}

/* === Hero Section === */
.hero {
  padding: 4rem 1rem 2rem;
  text-align: center;
  position: relative;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.4s ease-out 0.1s forwards;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin: 0;
  color: var(--preto);
  padding: 2rem 0;
  position: relative;
  z-index: 1;
  background: linear-gradient(135deg, var(--preto), var(--vermelho));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% 200%;
  animation: gradientShift 2s ease-in-out infinite;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: linear-gradient(rgba(255,255,255,0.9), rgba(255,255,255,0.7)), 
              url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="100" height="100" fill="%23f2f2f2"/><path d="M0,0 L100,100 M100,0 L0,100" stroke="%23e0e0e0" stroke-width="1"/></svg>');
  background-size: 200px;
  z-index: 0;
}

/* === Botões Globais === */
.botao {
  display: inline-block;
  background-color: var(--vermelho);
  color: var(--branco);
  border: none;
  padding: 0.75rem 2rem;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast) cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.botao::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.botao:hover,
.botao:focus {
  background-color: var(--vermelho-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(177, 0, 0, 0.3);
}

.botao:hover::before {
  left: 100%;
}

.botao:focus {
  outline: 2px solid var(--vermelho-claro);
  outline-offset: 2px;
}

.botao:active {
  transform: translateY(0);
}

/* === Seções Gerais === */
.secao {
  background: #fff; /* Mantém a área principal branca, mas destaca do fundo */
  border-radius: 18px;
  box-shadow: 0 8px 32px rgba(44,62,80,0.05);
  padding: 2.5rem 1rem;
  margin-bottom: 2.5rem;
  opacity: 0;
  transform: translateY(40px);
  animation: slideInUp 0.3s ease-out forwards;
}

@keyframes slideInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.secao-title {
  text-align: center;
  font-size: 2.2rem;
  margin-bottom: 3rem;
  position: relative;
}

.secao-title::after {
  content: "";
  display: block;
  width: 70px;
  height: 4px;
  background-color: var(--vermelho);
  margin: 0.8rem auto 1.5rem;
}

/* === Grid de Cards === */
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

@media (max-width: 768px) {
  .card-grid {
    grid-template-columns: 1fr;
  }
}

/* Animação escalonada para os cards */
.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }

.card {
  opacity: 0;
  transform: translateY(30px);
  animation: cardFadeIn 0.3s ease-out forwards;
}

@keyframes cardFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card {
  background-color: var(--cinza);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  transition: all var(--transition-fast) cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.card:hover,
.card:focus-within {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.card:focus-within {
  outline: 2px solid var(--vermelho);
  outline-offset: 2px;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background-color: var(--vermelho);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.card:hover::before {
  transform: scaleX(1);
}

.card .icon {
  font-size: 3rem;
  color: var(--vermelho);
  margin-bottom: 1.5rem;
  transition: transform 0.3s ease;
}

.card:hover .icon {
  transform: translateY(-8px);
}

.card h3 {
  font-size: 1.5rem;
  margin-bottom: 1.2rem;
  font-weight: 700;
}

.card p {
  font-size: 1.05rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
}

/* === Galeria Masonry === */
.gallery-masonry {
  column-count: 3;
  column-gap: 1.5rem;
}

@media (max-width: 992px) {
  .gallery-masonry { column-count: 2; }
}

@media (max-width: 576px) {
  .gallery-masonry { column-count: 1; }
}

.gallery-masonry .item {
  break-inside: avoid;
  margin-bottom: 1.5rem;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.gallery-img {
  width: 100%;
  display: block;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  border-radius: 10px;
}

.gallery-img:hover,
.gallery-img:focus {
  opacity: 0.9;
  transform: scale(1.05);
  box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.gallery-img:focus {
  outline: 3px solid var(--vermelho);
  outline-offset: 3px;
}

/* === Título da Galeria === */
#visitas {
  text-align: center;
}

#visitas h2 {
  display: inline-block;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  position: relative;
}

#visitas h2::after {
  content: "";
  display: block;
  width: 80px;
  height: 4px;
  background-color: var(--vermelho);
  margin: 1rem auto 2rem;
}

/* === Modais === */
.modal-content {
  background-color: var(--fundo-modal);
  border-radius: 16px;
  overflow: hidden;
  border: none;
}

.modal-header {
  border-bottom: none;
  padding-bottom: 0;
  justify-content: center;
  position: relative;
}

.modal-title {
  font-size: 1.8rem;
  font-weight: 700;
  text-align: center;
  color: var(--vermelho);
  padding: 1rem 0 0.5rem;
  width: 100%;
}

.modal-body {
  text-align: center;
  font-size: 1.1rem;
  font-weight: 500;
  line-height: 1.7;
  color: #333;
  padding: 1rem 2rem 2rem;
}

.modal-body::before {
  content: "";
  display: block;
  width: 60%;
  height: 2px;
  background-color: #ddd;
  margin: 0 auto 1.5rem;
}

/* LIGHTBOX */
.lightbox {
  display: flex;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(0px);
}

.lightbox.show {
  opacity: 1;
  visibility: visible;
  background-color: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(5px);
}

.lightbox-content {
  position: relative;
  max-width: 90vw;  /* Usando viewport width */
  max-height: 90vh; /* Usando viewport height */
  display: flex;
  justify-content: center;
  align-items: center;
}

#lightbox-img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain; /* Mantém proporção sem cortar */
  display: block;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.7);
  border: 2px solid #fff;
  border-radius: 8px;
  transform: scale(0.8);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.lightbox.show #lightbox-img {
  transform: scale(1);
}

.lightbox-close {
  position: fixed; /* Mantém fixo na janela */
  top: 20px;
  right: 20px;
  color: white;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
  background: rgba(0, 0, 0, 0.5);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  border: none;
}

.lightbox-close:hover,
.lightbox-close:focus {
  background: rgba(0, 0, 0, 0.8);
  transform: scale(1.1);
  outline: 2px solid var(--vermelho-claro);
  outline-offset: 2px;
}

.lightbox-close:active {
  transform: scale(0.95);
}
/* === Botão “Voltar ao Topo” === */
.back-to-top {
  position: fixed;
  bottom: 1.5rem; 
  right: 1.5rem;
  width: 3.5rem; 
  height: 3.5rem;
  background: var(--vermelho);
  color: var(--branco);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  opacity: 0; 
  visibility: hidden;
  transform: translateY(20px) scale(0.8);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.back-to-top:hover,
.back-to-top:focus {
  background: var(--vermelho-hover);
  transform: translateY(-3px) scale(1.1);
  box-shadow: 0 8px 25px rgba(0,0,0,0.4);
}

.back-to-top:focus {
  outline: 2px solid var(--vermelho-claro);
  outline-offset: 2px;
}

.back-to-top:active {
  transform: translateY(0) scale(0.95);
}

/* === Rodapé === */
.rodape {
  background-color: var(--preto);
  color: var(--branco);
  padding: 3rem 1rem 2rem;
  font-size: 0.95rem;
}

.rodape a {
  color: var(--branco);
  text-decoration: none;
  transition: color 0.2s ease;
}

.rodape a:hover {
  color: var(--vermelho-claro);
  text-decoration: underline;
}

/* footer titles */
.rodape h5 {
  font-weight: 700;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;  /* centraliza ícone + texto */
}


.rodape .col-md-4 {
  text-align: center;
}

/* === Responsividade === */
@media (max-width: 992px) {
  body {
    padding-top: 130px;
  }
  
  .header-logo {
    height: 100px;
  }
  
  .main-nav ul {
    gap: 1rem;
  }
  
  .hero-title {
    font-size: 2rem;
  }
}

@media (max-width: 768px) {
  body {
    padding-top: 120px;
  }
  
  .header-logo {
    height: 90px;
  }
  
  .main-nav ul {
    flex-wrap: wrap;
    gap: 0.8rem;
  }
  
  .main-nav li {
    flex: 0 0 calc(33.333% - 1rem);
    text-align: center;
  }
  
  .hero-title {
    font-size: 1.8rem;
    padding: 1.5rem 0;
  }
  
  .secao {
    padding: 3rem 1rem;
  }
}

@media (max-width: 576px) {
  body {
    padding-top: 110px;
  }
  
  .header-logo {
    height: 80px;
  }
  
  .main-nav ul {
    gap: 0.5rem;
  }
  
  .main-nav li {
    flex: 0 0 calc(50% - 0.5rem);
  }
  
  .main-nav a {
    font-size: 0.9rem;
    padding: 0.4rem 0.5rem;
  }
  
  .hero-title {
    font-size: 1.6rem;
    padding: 1rem 0;
  }
  
  .secao-title {
    font-size: 1.8rem;
    margin-bottom: 2rem;
  }
}

/* Suaviza abertura do modal */
.modal.fade .modal-dialog {
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275),
              opacity 0.2s ease;
  transform: translate(0, 30px) scale(0.9);
  opacity: 0;
}

.modal.show .modal-dialog {
  transform: translate(0, 0) scale(1);
  opacity: 1;
}

.modal-content {
  transform: rotateX(-10deg);
  transition: transform 0.3s ease;
}

.modal.show .modal-content {
  transform: rotateX(0deg);
}
/* Suaviza a rolagem em todo o site */
html {
  scroll-behavior: smooth;
}

/* Melhora a animação do back-to-top */
.back-to-top {
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}