#loader-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100vw;
  height: 100vh;
  background: #181c24ee;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s;
}

/* Social Media Buttons in Header */
.social-buttons {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: 18px;
}
.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  color: #0a3d62;
  box-shadow: 0 2px 8px rgba(75,32,103,0.10), 0 1.5px 8px #f9ca2422;
  transition: background 0.22s, color 0.22s, box-shadow 0.22s, transform 0.18s;
  font-size: 1.2em;
  border: none;
  text-decoration: none;
  position: relative;
}
.social-btn svg {
  width: 22px;
  height: 22px;
  display: block;
}
.social-btn.facebook {
  color: #1877f3;
}
.social-btn.instagram {
  color: #e4405f;
}
.social-btn:hover, .social-btn:focus {
  background: #f9ca24;
  color: #fff;
  box-shadow: 0 4px 16px #f9ca2433, 0 2px 8px #4b206733;
  transform: translateY(-2px) scale(1.08);
  outline: none;
}
.social-btn.facebook:hover {
  background: #1877f3;
  color: #fff;
}
.social-btn.instagram:hover {
  background: #e4405f;
  color: #fff;
}
@media (max-width: 900px) {
  .social-buttons {
    margin-left: 0;
    gap: 10px;
  }
  .social-btn {
    width: 34px;
    height: 34px;
  }
  .social-btn svg {
    width: 18px;
    height: 18px;
  }
}
.loader-spinner {
  border: 8px solid #f3f3f3;
  border-top: 8px solid #f9ca24;
  border-radius: 50%;
  width: 70px;
  height: 70px;
  animation: spin 1.1s linear infinite;
  margin-bottom: 18px;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
.loader-text {
  color: #fffbe7;
  font-size: 1.3em;
  font-weight: 600;
  letter-spacing: 1px;
  text-shadow: 0 2px 8px #0a3d62cc;
}

body {
  font-family: 'Poppins', 'Open Sans', 'Roboto', 'Segoe UI', Arial, sans-serif;
  background: linear-gradient(135deg, #f9ca24 0%, #4b2067 100%) fixed;
  margin: 0;
  padding: 0;
  color: #f5f6fa;
  min-height: 100vh;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  animation: bgMove 18s ease-in-out infinite alternate;
}

@keyframes bgMove {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

.site-bg-overlay {
  display: none;
}
body.dark-mode .site-bg-overlay {
  display: none;
}

body.dark-mode .site-bg-overlay {
  background: rgba(24,28,36,0.7);
}

body.dark-mode {
  background-color: #181c24;
  color: #e6e6e6;
}

.site-header {
  width: 100%;
  background: #0a3d62;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  padding: 0;
  min-height: 100px;
  overflow: visible;
  position: relative;
}
.header-bg {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 1;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  pointer-events: none;
}
.header-bg-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,0.7);
  z-index: 2;
  pointer-events: none;
}
body.dark-mode .header-bg-overlay {
  background: rgba(24,28,36,0.6);
}
.header-content {
  position: relative;
  z-index: 3;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 70px;
}
.logo-title {
  display: flex;
  align-items: center;
  gap: 16px;
}
.usl-logo {
  font-size: 2.1em;
  font-weight: bold;
  background: #f9ca24;
  color: #0a3d62;
  border-radius: 8px;
  padding: 4px 14px;
  letter-spacing: 2px;
}
.usl-title {
  font-size: 1.3em;
  font-weight: 600;
  letter-spacing: 1px;
}
.main-nav {
  display: flex;
  gap: 24px;
  align-items: center;
}
.main-nav a, .main-nav select {
  color: #fffbe7;
  background: transparent;
  border: none;
  font-size: 1.13em;
  font-weight: 600;
  letter-spacing: 0.7px;
  padding: 6px 14px;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(249,202,36,0.08);
  margin: 0;
  transition: color 0.22s, background 0.22s, box-shadow 0.22s;
  cursor: pointer;
  height: 35px;
  min-width: 90px;
  max-width: 160px;
  width: auto;
  display: inline-block;
  vertical-align: middle;
  text-decoration: none;
  flex-shrink: 1;
  box-sizing: border-box;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}
.main-nav a:hover, .main-nav a:focus, .main-nav select:hover, .main-nav select:focus {
  color: #4b2067;
  background: #f9ca24;
  box-shadow: 0 2px 8px #f9ca2433;
  outline: none;
}
.main-nav select {
  background: transparent;
  color: #fffbe7;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 1.13em;
  font-weight: 600;
  letter-spacing: 0.7px;
  margin-left: 0;
  margin-right: 0;
  box-shadow: 0 1px 4px rgba(249,202,36,0.08);
  cursor: pointer;
  min-width: 90px;
  max-width: 160px;
  width: auto;
  height: 35px;
  padding: 6px 14px;
  border-radius: 8px;
  box-sizing: border-box;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}
.main-nav select:hover, .main-nav select:focus {
  background: #f9ca24;
  color: #4b2067;
  box-shadow: 0 2px 8px #f9ca2433;
  outline: none;
}
.main-nav select option {
  color: #fffbe7 !important;
  background: transparent !important;
  font-family: inherit;
  border: none;
  font-size: 0.85em;
  height: 24px;
  padding: 6px 14px;
  box-sizing: border-box;
  border-radius: 8px;
}
.main-nav select option:hover,
.main-nav select option:focus {
  background: #f9ca24 !important;
  color: #4b2067 !important;
}
#header-content-boxes {
  position: absolute;
  left: 0; right: 0; top: 70px;
  z-index: 4;
  display: flex;
  gap: 16px;
  justify-content: flex-end;
  pointer-events: none;
}
#header-content-boxes .caixa {
  pointer-events: auto;
}

