/* =========================================
   BASE (COMPARTILHADO) – Rota do Ensino
   Objetivo: reset + header + footer
   ORDEM: carregar PRIMEIRO
========================================= */

/* =========================
   RESET BÁSICO
========================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: "DM Sans", "Fira Sans";
  color: #262118;
}

/* =========================
   HEADER (COMPARTILHADO)
========================= */
.header {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-img {
  height: 48px;
  width: auto;
  display: block;
}

.header-right {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  border: none;
  padding: 8px 14px;
  background: #ffffff;
  cursor: pointer;
  font-size: 14px;
  color: #262118;
}

.header-icon-btn .icon {
  font-size: 16px;
}

/* Dropdowns do header */
.header-dropdown {
  position: absolute;
  top: 52px;
  right: 0;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  padding: 6px 0;
  min-width: 190px;
  z-index: 9999;
  display: none;
}

.header-dropdown.open {
  display: block;
}

.language-dropdown {
  right: 64px;
}

.profile-dropdown {
  right: 0;
}

.header-dropdown .dropdown-item {
  width: 100%;
  padding: 8px 16px;
  border: none;
  background: transparent;
  text-align: left;
  font-size: 14px;
  cursor: pointer;
  color: #262118;
}

.header-dropdown .dropdown-item:hover {
  background-color: #f6e3d2;
}

.dropdown-link {
  display: block;
  width: 100%;
  text-decoration: none;
  color: inherit;
}

/* Searchbox no header (quando existir) */
.header-center {
  flex: 1;
  display: flex;
  justify-content: center;
  min-width: 260px;
}

.header-center .search-bar {
  width: 100%;
  max-width: 680px;
  background: #ffffff;
  border-radius: 999px;
  padding: 4px 12px 4px 22px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

/* =========================
   FOOTER – REFERÊNCIA ÚNICA
   (baseado no resultados.css)
========================= */
.footer.footer--trivago {
  background: #1b1b1b;
  color: #ffffff;
  padding: 34px 18px 18px;
}

.footer--trivago .footer2-inner {
  max-width: 1180px;
  margin: 0 auto;
}

/* Topo: logo + redes */
.footer--trivago .footer2-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}

.footer--trivago .footer2-logo {
  height: 32px;
  width: auto;
  display: block;
  filter: brightness(0) invert(1);
}

/* Redes (versão simples) */
.footer2-social--simple {
  display: flex;
  gap: 16px;
  align-items: center;
}

.footer2-social-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.footer2-social-link:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.35);
}

.footer2-social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.footer2-social-icon svg {
  display: block;
}

.footer2-social-text {
  line-height: 1;
}

/* Grid */
.footer--trivago .footer2-grid {
  display: grid;
  grid-template-columns: 320px 220px 220px 1fr;
  gap: 26px;
  align-items: start;
}

/* Títulos e links */
.footer--trivago .footer2-title {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 10px;
}

.footer--trivago .footer2-link {
  display: block;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  font-size: 14px;
  line-height: 1.9;
}

.footer--trivago .footer2-link:hover {
  color: rgba(255, 255, 255, 0.92);
  text-decoration: underline;
}

/* Endereço */
.footer2-addr {
  font-size: 12px;
  line-height: 1.5;
  color: rgba(255,255,255,0.65);
}

.footer2-addr::first-line {
  font-weight: 700;
  color: rgba(255,255,255,0.95);
}

/* Bottom */
.footer--trivago .footer2-bottom {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.65);
  font-size: 12px;
}

/* Responsivo */
@media (max-width: 1100px) {
  .footer--trivago .footer2-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .footer--trivago .footer2-top {
    align-items: flex-start;
  }

  .footer--trivago .footer2-grid {
    grid-template-columns: 1fr;
  }
}

/* 1. O container precisa ser relativo para o menu não flutuar na tela */
.footer2-country-wrap {
  position: relative;
  display: inline-block;
}

/* 2. Esconde o menu por padrão e posiciona para abrir para CIMA */
.footer2-country-menu {
  display: none; /* Escondido */
  position: absolute;
  bottom: 110%;  /* Abre acima do botão */
  left: 0;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  min-width: 180px;
  box-shadow: 0 -4px 12px rgba(0,0,0,0.15);
  z-index: 9999;
  padding: 8px 0;
}

/* 3. REGRA PRINCIPAL: Quando o JS coloca .is-open, o menu aparece */
.footer2-country-wrap.is-open .footer2-country-menu {
  display: block !important;
}

/* 4. Estilo das opções para parecer um menu limpo */
.footer2-country-option {
  display: block;
  width: 100%;
  padding: 10px 16px;
  border: none;
  background: none;
  text-align: left;
  font-size: 14px;
  cursor: pointer;
  color: #333;
  transition: background 0.2s;
}

