/* ----- Design System & Base Variables ----- */
:root {
    /* ===== FRONTERA VIVA — Brand Tokens ===== */
    /* Surfaces */
    --fv-dark:         #0C142F;       /* azul noche */
    --fv-dark-2:       #0F1A3A;       /* superficie elevada oscura */
    --fv-light:        #FFFFFF;       /* blanco Uruguay */
    --fv-frost:        #F4F6FA;       /* secciones intermedias */

    /* Text */
    --fv-text-on-dark-title: #FFFFFF;
    --fv-text-on-dark-body:  #CBD5E1;
    --fv-text-on-light-title:#0F172A;
    --fv-text-on-light-body: #334155;

    /* Bilingual accents */
    --fv-br-green:     #009C3B;       /* verde Brasil */
    --fv-uy-blue:      #003399;       /* azul noche Uruguay */
    --fv-uy-celeste:   #00A3E0;       /* celeste Uruguay */
    --fv-shared-yellow:#FFCC00;       /* amarillo (ambas banderas) */

    /* Borders */
    --fv-border-light: #E2E8F0;
    --fv-border-dark:  rgba(255,255,255,0.12);

    /* Glass */
    --fv-glass-dark-bg:     rgba(10,17,40,0.75);
    --fv-glass-dark-shadow: 0 8px 20px rgba(0,0,0,0.20);
    --fv-glass-light-shadow:0 4px 12px rgba(0,0,0,0.03);

    /* Map */
    --fv-map-bg:       #1A2A3A;
    --fv-map-street:   #CBD5E1;

    /* Gradiente principal "Frontera Viva" */
    --fv-gradient-brand: linear-gradient(135deg, #009C3B 0%, #003399 55%, #00A3E0 100%);
    /* Versión suave para CTAs (mismas paradas con menos saturación) */
    --fv-gradient-brand-soft: linear-gradient(135deg, #1FA858 0%, #2A4FB0 55%, #2FB7E8 100%);

    /* ===== Aliases backwards-compat (NO ELIMINAR) ===== */
    --primary-bg:    var(--fv-light);
    --hero-bg:       var(--fv-dark);
    --yellow-accent: var(--fv-shared-yellow);
    --red-accent:    var(--fv-uy-celeste); /* ← es celeste, no rojo; usado como accent UI */
    --text-dark:     var(--fv-text-on-light-title);
    --text-gray:     var(--fv-text-on-light-body);
    --light-gray:    var(--fv-frost);

    --font-main: 'Outfit', sans-serif;
    --border-radius-hero: 40px;
    --border-radius-card: 20px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}

body {
    font-family: var(--font-main);
    background-color: var(--primary-bg);
    color: var(--text-dark);
    line-height: 1.5;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ----- Navbar ----- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    min-height: 60px;
    border-bottom: 0;
    position: sticky;
    top: 0;
    background: var(--fv-light);
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
    border-radius: 0;
    z-index: 100;
    transition: background 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}
.navbar::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: var(--fv-gradient-brand);
}

.navbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 16px;
}

/* Navbar hero mode — fixed siempre, glass semitransparente,
   sin bordes laterales. La imagen del hero empieza desde atrás del navbar. */
.navbar--hero {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 0;
    background: rgba(10, 17, 40, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    border-radius: 0;
    z-index: 100;
}
.navbar--hero .navbar-inner {
    background: transparent;
    backdrop-filter: none;
    border-radius: 0;
    padding: 10px 24px;
    max-width: none;
}
.navbar--hero::after {
    display: none;
}
.navbar--hero .logo,
.navbar--hero .nav-links a,
.navbar--hero .login-btn {
    color: #fff;
}
.navbar--hero .nav-links a:hover {
    color: var(--fv-shared-yellow);
}
.navbar--hero .search-bar {
    border-color: rgba(255,255,255,0.25);
    color: rgba(255,255,255,0.7);
}
.navbar--hero .search-bar input {
    color: #fff;
}
.navbar--hero .search-bar input::placeholder {
    color: rgba(255,255,255,0.5);
}
/* (Variantes de scroll eliminadas: el navbar mantiene su look fijo siempre) */

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--text-dark);
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-dark);
}

