
/* CONFIGURAÇÕES GERAIS */

:root {
    --primary: #ff6329;
    --primary-hover: #e94d15;
    --background: #f7f6f2;
    --surface: #ffffff;
    --text: #141414;
    --muted: #707070;
    --border: #e5e5e5;
    --shadow: 0 8px 30px rgba(0,0,0,.07);
}

body.dark {
    --background: #111111;
    --surface: #1e1e1e;
    --text: #f5f5f5;
    --muted: #b5b5b5;
    --border: #353535;
    --shadow: 0 8px 30px rgba(0,0,0,.2);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

body {
    font-family: "Manrope", Arial, sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.7;
    transition: background .3s, color .3s;
}

a {
    color: inherit;
    text-decoration: none;
}

button, input, select {
    font: inherit;
}

button {
    cursor: pointer;
}

button, a, input, select {
    -webkit-tap-highlight-color: transparent;
}

:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 4px;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
}

.section {
    padding-top: 90px;
    padding-bottom: 90px;
}

h2 {
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -1.5px;
    margin: 12px 0;
}

.eyebrow {
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 2px;
}

.section-description {
    color: var(--muted);
    margin-bottom: 30px;
}

/* MENU */

.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 78px;
    gap: 25px;
}

.logo {
    font-size: 29px;
    font-weight: 800;
    letter-spacing: -2px;
    white-space: nowrap;
}

.logo span {
    color: var(--primary);
}

nav {
    display: flex;
    gap: 28px;
}

nav a {
    font-size: 14px;
    font-weight: 700;
    transition: color .2s;
}

nav a:hover {
    color: var(--primary);
}

.theme-button, .menu-toggle {
    background: var(--background);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 12px;
    width: 42px;
    height: 42px;
    font-size: 22px;
}

.menu-toggle {
    display: none;
}

/* BANNER PRINCIPAL */

.hero {
    min-height: 620px;
    display: flex;
    align-items: center;
    color: white;

    background:
        linear-gradient(90deg,
        rgba(0,0,0,.85),
        rgba(0,0,0,.2)),
        url("https://images.unsplash.com/photo-1543059080-f9b1272213d5?auto=format&fit=crop&w=1920&q=85")
        center/cover no-repeat;

    background-color: #222222;
}

.hero-content {
    padding-top: 70px;
    padding-bottom: 70px;
}

.tag {
    display: inline-block;
    border: 1px solid rgba(255,255,255,.4);
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 12px;
    letter-spacing: 2px;
    margin-bottom: 25px;
}

.hero h1 {
    font-size: clamp(48px, 8vw, 90px);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -4px;
}

.hero h1 span {
    color: var(--primary);
}

.hero p {
    max-width: 550px;
    font-size: 18px;
    margin: 25px 0 35px;
    color: #eeeeee;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

/* BOTÕES */

.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    border-radius: 12px;
    border: 1px solid transparent;
    font-size: 14px;
    font-weight: 800;
    transition: .25s;
}

.primary {
    background: var(--primary);
    color: #ffffff;
}

.primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.outline {
    border-color: rgba(255,255,255,.7);
    color: white;
    background: transparent;
}

.outline:hover {
    background: rgba(255,255,255,.15);
}

.secondary {
    background: var(--background);
    border-color: var(--border);
    color: var(--text);
}

.secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.full {
    width: 100%;
}

/* INDICADORES */

.statistics {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    padding: 30px 0;
    gap: 20px;
    text-align: center;
}

.stats-grid strong {
    display: block;
    color: var(--primary);
    font-size: 36px;
    font-weight: 800;
}

.stats-grid span {
    color: var(--muted);
    font-size: 13px;
}

/* PESQUISA E FILTROS */

.search {
    width: 100%;
    padding: 18px 22px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    border-radius: 14px;
    outline-offset: 2px;
    margin-bottom: 24px;
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 32px;
}

.filter {
    padding: 10px 20px;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    transition: .2s;
}

.filter:hover,
.filter.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* CARTÕES */

.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.attraction-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform .3s;
}

.attraction-card:hover {
    transform: translateY(-6px);
}

.card-image {
    height: 220px;
    position: relative;
    overflow: hidden;
    background: #d6d6d6;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s;
}

.attraction-card:hover img {
    transform: scale(1.06);
}

.category-tag {
    position: absolute;
    top: 15px;
    left: 15px;
    background: white;
    color: #141414;
    border-radius: 50px;
    padding: 5px 12px;
    font-size: 11px;
    font-weight: 800;
}

