/* Reset básico e box-sizing */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --verde-principal: #008000;
  --ouro-destaque: #ffD700;
  --azul-complementar: #003366;
  --fundo-pagina: #f5f5f5;
  --fundo-secao: #fafafa;
  --texto-principal: #333333;
  --texto-secundario: #555555;
  --sombra-leve: 0 2px 4px rgba(0, 0, 0, 0.1);
  --sombra-media: 0 4px 8px rgba(0, 0, 0, 0.15);
}

body {
  font-family: "Montserrat", sans-serif;
  background-color: var(--fundo-pagina);
  color: var(--texto-principal);
  line-height: 1.6;
}

/* Estilos gerais para o container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Estilos para o cabeçalho principal */
.main-header {
  background-color: var(--verde-principal);
  color: white;
  padding: 20px 0;
  box-shadow: var(--sombra-media);
}

.main-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  margin-bottom: 0;
}

/* Navegação principal */
.main-nav ul {
  list-style: none;
  display: flex;
}

.main-nav ul li {
  margin-left: 20px;
}

.main-nav ul li:first-child {
  margin-left: 0;
}

.main-nav a {
  color: white;
  text-decoration: none;
  padding: 10px;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

.main-nav a:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

/* Seção Hero */
.hero {
  background-image: url("./assets/hero/campo-futebol-torcida-1.jpg");
  background-size: cover;
  background-position: center;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-align: center;
  padding: 20px;
}

.hero-content {
  max-width: 80%;
  padding: 20px;
  background-color: rgba(0, 0, 0, 0.4);
  border-radius: 10px;
}

.hero h1 {
  font-size: 2rem;
  margin-bottom: 10px;
  color: var(--ouro-destaque);
}

.hero p {
  font-size: 1.1rem;
}

/* Estilos gerais para as seções de conteúdo */
.section {
  padding: 40px 0;
}

.section h2 {
  font-size: 1.8rem;
  color: var(--azul-complementar);
  margin-bottom: 20px;
  text-align: center;
}

/* Rodapé */
.main-footer {
  background-color: var(--azul-complementar);
  color: white;
  text-align: center;
  padding: 20px 0;
  font-size: 0.9rem;
}

/* Estilos para a seção de históricos */
#historicos {
  background-color: var(--fundo-secao);
}

.intro-text {
  color: var(--texto-secundario);
  line-height: 1.7;
  margin-bottom: 25px;
  text-align: justify;
}

.video-container {
  margin-bottom: 30px;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--sombra-leve);
}

.video-container iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
}

.video-description {
  background-color: white;
  color: var(--texto-principal);
  padding: 15px;
  font-size: 0.9rem;
  text-align: center;
}

.video-description strong {
  font-weight: bold;
  color: var(--verde-principal);
}

/* Estilos para o slideshow */
.slideshow-container {
  max-width: 800px;
  position: relative;
  margin: auto;
  border-radius: 8px;
  box-shadow: var(--sombra-media);
  overflow: hidden;
}

.slideshow-item {
  display: none;
}

.slideshow-item img {
  width: 100%;
  display: block;
}

.caption {
  color: var(--texto-principal);
  font-size: 0.9rem;
  padding: 15px;
  text-align: center;
  position: absolute;
  bottom: 0;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.85);
}

/* Botões de Próximo e Anterior */
.prev,
.next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  width: auto;
  padding: 16px;
  margin-top: -22px;
  color: white;
  font-weight: bold;
  font-size: 1.5rem;
  transition: background-color 0.6s ease;
  user-select: none;
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 0 4px 4px 0;
}

.next {
  right: 0;
  border-radius: 4px 0 0 4px;
}

.prev:hover,
.next:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

/* Indicadores (bolinhas) */
.slideshow-dots-container {
  text-align: center;
  margin-top: 20px;
}

.slideshow-dot {
  cursor: pointer;
  height: 15px;
  width: 15px;
  margin: 0 5px;
  background-color: #bbb;
  border-radius: 50%;
  display: inline-block;
  transition: background-color 0.6s ease, transform 0.3s ease;
}

.slideshow-dot.active,
.slideshow-dot:hover {
  background-color: var(--azul-complementar);
  transform: scale(1.1);
}

/* Estilos para a Seção "Pelada com Amigos" */
#pelada-amigos {
  background-color: var(--fundo-pagina);
}

#pelada-amigos h2 {
  color: var(--verde-principal);
}