.footer2-country-option:hover {
  background-color: #f5f5f5;
}

/* 5. Estilo do botão (trigger) */
.footer2-country-btn {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 6px;
  background: rgba(255,255,255,0.1);
  color: white; /* Ou a cor do seu footer */
}

/* =========================
   TIPOGRAFIA GLOBAL
========================= */

h1, h2, h3, h4, h5, h6 {
  font-family: "Fira Sans", "DM Sans", sans-serif;
  font-weight: 800;
}

/* =========================================================
   TOKENS (compartilhados) — alinhados com resultados.css
   - Mantém consistência visual para componentes reutilizados
========================================================= */
:root{
  --bg: #FAEEDF;
  --text: #262118;
  --muted: #6f655a;
  --card: #ffffff;
  --stroke: rgba(38, 33, 24, 0.12);
  --stroke-strong: rgba(38, 33, 24, 0.18);
  --orange: #fe5d03;
  --shadow: 0 12px 30px rgba(0, 0, 0, 0.10);
  --radius-lg: 18px;
  --radius-md: 14px;
}

/* =========================================================
   AUTOCOMPLETE (dropdown sugestões) — mesmo do resultados.css
========================================================= */
.geo-autocomplete-wrap{
  position: relative;
}

.geo-suggest{
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 9999;

  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.18);

  overflow: hidden;
  display: none;
  max-height: 320px;
  overflow-y: auto;
}

.geo-suggest.open{
  display: block;
}

.geo-suggest-section{
  padding: 10px 12px 6px;
  font-weight: 800;
  font-size: 12px;
  opacity: .75;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.geo-suggest-item{
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;

  padding: 10px 12px;
  display: grid;
  gap: 2px;
}

.geo-suggest-item:hover,
.geo-suggest-item.active,
.geo-suggest-item.is-active{
  background: rgba(0,0,0,0.06);
  outline: none;
}

.geo-suggest-title{
  font-weight: 700;
  font-size: 14px;
  color: #111;
}

.geo-suggest-sub{
  font-size: 12px;
  color: rgba(0,0,0,0.62);
}

.geo-suggest-badge{
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(254,93,3,.12);
  color: #fe5d03;
  vertical-align: middle;
}

.geo-suggest-badge--city{
  background: rgba(0, 114, 208, 0.12);
  color: #0072d0;
}

.geo-suggest-badge--bairro{
  background: #e8d2fd;
  color: #bb91e5;
}

.geo-suggest-badge--place{
  background: rgba(0, 46, 214, 0.10);
  color: #002ed6;
}

/* =========================================================
   PAINEL DE FILTROS (mega dropdown) — base (sem estilizar o trigger do desktop)
========================================================= */
.filters-wrap{ position: relative; display: inline-block; }

/* O trigger do index é um .search-input-wrapper — só precisa virar clicável e ocupar o campo */
.home-body .filters-wrap{ width: 100%; display: block; }
.home-body #filters-trigger.filters-trigger{
  width: 100%;
  cursor: pointer;
  user-select: none;
}
.home-body #filters-trigger .filters-trigger-caret{ margin-left: auto; opacity: .65; }

.filters-panel{
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: min(980px, calc(100vw - 24px));
  max-width: 980px;
  border-radius: 16px;
  border: 1px solid rgba(0,0,0,0.10);
  background: #fff;
  box-shadow: 0 18px 50px rgba(0,0,0,0.18);
  overflow: hidden;
  display: none;
  z-index: 999;
}

.filters-panel.is-open{ display: block; }

.filters-panel-inner{
  display: flex;
  flex-direction: column;
  max-height: min(78vh, 680px);
}

.filters-panel-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  background: #fff;
}

.filters-panel-title{
  font-size: 16px;
  font-weight: 800;
}

.filters-close{
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 16px;
  opacity: 0.7;
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.filters-close:hover{
  background: rgba(0,0,0,0.05);
  opacity: 1;
}

/* Chips selecionados */
.filters-selected{
  padding: 12px 16px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  background: #f7f1ff;
}

.filters-selected-chips{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filters-chip{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.10);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}

.filters-chip:hover{ border-color: rgba(0,0,0,0.22); }

/* Corpo */
.filters-body{
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 380px;
  overflow: hidden;
}

.filters-categories{
  border-right: 1px solid rgba(0,0,0,0.08);
  background: #fff;
  overflow: auto;
  padding: 10px 8px;
}

.filters-cat{
  width: 100%;
  padding: 12px 12px;
  border-radius: 12px;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font-weight: 800;
  color: rgba(0,0,0,0.55);
}

.filters-cat:hover{
  background: rgba(254, 93, 3, 0.08);
  color: var(--text);
}

.filters-cat.is-active{
  background: rgba(187, 145, 229, 0.18);
  color: var(--text);
}

.filters-content{
  overflow: auto;
  padding: 14px 16px 18px;
}

.filters-section-title{
  font-size: 15px;
  font-weight: 900;
  margin: 10px 0 14px;
}

.filters-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 18px;
}