.nav-links a:hover {
    color: var(--red-accent);
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #999;
    border: 1px solid #ccc;
    padding: 8px 12px;
    border-radius: 8px;
}

.search-bar input {
    border: none;
    background: transparent;
    font-family: var(--font-main);
    font-size: 0.9rem;
    outline: none;
    color: var(--text-dark);
}

/* ----- Hero Fullscreen ----- */
.hero--fullscreen {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    max-height: 900px;
    display: flex;
    align-items: stretch;
    overflow: hidden;
    margin-top: 0;
    border-radius: 0;
    padding: 0;
    color: #fff;
}

.hero--fullscreen > .container {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 100px 20px 40px;
    flex: 1;
}

.hero--fullscreen .hero-bg {
    position: absolute;
    inset: 0;
    background: url('assets/img/flags.jpg') center 0% / cover no-repeat;
    z-index: 1;
}

.hero--fullscreen .hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: transparent;
    pointer-events: none;
}

.hero--fullscreen .hero-content {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    text-align: center;
    max-width: 780px;
    margin: 0 auto;
    width: 100%;
}

/* CTA anclado al borde inferior del hero — no se mueve mientras el
   typewriter cambia la altura del título */
.hero--fullscreen .hero-actions {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 40px;
    margin-top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    z-index: 4;
}

.hero--fullscreen .hero-flags-badge {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding: 10px 24px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 1.5rem;
}

.hero--fullscreen .hero-flag-plus {
    font-size: 1rem;
    opacity: 0.6;
    font-weight: 300;
}

.hero--fullscreen .hero-title {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 80px;
    letter-spacing: -1px;
    color: #fff;
    /* Efecto 3D: sombras escalonadas hacia atrás-abajo + glow ambiental */
    text-shadow:
        1px 1px 0  rgba(0, 51, 153, 0.85),
        2px 2px 0  rgba(0, 51, 153, 0.75),
        3px 3px 0  rgba(0, 51, 153, 0.65),
        4px 4px 0  rgba(10, 17, 40, 0.55),
        5px 5px 0  rgba(10, 17, 40, 0.45),
        6px 6px 0  rgba(10, 17, 40, 0.35),
        8px 10px 24px rgba(0, 0, 0, 0.55);
}

.hero--fullscreen .hero-subtitle {
    font-size: 1.15rem;
    line-height: 1.6;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 36px;
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.20);
}

.hero {
    position: relative;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 24px;
}

.btn {
    font-family: inherit;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    border-radius: 30px;
    transition: var(--transition);
}

.btn-primary {
    background:
        linear-gradient(rgba(0, 0, 0, 0.10), rgba(0, 0, 0, 0.10)),
        var(--fv-gradient-brand);
    color: #fff;
    padding: 16px 32px;
    border: 0;
    box-shadow: 0 8px 20px rgba(0, 51, 153, 0.25);
    transition: var(--transition);
}

.btn-primary:hover {
    background: var(--fv-shared-yellow);
    color: var(--fv-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 204, 0, 0.35);
}

/* ----- Popular Tours Section ----- */
.popular-tours {
    margin-top: 20px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
}

.carousel-nav {
    display: flex;
    gap: 16px;
}

.nav-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.nav-btn.prev {
    background: var(--light-gray);
    color: #333;
}
.nav-btn.next {
    background: var(--fv-uy-celeste);
    color: white;
}
.nav-btn:hover {
    transform: scale(1.05);
}

.tours-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: 400px;
    gap: 24px;
    height: 400px;
    align-items: center;
}

.tour-card {
    position: relative;
    /* Forma asimétrica moderna: esquinas opuestas redondeadas, las otras cortadas */
    border-radius: 40px 6px 40px 6px;
    overflow: hidden;
    color: white;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 12px 28px -8px rgba(0,0,0,0.20);
}

.tour-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    transition: transform 0.5s ease;
}

.tour-card:hover .card-img {
    transform: scale(1.05);
}

/* Overlay sutil al pie: la foto cubre el 100% del card, solo el texto inferior
   recibe un ligero degradado para legibilidad */
