/* --- CSS Reset & Variables --- */
:root {
    /* Professional travel technology palette */
    --primary: #111827;
    --primary-hover: #030712;
    --bg-main: #FAFAFA;
    --bg-card: #FFFFFF;
    --bg-elevated: #F3F4F6;
    --accent: #D32F2F;
    --accent-subtle: #FFF7ED;
    --text-main: #111827;
    --text-muted: #4B5563;
    --border-color: #E5E7EB;
    
    --radius-lg: 20px;
    --radius-md: 16px;
    --shadow-soft: 0 1px 2px rgba(17, 24, 39, 0.04), 0 4px 12px rgba(17, 24, 39, 0.04);
    --shadow-hover: 0 10px 24px rgba(17, 24, 39, 0.10);

    --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    overscroll-behavior-y: contain; /* stops iOS rubber-band bounce feeling like a glitch */
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body.app-active {
    overflow: hidden;
    height: 100vh;
    height: 100dvh; /* real visible height on mobile, ignores address-bar show/hide jump */
}

/* Explore is a normal scrollable page, not a fixed map shell — undo the lock above */
body.explore-active {
    overflow-y: auto;
    height: auto;
    -webkit-overflow-scrolling: touch;
}

/* Travel Guides page is also a normal scrollable content page, same reasoning as Explore */
body.guides-active {
    overflow-y: auto;
    height: auto;
    -webkit-overflow-scrolling: touch;
}

/* Saved trips is a document-style page, so it must not inherit the planner's
   full-screen scroll lock on phones. */
body.saved-trips-active {
    overflow-y: auto;
    height: auto;
    -webkit-overflow-scrolling: touch;
}

/* --- UTILITY CLASSES --- */
.hidden { display: none !important; }

/* --- 1. NEW HEADER STYLES --- */
.site-header {
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    position: fixed; /* Fixed to stay on top */
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease; /* Smooth transition for background */
    background: transparent; /* Default Transparent */
}

/* Scrolled State (Added via JS) */
.site-header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.site-header.scrolled .logo { color: var(--text-main); }

/* Left: Logo */
.logo { 
    font-size: 1.5rem; 
    font-weight: 700; 
    letter-spacing: -0.5px; 
    cursor: pointer;
    color: var(--text-main); 
}
.logo-accent { color: var(--primary); }

/* Center: Global Search */
/* MODIFIED: Hidden by default (Home Page) */
.header-center {
    flex: 1;
    display: flex;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* MODIFIED: Visible ONLY when planner-mode class is active */
.site-header.planner-mode .header-center {
    opacity: 1;
    pointer-events: auto;
}

.global-search-wrapper {
    position: relative;
    width: 100%;
    max-width: 350px;
}

.global-search-input {
    width: 100%;
    padding: 10px 20px 10px 40px;
    border-radius: 50px;
    border: 1px solid transparent;
    background: rgba(0, 0, 0, 0.05);
    font-family: inherit;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.global-search-input:focus {
    outline: none;
    background: white;
    border-color: var(--primary);
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

/* Icon inside search */
.search-icon-symbol {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    opacity: 0.4;
    pointer-events: none;
}

/* Right: Actions */
.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.icon-btn {
    background: white;
    border: 1px solid #eee;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    position: relative;
}
.icon-btn:hover {
    background-color: #f9f9f9;
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.btn-login {
    background: var(--text-main);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-login:hover { background: #333; }

/* Saved Trips Dropdown */
.saved-trips-dropdown {
    position: absolute;
    top: 130%;
    right: 0;
    width: 280px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.12);
    border: 1px solid #eee;
    padding: 10px 0;
    z-index: 200;
    animation: fadeIn 0.2s ease-out;
}

.dropdown-header {
    padding: 5px 20px 10px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
    border-bottom: 1px solid #f5f5f5;
}

.saved-trip-item {
    padding: 12px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
}
.saved-trip-item:hover { background: #f9f9f9; }
.saved-trip-name { font-weight: 600; font-size: 0.95rem; }
.saved-trip-meta { font-size: 0.8rem; color: #888; margin-top: 2px; }
.notification-control { position: relative; }
.notifications-dropdown { position:absolute; top:130%; right:0; width:290px; overflow:hidden; border:1px solid #e5e7eb; border-radius:16px; background:#fff; box-shadow:0 10px 40px rgba(0,0,0,.12); z-index:200; animation:fadeIn .2s ease-out; }
.notification-empty { display:flex; flex-direction:column; align-items:center; gap:8px; padding:25px 20px; color:#64748b; text-align:center; font-size:.82rem; line-height:1.4; }.notification-empty i { width:25px; height:25px; color:var(--primary); }.notification-empty strong { color:var(--text-main); font-size:.9rem; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- LANDING PAGE STYLES --- */
#landing-view {
    width: 100%;
    min-height: 100vh;
    padding-top: 80px; /* Offset for fixed header */
}

.section { padding: 80px 20px; max-width: 1100px; margin: 0 auto; }
.section-title { text-align: center; font-size: 1.8rem; margin-bottom: 40px; font-weight: 700; }

/* Hero */
.hero { 
    text-align: center; 
    padding: 60px 20px 100px;
    max-width: 900px; 
    margin: 0 auto; 
    position: relative;
}

/* Hero Decor */
.hero-decor {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -40%);
    width: 120%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    opacity: 0.4;
}
.dashed-route {
    stroke: var(--accent);
    stroke-width: 2;
    stroke-dasharray: 10, 10;
    fill: none;
    opacity: 0.3;
}
.map-dot {
    fill: var(--bg-main);
    stroke: var(--accent);
    stroke-width: 3;
}

.hero h1 { font-size: 3.5rem; line-height: 1.1; margin-bottom: 16px; position: relative; }
.subtitle { color: var(--text-muted); font-size: 1.1rem; margin-bottom: 50px; position: relative; }

/* Pill Search Bar (Main Input) */
.input-card {
    background: white;
    padding: 10px;
    border-radius: 100px; 
    box-shadow: 0 15px 50px rgba(0,0,0,0.06);
    max-width: 850px;
    margin: 0 auto;
    display: flex; 
    align-items: center;
    border: 1px solid rgba(0,0,0,0.04);
    position: relative;
    z-index: 2;
}

.search-group {
    flex: 1;
    padding: 5px 25px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    text-align: left;
}

.search-group:not(:last-of-type)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 20%;
    height: 60%;
    width: 1px;
    background-color: #E0E0E0;
}

.search-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 800; 
    color: var(--text-main);
    margin-bottom: 2px;
    margin-left: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-control {
    width: 100%;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text-muted);
    padding: 2px 0;
    cursor: pointer;
    outline: none;
}
.search-control:focus { color: var(--primary); }

.btn-search {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 16px 36px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    margin-left: 10px;
    box-shadow: 0 4px 15px rgba(200, 74, 58, 0.3);
}
.btn-search:hover { 
    background-color: #b03d2f; 
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(200, 74, 58, 0.4);
}

/* Suggestions Dropdown Styles (Landing) */
.suggestions-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    z-index: 100;
    padding: 8px 0;
    margin-top: 15px; 
    border: 1px solid #eee;
    max-height: 300px;
    overflow-y: auto;
    text-align: left;
}

.suggestion-item {
    padding: 12px 24px;
    cursor: pointer;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background 0.2s;
    color: var(--text-main);
}

.suggestion-item:hover { background-color: #f5f5f5; color: var(--primary); }
.suggestion-item .icon { font-size: 1.1rem; opacity: 0.5; }

/* Hero Extras */
.hero-extras {
    margin-top: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    font-size: 0.85rem;
    color: var(--text-muted);
    opacity: 0.8;
}

.suggestion-pill {
    background: rgba(47, 111, 106, 0.08); 
    color: var(--accent);
    padding: 6px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}
.suggestion-pill:hover {
    background: rgba(47, 111, 106, 0.15);
}

.trust-text {
    display: flex;
    align-items: center;
    gap: 6px;
}
.dot-separator { width: 4px; height: 4px; background: #ccc; border-radius: 50%; }

/* Close Button Specifics */
#closePlannerBtn {
    font-size: 1.5rem;
    line-height: 1;
    font-weight: 400;
    /* Red background to distinguish it */
    background: #f0f0f0;
}
#closePlannerBtn:hover {
    background: #e0e0e0;
    color: var(--primary);
}

/* How It Works Cards */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 24px; }
.card { background: var(--bg-card); border-radius: var(--radius-md); padding: 24px; box-shadow: var(--shadow-soft); }
.step-card { text-align: center; }
.icon-box { font-size: 2rem; margin-bottom: 16px; background: #fdf2f0; width: 60px; height: 60px; line-height: 60px; border-radius: 50%; margin-left: auto; margin-right: auto; }

/* Footer */
footer { background: #f4f4f4; padding: 60px 20px 20px; color: var(--text-muted); margin-top: 60px; }
.footer-content { max-width: 1100px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; }
.copyright { text-align: center; margin-top: 40px; font-size: 0.8rem; border-top: 1px solid #ddd; padding-top: 20px; }

/* --- 2. PLANNER APP STYLES --- */
#planner-view {
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    background: white;
    padding-top: 70px; /* Space for fixed header */
}

/* App Header styling reused from main header logic */

.split-view {
    display: flex;
    flex: 1;
    height: calc(100vh - 70px);
    height: calc(100dvh - 70px);
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    width: 400px;
    background: white;
    border-right: 1px solid #eee;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    box-shadow: 4px 0 20px rgba(0,0,0,0.02);
    z-index: 10;
}

.sidebar-section { padding: 25px; border-bottom: 1px solid #f5f5f5; }
.sidebar-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 15px; }

/* Filters */
.filter-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.filter-chip {
    padding: 8px 16px; border-radius: 20px; background: #f0f0f0;
    font-size: 0.85rem; cursor: pointer; user-select: none;
    transition: all 0.2s; border: 1px solid transparent;
}
.filter-chip.active {
    background-color: rgba(47, 111, 106, 0.1);
    color: var(--accent);
    border-color: var(--accent);
    font-weight: 500;
}

.btn-update {
    background: var(--text-main); color: white; border: none;
    padding: 10px; width: 100%; border-radius: 8px; cursor: pointer;
    margin-top: 20px;
}

/* Itinerary List */
.plan-day { margin-bottom: 30px; }
.day-header {
    font-size: 0.9rem; color: var(--accent); text-transform: uppercase;
    font-weight: 700; letter-spacing: 1px; margin-bottom: 15px;
    padding-bottom: 5px; border-bottom: 2px solid #f0f0f0;
}

.plan-item {
    display: flex; gap: 15px; margin-bottom: 15px; padding: 12px;
    background: #FAFAFA; border-radius: 12px; position: relative;
    transition: transform 0.2s;
}
.plan-item:hover { transform: translateX(5px); background: #F5F5F5; }
.plan-time { font-size: 0.8rem; font-weight: 700; color: #999; min-width: 50px; }
.plan-details h4 { font-size: 0.95rem; margin-bottom: 4px; }
.plan-details p { font-size: 0.8rem; color: var(--text-muted); }

.remove-btn {
    position: absolute; top: 10px; right: 10px;
    color: #ccc; cursor: pointer; font-size: 1.2rem; line-height: 0.5;
}
.remove-btn:hover { color: var(--primary); }
.empty-state { text-align: center; color: #999; font-style: italic; padding: 20px;}

/* --- MAP CONTAINER --- */
.map-container {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: #e8f0ee;
}

#map {
    width: 100%;
    height: 100%;
    touch-action: none; /* let Mapbox own pinch/drag fully — stops the double pinch-zoom glitch with the page */
}

/* Mapbox Marker Custom Styles */
.map-pin {
    display: flex; 
    flex-direction: column; 
    align-items: center;
    cursor: pointer; 
    z-index: 5;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.2s;
}
.pin-head {
    width: 30px; height: 30px; background: white;
    border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    display: flex; justify-content: center; align-items: center;
    border: 2px solid var(--primary);
}
.pin-icon { transform: rotate(45deg); font-size: 14px; }
.pin-label {
    background: white; padding: 4px 8px; border-radius: 4px;
    font-size: 0.75rem; font-weight: 700; margin-top: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1); white-space: nowrap;
    opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
.map-pin:hover { z-index: 10; transform: scale(1.1); } 
.map-pin:hover .pin-label { opacity: 1; }
.map-pin.filtered-out { opacity: 0; pointer-events: none; transform: scale(0); }

.mapboxgl-popup-content {
    border-radius: 12px;
    padding: 10px 15px;
    font-family: 'DM Sans', sans-serif;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Destinations Section */
.cities-section { padding:30px 20px; max-width:1100px; margin:auto; }
.destinations {
  display:flex; overflow-x:auto; gap:15px; padding-bottom:10px; scroll-snap-type:x mandatory;
}
.destination-card { flex:0 0 auto; text-align:center; width:100px; scroll-snap-align:start; }
.destination-card { border: 0; background: transparent; color: var(--text-main); cursor: pointer; font: inherit; padding: 0; }
.destination-card img {
  width:100px; height:80px; object-fit:cover; border-radius:10px;
}
.destination-card span { display:block; margin-top:8px; font-size:14px; }
.destinations::-webkit-scrollbar { display:none; }
.destination-card:hover { transform: scale(1.05); }

/* Sections */
.section { padding: 20px 20px; max-width: 1100px; margin: auto; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.card {
  background: white; padding: 20px; border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}
.card:hover { transform: translateY(-5px); }

.itinerary-note {
    margin: -4px 0 16px;
    color: var(--text-muted);
    font-size: 0.78rem;
    line-height: 1.45;
}

/* ========== Mobile Tab Bar (floating glass pill) ========== */

/* Soft fade so page content never gets a hard cutoff behind the bar */
.tab-bar-fade {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 130px;
  background: linear-gradient(to bottom, rgba(250, 249, 246, 0), rgba(250, 249, 246, 0.9) 65%, rgba(250, 249, 246, 0.98));
  pointer-events: none;
  z-index: 2999;
}

@media (min-width: 768px) {
  .tab-bar-fade { display: none; }
}

.tab-bar {
  position: fixed;
  bottom: 14px;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%) translateZ(0);
  -webkit-transform: translateX(-50%) translateZ(0);
  will-change: transform;
  width: max-content;
  max-width: calc(100% - 20px);
  height: 64px;
  background: rgba(255, 253, 250, 0.82);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 999px;
  box-shadow:
    0 14px 36px rgba(31, 31, 31, 0.14),
    0 0 0 1px rgba(200, 74, 58, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  z-index: 3000;
}

.tab-bar button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  text-decoration: none;
  font: inherit;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.01em;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 52px;
  width: 52px;
  flex: 0 0 auto;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, transform 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.tab-bar button:hover,
.tab-bar button:focus-visible {
  color: var(--accent);
  background: rgba(47, 111, 106, 0.08);
  outline: none;
}

.tab-bar button:active {
  transform: scale(0.94);
}

.tab-bar button.active {
  color: var(--primary);
  width: 68px;
  background: rgba(200, 74, 58, 0.12);
  box-shadow: inset 0 0 0 1px rgba(200, 74, 58, 0.18);
}

.tab-bar button.active::after {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
}

.tab-bar svg {
  width: 19px;
  height: 19px;
  margin: 0;
  transition: transform 0.2s ease;
}

.tab-bar button.active svg {
  transform: translateY(-1px) scale(1.05);
}

/* Hide on desktop */
@media (min-width: 768px) {
  .tab-bar {
    display: none;
  }
}

/* --- MOBILE FIXES (Consolidated) --- */
@media (max-width: 768px) {
    /* Prevent Horizontal Scroll */
    body, html {
        overflow-x: hidden;
        width: 100%;
        position: relative;
    }

    /* Hero & Landing Adjustments */
    .hero {
        padding-top: 18px;
        padding-bottom: 28px;
    }
    
    .hero h1 {
        font-size: 2.2rem; /* Fix huge text */
        line-height: 1.2;
    }

    /* Input Card - Stack items vertically with spacing */
    .input-card {
        flex-direction: column;
        height: auto;
        padding: 20px;
        width: 100%;
        border-radius: 20px;
    }
    
    .search-group {
        width: 100%;
        border-bottom: 1px solid #eee;
        padding: 10px 0;
        margin-bottom: 5px;
    }

    .search-group:last-of-type {
        border-bottom: none;
    }
    
    .btn-search {
        width: 100%;
        margin-top: 15px;
        margin-left: 0;
        padding: 14px;
    }

    /* Planner View Mobile Layout */
    .split-view {
        flex-direction: column-reverse; /* Map on top, Sidebar on bottom */
        height: calc(100vh - 60px); /* Adjust for smaller header */
        height: calc(100dvh - 60px);
    }

    .map-container {
        height: 50vh; /* Fixed height for map */
        width: 100%;
        flex: none;
    }

    .sidebar {
        height: 50vh; /* Remaining height */
        width: 100%;
        border-right: none;
        border-top: 2px solid #eee;
    }

    /* Destination Cards Horizontal Scroll Container */
    .destinations {
        padding-bottom: 20px; /* Space for scrollbar/touch */
        padding-left: 10px;
        padding-right: 10px;
        gap: 1px;
        -webkit-overflow-scrolling: touch;
    }
    
    .destination-card {
        width: 120px; /* Slightly larger touch target */
    }

    /* Footer spacing for the floating mobile navigation */
    footer {
        padding-bottom: 110px;
    }

    /* Header Mobile adjustments */
    .site-header {
        padding: 0 15px;
    }
    
    /* Ensure modals/popups are centered on mobile */
    #installPopup > div, #iosPopup > div {
        width: 90%;
        max-width: 300px;
    }

    /* Mobile Header - Button Hiding */
    .header-right .btn-login,
    .header-right #savedTripsBtn {
        display: none !important;
    }

    /* Fix Saved Trips Dropdown for Mobile (Center it) */
    .saved-trips-dropdown {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) !important;
        width: 85%;
        max-height: 50vh;
        overflow-y: auto;
        box-shadow: 0 0 0 1000px rgba(0,0,0,0.5); /* Dim background */
    }

    /* Ensure Map doesn't get hidden behind tab bar */
    #planner-view {
        padding-bottom: 92px;
    }
    
    /* Force Map container to respect tab bar space */
    .map-container {
        height: calc(55% - 76px) !important;
    }

    /* Header Right Container */
    .header-right {
        display: flex !important;
        align-items: center;
        min-width: 50px; /* Reserve space for the button */
        justify-content: flex-end;
        gap: 0; /* Remove gap since other buttons are hidden */
    }

    /* Force Close Button visibility and prevent squashing */
    #closePlannerBtn {
        /* Ensure it's not hidden if the 'hidden' class is removed */
        display: flex; 
        flex-shrink: 0; /* Prevent it from shrinking to 0 width */
        width: 40px;
        height: 40px;
        background: #f5f5f5 !important; /* Light grey background to stand out */
        color: #333;
        z-index: 1100; /* Ensure it sits on top of everything */
        border-radius: 50%;
        justify-content: center;
        align-items: center;
        font-size: 1.5rem;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }
    
    /* Hide the wrapper div of Saved Trips to remove extra spacing */
    .header-right > div:has(#savedTripsBtn) {
        display: none !important;
    }
    
    /* Fallback if :has isn't supported (Hide Saved button specifically) */
    #savedTripsBtn {
        display: none !important;
    }
    
    /* Ensure only the active close button shows */
    #closePlannerBtn.hidden {
        display: none !important;
    }
    #closePlannerBtn:not(.hidden) {
        display: flex !important;
        opacity: 1 !important;
        pointer-events: auto !important;
    }

    /* 3️⃣ Header Logo: Force Centering */
    .site-header {
        display: flex !important;
        justify-content: center !important; /* Centers the Logo */
        position: fixed !important; /* Ensure it stays pinned */
        top: 0; left: 0; right: 0;
        padding: 0 15px !important;
    }

    .logo {
        position: absolute !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        z-index: 20 !important;
        margin: 0 !important;
    }

    /* Keep Header Actions (Saved/Profile) to the Right */
    .header-right {
        position: absolute !important;
        right: 15px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
    }

    /* Adjust Map Container to not be hidden behind Tab Bar */
    #planner-view {
        height: 100vh !important;
        height: 100dvh !important;
        padding-bottom: 60px !important; /* Space for Tab Bar */
    }
}

/* --- EXPLORE EXTENSIONS: AI PLANNER + T-BLOG --- */
.quick-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; padding-top: 6px; padding-bottom: 42px; }
.quick-action-card { text-align: left; border: 1px solid rgba(47,111,106,.13); background: rgba(255,255,255,.68); border-radius: 18px; padding: 18px; color: var(--text-main); cursor: pointer; transition: transform .2s ease, box-shadow .2s ease; }
.quick-action-card:hover { transform: translateY(-3px); box-shadow: 0 14px 28px rgba(31,31,31,.08); }
.quick-action-card span { display:block; color: var(--primary); font-size: 1.35rem; margin-bottom: 10px; }
.quick-action-card strong, .quick-action-card small { display:block; }
.quick-action-card small { color: var(--text-muted); font-size:.78rem; line-height:1.35; margin-top:4px; }

