/* ============================================================
   SEGREDO LUSITANO — Stylesheet Principal
   ============================================================ */

:root {
  --verde-escuro:  #1a3a2a;
  --verde:         #2d6a4f;
  --verde-claro:   #40916c;
  --verde-brilho:  #74c69d;
  --dourado:       #c9a84c;
  --dourado-claro: #e6c97a;
  --creme:         #f5efe6;
  --creme-escuro:  #ede4d5;
  --marrom:        #6b4226;
  --texto:         #1e1e1e;
  --texto-muted:   #6b7280;
  --branco:        #ffffff;
  --sombra-sm:     0 2px 8px rgba(0,0,0,.08);
  --sombra-md:     0 8px 24px rgba(0,0,0,.12);
  --sombra-lg:     0 20px 60px rgba(0,0,0,.18);
  --radius:        0;
  --radius-lg:     0;
  --nav-h:         80px;
  --transition:    .25s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Outfit', sans-serif;
  background: var(--creme);
  color: var(--texto);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
h1,h2,h3,h4,h5 { font-family: 'Playfair Display', serif; line-height: 1.2; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input,textarea,select {
  font-family: inherit; font-size: 1rem; outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
main { flex: 1; }

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--creme-escuro); }
::-webkit-scrollbar-thumb { background: var(--verde); border-radius: 4px; }

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: fixed !important; top: 0 !important; left: 0 !important; right: 0 !important;
  height: var(--nav-h);
  background: rgba(26,58,42,.97);
  backdrop-filter: blur(12px);
  z-index: 1000;
  border-bottom: 2px solid var(--dourado); /*grussura da linha da borda (de cor dourada que separa a linha verde do header)*/
  transition: box-shadow var(--transition);
  overflow: visible;
}
.navbar.scrolled { box-shadow: var(--sombra-lg); }

.nav-inner {
  width: 100%; height: 100%;
  padding: 0 20px;
  display: flex; align-items: center; gap: 2rem;
}

.nav-logo { display: flex; align-items: center; flex-shrink: 0; text-decoration: none; }
.nav-logo-img {
  height: 42px !important; width: 42px !important;
  max-height: 42px !important; max-width: 42px !important;
  min-height: unset !important; min-width: unset !important;
  object-fit: contain; display: block; flex-shrink: 0;
  filter: drop-shadow(0 0 5px rgba(201,168,76,.4));
  transition: filter var(--transition), transform var(--transition);
}
.nav-logo:hover .nav-logo-img {
  filter: drop-shadow(0 0 12px rgba(201,168,76,.75));
  transform: rotate(12deg);
}

/* Nav links — desktop */
.nav-links {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: .25rem;
  margin-left: auto;
}
.nav-links a {
  color: var(--creme);
  padding: .45rem .85rem;
  border-radius: 0;
  font-size: .9rem; font-weight: 400;
  display: flex; align-items: center; gap: .4rem;
  transition: background var(--transition), color var(--transition);
}
.nav-links a:hover,
.nav-links a.active { background: rgba(201,168,76,.15); color: var(--dourado); }

.btn-nav-login { border: 1px solid rgba(201,168,76,.5) !important; color: var(--dourado-claro) !important; }
.btn-nav-register { background: var(--dourado) !important; color: var(--verde-escuro) !important; font-weight: 600 !important; border-radius: var(--radius) !important; }
.btn-nav-register:hover { background: var(--dourado-claro) !important; }

.nav-profile-link {
  display: flex; align-items: center; gap: .5rem;
  color: var(--creme); padding: .45rem .85rem;
  border-radius: var(--radius); font-size: .9rem; font-weight: 400;
  transition: background var(--transition), color var(--transition);
  text-decoration: none;
}
.nav-profile-link:hover { background: rgba(201,168,76,.15); color: var(--dourado); }