.filter-item{
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 12px;
  padding: 10px 10px;
  cursor: pointer;
  width: 100%;
}

.filter-item:hover{
  background: rgba(0,0,0,0.03);
}

.filter-check{
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 2px solid rgba(0,0,0,0.28);
  display: inline-block;
  flex-shrink: 0;
}

.filter-check.is-on{
  border-color: var(--orange);
  background: rgba(187, 145, 229, 0.12);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.filter-check.is-on::after{
  content: '';
  width: 6px;
  height: 10px;
  border: solid var(--orange);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  display: block;
}

.filter-label{
  font-weight: 800;
  color: var(--text);
  font-size: 14px;
  line-height: normal;
}

/* Footer do painel */
.filters-footer{
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid rgba(0,0,0,0.08);
  background: #fff;
}

.filters-reset{
  height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.12);
  background: #fff;
  font-weight: 900;
  cursor: pointer;
}

.filters-apply{
  height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 0;
  background: var(--orange);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

/* Mobile: painel em tela cheia (mesma UX do resultados) */
@media (max-width: 900px){
  .filters-panel{
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    width: 100vw;
    height: 100dvh;
    max-width: none;
    border-radius: 0;
  }

  .filters-panel-inner{
    max-height: 100dvh;
  }

  .filters-body{
    grid-template-columns: 1fr;
  }

  .filters-categories{
    display: flex;
    gap: 8px;
    padding: 10px;
    border-right: 0;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    overflow: auto;
    white-space: nowrap;
  }

  .filters-cat{ width: auto; flex: 0 0 auto; }

  .filters-grid{
    grid-template-columns: 1fr;
  }
}

img.filter-opt-ico {
    width: 18px !important;
    height: 18px !important;
    display: inline-block !important;
    vertical-align: middle !important;
    margin-right: 8px !important;
    object-fit: contain !important;
    flex-shrink: 0 !important;
    max-width: 18px !important;
}

/* =========================================================
   AUTOCOMPLETE (dropdown sugestões) — igual resultados.css
========================================================= */
.geo-autocomplete-wrap {
  position: relative;
}

.geo-suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 9999;

  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.18);

  overflow: hidden;
  display: none;
  max-height: 320px;
  overflow-y: auto;
}

.geo-suggest.open { display: block; }

.geo-suggest-section {
  padding: 10px 12px 6px;
  font-weight: 800;
  font-size: 12px;
  opacity: .75;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.geo-suggest-item {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;

  padding: 10px 12px;
  display: grid;
  gap: 2px;
}

.geo-suggest-item:hover,
.geo-suggest-item.active,
.geo-suggest-item.is-active {
  background: rgba(0,0,0,0.06);
  outline: none;
}

.geo-suggest-title {
  font-weight: 700;
  font-size: 14px;
  color: #111;
}

.geo-suggest-sub {
  font-size: 12px;
  color: rgba(0,0,0,0.62);
}

.geo-suggest-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(254,93,3,.12);
  color: #fe5d03;
  vertical-align: middle;
}

.geo-suggest-badge--city {
  background: rgba(0, 114, 208, 0.12);
  color: #0072d0;
}

.geo-suggest-badge--bairro {
  background: #e8d2fd;
  color: #bb91e5;
}

.geo-suggest-badge--place {
  background: rgba(0, 46, 214, 0.10);
  color: #002ed6;
}

/* HOME (index) — keep filters panel inside viewport */
.home-body .filters-wrap { position: relative; }

.home-body #filters-panel.filters-panel,
.home-body .filters-panel {
  left: auto !important;
  right: 0 !important;                /* open to the left instead of to the right */
  width: min(980px, calc(100vw - 24px));
  max-width: 980px;
}

/* =========================================================
   COUNTRY / LANGUAGE SWITCHER — disabled for now
   Toggle by adding/removing: body.country-ui-off
========================================================= */
body.country-ui-off #lang-button,
body.country-ui-off #country-btn {
  pointer-events: none;
  opacity: 0.55;
  cursor: not-allowed;
  filter: grayscale(1);
}

/* never show the dropdown panels while disabled */
body.country-ui-off #language-dropdown,
body.country-ui-off #country-menu {
  display: none !important;
}

/* if JS toggles open state, still keep it hidden */
body.country-ui-off .footer2-country-wrap.is-open .footer2-country-menu {
  display: none !important;
}