/* 
Estilo para a página Sobre a Escola
Extraído de template-sobre-a-escola.php para organização
*/

/* 
cores padrões da escola
essas cores estão definidas no arquivo header.php
--azul: #27348B
--amarelo: #FEA800
--vermelho: #BE1D2C 

--azul-escuro: #0A1455;
--escuro: #333333;
*/

h3,
h4,
h5 {
  color: var(--azul);
  margin-top: 0;
  /* line-height: 131%; */
}

.botao-nav-prog-bra {
  margin-top: 8px;
  margin-right: 12px;
  font-size: 1rem;
  background-color: gainsboro;
  color: var(--escuro);
  border-color: gainsboro;
  font-weight: bold;
}

.botao-nav-prog-bra:hover {
  background-color: var(--azul);
  border-color: var(--azul);
}

.btn-primary:not(:disabled):not(.disabled).active,
.btn-primary:not(:disabled):not(.disabled):active,
.show > .btn-primary.dropdown-toggle {
  color: whitesmoke;
  background-color: #182470;
  border-color: black;
}

.botao-alem-sala {
  background-color: var(--amarelo);
  border-color: black;
  color: black;
}

.botao-alem-sala:hover {
  background-color: var(--azul);
  border-color: black;
  color: whitesmoke;
}

.card-img-top {
  max-height: 130px;
}

.div-item-alem-sala:hover {
  cursor: pointer;

  /* animation: rubberBand; */
  animation: pulse;
  /* referring directly to the animation's @keyframe declaration */
  animation-duration: 1s;
  /* don't forget to set a duration! */
}

.carousel-caption {
  background: rgba(0, 0, 0, 0.5);
}

.carousel-caption h5,
.carousel-caption p {
  color: whitesmoke;
}

.img-ppp {
  max-width: 430px;
  height: auto;
}

/* Estilos para a seção Regimento Escolar */
.rules-first-line {
  margin-bottom: 20px;
}

.rules-first-line .row {
  margin-bottom: 15px;
}

.rules-first-line h5 {
  margin-bottom: 10px;
  font-weight: bold;
}

.rules-first-line img {
  max-width: 50px;
  height: auto;
}

.rules-first-line .btn {
  margin-top: 5px;
}

/* Estilos para a Galeria de Estrutura Melhorada */
.estrutura-gallery {
  padding: 20px 0;
}

.category-tabs {
  margin-bottom: 30px;
  border-bottom: 1px solid #dee2e6;
}

.category-tabs .nav-link {
  color: var(--azul);
  border: none;
  border-bottom: 3px solid transparent;
  font-weight: 500;
  padding: 12px 20px;
  margin: 0 5px;
  transition: all 0.3s ease;
}

.category-tabs .nav-link:hover {
  background-color: rgba(39, 52, 139, 0.1);
  color: var(--azul);
}

.category-tabs .nav-link.active {
  background-color: transparent;
  border-bottom-color: var(--amarelo);
  color: var(--azul);
  font-weight: 600;
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  padding: 20px 0;
}

.image-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
}

.image-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.image-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.image-card:hover img {
  transform: scale(1.05);
}

.image-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  color: white;
  padding: 20px 15px 15px;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.image-card:hover .image-overlay {
  transform: translateY(0);
}

.image-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  line-height: 1.3;
  color: #f0f0f0;
}

.loading-spinner {
  text-align: center;
  padding: 40px;
  color: var(--azul);
}

.spinner-border {
  color: var(--amarelo);
}

/* Modal para visualização em tela cheia */
.image-modal .modal-dialog {
  max-width: 90vw;
  max-height: 90vh;
}

.image-modal .modal-content {
  background: #000;
  border: none;
  border-radius: 8px;
  position: relative;
}

.image-modal .modal-body {
  padding: 0;
  text-align: center;
  position: relative;
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-modal #modalImage {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  width: auto;
  height: auto;
}

.image-modal .modal-header {
  background: rgba(0, 0, 0, 0.9);
  color: white;
  border-bottom: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1051;
  border-radius: 8px 8px 0 0;
}

.image-modal .modal-title {
  font-size: 18px;
  font-weight: 500;
  color: whitesmoke;
}

.image-modal .close {
  color: white;
  text-shadow: none;
  opacity: 0.8;
  font-size: 28px;
}

.image-modal .close:hover {
  opacity: 1;
  color: white;
}

/* Navegação do modal */
.modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.6);
  border: none;
  color: white;
  padding: 15px 20px;
  font-size: 32px;
  cursor: pointer;
  transition: background 0.3s ease;
  z-index: 9999;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  pointer-events: auto;
}

.modal-nav:hover {
  background: rgba(0, 0, 0, 0.8);
  color: white;
  transform: translateY(-50%) scale(1.1);
}

.modal-nav:focus {
  outline: 2px solid var(--amarelo);
  outline-offset: 2px;
  color: white;
}

.modal-nav.prev {
  left: 20px;
}

.modal-nav.next {
  right: 20px;
}

/* Contador de imagens */
.image-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  z-index: 1052;
}

/* Responsividade */
@media (max-width: 768px) {
  .image-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
  }

  .category-tabs .nav-link {
    padding: 10px 15px;
    font-size: 14px;
  }

  .modal-nav {
    padding: 10px 15px;
    font-size: 28px;
    width: 50px;
    height: 50px;
  }

  .modal-nav.prev {
    left: 10px;
  }

  .modal-nav.next {
    right: 10px;
  }
}

@media (max-width: 576px) {
  .image-grid {
    grid-template-columns: 1fr;
  }

  .category-tabs {
    overflow-x: auto;
    white-space: nowrap;
  }

  .category-tabs .nav {
    flex-wrap: nowrap;
  }

  .modal-nav {
    width: 40px;
    height: 40px;
    font-size: 24px;
  }
}

/* Lazy loading placeholder */
.image-placeholder {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}