.btn-nav-sair {
  display: flex; align-items: center; gap: .4rem;
  color: var(--creme); padding: .45rem .85rem;
  border-radius: var(--radius); font-size: .9rem; font-weight: 400;
  border: 1px solid rgba(201,168,76,.3);
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.btn-nav-sair:hover { background: rgba(201,168,76,.15); color: var(--dourado); border-color: var(--dourado); }

.nav-dropdown { position: relative; }
.nav-avatar-btn {
  display: flex; align-items: center; gap: .5rem;
  background: none; border: none; cursor: pointer;
  color: var(--creme); padding: .45rem .85rem;
  border-radius: 0; font-size: .9rem; font-weight: 400;
  font-family: inherit;
  transition: background var(--transition), color var(--transition);
}
.nav-avatar-btn:hover { background: rgba(201,168,76,.15); color: var(--dourado); }

.dropdown-menu {
  position: absolute; top: calc(100% + 4px); right: 0;
  background: var(--verde-escuro); border: 1px solid var(--dourado);
  border-radius: 0; min-width: 210px; padding: .5rem;
  z-index: 9999; display: none;
}
.dropdown-menu.open { display: block; }
.dropdown-menu li a {
  display: flex; align-items: center; gap: .5rem;
  padding: .5rem .75rem; border-radius: 0; color: var(--creme); font-size: .9rem;
}
.dropdown-menu li a:hover { background: rgba(201,168,76,.15); color: var(--dourado); }

.nav-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; object-position: center; border: 2px solid var(--dourado); }
.nav-avatar-placeholder {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--dourado); color: var(--verde-escuro);
  font-weight: 700; font-size: .85rem;
  display: flex; align-items: center; justify-content: center;
}
#dropdown-chevron { transition: transform var(--transition); font-size: .75rem; }
#dropdown-chevron.rotated { transform: rotate(180deg); }

/* Hamburger — escondido no desktop */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: .4rem;
  margin-left: auto;
  cursor: pointer;
  background: none;
  border: none;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}
.hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--creme); border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Flash */
.flash {
  position: fixed; top: calc(var(--nav-h) + 12px); right: 1rem;
  padding: .75rem 1.25rem; border-radius: var(--radius);
  font-size: .9rem; font-weight: 600;
  display: flex; align-items: center; gap: .5rem;
  z-index: 2000; animation: slideIn .3s ease; box-shadow: var(--sombra-md);
}
.flash-success { background: var(--verde-claro); color: #fff; }
.flash-error   { background: #c0392b; color: #fff; }
@keyframes slideIn {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ============================================================
   HERO
   ============================================================ */
.hero-logo-wrap { margin-bottom: 1.5rem; animation: fadeUp .5s ease both; }
.hero-logo-img { height: 160px; width: auto; max-width: 420px; object-fit: contain; margin: 0 auto; display: block; filter: drop-shadow(0 0 30px rgba(201,168,76,.5)); }

.hero {
  height: 100vh; min-height: 600px; max-height: 100vh;
  background-color: #0f2316;
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: var(--nav-h) 1.5rem 4rem;
  position: relative; overflow: hidden;
}
.hero-content { position: relative; z-index: 1; max-width: 760px; }
.hero h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); color: var(--creme); margin-bottom: 1.25rem; animation: fadeUp .6s .1s ease both; }
.hero h1 em { color: var(--dourado); font-style: italic; }
.hero p { font-size: clamp(1rem, 2vw, 1.2rem); color: rgba(245,239,230,.85); max-width: 560px; margin: 0 auto 2rem; animation: fadeUp .6s .2s ease both; }
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; animation: fadeUp .6s .3s ease both; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes bounce { 0%, 100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(8px); } }

/* ============================================================
   BOTÕES
   ============================================================ */
.btn { display: inline-flex; align-items: center; gap: .5rem; padding: .75rem 1.75rem; border-radius: var(--radius); font-size: .95rem; font-weight: 600;}
.btn-primary { background: var(--dourado); color: var(--verde-escuro); }
.btn-primary:hover { background: var(--dourado-claro); }
.btn-outline { border: 2px solid rgba(245,239,230,.5); color: var(--creme); }
.btn-outline:hover { border-color: var(--dourado); color: var(--dourado); }
.btn-verde { background: var(--verde); color: #fff; }
.btn-verde:hover { background: var(--verde-escuro); }
.btn-danger { background: #c0392b; color: #fff; }
.btn-danger:hover { background: #922b21; }
.btn-sm { padding: .45rem 1rem; font-size: .85rem; }

/* ============================================================
   SECÇÕES
   ============================================================ */
.section { padding: 2rem 1.5rem; background: var(--creme); }
.section-dark { background: var(--creme-escuro); }
.section-alt  { background: rgba(245,239,230,.95); }
.container { max-width: 1200px; margin: 0 auto; }
.container-lg { max-width: 1400px; margin: 0 auto; }
.section-header { text-align: center; margin-bottom: 3rem; }
.section-header .label { font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--verde); margin-bottom: .75rem; display: block; }
.section-header h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); margin-bottom: .75rem; color: var(--verde-escuro); }
.section-header p { color: var(--texto-muted); max-width: 520px; margin: 0 auto; }

