/* NAV fixa no topo */
.trvl-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1100;
  background-color: #28292b;
  box-shadow: 0 2px 4px rgba(0,0,0,0.35);
  padding: 0;             /* você pediu padding 0 */
  min-height: 60px;
}
/* Container flex interno */
.trvl-nav .nav-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 15px; /* só padding horizontal dentro da nav */
  gap: 10px;
}
/* nav-left reservado (pode ficar vazio) */
.trvl-nav .nav-left {
  width: 60px;
}
/* NAV-CENTER: logo e título juntos centralizados */
.trvl-nav .nav-center {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  gap: 20px;           /* ESPAÇO ENTRE IMAGEM E TITULO -> 20px */
  pointer-events: none; /* evita clique no centro que atrapalhe toggle em mobile */
}
/* permite interação com links/inputs se tiverem dentro */
.trvl-nav .nav-center * { pointer-events: auto; }
/* Logo (sem margens na esquerda) - espaçamento controlado pelo gap da nav-center */
.trvl-nav .nav-logo {
  height: 40px; /* ajuste se quiser maior/menor */
  width: auto;
  display: block;
}
/* Título prata metálico */
.logo-metalico-final {
  font-family: 'Maven Pro', sans-serif;
  font-size: 44px;  /* ajustado para altura reduzida */
  font-weight: 900;
  margin: 0;
  background: linear-gradient(135deg, #e0e0e0 0%, #bfbfbf 40%, #9f9f9f 70%, #7c7c7c 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow:
    0 1px 0 #808080,
    0 2px 1px rgba(0,0,0,0.12),
    1px 1px 0 #d0d0d0;
  position: relative;
}
/* Área direita (menu + toggle) */
.trvl-nav .nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
/* Menu desktop (inline) */
.nav-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 14px;
}
.nav-menu li { list-style: none; }
.nav-menu a {
  display: block;
  padding: 8px 10px;
  color: #eee;
  text-decoration: none;
  white-space: nowrap;
}
/* Botão hamburger (escondido no desktop) */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin: auto;
}
/* estilo das barras do hambúrguer */
.nav-toggle .hamb {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  margin: 7px auto;
  transition: transform .2s ease, opacity .2s ease;
}
/* === MOBILE: quando a largura <= 900px === */
@media (max-width: 900px) {
  /* mostra o botão hamburger */
  .nav-toggle { display: block; }
  /* menu vira coluna e fica escondido por padrão */
  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;                 /* aparece abaixo da navbar */
    right: 0;
    left: 0;
    background: #2a2a2a;
    flex-direction: column;
    gap: 0;
    padding: 8px 0;
    box-shadow: 0 6px 12px rgba(0,0,0,0.35);
  }
  /* quando ativo, mostra */
  .nav-menu.show {
    display: flex;
  }
  .nav-menu a {
    padding: 12px 16px;
    width: 100%;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.03);
  }
  /* reduz título e logo para caber melhor */
  .trvl-nav .nav-logo { height: 44px; }
  .logo-metalico-final { font-size: 32px; }
}
/* Se outra regra externa estiver sobrescrevendo posicionamento, força top:0 */
.trvl-nav { top: 0 !important; }
/* --- Responsividade --- */
@media (max-width: 900px) {
  .nav-toggle { display: block; }
}
/* Reduzir tamanho em telas menores */
@media (max-width: 768px) {
  .trvl-nav {
   justify-content: center;
   align-items: center;
   padding: auto;
}
  .logo-metalico-final {
    padding-right: 20px;
    font-size: 36px;
  }
  .trvl-nav .nav-logo {
    height: 30px;
    margin-right: 5px;
  }
  .trvl-nav .nav-flex {
    padding: 6px 5px;
    gap: 5px;
  }
  .trvl-nav .nav-toggle {
    padding-right: 20px;
  }
}
/* Se outra regra externa estiver sobrescrevendo posicionamento, força top:0 */
.trvl-nav { top: 0 !important; }
.post {
  background:#222; color:#ddd; padding:20px; margin:30px auto;
  max-width:800px; border-radius:8px; box-shadow:0 3px 8px rgba(0,0,0,.9);
}
.post h2, .post h3 { color:#f4d03f; }
.post a { color:#4682B4; }
.post img {
  max-width:400px; max-height:400px; display:block;
  margin:10px auto; border-radius:4px;
}
.descricao {
  overflow:hidden; display:-webkit-box;
  -webkit-line-clamp:15; -webkit-box-orient:vertical;
  transition:all .3s ease;
}
.descricao.expandido { -webkit-line-clamp: unset; overflow:visible; }
.ler-mais-btn {
  background:none; border:none; color:#4682B4;
  cursor:pointer; font-weight:bold; margin-top:5px;
}
/* Footer */
footer {
  position:fixed; bottom:0; left:0; width:100%;
  padding:10px; background:#28292b; color:#eee;
  text-align:center; white-space:nowrap; overflow:hidden;
  text-overflow:ellipsis;
}
body { padding-bottom:50px; }

/* Paginação */
.pager { 
  display: flex; 
  justify-content: center; 
  gap: 8px; 
  list-style: none; 
  padding: 20px 0; 
}

.pager li a {
  background: #4682B4; 
  color: #000;
  border: 1px solid #444;
  padding: 8px 14px; 
  border-radius: 6px; 
  text-decoration: none;
  transition: all .3s;
}

.pager li a:hover { 
  background: #4682B4; 
  color: #fff; 
}

.pager li.active a { 
  background: #4682B4; 
  color: #111; 
  font-weight: bold; 
}

/* Previous e Next */
.pager li.previous a,
.pager li.next a {
  background: #333;
  color: #fff;
  font-weight: bold;
}

.pager li.previous a:hover,
.pager li.next a:hover {
  background: #555;
  color: #fff;
}

/* Ellipsis */
.pager li.ellipsis { 
  display: flex; 
  align-items: center; 
  padding: 0 5px; 
  color: #000; 
  user-select: none; 
}

/* Player */
.media-grid {
  display: flex;
  justify-content: center;   /* centraliza o conjunto */
  align-items: center;
  gap: 10px;                 /* espaço entre imagens */
  flex-wrap: wrap;           /* quebra linha em telas pequenas */
  margin: 15px 0;
}

.media-grid img{
  max-width: 220px;          /* tamanho reduzido */
  width: 100%;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,.4);
  object-fit: cover;
}

/* Quando tiver só UMA imagem */
.media-grid img:only-child{
  max-width: 420px;          /* maior para imagem única */
}

.audio-wrapper { display:flex; flex-direction:column; align-items:flex-start; width:100%; max-width:560px; }
.audio-player {
  display:flex; align-items:center; gap:8px; background:#111;
  border-radius:12px; width:100%;
}
.play-btn {
  background:#00ffff; color:#111; border:none; border-radius:50%;
  width:26px; height:26px; font-size:12px; cursor:pointer;
}
.progress-container {
  flex:1; height:6px; background:#333; border-radius:4px; cursor:pointer; position:relative;
}
.progress-bar {
  position:absolute; height:100%; width:0%;
  background:#00ffff; border-radius:4px; transition:width .1s linear;
}
.time { min-width:70px; text-align:right; color:#aaa; font-size:13px; }
.share-btn { background:none; border:none; cursor:pointer; color:#fff; }
.file-name { color:#ccc; font-size:14px; margin-top:4px; font-style:italic; word-break:break-word; }
/* Responsivo */
@media (max-width:768px){
  .audio-player { max-width:100%; }
  .post { margin:12px; }
  /* iframe do YouTube responsivo */
  iframe {
    width:100% !important;
    height:auto !important;
    max-width:100%;
    aspect-ratio:16 / 9; /* mantém proporção */
    border-radius:8px;
  }
  .post {
    margin: 30px 15px;
}
}
/* --- Tema escuro --- */
.comentarios {
  margin-top: 15px;
  padding: 12px;
  background: #1e1e1e;              /* fundo escuro */
  border: 1px solid #333;
  border-radius: 8px;
  color: #ddd;                      /* texto claro */
}
.comentarios h4 {
  color: #f0f0f0;
  margin-bottom: 8px;
  border-bottom: 1px solid #333;
  padding-bottom: 4px;
}
.comentarios textarea {
  width: 100%;
  min-height: 70px;
  padding: 10px;
  border: 1px solid #444;
  border-radius: 6px;
  background: #2b2b2b;
  color: #eee;
  resize: vertical;
}
.comentarios button[type="submit"] {
  margin-top: 8px;
  background: #0078ff;
  color: #fff;
  border: none;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease;
}
.comentarios button[type="submit"]:hover {
  background: #3399ff;
}
.comentario {
  margin-top: 10px;
  background: #2a2a2a;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #333;
  font-size: 14px;
  color: #ddd;
}
.comentario strong {
  color: #58a6ff; /* destaque para nome do autor */
}
.like-section {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}
.like-section button {
  background: transparent;
  color: #fff;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease;
  justify-content: center;
  align-items: center;
}
.like-section button:hover {
  background: #3399ff;
}
.like-section span {
  font-weight: bold;
  color: #bbb;
}
/* --- Pop-up de comentário --- */
.popup {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.7);
  justify-content: center;
  align-items: center;
}
.popup-conteudo {
  background: #1f1f1f;
  padding: 20px;
  border-radius: 10px;
  width: 90%;
  max-width: 400px;
  color: #eee;
  box-shadow: 0 0 10px #000;
  position: relative;
}
.popup-conteudo h3 {
  margin-top: 0;
  text-align: center;
  color: #58a6ff;
}
.popup-conteudo label {
  display: block;
  margin-top: 10px;
  font-size: 14px;
}
.popup-conteudo input,
.popup-conteudo textarea {
  width: 100%;
  margin-top: 4px;
  padding: 8px;
  border: 1px solid #444;
  border-radius: 6px;
  background: #2b2b2b;
  color: #eee;
}
.popup-conteudo button {
  margin-top: 12px;
  background: #0078ff;
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
}
.popup-conteudo button:hover {
  background: #3399ff;
}
.fechar {
  position: absolute;
  right: 10px;
  top: 6px;
  font-size: 22px;
  cursor: pointer;
  color: #aaa;
}
.fechar:hover { color: #fff; }
.abrir-comentario {
  background: #0078ff;
  color: #fff;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 8px;
}
.abrir-comentario:hover {
  background: #3399ff;
}

/* === CARROSSEL DE IMAGENS === */
.carousel-wrapper {
  position: relative;
  max-width: 100%;
  margin: 15px 0;
  border-radius: 8px;
  overflow: hidden;
  background: #1a1a1a;
}

.carousel-track {
  display: flex;
  transition: transform 0.4s ease-in-out;
  width: 100%;
}

.carousel-slide {
  min-width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
  box-sizing: border-box;
}

.carousel-slide img {
  max-width: 100%;
  max-height: 400px;
  width: auto;
  height: auto;
  border-radius: 6px;
  cursor: zoom-in;
  object-fit: contain;
  transition: transform 0.2s;
}

.carousel-slide img:hover {
  transform: scale(1.02);
}

/* Botões do carrossel */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.6);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.carousel-btn:hover { background: rgba(0,0,0,0.9); }
.carousel-prev { left: 10px; }
.carousel-next { right: 10px; }

/* Indicadores (bolinhas) */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  background: rgba(0,0,0,0.3);
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: background 0.2s;
}

.carousel-dot.active { background: #4caf50; }

/* === MODAL ZOOM (LIGHTBOX) === */
.lightbox {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.95);
  z-index: 10000;
  justify-content: center;
  align-items: center;
  padding: 20px;
  box-sizing: border-box;
}

.lightbox.active { display: flex; }

.lightbox-img {
  max-width: 95%;
  max-height: 90vh;
  width: auto;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  cursor: zoom-out;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 40px;
  cursor: pointer;
  background: none;
  border: none;
  line-height: 1;
}

.lightbox-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-size: 14px;
  background: rgba(0,0,0,0.6);
  padding: 5px 15px;
  border-radius: 20px;
}

/* Responsivo mobile */
@media (max-width: 600px) {
  .carousel-slide img { max-height: 300px; }
  .carousel-btn { width: 35px; height: 35px; font-size: 16px; }
}

/* === CARROSSEL - VERSÃO MOBILE CORRIGIDA === */
@media (max-width: 768px) {
  
  .carousel-wrapper {
    width: 100%;
    max-width: 100vw;
    margin: 10px 0;
    overflow: hidden; /* ESSENCIAL para esconder slides fora da tela */
    position: relative;
    touch-action: pan-y pinch-zoom; /* Permite scroll vertical, bloqueia horizontal no wrapper */
  }

/* Quando há apenas 1 imagem, remove margens extras */
.carousel-wrapper:has(.carousel-slide:only-child) {
    display: flex;
    justify-content: center;
}
.carousel-wrapper:has(.carousel-slide:only-child) .carousel-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}
  
  .carousel-track {
    display: flex;
    transition: transform 0.3s ease-out;
    width: 100%;
    /* Garante que o track não quebre em mobile */
    transform-style: preserve-3d;
    backface-visibility: hidden;
    will-change: transform; /* Otimiza performance no mobile */
  }
  
  .carousel-slide {
    /* IMPORTANTE: usa 100vw para garantir largura total da tela */
    min-width: 100%;
    width: 100vw;
    max-width: 100%;
    flex: 0 0 100%; /* NÃO permite encolher ou crescer */
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 5px;
    box-sizing: border-box;
    /* Evita que o conteúdo "vaze" */
    overflow: hidden;
  }
  
  .carousel-slide img {
    max-width: 100%;
    max-height: 35vh; /* Altura relativa à tela do celular */
    width: auto;
    height: auto;
    border-radius: 6px;
    cursor: zoom-in;
    object-fit: contain;
    display: block; /* Remove espaço extra abaixo da imagem */
    pointer-events: auto; /* Garante que o clique funcione */
    user-select: none; /* Evita seleção de texto ao arrastar */
    -webkit-user-drag: none; /* Evita drag nativo no iOS */
  }
  
  /* Botões maiores para toque */
  .carousel-btn {
    width: 44px; /* Mínimo recomendado para toque */
    height: 44px;
    font-size: 20px;
    padding: 0;
    /* Área de toque maior */
    margin: 0 5px;
  }
  
  .carousel-prev { left: 5px; }
  .carousel-next { right: 5px; }
  
  /* Indicadores (bolinhas) mais espaçados */
  .carousel-dots {
    padding: 8px;
    gap: 10px;
  }
  
  .carousel-dot {
    width: 12px;
    height: 12px;
  }
}

/* === CORREÇÃO PARA iOS/SAFARI === */
@supports (-webkit-touch-callout: none) {
  .carousel-track {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
  }
  
  .carousel-slide img {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
  }
}