.favorite-button {
    position: absolute;
    right: 15px;
    top: 15px;
    width: 42px;
    height: 42px;
    border: none;
    background: white;
    color: #333;
    border-radius: 50%;
    font-size: 23px;
}

.favorite-button.selected {
    color: #e53935;
}

.card-body {
    padding: 23px;
}

.card-body h3 {
    font-size: 22px;
    line-height: 1.3;
    margin-bottom: 8px;
}

.card-body p {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 18px;
}

.card-location {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 15px;
}

.card-footer {
    border-top: 1px solid var(--border);
    padding-top: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.price {
    color: #218a60;
    font-size: 14px;
    font-weight: 800;
}

body.dark .price {
    color: #65d5a7;
}

.map-link {
    color: var(--primary);
    font-size: 13px;
    font-weight: 800;
}

/* GERADOR DE ROTEIROS */

.planner-section {
    background: var(--surface);
    padding: 90px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.planner {
    padding: 35px;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 22px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 25px;
}

.field label {
    display: block;
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 8px;
}

.field select,
.field input {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
}

.route-result {
    margin-top: 35px;
    padding: 30px;
    border: 1px solid var(--border);
    background: var(--background);
    border-radius: 22px;
    animation: appear .4s ease;
}

.route-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin: 25px 0;
}

.summary-item {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 20px;
    border-radius: 14px;
}

.summary-item span {
    color: var(--muted);
    font-size: 12px;
}

.summary-item strong {
    display: block;
    color: var(--primary);
    font-size: 24px;
}

.timeline {
    border-left: 2px solid var(--primary);
    margin: 30px 0 30px 10px;
    padding-left: 25px;
}

.timeline-item {
    position: relative;
    margin-bottom: 25px;
    padding: 20px;
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: 14px;
}

.timeline-item::before {
    content: "";
    position: absolute;
    top: 25px;
    left: -33px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--primary);
}

.timeline-item h3 {
    margin: 5px 0;
}

.timeline-item p {
    font-size: 14px;
    color: var(--muted);
}

.time {
    color: var(--primary);
    font-size: 13px;
    font-weight: 800;
}

.route-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 25px;
}

.notice {
    font-size: 13px;
    color: var(--muted);
    margin-top: 15px;
}

.empty {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--muted);
    border: 1px dashed var(--border);
    border-radius: 15px;
    padding: 40px 20px;
}

.saved-title {
    margin: 40px 0 20px;
}

.saved-route {
    background: var(--surface);
    padding: 20px;
    margin-bottom: 15px;
    border: 1px solid var(--border);
    border-radius: 15px;
}

.saved-route .btn {
    margin-top: 12px;
    margin-right: 8px;
}

/* SOBRE E RODAPÉ */

.about {
    background: #161616;
    color: white;
    text-align: center;
    padding: 90px 0;
}

.about p {
    max-width: 700px;
    margin: 25px auto;
    color: #bbbbbb;
}

.footer {
    padding: 45px 0;
    text-align: center;
    background: #0c0c0c;
    color: #ffffff;
}

.footer p {
    color: #aaaaaa;
    font-size: 13px;
    margin: 10px 0;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 25px;
    margin: 25px 0;
    font-size: 14px;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer hr {
    border: none;
    border-top: 1px solid #333;
    margin: 25px 0;
}

/* BOTÃO VOLTAR AO TOPO */

#backToTop {
    display: none;
    position: fixed;
    right: 25px;
    bottom: 25px;
    width: 45px;
    height: 45px;
    border: none;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    font-size: 24px;
    z-index: 90;
}

/* NOTIFICAÇÕES */

#toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translate(-50%, 120px);
    opacity: 0;
    background: #171717;
    color: white;
    padding: 14px 24px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    z-index: 200;
    transition: .3s;
    text-align: center;
    max-width: 90%;
}

#toast.show {
    transform: translate(-50%, 0);
    opacity: 1;
}