.pelada-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px; /* Espaçamento entre os cards */
  margin-top: 30px;
}

.pelada-card {
  background-color: var(--fundo-secao);
  border-radius: 10px;
  overflow: hidden; /* Garante que a borda arredondada se aplique à imagem */
  box-shadow: var(--sombra-leve);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column; /* Organiza a imagem e o texto em coluna */
}

.pelada-card:hover {
  transform: translateY(-5px); /* Efeito de "elevação" no hover */
  box-shadow: var(--sombra-media);
}

.card-media img,
.card-media iframe {
  width: 100%;
  display: block;
}

.card-body {
  padding: 20px;
  flex-grow: 1; /* Permite que o corpo do card se expanda para ocupar o espaço disponível */
}

.card-title {
  font-size: 1.2rem;
  color: var(--azul-complementar);
  margin-bottom: 10px;
}

.card-text {
  font-size: 0.95rem;
  color: var(--texto-secundario);
}

.video-card-media {
  padding-bottom: 56.25%; /* Proporção de 16:9 para vídeos */
  position: relative;
  height: 0;
}

.video-card-media iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Animação de Fade */
.fade {
  animation-name: fade;
  animation-duration: 1.5s;
}

@keyframes fade {
  from {
    opacity: 0.4;
  }
  to {
    opacity: 1;
  }
}

/* Responsividade (Mobile First) */
@media (max-width: 600px) {
  .prev,
  .next {
    font-size: 1rem;
    padding: 10px;
  }
  .caption {
    font-size: 0.8rem;
    padding: 10px;
  }
  .main-nav ul {
    flex-direction: column;
    align-items: flex-start;
  }
  .main-nav ul li {
    margin: 5px 0;
  }
  .main-header .container {
    flex-direction: column;
  }
  .logo {
    margin-bottom: 10px;
  }
  .intro-text {
    text-align: left;
  }
}

@media (min-width: 600px) {
  .hero {
    height: 500px;
  }
  .hero h1 {
    font-size: 3rem;
  }
  .hero p {
    font-size: 1.3rem;
  }
  .section h2 {
    font-size: 2.2rem;
  }
}

@media (min-width: 992px) {
  .logo {
    font-size: 2rem;
  }
  .main-nav ul li {
    margin-left: 30px;
  }
  .main-nav a {
    padding: 15px;
  }
}

/* Adicionado: Estilos para o Modal */
.modal {
  display: none; /* Oculto por padrão */
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  justify-content: center;
  align-items: center;
}

.modal.active {
  display: flex;
}

.modal-overlay {
  position: fixed;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
}

.modal-content {
  background-color: #ffffff;
  padding: 30px;
  border-radius: 10px;
  box-shadow: var(--sombra-media);
  width: 90%;
  max-width: 800px;
  position: relative;
  z-index: 1001; /* Fica acima do overlay */
  transform: scale(0.9);
  opacity: 0;
  animation: modal-entrada 0.3s forwards ease-out;
}

.modal-active .modal-content {
  transform: scale(1);
  opacity: 1;
}

@keyframes modal-entrada {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 20px;
  color: #aaa;
  font-size: 2rem;
  font-weight: bold;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.3s ease;
}

.modal-close:hover {
  color: var(--verde-principal);
}

#modal-title {
  color: var(--azul-complementar);
  font-size: 1.8rem;
  margin-bottom: 10px;
}

#modal-relato {
  color: var(--texto-secundario);
  line-height: 1.6;
  margin-bottom: 20px;
}

/* Estilos para o Carrossel dentro do Modal */
.modal-slideshow-container {
  position: relative;
  max-width: 100%;
  margin: auto;
}

.modal-slideshow-item {
  display: none;
}

.modal-slideshow-item img {
  width: 100%;
  border-radius: 8px;
  box-shadow: var(--sombra-leve);
}

.modal-slideshow-nav {
  position: absolute;
  top: 50%;
  width: 100%;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
  z-index: 1;
}

.modal-prev,
.modal-next {
  cursor: pointer;
  width: auto;
  padding: 16px;
  color: white;
  font-weight: bold;
  font-size: 1.5rem;
  transition: background-color 0.6s ease;
  user-select: none;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-prev {
  border-radius: 0 3px 3px 0;
}

.modal-next {
  border-radius: 3px 0 0 3px;
}

.modal-prev:hover,
.modal-next:hover {
  background-color: rgba(0, 0, 0, 0.8);
}