/* ===========================
   CABEÇALHO INSTITUCIONAL APMP
   =========================== */

/* ======= CONTAINER GERAL ======= */
.header,
.navbar {
  position: sticky;          /* fixo no topo */
  top: 0;
  z-index: 999;
  width: 100%;
  background: #fff;
  border-bottom: 2px solid #b4181a;
  padding: 12px 0;
  font-family: "Inter", sans-serif;
  transition: all 0.3s ease;
}

/* ======= LOGO ======= */
.header .logo a img,
.navbar .logo a img {
  max-height: 55px;
  width: auto;
  display: block;
  transition: transform 0.3s ease;
}

.header .logo a:hover img,
.navbar .logo a:hover img {
  transform: scale(1.05);
}

/* ======= MENU DESKTOP ======= */
.navbar .menu {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.navbar .menu ul {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.navbar .menu li {
  list-style: none;
}

.navbar .menu li a {
  color: #444;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: color 0.3s ease, border-color 0.3s ease;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}

.navbar .menu li a:hover,
.navbar .menu li.current-menu-item a {
  color: #b4181a;
  border-color: #b4181a;
}

/* ======= BUSCA ======= */
.navbar .search form {
  display: flex;
  align-items: center;
  background: #f4f4f4;
  border-radius: 6px;
  overflow: hidden;
}

.navbar .search form input {
  border: none;
  background: transparent;
  padding: 8px 12px;
  font-size: 14px;
  width: 200px;
}

.navbar .search form input:focus {
  outline: none;
}

.navbar .search form button {
  background: #b4181a;
  border: none;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.navbar .search form button img {
  width: 18px;
  height: 18px;
  filter: brightness(0) invert(1);
}

/* ======= BOTÕES (Área do associado, Sair etc.) ======= */
.navbar .button {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #b4181a;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  border-radius: 4px;
  padding: 8px 18px;
  text-decoration: none;
  transition: background 0.3s ease;
}

.navbar .button img {
  width: 18px;
  height: 18px;
}

.navbar .button:hover {
  background: #8d1e13;
}

/* ======= REDES SOCIAIS ======= */
.navbar .social-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

.navbar .social-links img {
  width: 20px;
  height: 20px;
  transition: opacity 0.3s ease;
}

.navbar .social-links img:hover {
  opacity: 0.7;
}

/* ======= MENU MOBILE ======= */
.search-menu-mobile {
  display: none;
}

/* ÍCONES DO MENU MOBILE */
.search-menu-mobile .btns-menu {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.search-menu-mobile .btns-menu img {
  width: 28px;
  height: 28px;
}

/* NAV MOBILE */
.search-menu-mobile .menu {
  display: none;
  position: absolute;
  top: 70px;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid #eee;
  padding: 20px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.search-menu-mobile.active .menu {
  display: block;
  animation: fadeIn 0.3s ease;
}

/* ITENS DO MENU MOBILE */
.search-menu-mobile .menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.search-menu-mobile .menu li a {
  color: #444;
  font-weight: 600;
  text-decoration: none;
  font-size: 16px;
  transition: color 0.3s ease;
}

.search-menu-mobile .menu li a:hover {
  color: #b4181a;
}

/* BUSCA NO MOBILE */
.search-menu-mobile .menu .search form {
  display: flex;
  background: #f4f4f4;
  border-radius: 6px;
  margin-bottom: 16px;
}

.search-menu-mobile .menu .search input {
  border: none;
  background: transparent;
  padding: 8px 12px;
  font-size: 14px;
  flex: 1;
}

.search-menu-mobile .menu .search button {
  background: #b4181a;
  border: none;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-menu-mobile .menu .search button img {
  width: 18px;
  height: 18px;
  filter: brightness(0) invert(1);
}

/* BOTÕES NO MENU MOBILE */
.search-menu-mobile .menu .button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #b4181a;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  border-radius: 4px;
  padding: 10px 0;
  text-decoration: none;
  margin-bottom: 10px;
  transition: background 0.3s ease;
}

.search-menu-mobile .menu .button:hover {
  background: #8d1e13;
}

/* REDES SOCIAIS NO MENU MOBILE */
.search-menu-mobile .menu .social-links {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
}

.search-menu-mobile .menu .social-links img {
  width: 22px;
  height: 22px;
  transition: opacity 0.3s ease;
}

.search-menu-mobile .menu .social-links img:hover {
  opacity: 0.7;
}

/* ======= RESPONSIVO ======= */
@media (max-width: 991px) {
  .navbar .menu,
  .navbar .search-menu-desktop {
    display: none; /* esconde o menu desktop */
  }

  .search-menu-mobile {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    position: relative;
    gap: 10px;
  }

  .navbar .logo {
    flex: 1;
  }
}

/* ======= ANIMAÇÃO ======= */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}


/* ===== SUBMENUS MODERNOS (versão com sombra) ===== */
.navbar .menu ul ul {
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border-radius: 10px;
  padding: 10px 0;
  margin: 0;
  min-width: 220px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.25s ease-in-out;
  z-index: 999;
}

.navbar .menu li:hover > ul {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.navbar .menu ul ul li a {
  display: block;
  color: #444;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 18px;
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: all 0.25s ease;
}

.navbar .menu ul ul li a:hover {
  background: #f8f8f8;
  border-left-color: #b4181a;
  color: #b4181a;
}

.navbar .menu ul ul ul {
  left: 100%;
  top: 0;
  margin-left: 4px;
}

@media (max-width: 991px) {
  .navbar .menu ul ul {
    position: static;
    box-shadow: none;
    border-radius: 0;
    transform: none;
    opacity: 1;
    visibility: visible;
    background: none;
    padding: 0;
  }

  .navbar .menu ul ul li a {
    padding: 8px 16px;
    border-left: none;
    font-size: 15px;
  }
}

/* ===== Banner inicial ===== */
.sedes-hero {
  background: linear-gradient(135deg, #b4181a, #8d1e13);
  color: #fff;
  text-align: center;
  padding: 60px 20px;
}
.sedes-hero h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
}
.sedes-hero p {
  font-size: 1.2rem;
  opacity: 0.9;
}

/* ===== Bloco de avisos ===== */
.avisos {
  background: #f9f9f9;
  border-left: 4px solid #b4181a;
  padding: 24px;
  border-radius: 8px;
  margin: 40px 0;
}
.avisos h2 {
  color: #b4181a;
  font-size: 1.4rem;
  margin-bottom: 12px;
}
.avisos ul {
  margin: 0;
  padding-left: 20px;
}
.avisos li {
  margin-bottom: 8px;
}
.avisos a {
  color: #000;
  font-weight: 700;
  text-decoration: none;
  transition: color 0.2s ease;
}
.avisos a:hover {
  color: #b4181a;
  text-decoration: underline;
}

/* ===== Cards de sedes ===== */
.sedes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin: 50px 0;
}
.sede-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
  padding: 25px;
  transition: transform 0.25s ease;
}
.sede-card:hover {
  transform: translateY(-5px);
}
.sede-card h2 {
  color: #b4181a;
  margin-bottom: 15px;
  font-size: 1.3rem;
}
.sede-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.sede-card ul li {
  margin-bottom: 8px;
}
.sede-card ul li a {
  color: #000;
  font-weight: 700;
  text-decoration: none;
  transition: color 0.2s ease;
}
.sede-card ul li a:hover {
  color: #b4181a;
  text-decoration: underline;
}

/* ===== Responsivo ===== */
@media (max-width: 768px) {
  .sedes-hero {
    padding: 40px 10px;
  }
  .sede-card {
    padding: 20px;
  }
}