@keyframes appear {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* TABLETS */

@media (max-width: 900px) {
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    nav {
        gap: 15px;
    }
}

/* CELULARES */

@media (max-width: 650px) {

    .navbar {
        min-height: 65px;
        gap: 10px;
    }

    .menu-toggle {
        display: block;
        margin-left: auto;
    }

    nav {
        display: none;
        position: absolute;
        top: 65px;
        left: 0;
        right: 0;
        background: var(--surface);
        padding: 25px;
        flex-direction: column;
        border-bottom: 1px solid var(--border);
    }

    nav.open {
        display: flex;
    }

    .hero {
        min-height: 550px;
    }

    .hero h1 {
        letter-spacing: -2px;
    }

    .hero p {
        font-size: 16px;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    .cards-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        gap: 8px;
    }

    .stats-grid strong {
        font-size: 25px;
    }

    .stats-grid span {
        font-size: 11px;
    }

    .section,
    .planner-section,
    .about {
        padding-top: 55px;
        padding-bottom: 55px;
    }

    .planner,
    .route-result {
        padding: 20px;
    }

    .route-summary {
        grid-template-columns: 1fr;
    }

    .route-actions .btn {
        width: 100%;
    }

    .card-image {
        height: 230px;
    }
}

/* IMPRESSÃO E PDF */

@media print {

    body {
        background: white;
        color: black;
    }

    body * {
        visibility: hidden;
    }

    #routeResult,
    #routeResult * {
        visibility: visible;
    }

    #routeResult {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
    }

    #routeResult .route-actions,
    #routeResult .route-actions * {
        display: none;
    }

    .timeline-item,
    .summary-item {
        break-inside: avoid;
        color: black;
        background: white;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}
/* MENU PREMIUM */

.header {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

body.dark .header {
    background: rgba(20, 20, 20, 0.92);
}

nav a {
    position: relative;
    padding: 8px 0;
}

nav a::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}
/* ANIMAÇÕES DO BANNER */

.hero .tag {
    animation: entradaHero 0.7s ease both;
}

.hero h1 {
    animation: entradaHero 0.9s ease both;
    animation-delay: 0.15s;
}

.hero p {
    animation: entradaHero 0.9s ease both;
    animation-delay: 0.3s;
}

.hero-buttons {
    animation: entradaHero 0.9s ease both;
    animation-delay: 0.45s;
}

@keyframes entradaHero {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero .tag,
    .hero h1,
    .hero p,
    .hero-buttons {
        animation: none;
    }
}
/* CARTÕES PREMIUM */

.attraction-card {
    border-radius: 24px;
    transition: transform 0.35s ease,
                box-shadow 0.35s ease;
}

.attraction-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.13);
}

.card-image {
    height: 250px;
}

.card-image img {
    transition: transform 0.6s ease;
}

.attraction-card:hover .card-image img {
    transform: scale(1.08);
}

.favorite-button {
    transition: transform 0.25s ease;
}

.favorite-button:hover {
    transform: scale(1.15);
}

.card-body {
    padding: 25px;
}

.category-tag {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.92);
}

@media (prefers-reduced-motion: reduce) {
    .attraction-card,
    .card-image img,
    .favorite-button {
        transition: none;
    }
}

/* ACABAMENTO DAS FOTOGRAFIAS */

.card-image {
    height: 260px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: brightness(0.95);
    transition: transform 0.6s ease,
                filter 0.6s ease;
}

.attraction-card:hover .card-image img {
    transform: scale(1.08);
    filter: brightness(1.05);
}

.card-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.15),
        transparent 60%
    );
    pointer-events: none;
}

.category-tag,
.favorite-button {
    z-index: 2;
}

.attraction-card {
    display: flex;
    flex-direction: column;
}

.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-footer {
    margin-top: auto;
}

@media (max-width: 650px) {
    .card-image {
        height: 220px;
    }
}

/* DESCOBRE SP 2.0 */
.explore-tools{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:20px;color:var(--muted)}
.explore-tools select{padding:10px;border:1px solid var(--border);border-radius:10px;background:var(--surface);color:var(--text)}
.more-places{display:flex;margin:28px auto 0}.more-places[hidden]{display:none}
.place-title{background:none;border:0;color:inherit;font:inherit;text-align:left;cursor:pointer}.place-title:hover{color:var(--primary)}
.detail-button{margin:0 0 15px}.card-footer{flex-wrap:wrap}
#cityMap{height:440px;border-radius:20px;background:var(--surface);z-index:1;overflow:hidden}
#weekendGrid{margin-bottom:24px}
#placeDialog{margin:auto;width:min(620px,94vw);max-height:90vh;overflow:auto;padding:24px;border:1px solid var(--border);border-radius:22px;background:var(--surface);color:var(--text)}
#placeDialog::backdrop{background:#0009}#closePlace{margin-bottom:15px}.detail-photo{width:100%;height:240px;object-fit:cover;border-radius:14px}#placeDetails p{margin:10px 0}
@media(max-width:950px){.navbar{gap:10px}nav{gap:12px}nav a{font-size:12px}}
@media(max-width:800px){.menu-toggle{display:block;margin-left:auto}nav{display:none;position:absolute;top:100%;left:0;right:0;background:var(--surface);padding:20px;flex-direction:column}nav.open{display:flex}}
@media(max-width:650px){#cityMap{height:320px}.detail-photo{height:180px}}

/* ========================================
   MAPA PREMIUM - DESCOBRE SP
======================================== */

#cityMap {
    height: 550px;
    border-radius: 24px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    z-index: 1;
}