.tour-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 38%;
    background: linear-gradient(to top, rgba(10,17,40,0.85) 0%, rgba(10,17,40,0.50) 50%, transparent 100%);
    z-index: 2;
}

.card-badge {
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    color: var(--text-dark);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 4px;
}

.card-info {
    position: absolute;
    bottom: 24px;
    left: 20px;
    right: 20px;
    z-index: 3;
}

.card-info h3 {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.2;
}

/* Staggering card heights based on design */
.card-1, .card-2, .card-3, .card-4 { height: 100%; }


/* ----- Why Choose Us Section ----- */
.why-choose-us {
    margin-top: 120px;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    gap: 60px;
}

.choose-left {
    flex: 1;
    display: flex;
    justify-content: center;
    position: relative;
}

.choose-img-wrapper {
    position: relative;
    width: 80%;
}

.choose-img {
    width: 100%;
    border-radius: var(--border-radius-card);
    object-fit: cover;
}

.explore-badge {
    position: absolute;
    top: 20px;
    left: -40px;
    animation: float 4s ease-in-out infinite;
}

.choose-deco-plane {
    position: absolute;
    top: 20%;
    right: -40px;
    transform: rotate(30deg);
}

.choose-deco-line {
    position: absolute;
    top: 0;
    left: -50px;
    width: 200px;
    height: 200px;
    z-index: -1;
}

.choose-right {
    flex: 1;
}

.choose-right .section-title {
    margin-bottom: 40px;
}