.place-preview { position:absolute; left:20px; bottom:20px; z-index:30; width:min(360px, calc(100% - 40px)); background:rgba(255,255,255,.96); backdrop-filter:blur(16px); border-radius:18px; box-shadow:0 18px 42px rgba(20,35,31,.2); overflow:hidden; animation: previewIn .25s ease; }
.place-preview>img { width:100%; height:135px; object-fit:cover; display:block; }
.preview-body { padding:16px; }
.preview-body h2, .preview-body h3 { line-height:1.2; margin:2px 0 6px; }
.preview-body p { color:var(--text-muted); font-size:.84rem; margin:5px 0; }
.preview-close, .guide-close { position:absolute; top:10px; right:10px; z-index:2; width:32px; height:32px; border:0; border-radius:50%; background:rgba(20,25,23,.7); color:white; cursor:pointer; font-size:1.35rem; }
.preview-actions { display:flex; gap:8px; margin-top:14px; }
.button-primary, .button-secondary { border:0; border-radius:10px; padding:10px 12px; font:inherit; font-size:.8rem; font-weight:700; cursor:pointer; }
.button-primary { background:var(--primary); color:white; flex:1; }
.button-primary.is-added { background:var(--accent); }
.button-secondary { background:#edf2f0; color:var(--text-main); }
.featured-guides { margin-top:15px; display:flex; flex-wrap:wrap; gap:6px; border-top:1px solid #edf0ee; padding-top:12px; }
.featured-guides span { width:100%; color:var(--text-muted); text-transform:uppercase; letter-spacing:.08em; font-size:.64rem; font-weight:800; }
.featured-guides button { border:0; background:#edf5f3; color:var(--accent); padding:5px 8px; border-radius:99px; font:inherit; font-size:.68rem; cursor:pointer; }
.place-facts { display:flex; flex-wrap:wrap; gap:6px; margin:10px 0; }
.place-facts span { background:#f4f6f5; border-radius:7px; padding:5px 7px; font-size:.7rem; }
.ai-empty-state { position:absolute; left:50%; bottom:18px; transform:translateX(-50%); width:min(560px,calc(100% - 40px)); z-index:20; display:flex; align-items:center; gap:12px; padding:14px 16px; background:rgba(23,37,33,.93); color:white; border:1px solid rgba(111,185,174,.28); border-radius:16px; box-shadow:0 16px 34px rgba(18,28,25,.24); }
.ai-empty-state>span { color:#f1c26c; font-size:1.3rem; }.ai-empty-state div { flex:1; }.ai-empty-state strong,.ai-empty-state p { display:block; }.ai-empty-state p { color:rgba(255,255,255,.68); font-size:.76rem; }.ai-empty-state button { border:0; border-radius:10px; padding:9px 12px; color:white; background:var(--primary); font:inherit; font-size:.78rem; font-weight:700; cursor:pointer; }
.trip-action-bar { position:fixed; z-index:2500; left:50%; bottom:22px; transform:translateX(-50%); width:min(600px,calc(100% - 32px)); display:flex; align-items:center; justify-content:space-between; gap:16px; padding:12px 14px 12px 18px; background:rgba(23,37,33,.95); color:white; border:1px solid rgba(111,185,174,.32); border-radius:18px; box-shadow:0 16px 42px rgba(10,20,17,.28); animation:previewIn .25s ease; }
.trip-action-bar strong,.trip-action-bar span { display:block; }.trip-action-bar span { font-size:.73rem; color:rgba(255,255,255,.65); }.trip-action-bar button,.use-guide-button { border:0; border-radius:12px; background:var(--primary); color:#fff; padding:11px 16px; font:inherit; font-weight:800; cursor:pointer; white-space:nowrap; }
.ai-plan-label { padding:10px 12px; background:#e8f3f1; color:var(--accent); font-size:.77rem; font-weight:700; border-radius:10px; margin-bottom:14px; }

.guides-section { max-width:1200px; margin:0 auto; padding:64px 28px 120px; }.section-heading { display:flex; align-items:end; justify-content:space-between; gap:16px; margin-bottom:20px; }.section-heading h2 { font-size:2rem; letter-spacing:-.045em; }.section-heading button { border:0; background:transparent; color:var(--accent); font:inherit; font-weight:700; cursor:pointer; }
.eyebrow { color:var(--accent); font-size:.68rem; font-weight:800; letter-spacing:.12em; text-transform:uppercase; }.guides-carousel { display:flex; overflow-x:auto; gap:16px; padding:3px 2px 16px; scroll-snap-type:x mandatory; }.guides-carousel::-webkit-scrollbar { display:none; }
.guide-card { flex:0 0 230px; overflow:hidden; border-radius:18px; background:#fff; box-shadow:0 14px 28px rgba(31,31,31,.08); cursor:pointer; scroll-snap-align:start; transition:transform .2s ease; }.guide-card:hover { transform:translateY(-4px); }.guide-card img { width:100%; height:150px; object-fit:cover; display:block; }.guide-card>div { padding:14px; }.guide-card p { font-size:.7rem; color:var(--text-muted); }.guide-card h3 { font-size:1rem; margin:3px 0 10px; }.guide-card span { color:var(--primary); font-size:.75rem; font-weight:700; }
.guide-modal { position:fixed; inset:0; z-index:5000; background:rgba(10,18,16,.62); backdrop-filter:blur(8px); padding:30px; overflow:auto; }.guide-sheet { max-width:780px; margin:0 auto; background:var(--bg-main); min-height:100%; border-radius:24px; overflow:hidden; position:relative; }.guide-sheet>#guideContent>h2,.guide-intro,.guide-catalogue { margin-left:28px; margin-right:28px; }.guide-sheet>#guideContent>.eyebrow { padding:30px 28px 0; }.guide-intro { color:var(--text-muted); margin-top:8px; }.guide-catalogue { display:grid; grid-template-columns:repeat(2,1fr); gap:16px; margin-top:22px; padding-bottom:32px; }.guide-catalogue .guide-card { flex:auto; }.guide-hero { height:310px; background-size:cover; background-position:center; color:#fff; padding:160px 30px 28px; }.guide-hero .eyebrow { color:#d5f1eb; }.guide-hero h2 { font-size:2.5rem; line-height:1.05; }.guide-hero span { opacity:.78; font-size:.8rem; }.guide-day { padding:28px; }.guide-day>h3 { color:var(--accent); letter-spacing:.1em; font-size:.8rem; margin-bottom:14px; }.guide-stop { display:grid; grid-template-columns:150px 1fr; gap:16px; padding:14px 0; border-top:1px solid #e3e9e6; }.guide-stop img { width:150px; height:126px; object-fit:cover; border-radius:14px; }.guide-stop h4 { font-size:1.1rem; margin-bottom:5px; }.guide-stop p { color:var(--text-muted); font-size:.8rem; margin:3px 0; }.guide-stop .scam-alert { color:#a33d30; }.use-guide-button { display:block; width:calc(100% - 56px); margin:0 28px 30px; }
@keyframes previewIn { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:translateY(0); } }
@media (max-width:768px) { .quick-actions { grid-template-columns:1fr; padding:0 20px 30px; }.quick-action-card { display:grid; grid-template-columns:30px 1fr; column-gap:10px; align-items:center; }.quick-action-card span { grid-row:span 2; margin:0; }.ai-empty-state { bottom:12px; align-items:flex-start; }.ai-empty-state button { display:none; }.place-preview { left:12px; bottom:12px; width:calc(100% - 24px); }.place-preview>img { height:105px; }.guides-section { padding:38px 20px 120px; }.section-heading h2 { font-size:1.5rem; }.guide-modal { padding:0; }.guide-sheet { border-radius:0; }.guide-catalogue { grid-template-columns:1fr; }.guide-stop { grid-template-columns:1fr; }.guide-stop img { width:100%; height:190px; }.guide-hero { height:260px; padding:125px 22px 22px; }.guide-hero h2 { font-size:2rem; }.guide-day { padding:22px; }.trip-action-bar { bottom:86px; }.trip-action-bar span { display:none; } }

/* --- QUIET FUTURE VISUAL SYSTEM --- */
#landing-view {
    position: relative;
    /* Keep decorative art inside the page horizontally without turning the
       landing view into a clipped, non-scrollable container on mobile. */
    overflow-x: clip;
    overflow-y: visible;
    background:
        radial-gradient(circle at 84% 12%, rgba(47, 111, 106, 0.13), transparent 28rem),
        radial-gradient(circle at 12% 34%, rgba(200, 74, 58, 0.09), transparent 24rem),
        var(--bg-main);
}

#landing-view::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.38;
    background-image: linear-gradient(rgba(47, 111, 106, 0.055) 1px, transparent 1px), linear-gradient(90deg, rgba(47, 111, 106, 0.055) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(to bottom, black 0%, transparent 46%);
}

.hero { padding-top: 84px; }
.hero h1 { letter-spacing: -0.06em; font-weight: 800; }
.subtitle { max-width: 560px; margin-left: auto; margin-right: auto; }

.input-card {
    border-radius: 24px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.76);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.85);
    box-shadow: 0 22px 55px rgba(31, 31, 31, 0.10), 0 0 0 1px rgba(47, 111, 106, 0.07);
}

.search-group label { color: var(--accent); }
.btn-search { border-radius: 18px; box-shadow: 0 10px 24px rgba(200, 74, 58, 0.26); }
.suggestion-pill { border: 1px solid rgba(47, 111, 106, 0.15); }

.cities-section { position: relative; padding-top: 50px; }
.cities-section h2 { font-size: 1.9rem; letter-spacing: -0.04em; }
.destinations { gap: 18px; padding: 4px 2px 18px; }
.destination-card { width: 176px; text-align: left; transition: transform 0.25s ease; }
.destination-card img { width: 176px; height: 122px; border-radius: 18px; box-shadow: 0 12px 24px rgba(31, 31, 31, 0.12); }
.destination-card span { margin-top: 11px; font-weight: 700; font-size: 0.95rem; }
.destination-card small { display: block; color: var(--text-muted); font-size: 0.72rem; margin-top: 1px; }
.destination-card:hover { transform: translateY(-5px); }
.destination-card:focus-visible { outline: 3px solid rgba(200, 74, 58, 0.35); outline-offset: 4px; border-radius: 18px; }

.how-it-works { padding-top: 72px; padding-bottom: 72px; }
.step-card { position: relative; overflow: hidden; border: 1px solid rgba(47, 111, 106, 0.10); box-shadow: 0 16px 32px rgba(31, 31, 31, 0.05); }
.step-card::after { content: ''; position: absolute; width: 130px; height: 130px; border: 1px solid rgba(47, 111, 106, 0.14); border-radius: 50%; top: -70px; right: -55px; }
.icon-box { background: rgba(47, 111, 106, 0.10); color: var(--accent); font-size: 0.8rem; line-height: 60px; font-weight: 800; letter-spacing: 0.08em; }

.filter-chip { background: rgba(47, 111, 106, 0.06); border-color: rgba(47, 111, 106, 0.11); }
.filter-chip.active { box-shadow: 0 6px 15px rgba(47, 111, 106, 0.12); }
.btn-update { border-radius: 12px; }
.plan-item { border: 1px solid rgba(47, 111, 106, 0.08); background: rgba(250, 249, 246, 0.75); }

/* Saved-trip confirmation */
.saved-trip-open { overflow: hidden; }
.saved-trip-modal { position: fixed; inset: 0; z-index: 6000; display: grid; place-items: center; padding: 24px; background: rgba(15, 23, 42, .35); backdrop-filter: blur(8px); }
.saved-trip-card { position: relative; width: min(100%, 1040px); overflow: hidden; border: 1px solid #dfe4ea; border-radius: 24px; background: #fff; box-shadow: 0 26px 70px rgba(15, 23, 42, .23); color: #172033; animation: savedTripIn .25s ease-out; }
.saved-trip-close { position: absolute; top: 17px; right: 18px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: #f1f5f9; color: #475569; font-size: 24px; line-height: 1; cursor: pointer; z-index: 1; }
.saved-trip-card__header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 23px 30px; border-bottom: 1px solid #dde3ea; }
.saved-trip-card__header>div { display: flex; align-items: center; gap: 10px; }.saved-trip-card__header i { width: 23px; height: 23px; color: #D32F2F; }.saved-trip-card__header h2 { margin: 0; font-size: clamp(20px, 2.5vw, 25px); font-weight: 600; letter-spacing: -.025em; }.saved-trip-card__header>span { padding: 8px 12px; border-radius: 10px; background: #ecfdf3; color: #166534; font-size: 16px; font-weight: 750; }
.saved-trip-card__body { display: grid; grid-template-columns: 1.1fr .9fr; gap: 34px; padding: 32px 34px; }.saved-trip-timeline { padding: 6px 0; }.saved-trip-stop { position: relative; display: grid; grid-template-columns: 74px 22px 1fr; gap: 14px; min-height: 100px; }.saved-trip-stop:not(:last-child)::after { content: ''; position: absolute; top: 27px; bottom: 6px; left: 85px; width: 1px; background: #dce3eb; }.saved-trip-stop time { padding-top: 4px; color: #536176; font-size: 16px; }.saved-trip-stop__dot { position: relative; z-index: 1; width: 19px; height: 19px; margin-top: 2px; border: 5px solid #fff; border-radius: 50%; background: #D32F2F; box-shadow: 0 0 0 2px #D32F2F; }.saved-trip-stop h3 { margin: 0 0 8px; font-size: 20px; letter-spacing: -.025em; }.saved-trip-stop p { margin: 0; color: #536176; font-size: 16px; line-height: 1.35; }
.saved-trip-route-art { position: relative; min-height: 310px; overflow: hidden; background: #eaf0f4; }.saved-trip-route-art::before, .saved-trip-route-art::after { content: ''; position: absolute; width: 140%; height: 18px; border: 8px solid rgba(255, 255, 255, .72); border-radius: 50%; transform: rotate(-34deg); }.saved-trip-route-art::before { top: 93px; left: -120px; }.saved-trip-route-art::after { top: 190px; left: -70px; transform: rotate(24deg); }.saved-trip-route-art strong { position: absolute; top: 30px; right: 25px; z-index: 2; font-size: 22px; }.saved-route-line { position: absolute; z-index: 1; width: 150%; height: 3px; top: 50%; left: -26%; background: #D32F2F; transform: rotate(-43deg); }.saved-pin { position: absolute; z-index: 2; width: 22px; height: 22px; border-radius: 50% 50% 50% 0; background: #D32F2F; box-shadow: 0 4px 7px rgba(255,113,18,.28); transform: rotate(-45deg); }.saved-pin--one { top: 34%; left: 24%; }.saved-pin--two { top: 57%; left: 55%; }.saved-pin--three { right: 20%; bottom: 24%; }
.saved-trip-card__footer { display: flex; align-items: center; gap: 30px; padding: 20px 34px; border-top: 1px solid #eef1f5; color: #536176; font-size: 16px; }.saved-trip-card__footer span { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }.saved-trip-card__footer span i { width: 20px; height: 20px; color: #D32F2F; }.saved-trip-card__footer button { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 10px; padding: 10px 13px; background: #172033; color: #fff; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }.saved-trip-card__footer button i { width: 16px; height: 16px; }
@keyframes savedTripIn { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.saved-trips-view { min-height: 100vh; background: #f8fafc; }
.saved-trips-page { max-width: 1120px; margin: 0 auto; padding: 54px 24px 110px; }
.saved-trips-page__header { display:flex; align-items:flex-end; justify-content:space-between; gap:20px; margin-bottom:28px; }
.saved-trips-page__header p { margin:0 0 7px; color:#D32F2F; font-size:12px; font-weight:800; letter-spacing:.11em; }
.saved-trips-page__header h1 { margin:0; font-size:42px; letter-spacing:-.055em; }
.saved-trips-page__header span { display:block; margin-top:8px; color:#64748b; }
.saved-trips-page__header button { display:inline-flex; align-items:center; gap:8px; border:0; border-radius:10px; padding:11px 14px; background:#172033; color:#fff; font:inherit; font-size:14px; font-weight:700; cursor:pointer; }
.saved-trips-page__header button i { width:16px; height:16px; }
.saved-trips-cards { display:grid; gap:22px; }
.saved-trips-cards .saved-trip-card { width:100%; }
.saved-trips-empty { padding:70px 24px; border:1px dashed #cbd5e1; border-radius:20px; background:#fff; text-align:center; color:#64748b; }
.saved-trips-empty i { width:32px; height:32px; color:#D32F2F; }
.saved-trips-empty h2 { margin:12px 0 6px; color:#172033; }
.saved-trips-empty p { margin:0; }
@media (max-width: 720px) { .saved-trip-modal { align-items: end; padding: 12px; }.saved-trip-modal .saved-trip-card { max-height: calc(100vh - 24px); overflow: auto; border-radius: 20px; }.saved-trip-card__header { padding: 20px; padding-right: 58px; }.saved-trip-card__header>span { font-size: 14px; }.saved-trip-card__body { grid-template-columns: 1fr; gap: 8px; padding: 24px 20px; }.saved-trip-stop { grid-template-columns: 58px 20px 1fr; gap: 10px; min-height: 82px; }.saved-trip-stop:not(:last-child)::after { left: 67px; }.saved-trip-stop time, .saved-trip-stop p { font-size: 14px; }.saved-trip-stop h3 { margin-bottom: 5px; font-size: 17px; }.saved-trip-route-art { min-height: 210px; }.saved-trip-card__footer { flex-wrap: wrap; gap: 12px 18px; padding: 18px 20px; font-size: 14px; }.saved-trip-card__footer button { width: 100%; justify-content: center; margin-left: 0; } }
@media (max-width: 720px) { .saved-trips-page { padding:32px 16px 106px; }.saved-trips-page__header { align-items:flex-start; flex-direction:column; }.saved-trips-page__header h1 { font-size:34px; }.saved-trips-page__header button { width:100%; justify-content:center; } }

.site-footer { background: #172521; border-top: 1px solid rgba(111, 185, 174, 0.20); }
.footer-bottom { background: #101a18; }

@media (max-width: 768px) {
    .hero { padding-top: 34px; }
    .input-card { border-radius: 22px; }
    .destination-card, .destination-card img { width: 146px; }
    .destination-card img { height: 108px; }
    .cities-section { padding-top: 34px; }
}
/* --- RESPONSIVE FOOTER STYLES --- */
.site-footer {
    background-color: #1a1a1a;
    color: #e0e0e0;
    padding-top: 60px;
    font-size: 0.95rem;
    margin-top: 0; /* Removes default margin */
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 0 20px 40px;
    gap: 40px;
}

.footer-col {
    flex: 1;
    min-width: 220px;
}

.footer-col h3 {
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 20px;
    font-weight: 700;
}

/* About Section */
.footer-col.about p {
    line-height: 1.6;
    color: #ccc;
    max-width: 300px;
}

/* Links Section */
.footer-col.links ul {
    list-style: none;
    padding: 0;
}

.footer-col.links li {
    margin-bottom: 12px;
}

.footer-col.links a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-col.links a:hover {
    color: var(--primary, #C84A3A); /* Uses your existing primary color variable */
    padding-left: 5px;
}

/* Contact Section */
.footer-col.contact p {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ccc;
}

/* Social Section */
.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background: var(--primary, #C84A3A);
    transform: translateY(-3px);
}

/* Bottom Bar */
.footer-bottom {
    background-color: #111;
    text-align: center;
    padding: 20px;
    border-top: 1px solid #333;
    font-size: 0.85rem;
    color: #888;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .footer-container {
        flex-direction: column;
        gap: 30px;
    }
    
    .footer-col {
        width: 100%;
        text-align: left;
    }
    
    .social-icons {
        justify-content: flex-start;
    }
}

@media (max-width:768px){.site-header .logo img{display:none;}}