.custom-map-icon {
    background: transparent;
    border: none;
}

.map-pin {
    width: 38px;
    height: 38px;
    border: 3px solid white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(0,0,0,.30);
    transition: transform .2s ease;
}

.map-pin:hover {
    transform: scale(1.18);
}

.leaflet-popup-content-wrapper {
    border-radius: 18px;
    overflow: hidden;
}

.leaflet-popup-content {
    margin: 12px;
}

.map-popup {
    width: 240px;
    max-width: 100%;
    font-family: "Manrope", Arial, sans-serif;
}

.map-popup img {
    width: 100%;
    height: 145px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 12px;
}

.map-popup-category {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.map-popup h3 {
    font-size: 19px;
    line-height: 1.3;
    margin: 7px 0;
    color: #171717;
}

.map-popup p {
    font-size: 12px;
    line-height: 1.5;
    color: #666;
    margin: 8px 0;
}

.map-popup-price {
    display: block;
    color: #218a60;
    margin: 12px 0;
}

.map-popup-button {
    width: 100%;
    background: #ff6329;
    color: white;
    border: none;
    border-radius: 10px;
    padding: 11px;
    font-weight: 800;
    cursor: pointer;
}

.map-popup-button:hover {
    background: #e94d15;
}

.map-popup-link {
    display: block;
    text-align: center;
    margin-top: 12px;
    font-size: 12px;
    font-weight: 700;
}

@media (max-width: 650px) {
    #cityMap {
        height: 400px;
    }
}
/* MAPA 3.0 */
#mapShell{background:var(--surface);border:1px solid var(--border);border-radius:24px;padding:16px;box-shadow:var(--shadow)}
.map-toolbar,.map-legend{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-bottom:12px}
.map-toolbar label{display:flex;align-items:center;gap:8px;font-size:13px;font-weight:800}
.map-toolbar button,.map-toolbar select,.map-legend button{background:var(--background);color:var(--text);border:1px solid var(--border);border-radius:10px;padding:8px 12px;font-size:13px;font-weight:700}
.map-legend button{display:flex;align-items:center;gap:6px}.map-legend button[aria-pressed=true]{border-color:var(--primary);color:var(--primary)}
.map-legend span{display:grid;place-items:center;width:25px;height:25px;border-radius:50%;color:white}
#mapStatus{font-size:12px;color:var(--muted);margin-top:10px}#mapShell #cityMap{box-shadow:none}
.map-cluster{display:grid;place-items:center;background:#ff632940;border-radius:50%}.map-cluster span{display:grid;place-items:center;background:#ff6329;color:white;width:34px;height:34px;border:2px solid white;border-radius:50%;font-weight:800}
.route-map-number{background:#171717;color:white;border:3px solid white;border-radius:50%;display:grid;place-items:center;font-weight:800}
body.dark #cityMap .leaflet-tile-pane{filter:brightness(.72) invert(1) hue-rotate(180deg) saturate(.65)}
body.dark #cityMap .leaflet-popup-content-wrapper,body.dark #cityMap .leaflet-popup-tip{background:var(--surface);color:var(--text)}
body.dark .map-popup h3{color:var(--text)}body.dark .map-popup p{color:var(--muted)}
#mapShell:fullscreen,#mapShell.map-expanded{display:flex;flex-direction:column;background:var(--surface);padding:14px;border-radius:0;width:100%;height:100%;overflow:auto}
#mapShell.map-expanded{position:fixed;inset:0;z-index:1000}#mapShell:fullscreen #cityMap,#mapShell.map-expanded #cityMap{flex:1;min-height:180px;height:auto}
@media(max-width:650px){#mapShell{padding:9px}.map-toolbar button,.map-toolbar select,.map-legend button{font-size:11px;padding:6px 8px}}

/* Descobre SP 4.0 */
.experience-tools{display:flex;flex-wrap:wrap;gap:12px;align-items:center;margin-bottom:18px}.experience-tools select{padding:10px;border:1px solid var(--border);border-radius:10px;background:var(--surface);color:var(--text);max-width:100%}.experience-tools label{display:flex;gap:8px;align-items:center;flex-wrap:wrap} @media(max-width:1050px){.navbar{gap:10px}nav{gap:10px}nav a{font-size:12px}} @media(max-width:800px){.menu-toggle{display:block;margin-left:auto}nav{display:none;position:absolute;top:100%;left:0;right:0;background:var(--surface);padding:20px;flex-direction:column}nav.open{display:flex}.experience-tools>*{width:100%}}