.features-list {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.feature-item {
    display: flex;
    gap: 20px;
}

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.icon-purple { background: #F0EDFE; color: #4B3BE0; }
.icon-orange { background: #FFF4E5; color: #F8B133; }
.icon-celeste { background: #E8F4FD; color: var(--fv-uy-celeste); }

.feature-content h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.feature-content p {
    color: var(--text-gray);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ----- Map Section ----- */
.map-wrapper {
    display: flex;
    gap: 20px;
    margin-top: 40px;
    margin-bottom: 40px;
}

.map-main {
    flex: 1;
    position: relative;
}

/* Utilidades de visibilidad */
.mobile-only {
    display: none !important;
}

#map {
    width: 100%;
    height: 450px;
    border-radius: var(--border-radius-card);
    overflow: hidden;
    background: #f0f0f0;
    border: 1px solid #e0e0e0;
}

.country-labels {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.country-label {
    background: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 2px solid;
}

.country-label.uy {
    border-color: #0038A8;
    color: #0038A8;
}

.country-label.br {
    border-color: #009739;
    color: #009739;
}

.map-sidebar-right {
    width: 320px;
    height: 450px;
    display: flex;
    flex-direction: column;
}

.places-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    height: 100%;
    overflow-y: auto;
}

.map-sidebar {
    width: 350px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.map-filters h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-btn {
    padding: 8px 16px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover {
    border-color: var(--fv-uy-celeste);
    color: var(--fv-uy-celeste);
}

.filter-btn.active {
    background: var(--fv-uy-celeste);
    border-color: var(--fv-uy-celeste);
    color: white;
}

.places-list {
    max-height: 400px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.place-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
}

.place-item:hover {
    border-color: var(--fv-uy-celeste);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.place-item.active {
    border-color: var(--fv-uy-celeste);
    background: #F0F9FF;
}

.place-item-img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.place-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.place-item-info {
    flex: 1;
    min-width: 0;
}

.place-item-info h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 4px;
    line-height: 1.2;
}

.place-item-info p {
    font-size: 0.8rem;
    color: var(--text-gray);
    margin-bottom: 8px;
    line-height: 1.3;
}

.place-item-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.place-country {
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
}

.place-country.uy {
    background: #E8F4FD;
    color: #0038A8;
}

.place-country.br {
    background: #E8F5E8;
    color: #009739;
}

.place-category {
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 10px;
    background: #F5F5F5;
    color: var(--text-gray);
    font-weight: 500;
}

.map-legend {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 15px;
}

.map-legend h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.legend-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Responsive constraints just to make sure it doesn't break horribly */
@media (max-width: 992px) {
    .tours-grid {
        grid-template-columns: repeat(2, 1fr);
        height: auto;
    }
    .tour-card {
        height: 300px !important;
    }
    .why-choose-us {
        flex-direction: column;
    }
    
    .map-wrapper {
        flex-direction: column;
    }
    
    .map-sidebar {
        width: 100%;
    }
    
    #map {
        height: 400px;
    }
}

/* Login Button Styles */
.login-section {
    display: flex;
    align-items: center;
}

.login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    background: transparent;
    color: #666;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s, color 0.2s;
}

.login-btn:hover {
    background: #f5f5f5;
    color: #333;
}

.login-btn svg {
    width: 20px;
    height: 20px;
}

.mobile-menu-btn {
    display: none;
}

/* Login Modal Styles */
.login-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.login-modal-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 380px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    animation: slideUp 0.3s ease-out;
}

.login-modal-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 32px 24px 16px;
    background: var(--fv-gradient-brand);
}

.login-modal-header h3 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
    color: white;
}

.login-modal-subtitle {
    margin: 8px 0 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
}

.close-modal {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: white;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.close-modal:hover {
    background: rgba(255, 255, 255, 0.3);
}

.login-modal-body {
    padding: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
    box-sizing: border-box;
    background: #f8f9fa;
}

.form-group input:focus {
    outline: none;
    border-color: var(--fv-uy-celeste);
    box-shadow: 0 0 0 4px rgba(0, 163, 224, 0.15);
    background: white;
}

.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper input {
    padding-right: 48px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    color: #6c757d;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.toggle-password:hover {
    color: #333;
}

.login-submit {
    width: 100%;
    padding: 14px;
    background:
        linear-gradient(rgba(0, 0, 0, 0.10), rgba(0, 0, 0, 0.10)),
        var(--fv-gradient-brand);
    color: white;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
    border-radius: 10px;
    margin-top: 8px;
    box-shadow: 0 4px 12px rgba(0, 51, 153, 0.25);
}

.login-submit:hover {
    background: var(--fv-shared-yellow);
    color: var(--fv-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(255, 204, 0, 0.35);
}

.login-error {
    margin-top: 16px;
    padding: 12px;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    font-size: 0.9rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-content {
        flex-direction: column-reverse;
        text-align: center;
        gap: 24px;
    }
    
    .hero-text-col, .hero-image-col {
        width: 100%;
    }
    
    .tourist-image {
        max-width: 100%;
        height: auto;
    }
    
    .features-grid, .place-grid {
        grid-template-columns: 1fr;
    }
    
    .tours-grid {
        grid-template-columns: 1fr;
    }
    
    .tour-card {
        height: 220px !important;
    }
    
    .map-wrapper {
        grid-template-columns: 1fr;
    }
    
    .map-sidebar-right {
        max-height: 300px;
    }
    
    #map {
        height: 350px;
    }
    
    .login-section {
        margin-left: 8px;
    }
    
    .login-btn span {
        display: none;
    }
    
    .login-btn {
        padding: 8px;
    }
    
    .navbar {
        padding: 10px 12px;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .navbar > *:not(.nav-links) {
        order: 1;
    }
    
    .mobile-menu-btn {
        order: 0;
    }
    
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        padding: 16px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        gap: 12px;
        z-index: 1000;
    }
    
    .nav-links a {
        padding: 12px 16px;
        border-radius: 8px;
        background: #f8f9fa;
        text-decoration: none;
        color: #333;
        font-weight: 500;
    }
    
    .nav-links a:hover {
        background: #e9ecef;
    }
    
    .search-bar {
        order: 3;
        width: 100%;
        margin-top: 8px;
    }
    
    .logo span {
        font-size: 1rem;
    }
    
    .logo img {
        height: 32px !important;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .gallery-layout {
        grid-template-columns: 1fr !important;
    }
    
    .main-gallery {
        grid-template-columns: 1fr !important;
        height: auto !important;
    }
    
    .main-image {
        height: 250px;
    }
    
    .thumbnail {
        height: 100px;
    }
    
    .info-section {
        margin-top: 24px;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
    
    .breadcrumb {
        flex-wrap: wrap;
        font-size: 0.85rem;
    }
    
    .place-title {
        font-size: 1.75rem;
    }
    
    .login-modal-content {
        max-width: 90%;
        margin: 16px;
    }
    
    .login-modal-header {
        padding: 24px 16px 12px;
    }
    
    .login-modal-body {
        padding: 16px;
    }
    
    .form-group input {
        padding: 12px 14px;
    }
    
    .login-submit {
        padding: 12px;
    }
    
    footer {
        padding: 24px 16px !important;
    }
    
    footer p {
        font-size: 0.85rem;
    }
}

/* =============================================
   VIEW TRANSITIONS API — cross-document
   ============================================= */

/* Nombre del shared element en cards del listado */
.place-row img,
.tour-card .card-img {
    view-transition-name: none; /* se asigna dinámicamente por JS */
}

/* Transición de página por defecto: fade suave */
@keyframes vt-fade-in  { from { opacity: 0; } to { opacity: 1; } }
@keyframes vt-fade-out { from { opacity: 1; } to { opacity: 0; } }

::view-transition-old(root) {
    animation: vt-fade-out 220ms var(--ease-exit, ease-in) both;
}
::view-transition-new(root) {
    animation: vt-fade-in 300ms var(--ease-entrance, ease-out) both;
}

/* Shared element: la imagen "vuela" de card a hero */
::view-transition-old(place-hero) {
    animation: none;
    mix-blend-mode: normal;
}
::view-transition-new(place-hero) {
    animation: none;
    mix-blend-mode: normal;
}

@media (prefers-reduced-motion: reduce) {
    ::view-transition-old(root),
    ::view-transition-new(root),
    ::view-transition-old(place-hero),
    ::view-transition-new(place-hero) {
        animation: none !important;
    }
}

/* =============================================
   FILTROS FLIP — pill activa deslizable
   ============================================= */

.places-filters {
    position: relative;
}

.cat-btn {
    position: relative;
    transition:
        color var(--dur-fast, 150ms) ease,
        border-color var(--dur-fast, 150ms) ease;
}

.cat-btn.active {
    color: white !important;
    border-color: transparent !important;
}

/* Pill de fondo que se desliza (creada por JS) */
.cat-pill-bg {
    position: absolute;
    background: var(--fv-gradient-brand);
    border-radius: 20px;
    pointer-events: none;
    z-index: 0;
    transition:
        left var(--dur-base, 300ms) var(--ease-entrance, cubic-bezier(0.16,1,0.3,1)),
        top var(--dur-base, 300ms) var(--ease-entrance, cubic-bezier(0.16,1,0.3,1)),
        width var(--dur-base, 300ms) var(--ease-entrance, cubic-bezier(0.16,1,0.3,1)),
        height var(--dur-base, 300ms) var(--ease-entrance, cubic-bezier(0.16,1,0.3,1));
}

.cat-btn span {
    position: relative;
    z-index: 1;
}

/* =============================================
   SISTEMA DE ANIMACIONES — FRONTERA VIVA
   ============================================= */

/* Variables de animación (fallback CSS para navegadores sin Tailwind v4) */
:root {
    --ease-entrance: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-exit: cubic-bezier(0.7, 0, 0.84, 0);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --dur-fast: 150ms;
    --dur-base: 300ms;
    --dur-slow: 600ms;
}

/* ----- Keyframes ----- */
@keyframes fv-fade-up {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fv-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes fv-slide-left {
    from { opacity: 0; transform: translateX(-32px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes fv-slide-right {
    from { opacity: 0; transform: translateX(32px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes fv-scale-in {
    from { opacity: 0; transform: scale(0.94); }
    to   { opacity: 1; transform: scale(1); }
}

@keyframes fv-shimmer {
    from { background-position: -400px 0; }
    to   { background-position: 400px 0; }
}

@keyframes fv-pulse-ring {
    0%   { transform: scale(1); opacity: 0.7; }
    70%  { transform: scale(1.4); opacity: 0; }
    100% { transform: scale(1.4); opacity: 0; }
}

@keyframes fv-shrink-navbar {
    from { padding-top: 10px; padding-bottom: 10px; }
    to   { padding-top: 4px; padding-bottom: 4px; }
}

/* ----- Clases de reveal (activadas por JS via IntersectionObserver) ----- */
.fv-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition:
        opacity var(--dur-slow) var(--ease-entrance),
        transform var(--dur-slow) var(--ease-entrance);
}

.fv-reveal.fv-revealed {
    opacity: 1;
    transform: translateY(0);
}

.fv-reveal-left {
    opacity: 0;
    transform: translateX(-32px);
    transition:
        opacity var(--dur-slow) var(--ease-entrance),
        transform var(--dur-slow) var(--ease-entrance);
}

.fv-reveal-left.fv-revealed {
    opacity: 1;
    transform: translateX(0);
}

.fv-reveal-right {
    opacity: 0;
    transform: translateX(32px);
    transition:
        opacity var(--dur-slow) var(--ease-entrance),
        transform var(--dur-slow) var(--ease-entrance);
}

.fv-reveal-right.fv-revealed {
    opacity: 1;
    transform: translateX(0);
}

.fv-reveal-scale {
    opacity: 0;
    transform: scale(0.94);
    transition:
        opacity var(--dur-slow) var(--ease-entrance),
        transform var(--dur-slow) var(--ease-entrance);
}

.fv-reveal-scale.fv-revealed {
    opacity: 1;
    transform: scale(1);
}

/* Delay helpers para stagger */
.fv-delay-1 { transition-delay: 60ms; }
.fv-delay-2 { transition-delay: 120ms; }
.fv-delay-3 { transition-delay: 180ms; }
.fv-delay-4 { transition-delay: 240ms; }
.fv-delay-5 { transition-delay: 300ms; }

/* ----- Navbar: NO shrink al scroll (mismo tamaño siempre) ----- */
.navbar.fv-scrolled {
    /* intencionalmente vacío: el navbar mantiene su padding original */
}

/* ----- Ken-Burns en imágenes de cards ----- */
@media (hover: hover) {
    .tour-card,
    .place-row,
    .place-item {
        overflow: hidden;
    }

    .tour-card .card-img,
    .place-row img,
    .place-item img {
        transition: transform 0.7s var(--ease-entrance);
        will-change: transform;
    }

    .tour-card:hover .card-img,
    .place-row:hover img,
    .place-item:hover img {
        transform: scale(1.08);
    }

    /* Overlay info en tour-card */
    .tour-card .card-info {
        transition: transform var(--dur-base) var(--ease-entrance),
                    background var(--dur-base) ease;
    }

    .tour-card:hover .card-info {
        background: rgba(0,0,0,0.55);
    }
}

/* ----- CTA button: ripple + glow ----- */
@media (hover: hover) {
    .hero-cta,
    .btn-primary {
        position: relative;
        overflow: hidden;
        transition:
            transform var(--dur-fast) var(--ease-spring),
            box-shadow var(--dur-base) ease;
    }

    .hero-cta:hover,
    .btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 24px rgba(255, 204, 0, 0.35);
    }

    .hero-cta:active,
    .btn-primary:active {
        transform: scale(0.97);
    }
}

/* Ripple effect */
.fv-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.35);
    transform: scale(0);
    animation: fv-ripple-anim 0.5s var(--ease-exit);
    pointer-events: none;
}

@keyframes fv-ripple-anim {
    to { transform: scale(4); opacity: 0; }
}

/* ----- Skeleton loaders ----- */
.fv-skeleton {
    background: #e8e8e8;
    background-image: linear-gradient(
        90deg,
        #e8e8e8 0px,
        #f5f5f5 80px,
        #e8e8e8 160px
    );
    background-size: 400px 100%;
    animation: fv-shimmer 1.4s ease-in-out infinite;
    border-radius: 8px;
}

/* Imagen con skeleton mientras carga */
.fv-img-wrap {
    position: relative;
    overflow: hidden;
}

.fv-img-wrap::before {
    content: '';
    position: absolute;
    inset: 0;
    background: #e8e8e8;
    background-image: linear-gradient(
        90deg,
        #e8e8e8 0px,
        #f5f5f5 80px,
        #e8e8e8 160px
    );
    background-size: 400px 100%;
    animation: fv-shimmer 1.4s ease-in-out infinite;
    transition: opacity var(--dur-base) ease;
    z-index: 1;
}

.fv-img-wrap.fv-img-loaded::before {
    opacity: 0;
    pointer-events: none;
}

.fv-img-wrap img {
    position: relative;
    z-index: 2;
    opacity: 0;
    transition: opacity var(--dur-base) ease;
}

.fv-img-wrap.fv-img-loaded img {
    opacity: 1;
}

/* Cuando el wrap está dentro de un tour-card, debe llenar el card completo
   y la imagen vuelve a comportarse como absolute + 100% (cover real) */
.tour-card > .fv-img-wrap {
    position: absolute;
    inset: 0;
    z-index: 1;
}
.tour-card > .fv-img-wrap > img.card-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ----- Scroll progress bar ----- */
.fv-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: var(--fv-gradient-brand);
    z-index: 9999;
    transition: width 0.1s linear;
}

/* ----- Botón "Cómo llegar" pulse (geo disponible) ----- */
#comoLlegar.fv-geo-pulse {
    position: relative;
    overflow: visible;
}

#comoLlegar.fv-geo-pulse::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: inherit;
    border: 2px solid currentColor;
    opacity: 0;
    animation: fv-pulse-ring 1.8s ease-out infinite;
}

/* ----- Video poster / play button ----- */
.fv-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: transform var(--dur-fast, 150ms) var(--ease-spring, ease);
}

.fv-video-poster:hover .fv-play-btn,
.fv-video-poster:focus-within .fv-play-btn {
    transform: translate(-50%, -50%) scale(1.12);
}

/* Pulse en el anillo del botón */
.fv-play-btn circle {
    animation: fv-pulse-ring 2s ease-in-out infinite;
    transform-origin: center;
}

.fv-video-poster:hover .fv-play-btn circle,
.fv-video-poster:focus-within .fv-play-btn circle {
    animation-play-state: paused;
}

/* ----- Accesibilidad: sin animaciones si el usuario lo prefiere ----- */
@media (prefers-reduced-motion: reduce) {
    .fv-reveal,
    .fv-reveal-left,
    .fv-reveal-right,
    .fv-reveal-scale {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    .fv-delay-1, .fv-delay-2, .fv-delay-3,
    .fv-delay-4, .fv-delay-5 {
        transition-delay: 0ms !important;
    }

    .fv-img-wrap::before {
        animation: none;
    }

    .fv-skeleton {
        animation: none;
    }

    .navbar {
        transition: none;
    }
}

/* ==========================================
   3D HOME ENHANCEMENTS — Inline overrides
   ========================================== */

/* Perspective for tours grid */
.tours-grid {
    perspective: 1200px;
}

/* Ensure hero can contain absolute canvas */
.hero--3d {
    position: relative;
    overflow: hidden;
}

/* ==========================================
   FRONTERA VIVA — Brand Utilities
   ========================================== */
.fv-gradient-brand {
    background: var(--fv-gradient-brand);
    color: #fff;
}

.fv-gradient-text {
    background: var(--fv-gradient-brand);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.fv-gradient-divider {
    height: 2px;
    border: 0;
    border-radius: 2px;
    background: var(--fv-gradient-brand);
}

.fv-gradient-border {
    border: 1px solid transparent;
    background:
        linear-gradient(var(--fv-light), var(--fv-light)) padding-box,
        var(--fv-gradient-brand) border-box;
}

.fv-glass-dark {
    background: var(--fv-glass-dark-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--fv-border-dark);
    box-shadow: var(--fv-glass-dark-shadow);
    border-radius: var(--border-radius-card);
}

.fv-glass-light {
    background: var(--fv-light);
    border: 1px solid var(--fv-border-light);
    box-shadow: var(--fv-glass-light-shadow);
    border-radius: var(--border-radius-card);
}

/* ==========================================
   Map markers (Leaflet divIcon styles)
   ========================================== */
.fv-marker-wrap { background: transparent; border: 0; }
.fv-marker {
    display: block;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
}
.fv-marker--uy {
    background: #fff;
    border: 3px solid var(--fv-uy-celeste);
}
.fv-marker--br {
    background: var(--fv-shared-yellow);
    border: 3px solid var(--fv-br-green);
}
.fv-marker--bi {
    background: linear-gradient(90deg,
        var(--fv-br-green) 0 50%,
        var(--fv-uy-celeste) 50% 100%);
    border: 2px solid #fff;
}

/* Leaflet popup with gradient border */
.leaflet-popup-content-wrapper {
    color: var(--fv-text-on-light-title);
    border-radius: 14px;
    padding: 2px;
    background:
        linear-gradient(#fff, #fff) padding-box,
        var(--fv-gradient-brand) border-box;
    border: 1px solid transparent;
    box-shadow: 0 10px 24px rgba(10, 17, 40, 0.18);
}
.leaflet-popup-tip { background: #fff; }
.leaflet-container { background: #f0f0f0; }

/* Light map — Leaflet controls */
.leaflet-control-zoom a {
    background: #fff;
    color: #333;
    border-color: #ddd;
}
.leaflet-control-zoom a:hover {
    background: #f5f5f5;
    color: #000;
}
.leaflet-control-attribution {
    background: rgba(255, 255, 255, 0.9) !important;
    color: #666;
}
.leaflet-control-attribution a {
    color: var(--fv-uy-celeste);
}

.popup-cta {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--fv-gradient-brand);
    color: #fff !important;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s ease;
}
.popup-cta:hover {
    transform: translateY(-2px);
    background: var(--fv-shared-yellow);
    color: var(--fv-dark) !important;
}

/* ==========================================
   FRONTERA VIVA — Site Footer
   ========================================== */
.site-footer {
    text-align: center;
    padding: 48px 24px;
    color: var(--fv-text-on-dark-body);
    border-top: 2px solid transparent;
    background:
        linear-gradient(var(--fv-dark), var(--fv-dark)) padding-box,
        var(--fv-gradient-brand) border-box;
    margin-top: 60px;
}
.site-footer a {
    color: #fff;
    text-decoration: none;
    transition: color 0.2s ease;
}
.site-footer a:hover {
    color: var(--fv-shared-yellow);
}

/* ==========================================
   Badges
   ========================================== */
.badge-local {
    background: var(--fv-shared-yellow);
    color: var(--fv-dark);
    border-radius: 999px;
    padding: 4px 10px;
    font-weight: 600;
    font-size: 0.8rem;
}
.badge-featured {
    color: var(--fv-shared-yellow);
}


/* Bloques del home extraídos a /assets/css/pages/home.css (cargados condicionalmente desde index.php) */

/* ----- Language Toggle ES/PT (header global) ----- */
.lang-toggle {
    display: inline-flex;
    gap: 2px;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.20);
    border-radius: 999px;
    padding: 3px;
    margin-right: 10px;
}
.navbar:not(.navbar--hero) .lang-toggle {
    background: var(--fv-frost);
    border-color: var(--fv-border-light);
}
.lang-toggle__btn {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 5px 10px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.78);
    transition: background 0.2s ease, color 0.2s ease;
    line-height: 1;
}
.navbar:not(.navbar--hero) .lang-toggle__btn { color: var(--fv-text-on-light-body); }
.lang-toggle__btn:hover { color: #fff; }
.navbar:not(.navbar--hero) .lang-toggle__btn:hover { color: var(--fv-dark); }
.lang-toggle__btn.is-active {
    background: var(--fv-uy-celeste);
    color: #fff;
    box-shadow: 0 2px 6px rgba(0, 163, 224, 0.35);
}

/* ==========================================
   Scroll to Top Button
   ========================================== */
.scroll-top-btn {
    position: fixed;
    bottom: 32px;
    right: 32px;
    z-index: 9999;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: var(--fv-gradient-brand);
    color: #fff;
    font-size: 1.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.30);
    opacity: 0;
    transform: translateY(20px) scale(0.85);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.scroll-top-btn.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}
.scroll-top-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.40);
}
.scroll-top-btn:active {
    transform: scale(0.95);
}
