
/* =========================================================
   ROTA TURÍSTICA PAROBÉ 1.1.0
   INGEEN SOLUÇÕES CRIATIVAS
   Identidade: Azul-marinho, branco e azul-aço
   Responsivo: Desktop, Tablet e Mobile
========================================================= */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&family=Manrope:wght@400;500;600;700;800&family=Playfair+Display:wght@600;700&display=swap');

:root {
    --navy: #183a36;
    --navy-dark: #102a27;
    --navy-light: #28534b;
    --blue: #9a7447;
    --blue-light: #f3eee5;
    --blue-soft: #e8dfd0;
    --blue-mid: #b08b5d;
    --white: #ffffff;
    --background: #f5f3ee;
    --surface: #ffffff;
    --text: #263a35;
    --muted: #7d8982;
    --border: #e8e3d9;
    --green: #62856b;
    --red: #e65b5b;
    --shadow: 0 8px 30px rgba(16,41,68,.08);
    --shadow-strong: 0 16px 45px rgba(16,41,68,.16);
    --radius: 16px;
    --header-height: 78px;
    --sidebar-width: 350px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
    width: 100%;
    height: 100%;
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
}

body {
    width: 100%;
    height: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    font-family: 'DM Sans', sans-serif;
    background: var(--background);
    color: var(--text);
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
button { border: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible { outline: 3px solid rgba(39,118,173,.35); outline-offset: 3px; }
img { max-width: 100%; }

/* ESTRUTURA */

.app-container {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* CABEÇALHO */

.top-header {
    height: var(--header-height);
    min-height: var(--header-height);
    flex-shrink: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    position: relative;
    z-index: 1000;
}

.brand-area, .header-actions { display: flex; align-items: center; }
.brand-area { gap: 13px; min-width: 0; }

.brand-icon {
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    border-radius: 14px;
    background: linear-gradient(145deg,var(--navy),#496b5b);
    color: white;
    display: grid;
    place-items: center;
    font-size: 21px;
    box-shadow: 0 5px 15px rgba(16,41,68,.2);
}

.brand-text { min-width: 0; }
.brand-text h1 {
    font-family: 'Manrope',sans-serif;
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -.8px;
    color: var(--navy);
    line-height: 1.2;
}
.brand-text h1 span { color: var(--blue); }
.brand-text small { font-size: 9px; font-weight: 800; letter-spacing: 1.7px; color: var(--muted); }

.header-actions { gap: 24px; flex-shrink: 0; }
.visitor-identification { display: flex; align-items: center; gap: 10px; }

.visitor-indicator, .live-indicator {
    width: 9px;
    height: 9px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 4px rgba(39,173,119,.12);
    animation: pulse 2s infinite;
}

.visitor-identification div { display: flex; flex-direction: column; gap: 2px; }
.visitor-identification small { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .8px; }
.visitor-identification strong { color: var(--navy); font-size: 12px; }

.header-location-btn {
    background: var(--navy);
    color: white;
    border-radius: 10px;
    padding: 12px 17px;
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 12px;
    font-weight: 700;
    transition: .25s;
}
.header-location-btn:hover { background: var(--blue); transform: translateY(-2px); }

/* ESTRUTURA PRINCIPAL */

.main-layout {
    display: flex;
    flex: 1;
    min-height: 0;
    min-width: 0;
    overflow: hidden;
}

/* PAINEL LATERAL */

.sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    height: 100%;
    min-height: 0;
    flex-shrink: 0;
    background: var(--white);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 25px 22px 15px;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #d4dee8 transparent;
    z-index: 500;
}

.sidebar::-webkit-scrollbar { width: 5px; }
.sidebar::-webkit-scrollbar-thumb { background: #d4dee8; border-radius: 10px; }

.section-label { font-size: 9px; font-weight: 800; letter-spacing: 1.7px; color: var(--blue); }
.sidebar-heading h2 {
    font-family: 'Manrope',sans-serif;
    color: var(--navy);
    font-size: 24px;
    line-height: 1.25;
    margin: 9px 0;
    letter-spacing: -.7px;
}
.sidebar-heading p { color: var(--muted); font-size: 12px; line-height: 1.7; max-width: 280px; }

/* PESQUISA */

.search-container {
    height: 46px;
    min-height: 46px;
    margin: 22px 0 24px;
    padding: 0 13px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: #f8fafc;
    transition: .25s;
}
.search-container:focus-within { border-color: var(--blue); background: white; box-shadow: 0 0 0 3px rgba(39,118,173,.08); }
.search-container > i { color: var(--muted); font-size: 13px; }
.search-container input { width: 100%; min-width: 0; outline: none; border: none; background: transparent; color: var(--text); font-size: 12px; }
.search-container input::placeholder { color: #a0adba; }
.search-container button { background: transparent; color: #9aa7b4; padding: 5px; display: none; }
.search-container button.visible { display: block; }

/* CATEGORIAS */

.category-section, .featured-section { margin-bottom: 23px; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 13px; }
.section-title h3 { font-size: 13px; font-weight: 800; color: var(--navy); }
.section-title > span { font-size: 10px; color: var(--muted); font-weight: 600; }
.category-list { display: flex; flex-wrap: wrap; gap: 8px; }

.category-button {
    background: #f3f6f9;
    color: #68798a;
    padding: 9px 11px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 10px;
    font-weight: 700;
    border: 1px solid transparent;
    transition: .25s;
}
.category-button i { font-size: 11px; }
.category-button:hover { background: var(--blue-light); color: var(--blue); }
.category-button.active { background: var(--navy); color: white; box-shadow: 0 4px 10px rgba(16,41,68,.15); }

/* DESTINOS */

.places-list { display: flex; flex-direction: column; gap: 11px; }
.place-card { border-radius: 14px; box-shadow: 0 3px 12px rgba(30,48,39,.035); }

.place-card {
    display: flex;
    gap: 12px;
    padding: 10px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: .25s;
    animation: fadeUp .35s ease both;
}
.place-card:hover, .place-card.selected {
    border-color: #a6c9e2;
    background: #f8fbfe;
    box-shadow: 0 5px 18px rgba(16,41,68,.07);
    transform: translateY(-2px);
}
.place-card-image {
    width: 76px;
    min-width: 76px;
    height: 76px;
    flex-shrink: 0;
    border-radius: 9px;
    overflow: hidden;
    background: var(--blue-soft);
}
.place-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.place-card:hover .place-card-image img { transform: scale(1.08); }
.place-card-info { min-width: 0; flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 5px; }
.place-card-category { font-size: 8px; font-weight: 800; color: var(--blue); letter-spacing: .8px; text-transform: uppercase; }
.place-card-info h4 { color: var(--navy); font-size: 12px; font-weight: 800; line-height: 1.3; }
.place-card-info p {
    color: var(--muted);
    font-size: 10px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.place-card-arrow { color: #a5b5c4; align-self: center; font-size: 12px; }
.place-provisional { display: inline-flex; align-items: center; gap: 4px; color: #9a7437; font-size: 8px; font-weight: 700; }

/* ESTADO SEM RESULTADOS */

.places-empty, .no-results {
    text-align: center;
    padding: 30px 15px;
    color: var(--muted);
}
.places-empty i, .no-results i { display: block; font-size: 25px; color: #b7c7d6; margin-bottom: 12px; }
.places-empty strong, .no-results strong { display: block; font-size: 12px; color: var(--navy); margin-bottom: 5px; }
.places-empty p, .no-results p { font-size: 10px; line-height: 1.5; }

/* VISITANTE */

.visitor-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: linear-gradient(135deg,#edf5fb,#f5f9fc);
    border: 1px solid #e1edf6;
    padding: 14px;
    border-radius: 12px;
    margin-top: auto;
}
.visitor-card-icon {
    width: 35px;
    height: 35px;
    min-width: 35px;
    border-radius: 10px;
    background: white;
    color: var(--blue);
    display: grid;
    place-items: center;
    font-size: 15px;
}
.visitor-card-content strong { font-size: 11px; color: var(--navy); }
.visitor-card-content p { font-size: 10px; color: #718295; line-height: 1.5; margin: 5px 0; }
.visitor-card-content span { font-size: 9px; font-weight: 700; color: var(--green); }
.visitor-card-content span i { margin-right: 3px; }

.sidebar-footer {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-top: 20px;
    margin-top: 15px;
    border-top: 1px solid var(--border);
}
.sidebar-footer > span, .sidebar-footer > small { color: #9ba8b5; font-size: 8px; font-weight: 700; letter-spacing: 1px; }
.sidebar-footer strong { font-family: 'Manrope',sans-serif; font-size: 17px; color: var(--navy); }
.sidebar-footer strong small { color: var(--blue); font-size: 8px; letter-spacing: .8px; }

/* ÁREA DO MAPA */

.map-area {
    position: relative;
    flex: 1;
    min-width: 0;
    min-height: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #e8eef3;
    overflow: hidden;
}

.map-topbar {
    height: 62px;
    min-height: 62px;
    flex-shrink: 0;
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 23px;
    z-index: 450;
}
.map-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.map-title > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.map-title strong { color: var(--navy); font-size: 12px; }
.map-title small { color: var(--muted); font-size: 10px; }
.map-tools { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }
.map-tools button {
    background: #f0f4f8;
    color: var(--navy);
    border-radius: 9px;
    padding: 10px 13px;
    font-size: 11px;
    font-weight: 700;
    transition: .2s;
}
.map-tools button:hover { background: var(--navy); color: white; }
.map-tools button i { margin-right: 5px; }

/* LEAFLET */

#map {
    position: relative;
    flex: 1 1 0;
    min-height: 0;
    min-width: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background: #e7edf2;
}
.leaflet-container { width: 100%; height: 100%; font-family: 'DM Sans',sans-serif; background: #e7edf2; }
.leaflet-control-zoom { border: none !important; box-shadow: var(--shadow) !important; }
.leaflet-control-zoom a {
    color: var(--navy) !important;
    border: none !important;
    width: 36px !important;
    height: 36px !important;
    line-height: 36px !important;
}
.leaflet-popup-content-wrapper { border-radius: 12px !important; box-shadow: var(--shadow-strong) !important; }
.leaflet-popup-content { margin: 14px !important; }
.leaflet-popup-content strong { color: var(--navy); font-size: 13px; }
.leaflet-popup-content p { font-size: 11px; color: var(--muted); margin: 6px 0 !important; }
.leaflet-popup-content button { background: var(--navy); color: white; border-radius: 7px; padding: 8px 11px; font-size: 10px; font-weight: 700; }

/* SOBREPOSIÇÕES */

.map-overlay-top { position: absolute; top: 82px; left: 20px; z-index: 400; pointer-events: none; }
.map-discovery-card {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 12px 15px;
    border-radius: 12px;
    background: rgba(255,255,255,.94);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow);
}
.discovery-icon {
    width: 37px;
    height: 37px;
    flex-shrink: 0;
    background: var(--blue-light);
    color: var(--blue);
    border-radius: 10px;
    display: grid;
    place-items: center;
}
.map-discovery-card > div:last-child { display: flex; flex-direction: column; gap: 4px; }
.map-discovery-card strong { font-size: 11px; color: var(--navy); }
.map-discovery-card span { font-size: 9px; color: var(--muted); }

/* LEGENDA */

.map-legend {
    position: absolute;
    bottom: 20px;
    left: 20px;
    z-index: 400;
    background: rgba(255,255,255,.95);
    backdrop-filter: blur(10px);
    border-radius: 11px;
    box-shadow: var(--shadow);
    padding: 11px 14px;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}
.map-legend span { display: flex; align-items: center; gap: 6px; color: #627385; font-size: 9px; font-weight: 700; }
.legend-dot { width: 8px; height: 8px; flex-shrink: 0; border-radius: 50%; }
.legend-dot.historical { background: #a67c4d; }
.legend-dot.religious { background: #8666c5; }
.legend-dot.nature { background: #35a66e; }
.legend-dot.commerce { background: #df9841; }

/* GPS */

.gps-floating-button {
    position: absolute;
    right: 20px;
    bottom: 76px;
    z-index: 400;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 17px;
    background: var(--navy);
    color: white;
    border-radius: 11px;
    box-shadow: 0 7px 20px rgba(16,41,68,.25);
    font-size: 11px;
    font-weight: 700;
    transition: .25s;
}
.gps-floating-button:hover { background: var(--blue); transform: translateY(-3px); }
.gps-floating-button i { font-size: 15px; }

/* VISITANTES */

.visitors-floating {
    position: absolute;
    right: 20px;
    top: 82px;
    z-index: 400;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 13px;
    background: rgba(255,255,255,.95);
    border-radius: 11px;
    box-shadow: var(--shadow);
}
.visitors-icon {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    color: var(--green);
    background: #e8f7f0;
}
.visitors-floating > div:last-child { display: flex; flex-direction: column; gap: 2px; }
.visitors-floating strong { color: var(--navy); font-size: 14px; }
.visitors-floating small { color: var(--muted); font-size: 8px; }

/* STATUS GPS */

.gps-status {
    position: absolute;
    top: 150px;
    right: 20px;
    max-width: 310px;
    z-index: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    padding: 12px 14px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    font-size: 10px;
    color: var(--text);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: .3s;
}
.gps-status.show { opacity: 1; visibility: visible; transform: translateY(0); }
.gps-status > i { color: var(--blue); font-size: 15px; }
.gps-status span { flex: 1; line-height: 1.5; }
.gps-status button { background: transparent; color: var(--muted); }

/* MARCADORES */

.custom-map-marker { background: transparent; border: none; }
.marker-pin {
    width: 37px;
    height: 37px;
    border-radius: 50% 50% 50% 5px;
    transform: rotate(-45deg);
    display: grid;
    place-items: center;
    color: white;
    border: 3px solid white;
    box-shadow: 0 4px 12px rgba(0,0,0,.24);
    transition: .2s;
}
.marker-pin i { transform: rotate(45deg); font-size: 13px; }
.marker-pin.historico { background: #a67c4d; }
.marker-pin.religioso { background: #8666c5; }
.marker-pin.natureza { background: #35a66e; }
.marker-pin.comercio { background: #df9841; }
.marker-pin.monumento { background: var(--blue); }
.marker-pin:hover { transform: rotate(-45deg) scale(1.15); }

.user-location-marker {
    width: 20px;
    height: 20px;
    border: 4px solid white;
    border-radius: 50%;
    background: #2588ee;
    box-shadow: 0 0 0 8px rgba(37,136,238,.2);
    animation: gpsPulse 2s infinite;
}

/* =========================================================
   NOVO SISTEMA DE ROTA TURÍSTICA 1.1.0
========================================================= */

/* Botões iniciar e encerrar */

#startTourButton, #stopTourButton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    min-height: 46px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 800;
    transition: background .2s, transform .2s, box-shadow .2s;
}

#startTourButton {
    background: linear-gradient(135deg,var(--navy),#496b5b);
    color: white;
    box-shadow: 0 5px 14px rgba(16,41,68,.17);
}
#startTourButton:hover { background: linear-gradient(135deg,var(--blue),#398bc3); transform: translateY(-2px); box-shadow: 0 8px 18px rgba(16,41,68,.2); }
#startTourButton:active, #stopTourButton:active { transform: scale(.98); }

#stopTourButton {
    background: #fbeeee;
    color: #b94a4a;
    border: 1px solid #f3d8d8;
}
#stopTourButton:hover { background: #f6dddd; }

/* Painel de progresso */

#tourProgressPanel {
    display: none;
    width: 100%;
    margin: 14px 0;
    padding: 16px;
    border: 1px solid #dce8f2;
    border-radius: 13px;
    background: linear-gradient(145deg,#f5f9fc,#eaf3fa);
    box-shadow: 0 5px 18px rgba(16,41,68,.06);
}
#tourProgressPanel.show { display: block; animation: fadeUp .25s ease; }

#tourStatusTitle {
    display: block;
    color: var(--navy);
    font-family: 'Manrope',sans-serif;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.4;
}
#tourStatusDescription {
    margin-top: 5px;
    color: #6f8192;
    font-size: 10px;
    line-height: 1.5;
}
#tourCurrentDestination {
    display: block;
    margin-top: 13px;
    padding: 11px 12px;
    border-radius: 9px;
    background: white;
    border: 1px solid #e2ebf3;
    color: var(--navy);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.5;
}
#tourCurrentDestination::before {
    content: 'DESTINO ATUAL';
    display: block;
    margin-bottom: 4px;
    color: var(--blue);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 1px;
}
#tourProgressCount {
    display: block;
    margin-top: 12px;
    color: #62778a;
    font-size: 9px;
    font-weight: 800;
}
#tourProgressBar {
    display: block;
    width: 0;
    height: 6px;
    margin-top: 8px;
    border-radius: 20px;
    background: linear-gradient(90deg,var(--blue),#65a9d7);
    transition: width .4s ease;
}
#tourProgressPanel::after {
    content: '';
    display: block;
    width: 100%;
    height: 6px;
    margin-top: -6px;
    border-radius: 20px;
    background: #d9e5ef;
    z-index: -1;
}

/* Indicadores flutuantes da rota */

#mapRouteIndicator, #mapNextDestination {
    display: none;
    position: absolute;
    left: 20px;
    z-index: 420;
    max-width: min(340px,calc(100% - 40px));
    padding: 12px 15px;
    border: 1px solid rgba(220,232,242,.95);
    border-radius: 12px;
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow);
    color: var(--navy);
    font-size: 11px;
    line-height: 1.5;
}
#mapRouteIndicator { top: 155px; }
#mapNextDestination { top: 220px; }
#mapRouteIndicator.show, #mapNextDestination.show { display: block; animation: fadeUp .25s ease; }

#mapRouteIndicator i, #mapNextDestination i { color: var(--blue); margin-right: 7px; }
#mapRouteIndicator strong, #mapNextDestination strong { color: var(--navy); }

/* Estado ativo dos botões */

#startTourButton:disabled, #stopTourButton:disabled {
    opacity: .45;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* =========================================================
   NOTIFICAÇÃO DE PROXIMIDADE
========================================================= */

.proximity-notification {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: min(390px,calc(100% - 30px));
    display: flex;
    align-items: flex-start;
    gap: 13px;
    background: white;
    padding: 18px;
    border-radius: 16px;
    box-shadow: 0 15px 50px rgba(10,29,50,.22);
    border: 1px solid #e7edf3;
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(25px);
    transition: .35s cubic-bezier(.2,.8,.2,1);
}
.proximity-notification.show { opacity: 1; visibility: visible; transform: translateY(0); }
.proximity-icon {
    width: 43px;
    height: 43px;
    min-width: 43px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--blue-light);
    color: var(--blue);
    font-size: 18px;
}
.proximity-content { flex: 1; min-width: 0; }
.proximity-label { font-size: 8px; font-weight: 800; letter-spacing: 1.3px; color: var(--green); }
.proximity-content strong { display: block; color: var(--navy); font-size: 13px; line-height: 1.4; margin: 5px 0; }
.proximity-content p { color: var(--muted); font-size: 10px; line-height: 1.5; }
.proximity-content button {
    margin-top: 12px;
    background: var(--navy);
    color: white;
    padding: 10px 13px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 700;
    transition: .2s;
}
.proximity-content button:hover { background: var(--blue); }
.proximity-content button i { margin-left: 6px; }
.notification-close { background: transparent; color: #9aa7b4; font-size: 13px; padding: 3px; }

/* MODAIS */

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(5,18,32,.72);
    backdrop-filter: blur(5px);
    z-index: 4000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: .3s;
}
.modal-backdrop.show { opacity: 1; visibility: visible; }

.place-modal, .about-modal {
    position: relative;
    width: 100%;
    max-width: 650px;
    max-height: 90vh;
    max-height: 90dvh;
    overflow-x: hidden;
    overflow-y: auto;
    background: white;
    border-radius: 18px;
    box-shadow: 0 20px 70px rgba(0,0,0,.3);
    transform: translateY(20px) scale(.98);
    transition: .3s;
    scrollbar-width: thin;
}
.modal-backdrop.show .place-modal, .modal-backdrop.show .about-modal { transform: translateY(0) scale(1); }

.modal-close {
    position: absolute;
    top: 13px;
    right: 13px;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: rgba(8,25,43,.72);
    color: white;
    display: grid;
    place-items: center;
    z-index: 5;
    transition: .2s;
}
.modal-close:hover { background: var(--blue); transform: rotate(90deg); }

/* IMAGEM DO MODAL */

.modal-image-container { height: 235px; position: relative; overflow: hidden; background: #dce8f1; }
.modal-image-container img { width: 100%; height: 100%; object-fit: cover; }
.modal-image-overlay { position: absolute; inset: 0; background: linear-gradient(transparent 40%,rgba(7,25,44,.65)); pointer-events: none; }
.modal-category {
    position: absolute;
    bottom: 17px;
    left: 23px;
    background: rgba(255,255,255,.95);
    color: var(--navy);
    padding: 7px 11px;
    border-radius: 6px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1px;
}

/* CONTEÚDO DO MODAL */

.modal-content { padding: 25px 28px 28px; }
.modal-location-label { font-size: 9px; font-weight: 800; letter-spacing: 1px; color: var(--blue); }
.modal-content h2 { font-family: 'Playfair Display','Manrope',sans-serif; font-size: 27px; color: var(--navy); line-height: 1.25; margin: 10px 0 7px; }
.modal-subtitle { font-size: 12px; color: var(--muted); line-height: 1.6; }
.modal-information { margin-top: 25px; }
.modal-information h3 { color: var(--navy); font-size: 14px; margin-bottom: 13px; }
.modal-information h3 i { color: var(--blue); margin-right: 7px; }
#modalDescription { font-size: 12px; line-height: 1.9; color: #5c6c7c; white-space: pre-line; }

.historical-timeline {
    margin: 24px 0;
    border-left: 2px solid #dce9f3;
    padding-left: 18px;
    display: flex;
    flex-direction: column;
    gap: 17px;
}
.timeline-item { position: relative; }
.timeline-item::before {
    content: '';
    position: absolute;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--blue);
    left: -23.5px;
    top: 3px;
    box-shadow: 0 0 0 4px #eaf3fa;
}
.timeline-item strong { color: var(--blue); font-size: 12px; }
.timeline-item p { color: #66788a; font-size: 11px; line-height: 1.6; margin-top: 4px; }

.modal-address {
    background: #f4f7fa;
    padding: 13px;
    border-radius: 9px;
    color: #6c7c8b;
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: 11px;
}
.modal-address i { color: var(--blue); }
.modal-actions { display: flex; gap: 10px; margin-top: 18px; }
.modal-actions button { flex: 1; padding: 13px; border-radius: 9px; font-size: 11px; font-weight: 700; transition: .2s; }
.modal-route-button { background: var(--navy); color: white; }
.modal-route-button:hover { background: var(--blue); }
.modal-share-button { background: var(--blue-light); color: var(--navy); }
.modal-share-button:hover { background: var(--blue-soft); }
.modal-source { margin-top: 20px; border-top: 1px solid var(--border); padding-top: 14px; font-size: 9px; line-height: 1.6; color: #98a5b1; }

/* SOBRE */

.about-modal { max-width: 440px; padding: 40px 30px; text-align: center; }
.about-logo {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    display: grid;
    place-items: center;
    border-radius: 22px;
    background: linear-gradient(145deg,var(--navy),var(--blue));
    color: white;
    font-size: 30px;
    box-shadow: var(--shadow);
}
.about-modal h2 { font-family: 'Playfair Display','Manrope',sans-serif; font-size: 25px; color: var(--navy); margin: 12px 0; }
.about-modal p { color: #708092; font-size: 12px; line-height: 1.8; margin-bottom: 13px; }
.about-version { padding-top: 20px; margin-top: 20px; border-top: 1px solid var(--border); font-size: 9px; font-weight: 800; color: var(--blue); letter-spacing: .8px; }

/* CARREGAMENTO */

.loading-screen {
    position: fixed;
    inset: 0;
    background: var(--navy-dark);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    transition: opacity .5s,visibility .5s;
}
.loading-screen.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loading-logo {
    width: 75px;
    height: 75px;
    border-radius: 22px;
    background: linear-gradient(145deg,#286d9d,#173c60);
    display: grid;
    place-items: center;
    font-size: 32px;
    margin-bottom: 20px;
    box-shadow: 0 10px 35px rgba(0,0,0,.3);
    animation: logoFloat 2s ease-in-out infinite;
}
.loading-screen h2 { font-family: 'Manrope',sans-serif; font-size: 26px; letter-spacing: -.7px; }
.loading-screen h2 span { color: #73b6e4; }
.loading-screen p { color: #a8bfd2; font-size: 12px; margin-top: 8px; }
.loading-progress { width: 180px; height: 3px; background: rgba(255,255,255,.13); border-radius: 10px; overflow: hidden; margin: 25px 0 20px; }
.loading-progress div { height: 100%; width: 45%; background: #68b2e6; border-radius: 10px; animation: loadingBar 1.5s ease-in-out infinite; }
.loading-screen > small { color: #718da6; font-size: 8px; font-weight: 800; letter-spacing: 2px; }

/* NAVEGAÇÃO MOBILE */

.mobile-navigation { display: none; }

/* ANIMAÇÕES */

@keyframes pulse {
    0%,100% { box-shadow: 0 0 0 4px rgba(39,173,119,.12); }
    50% { box-shadow: 0 0 0 8px rgba(39,173,119,.04); }
}
@keyframes gpsPulse {
    0%,100% { box-shadow: 0 0 0 5px rgba(37,136,238,.18); }
    50% { box-shadow: 0 0 0 13px rgba(37,136,238,.04); }
}
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes logoFloat {
    0%,100% { transform: translateY(0); }
    50% { transform: translateY(-7px); }
}
@keyframes loadingBar {
    0% { transform: translateX(-120%); }
    100% { transform: translateX(350%); }
}

/* TABLETS */

@media (max-width: 1050px) {
    :root { --sidebar-width: 300px; }
    .sidebar { padding: 22px 17px 14px; }
    .top-header { padding: 0 20px; }
    .map-legend { gap: 9px; }
}

/* MOBILE */

@media (max-width: 768px) {
    :root { --header-height: 65px; }
    body { overflow: hidden; }
    .app-container { height: 100vh; height: 100dvh; min-height: 0; }
    .top-header { height: var(--header-height); min-height: var(--header-height); padding: 0 15px; }
    .brand-area { gap: 9px; }
    .brand-icon { width: 39px; height: 39px; border-radius: 11px; font-size: 18px; }
    .brand-text h1 { font-size: 17px; }
    .brand-text small { font-size: 7px; letter-spacing: 1.1px; }
    .header-actions { gap: 10px; }
    .visitor-identification { gap: 7px; }
    .visitor-indicator { width: 7px; height: 7px; }
    .visitor-identification small { font-size: 7px; }
    .visitor-identification strong { font-size: 9px; }
    .header-location-btn { width: 38px; height: 38px; padding: 0; justify-content: center; border-radius: 10px; }
    .header-location-btn span { display: none; }

    .main-layout { position: relative; display: block; flex: 1; min-height: 0; overflow: hidden; }

    .sidebar {
        display: none;
        position: absolute;
        inset: 0;
        width: 100%;
        min-width: 0;
        height: 100%;
        padding: 20px 16px 20px;
        z-index: 600;
        border: none;
    }
    .sidebar.mobile-visible { display: flex; animation: fadeUp .25s ease; }
    .sidebar-heading h2 { font-size: 22px; }
    .search-container { margin: 17px 0 19px; }
    .category-section { margin-bottom: 19px; }
    .category-list { gap: 7px; }
    .category-button { padding: 10px 12px; font-size: 10px; }
    .places-list { gap: 10px; }
    .place-card-image { width: 68px; min-width: 68px; height: 68px; }
    .sidebar-footer { padding-bottom: 5px; }

    .map-area { width: 100%; height: 100%; min-height: 0; }
    .map-topbar { height: 53px; min-height: 53px; padding: 0 13px; }
    .map-title { gap: 9px; }
    .map-title strong { font-size: 10px; }
    .map-title small { font-size: 9px; }
    .map-tools { gap: 5px; }
    .map-tools button { padding: 9px; font-size: 10px; }
    .map-tools button span { display: none; }
    .map-tools button i { margin: 0; }
    #map { flex: 1 1 0; height: auto; min-height: 0; width: 100%; }

    .map-overlay-top { top: 65px; left: 10px; }
    .map-discovery-card { padding: 9px 11px; gap: 8px; border-radius: 10px; }
    .discovery-icon { width: 32px; height: 32px; font-size: 13px; }
    .map-discovery-card strong { font-size: 10px; }
    .map-discovery-card span { font-size: 8px; }

    .visitors-floating { top: 65px; right: 10px; padding: 8px 10px; gap: 7px; }
    .visitors-icon { width: 28px; height: 28px; font-size: 12px; }
    .visitors-floating strong { font-size: 12px; }
    .visitors-floating small { font-size: 7px; }

    .map-legend { left: 10px; bottom: 17px; right: 10px; justify-content: center; padding: 9px; gap: 9px 12px; border-radius: 9px; }
    .map-legend span { font-size: 8px; gap: 5px; }
    .legend-dot { width: 7px; height: 7px; }

    .gps-floating-button {
        right: 12px;
        bottom: 88px;
        width: 45px;
        height: 45px;
        padding: 0;
        justify-content: center;
        border-radius: 13px;
    }
    .gps-floating-button i { font-size: 18px; }
    .gps-floating-button span { display: none; }

    .gps-status { top: 115px; right: 10px; left: 10px; max-width: none; font-size: 10px; }

    /* ROTA NO MOBILE */
    #tourProgressPanel { margin: 10px 0; padding: 13px; }
    #tourStatusTitle { font-size: 12px; }
    #tourCurrentDestination { margin-top: 10px; }
    #mapRouteIndicator, #mapNextDestination {
        left: 10px;
        right: 10px;
        max-width: none;
        padding: 10px 12px;
        font-size: 10px;
    }
    #mapRouteIndicator { top: 115px; }
    #mapNextDestination { top: 170px; }

    /* NAVEGAÇÃO INFERIOR */
    .mobile-navigation {
        height: calc(66px + env(safe-area-inset-bottom));
        min-height: calc(66px + env(safe-area-inset-bottom));
        flex-shrink: 0;
        padding: 5px 10px calc(5px + env(safe-area-inset-bottom));
        background: rgba(255,255,255,.98);
        border-top: 1px solid var(--border);
        display: flex;
        align-items: center;
        justify-content: space-around;
        z-index: 1000;
        box-shadow: 0 -5px 20px rgba(16,41,68,.05);
    }
    .mobile-nav-item {
        flex: 1;
        height: 100%;
        background: transparent;
        color: #91a0ae;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        transition: .2s;
    }
    .mobile-nav-item i { font-size: 18px; }
    .mobile-nav-item span { font-size: 9px; font-weight: 700; }
    .mobile-nav-item.active { color: var(--blue); }
    .mobile-nav-item.active i { transform: translateY(-2px); }

    /* NOTIFICAÇÃO MOBILE */
    .proximity-notification {
        bottom: calc(78px + env(safe-area-inset-bottom));
        right: 10px;
        width: calc(100% - 20px);
        padding: 14px;
        border-radius: 14px;
        gap: 10px;
    }
    .proximity-icon { width: 37px; height: 37px; min-width: 37px; font-size: 15px; }
    .proximity-content strong { font-size: 12px; }
    .proximity-content p { font-size: 9px; }

    /* MODAIS MOBILE */
    .modal-backdrop { padding: 10px; padding-bottom: max(10px,env(safe-area-inset-bottom)); align-items: flex-end; }
    .place-modal { max-height: 92vh; max-height: 92dvh; border-radius: 18px 18px 12px 12px; }
    .modal-image-container { height: 190px; }
    .modal-content { padding: 20px 19px 23px; }
    .modal-content h2 { font-size: 21px; }
    .modal-information { margin-top: 20px; }
    #modalDescription { font-size: 11px; }
    .historical-timeline { gap: 14px; }
    .modal-actions { flex-direction: column; }
    .modal-actions button { padding: 14px; }
    .about-modal { margin: auto 0; padding: 35px 23px; }
}

/* CELULARES PEQUENOS */

@media (max-width: 380px) {
    .brand-text h1 { font-size: 15px; }
    .brand-text small { font-size: 6px; }
    .visitor-identification small { font-size: 6px; }
    .visitor-identification strong { font-size: 8px; }
    .map-discovery-card span { display: none; }
    .map-legend { gap: 8px; }
    .map-legend span { font-size: 7px; }
    .mobile-nav-item span { font-size: 8px; }
    #mapRouteIndicator, #mapNextDestination { font-size: 9px; }
}

/* ACESSIBILIDADE */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

/* ESTADOS AUXILIARES */

.no-results { text-align: center; padding: 30px 15px; color: var(--muted); }
.no-results i { font-size: 25px; color: #b7c7d6; margin-bottom: 12px; }
.no-results strong { display: block; font-size: 12px; color: var(--navy); margin-bottom: 5px; }
.no-results p { font-size: 10px; line-height: 1.5; }
button:disabled { opacity: .5; cursor: not-allowed; }

/* PROTEÇÃO CONTRA ESTOURO DE TELA */

@media (max-width: 768px) {
    .app-container, .main-layout, .map-area, #map { max-width: 100%; }
    .map-area, .sidebar { overscroll-behavior: contain; }
    .place-modal, .about-modal { overscroll-behavior: contain; }
}

/* TELA CHEIA */

.map-area:fullscreen {
    width: 100%;
    height: 100%;
    background: white;
}
.map-area:fullscreen #map { height: 100%; }


/* REFINAMENTO VISUAL E ESTADOS DO INVENTÁRIO · V1.2 */
:root { --shadow: 0 10px 32px rgba(24,58,54,.075); --shadow-strong: 0 18px 48px rgba(24,58,54,.16); }
.top-header { box-shadow: 0 3px 18px rgba(24,58,54,.035); }
.brand-icon { background: linear-gradient(145deg,#183a36,#56715d); }
.header-location-btn, #startTourButton { background: linear-gradient(135deg,#183a36,#496b5b); }
.category-button.active { background: #183a36; }
.place-card { border-color: #e9e4da; }
.place-card:hover, .place-card.selected { border-color: #c5ae8d; background: #fbfaf6; }
.place-card-category { color: #987247; }
.place-provisional { color: #8a6b3e; background: #f5efe4; border-radius: 20px; padding: 4px 7px; width: fit-content; line-height: 1.35; }
.map-topbar { background: rgba(250,249,245,.97); }
.map-discovery-card { border: 1px solid rgba(232,227,217,.9); }
.gps-floating-button { background: #183a36; }
.modal-category { color: #183a36; }
button:focus-visible, input:focus-visible { outline-color: rgba(154,116,71,.5); }
@media (max-width: 768px) { .sidebar { background: #fbfaf7; } }

.marker-pin.folclore { background: #a65d46; }
.marker-pin.arquitetonico { background: #8a7657; }
.marker-pin.imaterial, .marker-pin.cultura { background: #806a9a; }
.marker-pin.paisagem, .marker-pin.rural { background: #66845f; }
