/* 
==============================================
   HOME PAGE - HERO SECTION
==============================================
/* 
======================================================
   HERO SECTION - VERSÃO INFALÍVEL PARA TODAS AS TELAS
======================================================
*/
.hero-master-section {
  position: relative; /* Essencial para o posicionamento do filho */
  height: 90vh;
  min-height: 700px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  overflow: hidden; /* O mais importante: corta o excesso do vídeo */
}

/* O contentor do vídeo não muda */
.video-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
}

/* A CORREÇÃO CRÍTICA ESTÁ AQUI */
#hero-video {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%); /* Centra o vídeo perfeitamente */
  min-width: 100%; /* Garante que a largura nunca é menor que a do container */
  min-height: 100%; /* Garante que a altura nunca é menor que a do container */
  width: auto; /* Permite que a dimensão se ajuste para manter a proporção */
  height: auto; /* Permite que a dimensão se ajuste para manter a proporção */
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.4));
  z-index: -1;
}

.hero-content {
  animation: fadeIn 1.5s 0.5s ease-out both;
  z-index: 2;
}

/* ... O resto do CSS do .hero-content, .glass-form, etc., permanece o mesmo ... */
.hero-content h1 {
  text-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  font-weight: 900;
}
.hero-content p {
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.hero-search-form-container {
  max-width: 700px;
  margin: 0 auto;
}
.glass-form {
  background: var(--cor-glass-dark);
  border-radius: 50px;
  padding: 0.5rem 0.5rem 0.5rem 1.5rem;
  backdrop-filter: var(--filtro-blur);
  border: 1px solid var(--cor-borda-glass-dark);
  box-shadow: var(--sombra-forte);
  display: flex;
  align-items: center;
}
.search-icon {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.7);
}
.glass-form .form-control {
  background: transparent;
  border: none;
  color: white;
  font-size: 1.1rem;
  padding: 0.75rem;
  flex-grow: 1;
}
.glass-form .form-control:focus {
  box-shadow: none;
}
.glass-form .form-control::placeholder {
  color: rgba(255, 255, 255, 0.6);
}
.glass-form {
  background: var(--cor-glass-dark);
  border-radius: 50px;
  padding: 0.5rem;
  padding-left: 1.5rem;
  backdrop-filter: var(--filtro-blur);
  border: 1px solid var(--cor-borda-glass-dark);
  box-shadow: var(--sombra-forte);
  display: flex;
  align-items: center;
}
.search-icon {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.7);
}
.glass-form .form-control {
  background: transparent;
  border: none;
  color: white;
  font-size: 1.1rem;
  padding: 0.75rem;
  flex-grow: 1;
}
.glass-form .form-control:focus {
  box-shadow: none;
}
.glass-form .form-control::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

/* 
==============================================
   HOME PAGE - SECTIONS & CARDS
==============================================
*/
.main-content {
  background-color: var(--cor-fundo);
}

.horizontal-scroll-wrapper {
  display: flex;
  overflow-x: auto;
  gap: 1.5rem;
  padding: 1rem 0.5rem 2rem 0.5rem; /* Padding para a sombra e scrollbar */
  scrollbar-width: none; /* Firefox */
}
.horizontal-scroll-wrapper::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}
.horizontal-scroll-wrapper .card {
  flex: 0 0 320px;
}

@media (max-width: 576px) {
  .horizontal-scroll-wrapper .card {
    flex: 0 0 280px;
  }

  .card-img-container {
    height: 180px;
  }
}

.card.glass-card {
  background: var(--cor-superficie);
  border-radius: var(--raio-borda);
  border: 1px solid var(--cor-borda-glass);
  box-shadow: var(--sombra-suave);
  overflow: hidden;
  transition:
    transform var(--duracao-transicao) var(--curva-animacao),
    box-shadow var(--duracao-transicao) var(--curva-animacao);
}
.card.glass-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--sombra-forte);
}