.toggle-admin-panel {
  position: fixed;
  top: 18px;
  left: 18px;
  z-index: 400;
  background: #fff;
  color: #0a3d62;
  border: 2px solid #0a3d62;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  font-size: 1.5em;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}
.toggle-admin-panel.collapsed {
  left: 18px;
  background: #f9ca24;
  color: #0a3d62;
}

.admin-sidebar-modern {
  position: fixed;
  top: 0;
  left: 0;
  width: 260px;
  height: 100vh;
  background: #fff;
  border-right: 2px solid #e1e8ed;
  box-shadow: 2px 0 16px rgba(0,0,0,0.07);
  z-index: 300;
  padding: 32px 18px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  transition: all 0.3s ease-in-out;
}
.admin-sidebar-modern.collapsed {
  width: 0;
  min-width: 0;
  padding: 0;
  overflow: hidden;
}
.admin-sidebar-modern h3 {
  margin: 0 0 12px 0;
  font-size: 1.1em;
  color: #0a3d62;
  display: flex;
  align-items: center;
  gap: 8px;
}
.admin-sidebar-modern label {
  font-size: 0.98em;
  margin-bottom: 2px;
  color: #0a3d62;
}
.admin-sidebar-modern input[type="file"] {
  margin-bottom: 10px;
}
.admin-sidebar-modern button {
  margin: 0 0 8px 0;
  padding: 10px 18px;
  font-size: 1em;
  border: none;
  border-radius: 8px;
  background: linear-gradient(90deg, #f9ca24 60%, #4b2067 100%);
  color: #fffbe7;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 8px #4b206733, 0 1px 4px #f9ca2433;
  transition: background 0.22s, color 0.22s, box-shadow 0.22s, transform 0.22s;
  display: flex;
  align-items: center;
  gap: 8px;
}
.admin-sidebar-modern button:hover, .admin-sidebar-modern button:focus {
  background: linear-gradient(90deg, #4b2067 0%, #f9ca24 100%);
  color: #fffbe7;
  box-shadow: 0 4px 16px #f9ca2433, 0 2px 8px #4b206733;
  transform: translateY(-2px) scale(1.03);
  outline: none;
}

.admin-badge {
  background: #f9ca24;
  color: #0a3d62;
  border-radius: 8px;
  padding: 2px 10px;
  font-size: 1em;
  font-weight: bold;
  margin-left: 6px;
}

.main-title-overlay {
  text-align: center;
  margin-top: 36px;
  font-size: 2.7em;
  color: #fffbe7;
  letter-spacing: 1.5px;
  background: rgba(75,32,103,0.18);
  border-radius: 16px;
  padding: 20px 38px;
  box-shadow: 0 4px 32px rgba(75,32,103,0.13), 0 1.5px 8px #f9ca24;
  display: inline-block;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 28px;
  text-shadow: 0 2px 12px #0a3d6240, 0 2px 8px #f9ca2433;
  font-family: 'Poppins', 'Roboto', Arial, sans-serif;
  font-weight: bold;
}

#main-content {
  position: relative;
  min-height: 60vh;
  max-width: 1100px;
  margin: 0 auto 0 auto;
  padding: 24px;
  display: block;
  background: none;
  border: none;
  box-shadow: none;
}

.caixa {
  background: #23272f;
  color: #fffbe7;
  border-radius: 14px;
  box-shadow: 0 2px 16px 0 rgba(75,32,103,0.10), 0 1.5px 8px #f9ca2422;
  border: none;
  padding: 16px 18px 18px 18px;
  min-width: 120px;
  min-height: 60px;
  transition: box-shadow 0.3s, background 0.3s, border 0.3s, transform 0.3s;
  z-index: 10;
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  resize: both;
  overflow: auto;
}
body.dark-mode .caixa {
  background: #23272f;
  color: #fffbe7;
}
body.dark-mode .caixa {
  background: #181c24;
  color: #fff;
  border: 2px solid #f9ca24;
}
.caixa:focus {
  outline: 2.5px solid #f9ca24;
  box-shadow: 0 0 0 4px #f9ca2433;
}
.caixa-texto {
  color: #fffbe7;
  font-size: 1.08em;
  font-family: 'Open Sans', 'Roboto', Arial, sans-serif;
  word-break: break-word;
  background: transparent !important;
  text-shadow: none;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.5;
}
body.dark-mode .caixa-texto {
  color: #fffbe7;
}
.caixa-imagem {
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  box-shadow: 0 2px 12px rgba(75,32,103,0.10), 0 1.5px 8px #f9ca2411;
  border: none;
  border-radius: 14px;
  transition: box-shadow 0.3s, border 0.3s;
}
.caixa-imagem img {
  border-radius: 12px;
  box-shadow: none;
}
.caixa-imagem:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,0.28), 0 2.5px 12px #f9ca24;
  border: 2.5px solid #0a3d62;
}
.img-na-caixa, .caixa-imagem img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  background: #e1e8ed;
  filter: saturate(1.4) contrast(1.08) brightness(1.08) drop-shadow(0 2px 8px #f9ca24aa);
  transition: filter 0.3s;
}
.img-na-caixa:hover, .caixa-imagem img:hover {
  filter: saturate(1.7) contrast(1.15) brightness(1.12) drop-shadow(0 4px 16px #f9ca24cc);
}

/* Handles de redimensionamento */
.caixa.resizable {
  resize: both;
  overflow: auto;
  min-width: 80px;
  min-height: 40px;
  box-sizing: border-box;
}
.caixa .resize-handle {
  position: absolute;
  width: 16px;
  height: 16px;
  background: #f9ca24;
  border: 2px solid #0a3d62;
  border-radius: 50%;
  z-index: 30;
  cursor: nwse-resize;
  right: -10px;
  bottom: -10px;
  display: none;
  box-shadow: 0 2px 8px #0a3d6240;
}
.caixa:hover .resize-handle {
  display: block;
}

.caixa-controls {
  position: absolute;
  bottom: 4px;
  left: 8px;
  display: none;
  gap: 6px;
  z-index: 20;
  transition: all 0.3s;
}
.caixa:hover .caixa-controls {
  display: flex;
}
.caixa-controls button, .caixa-controls input[type="color"] {
  border: none;
  background: #f0f4f8;
  color: #0a3d62;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 1em;
  cursor: pointer;
  margin: 0;
  height: 28px;
  display: flex;
  align-items: center;
  transition: background 0.2s, color 0.2s;
}
.caixa-controls button:hover {
  background: #f9ca24;
  color: #0a3d62;
}

.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: #0a3d62;
  color: #fff;
  padding: 16px 32px;
  border-radius: 8px;
  font-size: 1.1em;
  box-shadow: 0 2px 16px rgba(0,0,0,0.13);
  opacity: 0;
  pointer-events: none;
  z-index: 9999;
  transition: opacity 0.3s;
}
.toast.show {
  opacity: 1;
  pointer-events: auto;
}