/* ============================================================
   CARDS
   ============================================================ */
.cards-grid { display: flex; flex-wrap: wrap; row-gap: 1.75rem; }
.card { flex: 0 0 calc(25% - 0.875rem); margin-right: 0.875rem; min-width: 0; background: var(--branco); border-radius: var(--radius-lg); overflow: hidden; transition: transform var(--transition); display: flex; flex-direction: column; }
.card:hover { transform: translateY(-4px); }
.card-img { position: relative; height: 175px; overflow: hidden; background: var(--creme-escuro); }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card-img-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 3rem; color: var(--verde-claro); background: linear-gradient(135deg, var(--creme-escuro), #d4e8d8); }
.card-badges { position: absolute; top: .75rem; left: .75rem; display: flex; gap: .4rem; flex-wrap: wrap; }
.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .25rem .65rem; border-radius: 0; font-size: .75rem; font-weight: 600; }
.badge-cat        { background: rgba(26,58,42,.85); color: var(--dourado); }
.badge-dif-facil  { background: #27ae60; color: #fff; }
.badge-dif-medio  { background: #f39c12; color: #fff; }
.badge-dif-dificil{ background: #c0392b; color: #fff; }
.badge-pendente   { background: #e67e22; color: #fff; }
.badge-aprovado   { background: #27ae60; color: #fff; }
.badge-rejeitado  { background: #c0392b; color: #fff; }
.card-body { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; }
.card-region { font-size: .78rem; color: var(--texto-muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: .35rem; }
.card-title { font-family: 'Playfair Display', serif; font-size: 1.2rem; font-weight: 700; margin-bottom: .6rem; color: var(--texto); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 100%; overflow-wrap: break-word; word-break: normal; hyphens: auto; }
.card-title a { display: block; white-space: normal; overflow-wrap: break-word; word-break: normal; }
.card-desc { font-size: .88rem; color: var(--texto-muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; flex: 1; margin-bottom: 1rem; max-width: 100%; white-space: normal; overflow-wrap: break-word; word-break: normal; hyphens: auto; }
.card-meta { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--creme-escuro); padding-top: .75rem; margin-top: auto; font-size: .82rem; color: var(--texto-muted); }
.card-meta-stats { display: flex; gap: .75rem; }
.card-meta-stats span { display: flex; align-items: center; gap: .3rem; }
.card-meta-stats .fa-heart { color: #e74c3c; }
.card-meta-stats .fa-comment { color: var(--verde-claro); }

/* ============================================================
   FILTROS
   ============================================================ */
.filtros-bar { background: transparent; padding: 1.25rem 0; margin-bottom: 2rem; border-bottom: 2px solid var(--dourado); }
.filtros-form { display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-end; }
.filtro-group { display: flex; flex-direction: column; gap: .35rem; flex: 1; min-width: 160px; }
.filtro-group label { font-size: .8rem; font-weight: 600; color: var(--texto-muted); text-transform: uppercase; letter-spacing: .05em; }
.filtro-group select, .filtro-group input { padding: .6rem .9rem; border: 1.5px solid var(--creme-escuro); border-radius: var(--radius); background: var(--branco); color: var(--texto); font-size: .9rem; }
.filtro-group select:focus, .filtro-group input:focus { border-color: var(--verde-claro); box-shadow: 0 0 0 3px rgba(64,145,108,.15); }
.filtros-form .btn { align-self: flex-end; }
.filtros-grid { display: flex; flex-wrap: nowrap; gap: .75rem; flex: 4; min-width: 0; align-items: flex-end; }
.filtros-actions { display: flex; gap: .75rem; align-self: flex-end; }
.filtros-actions .btn { padding-top: .6rem; padding-bottom: .6rem; font-size: .9rem; }

/* ============================================================
   PAGINAÇÃO
   ============================================================ */
.pagination { display: flex; gap: .5rem; justify-content: center; margin-top: 2.5rem; flex-wrap: wrap; }
.pagination a, .pagination span { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: var(--radius); font-size: .9rem; font-weight: 600; border: 1.5px solid var(--creme-escuro); color: var(--texto-muted); transition: all var(--transition); }
.pagination a:hover { border-color: var(--verde); color: var(--verde); }
.pagination .current { background: var(--verde); color: #fff; border-color: var(--verde); }

/* ============================================================
   MAPA
   ============================================================ */
#map { width: 100%; height: 80vh; min-height: 500px; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--sombra-md); }
.leaflet-popup-content-wrapper { border-radius: var(--radius); box-shadow: var(--sombra-md); border: 2px solid var(--dourado); }

/* ============================================================
   DETALHE DO LOCAL
   ============================================================ */
.detalhe-hero { height: 420px; background: var(--verde-escuro); position: relative; overflow: hidden; display: flex; align-items: flex-end; }
.detalhe-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.detalhe-hero-content { position: relative; z-index: 1; padding: 2.5rem; max-width: 1200px; margin: 0 auto; width: 100%; }
.detalhe-hero-content h1 { color: var(--creme); font-size: clamp(1.8rem, 4vw, 3rem); }
.detalhe-grid { display: grid; grid-template-columns: 1fr 340px; grid-template-areas: "top sidebar" "mapa sidebar" "comments sidebar"; gap: 2rem; align-items: start; }
.detalhe-main-top { grid-area: top; }
.detalhe-mapa { grid-area: mapa; }
.detalhe-comentarios { grid-area: comments; }
.detalhe-sidebar { grid-area: sidebar; display: flex; flex-direction: column; gap: 1.25rem; }
.info-card { background: transparent; border-radius: var(--radius-lg); padding: 1.5rem 0; }
.info-card h3 { font-size: 1.05rem; margin-bottom: 1rem; color: var(--verde-escuro); }
.info-row { display: flex; justify-content: space-between; align-items: center; padding: .5rem 0; border-bottom: 1px solid var(--creme-escuro); font-size: .9rem; }
.info-row:last-child { border-bottom: none; }
.info-row .label { color: var(--texto-muted); }
.info-row .val { font-weight: 600; }
.galeria {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: .75rem;
  max-height: 450px;
  overflow-y: scroll;
  overflow-x: hidden;
  padding-right: .25rem;
}
.galeria-item { border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/3; }
.galeria-item img { width: 100%; height: 100%; object-fit: cover; transition: none; transform: none; }
.galeria-item:hover img { transform: none; }
.like-btn { display: inline-flex; align-items: center; gap: .5rem; padding: .6rem 1.25rem; border-radius: var(--radius); border: 2px solid #e74c3c; color: #e74c3c; font-weight: 700; font-size: .95rem; transition: all var(--transition); }
.like-btn.liked, .like-btn:hover { background: #e74c3c; color: #fff; }
.comentario { display: flex; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--creme-escuro); }
.comentario:last-child { border-bottom: none; }
.comentario-avatar { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; background: var(--verde-claro); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1rem; overflow: hidden; }
.comentario-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.comentario-body { flex: 1; min-width: 0; }
.comentario-meta { font-size: .82rem; color: var(--texto-muted); margin-bottom: .3rem; }
.comentario-meta strong { color: var(--texto); }
.comentario-texto { font-size: .92rem; max-width: 100%; white-space: normal; overflow-wrap: anywhere; word-break: break-all; }

/* ============================================================
   FORMULÁRIOS
   ============================================================ */
.form-container { max-width: 620px; margin: 0 auto; background: var(--branco); border-radius: var(--radius-lg); padding: 2.5rem; }
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; margin-bottom: .4rem; font-weight: 600; font-size: .9rem; }
.form-group input, .form-group textarea, .form-group select { width: 100%; padding: .75rem 1rem; border: 1.5px solid var(--creme-escuro); border-radius: var(--radius); background: var(--creme); color: var(--texto); font-size: .95rem; }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { border-color: var(--verde-claro); box-shadow: 0 0 0 3px rgba(64,145,108,.15); }
.form-group input:-webkit-autofill,
.form-group input:-webkit-autofill:hover,
.form-group input:-webkit-autofill:focus { -webkit-text-fill-color: var(--texto); -webkit-box-shadow: 0 0 0px 1000px var(--creme) inset; transition: background-color 5000s ease-in-out 0s; }
.form-group textarea { min-height: 130px; resize: vertical; }
.form-error { font-size: .82rem; color: #c0392b; margin-top: .3rem; }
.form-title { font-size: 1.8rem; margin-bottom: .5rem; }
.form-subtitle { color: var(--texto-muted); margin-bottom: 2rem; font-size: .95rem; }
.form-link { color: var(--verde); font-weight: 600; }
.form-link:hover { text-decoration: underline; }
.form-divider { text-align: center; margin: 1.5rem 0; color: var(--texto-muted); font-size: .85rem; position: relative; }
.form-divider::before, .form-divider::after { content: ''; position: absolute; top: 50%; width: 42%; height: 1px; background: var(--creme-escuro); }
.form-divider::before { left: 0; }
.form-divider::after  { right: 0; }

/* ============================================================
   PERFIL / RANKING
   ============================================================ */
.perfil-hero { background: var(--verde-escuro); padding: calc(var(--nav-h) + 0.1rem) 1.5rem 1.5rem; text-align: left; }/*formatação da linha verde do perfil*/
.perfil-hero > .container { max-width: 1200px; margin: 0 auto; }
.perfil-avatar { width: 90px; height: 90px; border-radius: 50%; border: 4px solid var(--dourado); margin: 0 0 1rem; overflow: hidden; background: var(--verde-claro); display: flex; align-items: center; justify-content: center; font-size: 2rem; font-weight: 700; color: #fff; }
.perfil-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.perfil-nome { font-size: 2rem; color: var(--creme); }
.perfil-username { color: var(--dourado); font-size: .95rem; margin-bottom: .75rem; }
.perfil-bio { color: rgba(245,239,230,.7); max-width: 560px; margin: 0 0 1.5rem; font-size: .95rem; white-space: normal; overflow-wrap: anywhere; word-break: break-all; }
.perfil-stats { display: flex; flex-wrap: wrap; gap: 1rem 2.25rem; margin-top: .75rem; }
.stat-item { display: flex; align-items: baseline; gap: .4rem; }
.stat-num { font-family: 'Inter', sans-serif; font-size: 1.35rem; font-weight: 700; letter-spacing: -.02em; color: var(--dourado); }
.stat-label { font-family: 'Inter', sans-serif; font-size: .82rem; font-weight: 300; color: rgba(245,239,230,.55); }
.ranking-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ranking-table { width: 100%; border-collapse: collapse; }
.ranking-table th { text-align: left; padding: .75rem 1rem; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--texto-muted); border-bottom: 2px solid var(--creme-escuro); white-space: nowrap; }
.ranking-table td { padding: .85rem 1rem; border-bottom: 1px solid var(--creme-escuro); vertical-align: middle; }
.ranking-table tr:last-child td { border-bottom: none; }
.rank-pos { font-family: 'Playfair Display', serif; font-size: 1.1rem; font-weight: 700; }
.rank-1 { color: #f1c40f; } .rank-2 { color: #bdc3c7; } .rank-3 { color: #e67e22; }
.rank-user { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.rank-avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--verde-claro); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; flex-shrink: 0; overflow: hidden; }
.rank-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.rank-user-info { min-width: 0; max-width: 100%; }
.rank-user-info > div, .rank-user-info > a { white-space: normal; overflow-wrap: anywhere; word-break: break-word; }
.rank-pontos { font-family: 'Inter', sans-serif; font-size: 1.25rem; font-weight: 700; letter-spacing: -.02em; color: var(--dourado); }
.text-wrap-anywhere { max-width: 100%; white-space: normal; overflow-wrap: anywhere; word-break: break-all; }

/* ============================================================
   ADMIN
   ============================================================ */
.admin-wrapper { display: flex; min-height: 100vh; }
.admin-sidebar { width: 240px; flex-shrink: 0; background: var(--verde-escuro); padding: 1.5rem 1rem; position: fixed; top: var(--nav-h); left: 0; height: calc(100vh - var(--nav-h)); overflow-y: auto; border-right: 2px solid var(--dourado); }
.admin-nav a { display: flex; align-items: center; gap: .65rem; color: rgba(245,239,230,.75); padding: .6rem .85rem; border-radius: var(--radius); font-size: .9rem; margin-bottom: .2rem; transition: all var(--transition); }
.admin-nav a:hover, .admin-nav a.active { background: rgba(201,168,76,.15); color: var(--dourado); }
.admin-nav .nav-section { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: rgba(245,239,230,.35); padding: 1rem .85rem .4rem; }
.admin-content { flex: 1; padding: 2rem; min-width: 0; max-width: 100%; overflow-x: hidden; margin-left: 240px; }
.admin-title { font-size: 1.6rem; margin-bottom: 1.5rem; }
.admin-cards { display: flex; flex-direction: column; gap: .65rem; margin-bottom: 2rem; max-width: 275px; }
.admin-stat-card { background: var(--branco); border-radius: var(--radius-lg); padding: .6rem 1.25rem; box-shadow: 0 1px 4px rgba(0,0,0,.07), 0 4px 16px rgba(0,0,0,.05); display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 1rem; }
.admin-stat-card .card-header { display: flex; align-items: center; }
.admin-stat-card .num { font-family: inherit; font-size: 1.6rem; font-weight: 700; line-height: 1; color: var(--verde-escuro); letter-spacing: -.02em; }
.admin-stat-card .lbl { font-size: .8rem; color: var(--texto-muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.admin-chart-container { position: relative; width: 100%; max-width: 100%; overflow-x: auto; }
.admin-chart-container canvas { max-width: 100%; height: auto !important; }
.data-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius-lg); box-shadow: var(--sombra-sm); }
.data-table { width: 100%; border-collapse: collapse; background: var(--branco); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--sombra-sm); }
.data-table th { background: var(--verde-escuro); color: var(--creme); padding: .85rem 1rem; text-align: left; font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; }
.data-table td { padding: .85rem 1rem; border-bottom: 1px solid var(--creme-escuro); font-size: .9rem; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--creme); }

/* ============================================================
   ESTADOS VAZIOS
   ============================================================ */
.empty-state { text-align: center; padding: 4rem 2rem; color: var(--texto-muted); }
.empty-state i { font-size: 3.5rem; color: var(--verde-brilho); margin-bottom: 1rem; }
.empty-state h3 { font-size: 1.4rem; margin-bottom: .5rem; color: var(--texto); }

/* ============================================================
   UPLOAD
   ============================================================ */
.upload-preview { width: 100%; height: 180px; object-fit: cover; border-radius: var(--radius); margin-top: .75rem; display: none; border: 2px solid var(--verde-claro); }
.upload-preview.visible { display: block; }
.upload-area.has-file { border-color: var(--verde-claro); background: rgba(64,145,108,.05); }
.upload-area.has-file .upload-icon { color: var(--verde); }
.upload-area.has-file .upload-label { color: var(--verde); font-weight: 600; }
.upload-area { border: 2px dashed var(--creme-escuro); border-radius: var(--radius); padding: 2rem; text-align: center; cursor: pointer; transition: border-color var(--transition), background var(--transition); }
.upload-area:hover, .upload-area.drag { border-color: var(--verde-claro); background: rgba(64,145,108,.05); }
.upload-area i { font-size: 2.5rem; color: var(--verde-claro); margin-bottom: .75rem; }

/* ============================================================
   STATS HOME / COMO FUNCIONA
   ============================================================ */
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1.5rem; text-align: center; }
.stats-row .num { font-family: 'Playfair Display', serif; font-size: 3rem; color: var(--dourado); display: block; }
.stats-row .lbl { font-size: .85rem; color: rgba(245,239,230,.65); text-transform: uppercase; letter-spacing: .06em; }
.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2rem; }
.step-card { background: var(--branco); border-radius: var(--radius-lg); padding: 2rem 1.5rem; text-align: center; box-shadow: var(--sombra-sm); transition: transform var(--transition); }
.step-card:hover { transform: translateY(-4px); }
.step-icon { width: 60px; height: 60px; border-radius: 50%; background: linear-gradient(135deg, var(--verde), var(--verde-claro)); display: flex; align-items: center; justify-content: center; margin: 0 auto 1rem; font-size: 1.5rem; color: #fff; }
.step-card h3 { font-size: 1.1rem; margin-bottom: .5rem; }
.step-card p { font-size: .9rem; color: var(--texto-muted); }

/* ============================================================
   GRID SYSTEM
   ============================================================ */
.row { display: flex; flex-wrap: wrap; gap: 1rem; }
.col-1  { flex: 0 0 calc(8.333% - 1rem); }   .col-2  { flex: 0 0 calc(16.666% - 1rem); }
.col-3  { flex: 0 0 calc(25% - 1rem); }       .col-4  { flex: 0 0 calc(33.333% - 1rem); }
.col-5  { flex: 0 0 calc(41.666% - 1rem); }   .col-6  { flex: 0 0 calc(50% - 1rem); }
.col-7  { flex: 0 0 calc(58.333% - 1rem); }   .col-8  { flex: 0 0 calc(66.666% - 1rem); }
.col-9  { flex: 0 0 calc(75% - 1rem); }       .col-10 { flex: 0 0 calc(83.333% - 1rem); }
.col-11 { flex: 0 0 calc(91.666% - 1rem); }   .col-12 { flex: 0 0 calc(100% - 1rem); }

@media (min-width: 1024px) {
  .col-lg-1  { flex: 0 0 calc(8.333% - 1rem); }   .col-lg-2  { flex: 0 0 calc(16.666% - 1rem); }
  .col-lg-3  { flex: 0 0 calc(25% - 1rem); }       .col-lg-4  { flex: 0 0 calc(33.333% - 1rem); }
  .col-lg-5  { flex: 0 0 calc(41.666% - 1rem); }   .col-lg-6  { flex: 0 0 calc(50% - 1rem); }
  .col-lg-7  { flex: 0 0 calc(58.333% - 1rem); }   .col-lg-8  { flex: 0 0 calc(66.666% - 1rem); }
  .col-lg-9  { flex: 0 0 calc(75% - 1rem); }       .col-lg-10 { flex: 0 0 calc(83.333% - 1rem); }
  .col-lg-11 { flex: 0 0 calc(91.666% - 1rem); }   .col-lg-12 { flex: 0 0 calc(100% - 1rem); }
}

@media (max-width: 1023px) {
  .col-md-1  { flex: 0 0 calc(8.333% - 1rem); }   .col-md-2  { flex: 0 0 calc(16.666% - 1rem); }
  .col-md-3  { flex: 0 0 calc(25% - 1rem); }       .col-md-4  { flex: 0 0 calc(33.333% - 1rem); }
  .col-md-5  { flex: 0 0 calc(41.666% - 1rem); }   .col-md-6  { flex: 0 0 calc(50% - 1rem); }
  .col-md-7  { flex: 0 0 calc(58.333% - 1rem); }   .col-md-8  { flex: 0 0 calc(66.666% - 1rem); }
  .col-md-9  { flex: 0 0 calc(75% - 1rem); }       .col-md-10 { flex: 0 0 calc(83.333% - 1rem); }
  .col-md-11 { flex: 0 0 calc(91.666% - 1rem); }   .col-md-12 { flex: 0 0 calc(100% - 1rem); }
}

/* ============================================================
   RESPONSIVE — 900px
   ============================================================ */
@media (max-width: 900px) {
  .detalhe-grid { grid-template-columns: 1fr; grid-template-areas: "top" "sidebar" "mapa" "comments"; }
  .admin-wrapper { flex-direction: column; }
  .admin-sidebar { width: 100%; height: auto; position: static; }
}

/* ============================================================
   RESPONSIVE — 1040px (NAVBAR → HAMBURGER)
   ============================================================ */
@media (max-width: 1040px) {

  .cards-grid .card { flex: 0 0 calc(50% - 0.875rem); }

  /* Mostrar hamburger, esconder nav-links do desktop */
  .hamburger { display: flex !important; }

  /* Nav links — painel lateral direito */
  .nav-links {
    position: fixed !important;
    top: var(--nav-h) !important;
    right: 0 !important;
    left: auto !important;
    bottom: auto !important;
    width: 260px !important;
    max-height: calc(100vh - var(--nav-h)) !important;
    background: var(--verde-escuro) !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    padding: .75rem !important;
    gap: 2px !important;
    margin-left: 0 !important;
    transform: translateX(100%) !important;
    transition: transform var(--transition) !important;
    z-index: 999 !important;
    overflow-y: auto !important;
    box-shadow: -4px 0 20px rgba(0,0,0,.5) !important;
    border-bottom-left-radius: var(--radius) !important;
  }
  .nav-links.open { transform: translateX(0) !important; }

  .nav-links li { width: 100% !important; display: block !important; }

  .nav-links a {
    display: flex !important;
    align-items: center !important;
    gap: .6rem !important;
    padding: .75rem .9rem !important;
    border-radius: 0 !important;
    font-size: .95rem !important;
    color: var(--creme) !important;
    width: 100% !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  .nav-links a:hover,
  .nav-links a.active {
    background: rgba(201,168,76,.15) !important;
    color: var(--dourado) !important;
  }

  .nav-avatar-btn {
    display: flex !important;
    align-items: center !important;
    gap: .6rem !important;
    padding: .75rem .9rem !important;
    font-size: .95rem !important;
    width: 100% !important;
    color: var(--creme) !important;
    justify-content: flex-start !important;
    border-radius: 0 !important;
  }

  .dropdown-menu {
    position: static !important;
    display: none !important;
    border: none !important;
    background: rgba(255,255,255,.06) !important;
    border-radius: 0 !important;
    margin: 2px 0 4px !important;
    min-width: unset !important;
    width: 100% !important;
    padding: 2px 0 !important;
    box-shadow: none !important;
  }
  .dropdown-menu.open { display: block !important; }
  .dropdown-menu li a {
    padding: .65rem 1.25rem !important;
    font-size: .9rem !important;
    color: rgba(245,239,230,.85) !important;
    white-space: nowrap !important;
  }

  .btn-nav-login,
  .btn-nav-register {
    display: flex !important;
    width: 100% !important;
    padding: .75rem .9rem !important;
    border-radius: 0 !important;
    font-size: .95rem !important;
    justify-content: flex-start !important;
  }
}

/* ============================================================
   RESPONSIVE — 768px (TELEMÓVEL)
   ============================================================ */
@media (max-width: 768px) {

  .cards-grid .card { flex: 0 0 calc(50% - 0.875rem); }

  /* Tabelas */

  .data-table, .ranking-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }
  .data-table th:nth-child(6), .data-table td:nth-child(6),
  .data-table th:nth-child(7), .data-table td:nth-child(7) { display: none; }
  .data-table-wrap .data-table th:nth-child(6),
  .data-table-wrap .data-table td:nth-child(6),
  .data-table-wrap .data-table th:nth-child(7),
  .data-table-wrap .data-table td:nth-child(7) { display: table-cell; }
  .ranking-table th:nth-child(4), .ranking-table td:nth-child(4) { display: none; }

  /* Filtros da página explorar */
  .filtros-bar { padding: .85rem 1rem; }

  /* Admin */
  .admin-cards { flex-direction: column !important; }
  .admin-content { padding: 1rem; max-width: 100vw; overflow-x: hidden; margin-left: 0; }
  .admin-wrapper { flex-direction: column; }
  .admin-sidebar { width: 100%; height: auto; position: static; }

  /* Admin dashboard main layout - stack on mobile */
  .admin-dashboard-grid { grid-template-columns: 1fr !important; display: grid !important; }
  .admin-rankings-grid { grid-template-columns: 1fr !important; display: grid !important; }
  .admin-chart-container { max-width: 100%; overflow-x: auto; }
}

/* ============================================================
   RESPONSIVE — 560px
   ============================================================ */
@media (max-width: 560px) {
  .cards-grid .card { flex: 0 0 100%; margin-right: 0; }
  .filtros-form { flex-direction: column; gap: .5rem; }
  .filtro-group { min-width: unset; width: 100%; }
  .filtro-group select, .filtro-group input { width: 100%; }
  .filtros-grid { display: grid !important; grid-template-columns: 1fr 1fr; gap: .5rem; width: 100%; flex: none; }
  .filtros-grid .filtro-group { width: auto; }
  .filtros-actions { width: 100%; }
  .filtros-actions .btn { flex: 1; justify-content: center; }
  .section { padding: 3rem 1rem; }
  .form-container { padding: 1.5rem; }
  .detalhe-hero { height: 280px; }
  .admin-cards { flex-direction: column !important; }
  .admin-dashboard-grid { grid-template-columns: 1fr !important; }
  .admin-rankings-grid { grid-template-columns: 1fr !important; }
  .admin-content { padding: 0.75rem; max-width: 100vw; overflow-x: hidden; }
  .admin-chart-container { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* ============================================================
   PÁGINA / MAPA
   ============================================================ */
.page-content { padding-top: 50px; }
.page-content:has(#map) { display: flex; flex-direction: column; height: 100vh; padding-top: var(--nav-h); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: var(--verde-escuro); padding: 1rem 1.5rem; border-top: 2px solid var(--dourado); margin-top: auto; }
.footer-inner { max-width: 1300px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: .4rem; text-align: center; }
.footer-brand { display: flex; align-items: center; gap: .6rem; }
.footer-tagline { color: rgba(245,239,230,.6); font-size: .9rem; margin: 0; }
.footer-links { display: flex; gap: 1.5rem; flex-wrap: wrap; justify-content: center; }
.footer-links a { color: rgba(245,239,230,.7); font-size: .88rem; transition: color var(--transition); }
.footer-links a:hover { color: var(--dourado); }
.footer-copy { color: rgba(245,239,230,.35); font-size: .78rem; margin: 0; }

/* Hover cards admin */
a:has(.admin-stat-card) { display: block; border-radius: inherit; }
.admin-stat-card { transition: transform .18s ease, box-shadow .18s ease; }
a:has(.admin-stat-card):hover .admin-stat-card { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,.1); }

/* Seta de scroll da hero */
.hero-scroll-arrow {
  position: absolute; bottom: 4rem; left: 50%; transform: translateX(-50%);
  color: #c9a84c; font-size: 2.5rem; text-decoration: none; z-index: 2;
  animation: bounce 2s infinite;
}
@media (max-height: 750px) { .hero-scroll-arrow { bottom: 2rem; } }
@media (max-height: 640px) { .hero-scroll-arrow { bottom: 1rem; } }