.card-img-container {
  position: relative;
  overflow: hidden;
  height: 220px; /* Importante manter a altura fixa para o skeleton aparecer */

  /* O skeleton fica aqui no fundo */
  background: linear-gradient(
    90deg,
    var(--cor-borda-glass) 25%,
    var(--cor-superficie) 50%,
    var(--cor-borda-glass) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
}

/* Quando a imagem dentro dele ganha a classe .loaded, o fundo para */
.card-img-container:has(.card-img-top.loaded) {
  animation: none;
  background: transparent;
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.card-img-top {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.4s ease-in-out; /* Revelação suave */
}

/* Esconde a imagem enquanto carrega para não ver o efeito "escada" */
.card-img-top.loading {
  opacity: 0;
}

/* Mostra a imagem de uma vez quando terminar */
.card-img-top.loaded {
  opacity: 1;
}

/* Pára a animação do container quando a imagem entra */
.card-img-container:has(.loaded) {
  animation: none;
  background: none;
}

.tag-container {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 2;
}

.card-overlay-icons {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  gap: 0.5rem;
  padding: 1rem;
  opacity: 0; /* Escondido por padrão no Desktop */
  transition: opacity var(--duracao-transicao);
  pointer-events: none; /* Evita bloquear cliques na imagem por acidente */
}

.icon-btn {
  width: 44px; /* Aumentado para 44px (padrão de toque mobile Apple/Google) */
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(5px);
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.2rem;
  transform: translateY(20px);
  transition:
    transform 0.3s var(--curva-animacao),
    background-color 0.3s;
  pointer-events: auto; /* Reativa o clique apenas nos botões */
  text-decoration: none;
}

/* --- COMPORTAMENTO HOVER (DESKTOP) --- */
@media (hover: hover) {
  .card.glass-card:hover .card-overlay-icons {
    opacity: 1;
  }
  .card.glass-card:hover .icon-btn {
    transform: translateY(0);
  }
  .card.glass-card:hover .icon-btn:nth-child(2) {
    transition-delay: 0.1s;
  }
}

/* --- COMPORTAMENTO TOUCH (REDMI 12 PRO / MOBILE) --- */
@media (hover: none) {
  .card-overlay-icons {
    opacity: 1; /* Sempre visível no telemóvel */
    background: linear-gradient(to top, rgba(0, 0, 0, 0.45), transparent);
  }
  .icon-btn {
    transform: translateY(0); /* Remove o deslocamento para ser clicável de imediato */
    background: rgba(0, 0, 0, 0.3); /* Um pouco mais escuro para contraste no sol */
  }
}

.icon-btn:hover {
  background: var(--cor-primaria);
  color: white;
}
.card-body {
  padding: 1.25rem;
}
.card-title {
  font-weight: 800;
  color: var(--cor-texto-principal);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rating {
  color: #ffc107;
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.card-price {
  color: var(--cor-primaria);
  font-size: 1.1rem;
}

/* 
==============================================
   MESTRIA PhD - NAVBAR MOBILE
==============================================
*/
.hamburger-button {
  background: transparent;
  border: none;
  /* Z-index 2000 garante que fique acima do overlay (1100) */
  z-index: 2000 !important;
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  margin-left: auto;
  position: relative; /* Fluxo normal quando fechado */
  transition: all 0.3s ease;
}

/* ESTADO ATIVO: Quando o menu abre */
body.mobile-menu-active .hamburger-button {
  position: fixed !important; /* Força ele a ignorar o container da navbar */
  right: 20px;
  top: 20px;
  /* Se o menu for branco, o X precisa de cor. Se for escuro, mude para white */
  background-color: rgba(var(--cor-primaria-rgb), 0.1);
  border-radius: 50%;
}

.hamburger-button .line {
  display: block;
  width: 28px;
  height: 3px;
  background-color: var(--cor-texto-principal); /* Cor original */
  border-radius: 3px;
  transition: all 0.3s ease;
}

/* Cor das linhas quando o menu está aberto */
.hamburger-button.active .line {
  background-color: var(--cor-primaria) !important; /* Garante contraste sobre o blur */
}

/* O "X" perfeito */
.hamburger-button.active .line:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}
.hamburger-button.active .line:nth-child(2) {
  opacity: 0;
  transform: translateX(-10px);
}
.hamburger-button.active .line:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}
@media (max-width: 991px) {
  .navbar > .container {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
  }
}
/* 
==============================================
   MESTRIA PhD - NOVAS SECÇÕES DA HOME
==============================================
*/
.section-subtitle {
  text-align: center;
  color: var(--cor-texto-secundario);
  max-width: 600px;
  margin: -2.5rem auto 3rem auto;
}

/* Destinos Populares */
.destination-card {
  display: block;
  position: relative;
  border-radius: var(--raio-borda);
  overflow: hidden;
  height: 250px;
  background-size: cover;
  background-position: center;
  transition: transform var(--duracao-transicao) var(--curva-animacao);
}
.destination-card.large-card {
  height: 512px; /* Altura de 2 cards + gutter */
}
.destination-card:hover {
  transform: scale(1.03);
}
.destination-card .card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 3rem 1.5rem 1.5rem 1.5rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  color: white;
}
.destination-card h3,
.destination-card h4 {
  font-weight: 800;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

/* Explore por Categoria */
.category-card {
  display: flex;
  align-items: flex-end;
  position: relative;
  border-radius: var(--raio-borda);
  overflow: hidden;
  height: 350px;
  background-size: cover;
  background-position: center;
  transition: transform var(--duracao-transicao) var(--curva-animacao);
  padding: 2rem;
  color: white;
}
.category-card:hover {
  transform: translateY(-10px);
}
.category-card .card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.1));
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem;
  z-index: 1;
}
.category-card h3 {
  font-weight: 800;
}
.category-card p {
  color: rgba(255, 255, 255, 0.8);
}