.site-footer {
  width: 100%;
  position: fixed;
  left: 0;
  bottom: 0;
  background: #fff;
  border-top: 1px solid #e1e8ed;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.04);
  padding: 16px 0 12px 0;
  display: flex;
  justify-content: center;
  gap: 24px;
  z-index: 300;
}
#adminFooterBadge {
  position: static;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
#adminFooterBadge:hover {
  background: #0a3d62;
  color: #fff;
}
body.dark-mode .site-footer {
  background: #23272f;
  border-top: 1px solid #444;
}

@media (max-width: 900px) {
  .header-content {
    flex-direction: column;
    height: auto;
    gap: 10px;
    padding: 10px 8px;
  }
  .admin-sidebar-modern {
    width: 100vw;
    height: auto;
    position: absolute;
    left: 0;
    top: 0;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 8px;
    z-index: 1000;
    background: rgba(75,32,103,0.95);
    color: #fffbe7;
    box-shadow: 0 2px 16px #4b206733;
  }
  .toggle-admin-panel {
    left: 8px;
    top: 8px;
    width: 38px;
    height: 38px;
    font-size: 1.1em;
  }
  .caixa {
    position: static !important;
    margin-bottom: 18px;
    width: 100% !important;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }
}

@media (max-width: 600px) {
  nav {
    flex-direction: column;
    align-items: flex-start;
  }
  nav a {
    margin: 0 8px;
    font-size: 1em;
  }
  h1 {
    font-size: 1.5em;
  }
  .main-title-overlay {
    font-size: 1.1em;
    padding: 8px 6px;
    border-radius: 10px;
  }
  .admin-sidebar-modern {
    width: 100vw;
    padding: 8px 2vw;
    flex-direction: column;
    gap: 6px;
    background: rgba(75,32,103,0.98);
    color: #fffbe7;
  }
  .site-footer {
    padding: 8px 0 6px 0;
    gap: 10px;
  }
  #adminFooterBadge {
    position: fixed;
    right: 10px;
    bottom: 10px;
    z-index: 1000;
    background: #f9ca24;
    color: #4b2067;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 1.1em;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
  }
  .caixa {
    position: static !important;
    margin-bottom: 14px;
    width: 100% !important;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    padding: 12px 8px 24px 8px;
  }
}

/* --- CSS ESPECÍFICO PARA O DROPDOWN AO LADO DE LOCALIZAÇÃO --- */
nav.main-nav > a.nav-link-box[href='/localizacao'] + select#eventoDropdown.nav-link-box {
  height: 35px;
  min-width: 110px;
  max-width: 140px;
  font-size: 1em;
  border-radius: 8px;
  padding: 0 14px;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: #fff url('data:image/svg+xml;utf8,<svg fill="#333" height="16" viewBox="0 0 24 24" width="16" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>') no-repeat right 8px center/16px 16px;
  border: 1px solid #ccc;
  color: #222;
  cursor: pointer;
  padding-right: 32px;
  margin-left: 0;
}