/* Porquê EncontreAqui? */
.feature-box {
  padding: 2.5rem;
  background: var(--cor-superficie);
  border: 1px solid var(--cor-borda-glass);
  border-radius: var(--raio-borda);
  height: 100%;
}
.feature-icon {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  background: -webkit-linear-gradient(45deg, var(--cor-primaria), #ff8a5b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.feature-box h4 {
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--cor-texto-principal);
}

/* ... (Todo o CSS existente) ... */

/* 
==============================================
   PERFORMANCE & ROBUSTEZ - MELHORIAS
==============================================
*/
/* Previne que imagens sem 'width' e 'height' causem saltos */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Scroll suave para links internos */
html {
  scroll-behavior: smooth;
}

/* 
==============================================
   SCROLL HORIZONTAL INTERATIVO
==============================================
*/
.scroll-container {
  position: relative;
}

.scroll-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--cor-superficie);
  border: 1px solid var(--cor-borda-glass);
  color: var(--cor-texto-principal);
  font-size: 1.5rem;
  z-index: 10;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--sombra-media);
  opacity: 0;
  visibility: hidden;
  transition: all var(--duracao-transicao) var(--curva-animacao);
}

.scroll-container:hover .scroll-btn {
  opacity: 1;
  visibility: visible;
}

.scroll-btn.prev-btn {
  left: -25px;
}
.scroll-btn.next-btn {
  right: -25px;
}
.scroll-btn:hover {
  background-color: var(--cor-primaria);
  color: white;
  transform: translateY(-50%) scale(1.1);
}

@media (max-width: 768px) {
  .scroll-btn {
    display: none;
  } /* Oculta em mobile, pois o toque é nativo */
}

/* 
==============================================
   NOVAS SECÇÕES - EXPERIÊNCIAS E TESTEMUNHOS
==============================================
*/

/* Experiências Únicas */
.experience-card {
  display: block;
  position: relative;
  border-radius: var(--raio-borda);
  overflow: hidden;
  height: 400px;
}
.experience-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--curva-animacao);
}
.experience-card:hover .experience-img {
  transform: scale(1.1);
}
.experience-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  padding: 2rem 1.5rem 1.5rem 1.5rem;
  z-index: 2;
}
.experience-overlay h5 {
  color: white;
  font-weight: 700;
  transform: translateY(10px);
  transition: transform 0.4s var(--curva-animacao);
}
.experience-card:hover .experience-overlay h5 {
  transform: translateY(0);
}

/* Testemunhos */
.testimonials-wrapper {
  align-items: stretch; /* Garante que os cards tenham a mesma altura */
}
.testimonial-card {
  flex: 0 0 380px;
  padding: 2.5rem;
  background: var(--cor-superficie);
  border: 1px solid var(--cor-borda-glass);
  border-radius: var(--raio-borda);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.testimonial-stars {
  color: #ffc107;
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
}
.testimonial-text {
  font-size: 1.1rem;
  font-style: italic;
  color: var(--cor-texto-principal);
  flex-grow: 1;
  margin-bottom: 2rem;
}
.testimonial-author {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.testimonial-author img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
}
.author-name {
  margin-bottom: 0;
  font-weight: 700;
  color: var(--cor-texto-principal);
}
.author-title {
  font-size: 0.9rem;
  color: var(--cor-texto-secundario);
}

.js-favorito-btn .bi-heart-fill {
  color: #ff4757 !important;
  transition: transform 0.2s ease;
}

.js-favorito-btn .bi-heart-fill {
  transform: scale(1.2);
}
