/* ============================================
   Rahhala Map - Main Stylesheet
   Color Palette: Teal (#0e8a7e) + Orange (#e8831a)
   RTL Arabic-first design
   ============================================ */

/* ============================================
   CSS Variables (Design Tokens)
   ============================================ */
:root {
    /* Brand Colors (shared) */
    --teal-dark: #0a6b62;
    --teal: #0e8a7e;
    --teal-light: #12b0a0;
    --teal-glow: rgba(14, 138, 126, 0.3);
    --orange-dark: #c46d0f;
    --orange: #e8831a;
    --orange-light: #f5a623;
    --orange-glow: rgba(232, 131, 26, 0.3);

    /* Light Theme (Default) */
    --bg-dark: #f0f4f8;
    --bg-darker: #e2e8f0;
    --bg-card: #ffffff;
    --bg-card-hover: #f7fafc;
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --text-muted: #a0aec0;
    --border-color: rgba(0, 0, 0, 0.08);
    --border-light: rgba(0, 0, 0, 0.12);

    /* Semi-transparent overlays (theme-aware) */
    --hover-bg: rgba(0, 0, 0, 0.04);
    --hover-bg-md: rgba(0, 0, 0, 0.06);
    --hover-bg-lg: rgba(0, 0, 0, 0.08);
    --input-bg: rgba(0, 0, 0, 0.03);
    --close-bg: rgba(0, 0, 0, 0.06);
    --close-bg-hover: rgba(0, 0, 0, 0.12);

    /* Glass Effect */
    --glass-bg: rgba(255, 255, 255, 0.92);
    --glass-border: rgba(0, 0, 0, 0.08);
    --glass-blur: 20px;

    /* Shadows */
    --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
    --shadow-teal: 0 4px 20px rgba(14, 138, 126, 0.2);
    --shadow-orange: 0 4px 20px rgba(232, 131, 26, 0.2);

    /* Typography */
    --font-arabic: 'Tajawal', 'Segoe UI', sans-serif;
    --font-latin: 'Inter', 'Segoe UI', sans-serif;

    /* Spacing */
    --header-height: 70px;
    --filter-height: 55px;
    --panel-width: 420px;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 50%;
}

/* ============================================
   Dark Theme Override
   ============================================ */
[data-theme="dark"] {
    --bg-dark: #0f1923;
    --bg-darker: #0a1219;
    --bg-card: #1a2a36;
    --bg-card-hover: #223344;
    --text-primary: #ffffff;
    --text-secondary: #a0b4c4;
    --text-muted: #6b8399;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-light: rgba(255, 255, 255, 0.15);
    --hover-bg: rgba(255, 255, 255, 0.04);
    --hover-bg-md: rgba(255, 255, 255, 0.06);
    --hover-bg-lg: rgba(255, 255, 255, 0.08);
    --input-bg: rgba(255, 255, 255, 0.06);
    --close-bg: rgba(255, 255, 255, 0.1);
    --close-bg-hover: rgba(255, 255, 255, 0.2);
    --glass-bg: rgba(15, 25, 35, 0.85);
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.4);
    --shadow-teal: 0 4px 20px rgba(14, 138, 126, 0.3);
    --shadow-orange: 0 4px 20px rgba(232, 131, 26, 0.3);
}

/* ============================================
   Reset & Global Styles
   ============================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-arabic);
    background: var(--bg-dark);
    color: var(--text-primary);
    direction: rtl;
    overflow: hidden;
    height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
}

/* ============================================
   Header / Navigation
   ============================================ */
.main-header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    height: var(--header-height);
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000;
    transition: transform var(--transition-smooth);
}

.header-container {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 24px;
    gap: 20px;
    max-width: 100%;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.logo-img {
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
}

.logo-subtitle {
    font-family: var(--font-latin);
    font-size: 10px;
    font-weight: 500;
    color: var(--teal-light);
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Navigation */
.main-nav {
    display: flex;
    align-items: center;
    gap: 2px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-shrink: 1;
    min-width: 0;
}

.main-nav::-webkit-scrollbar {
    display: none;
}

.nav-link {
    padding: 8px 10px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--hover-bg-md);
}

.nav-link.active {
    color: var(--teal-light);
    background: rgba(14, 138, 126, 0.12);
}

.nav-link i {
    margin-left: 6px;
    font-size: 13px;
}

/* Search Bar */
.search-container {
    flex: 1;
    max-width: 400px;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 10px 44px 10px 16px;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    color: var(--text-primary);
    font-family: var(--font-arabic);
    font-size: 14px;
    transition: all var(--transition-fast);
    direction: rtl;
}

.search-input:focus {
    outline: none;
    border-color: var(--teal);
    background: var(--hover-bg-lg);
    box-shadow: 0 0 0 3px var(--teal-glow);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-btn {
    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--teal), var(--teal-dark));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.search-btn:hover {
    background: linear-gradient(135deg, var(--teal-light), var(--teal));
    box-shadow: var(--shadow-teal);
}

/* Search Results Dropdown */
.search-results {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    max-height: 300px;
    overflow-y: auto;
    display: none;
    z-index: 100;
}

.search-results.active {
    display: block;
    animation: slideDown 0.2s ease;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background var(--transition-fast);
    border-bottom: 1px solid var(--border-color);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: var(--hover-bg);
}

.search-result-item i {
    color: var(--orange);
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.search-result-item .result-text {
    flex: 1;
}

.search-result-item .result-title {
    font-size: 14px;
    font-weight: 500;
}

.search-result-item .result-sub {
    font-size: 12px;
    color: var(--text-muted);
}

/* Theme Toggle Button */
.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--hover-bg-md);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: all var(--transition-fast);
    flex-shrink: 0;
    position: relative;
}

.theme-toggle:hover {
    background: var(--hover-bg-lg);
    color: var(--orange);
    border-color: var(--orange);
    transform: scale(1.05);
}

/* Light mode: show moon (to switch to dark), hide sun */
.theme-toggle #themeIconMoon {
    display: inline-block;
}
.theme-toggle #themeIconSun {
    display: none;
}

/* Dark mode: show sun (to switch to light), hide moon */
[data-theme="dark"] .theme-toggle #themeIconMoon {
    display: none;
}
[data-theme="dark"] .theme-toggle #themeIconSun {
    display: inline-block;
    color: var(--orange-light);
}

/* ============================================
   User Area (Login / Avatar / Dropdown)
   ============================================ */
.user-area {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.user-guest {
    display: flex;
    align-items: center;
}

.btn-login {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--hover-bg-md);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
    font-family: var(--font-arabic);
}

.btn-login:hover {
    background: var(--hover-bg-lg);
    border-color: var(--teal);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(14, 138, 126, 0.2);
}

.btn-login .google-icon {
    flex-shrink: 0;
}

/* Logged-in user avatar button */
.user-logged-in {
    position: relative;
    display: flex;
    align-items: center;
}

.user-avatar-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px 4px 4px;
    background: var(--hover-bg-md);
    border: 2px solid var(--teal);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.user-avatar-btn:hover {
    background: var(--hover-bg-lg);
    box-shadow: 0 0 0 3px rgba(14, 138, 126, 0.15);
    transform: scale(1.03);
}

.user-avatar-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.user-name-short {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* User Dropdown Menu */
.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 260px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.97);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1000;
    overflow: hidden;
}

.user-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.user-dropdown-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--hover-bg);
}

.user-dropdown-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid var(--teal);
    object-fit: cover;
    flex-shrink: 0;
}

.user-dropdown-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
}

.user-dropdown-email {
    font-size: 11px;
    color: var(--text-muted);
    direction: ltr;
    text-align: right;
}

.user-dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0;
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
    transition: background var(--transition-fast);
    cursor: pointer;
}

.user-dropdown-item:hover {
    background: var(--hover-bg-md);
}

.user-dropdown-item i {
    width: 18px;
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
}

.user-dropdown-item .fa-heart {
    color: #e74c3c;
}

.user-dropdown-item .fa-star {
    color: #f39c12;
}

.user-dropdown-logout {
    color: #e74c3c;
}

.user-dropdown-logout i {
    color: #e74c3c;
}

.fav-count-badge {
    margin-right: auto;
    padding: 2px 8px;
    background: rgba(231, 76, 60, 0.12);
    color: #e74c3c;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
}

/* ============================================
   Toast Notifications
   ============================================ */
.rahhala-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    padding: 12px 24px;
    border-radius: var(--radius-lg);
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-arabic);
    color: #fff;
    z-index: 10000;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
    pointer-events: none;
}

.rahhala-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.rahhala-toast-success {
    background: linear-gradient(135deg, #0e8a7e, #12b0a0);
}

.rahhala-toast-error {
    background: linear-gradient(135deg, #c0392b, #e74c3c);
}

.rahhala-toast-info {
    background: linear-gradient(135deg, #2c3e50, #34495e);
}

/* ============================================
   Favorite Heart Button (in panels/popups)
   ============================================ */
.fav-filter-btn {
    border: 1px solid rgba(231, 76, 60, 0.3) !important;
    color: #e74c3c !important;
}

.fav-filter-btn.active {
    background: rgba(231, 76, 60, 0.15) !important;
    border-color: #e74c3c !important;
    color: #e74c3c !important;
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.15);
}

.fav-filter-btn i {
    margin-left: 4px;
}

.btn-favorite {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--hover-bg);
    color: var(--text-muted);
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    flex-shrink: 0;
}

.btn-favorite:hover {
    background: rgba(231, 76, 60, 0.1);
    border-color: #e74c3c;
    color: #e74c3c;
    transform: scale(1.15);
}

.btn-favorite.active {
    background: rgba(231, 76, 60, 0.12);
    border-color: #e74c3c;
    color: #e74c3c;
}

.btn-favorite.active i {
    animation: heartPop 0.4s ease;
}

@keyframes heartPop {
    0% { transform: scale(1); }
    40% { transform: scale(1.35); }
    100% { transform: scale(1); }
}

/* ============================================
   Rating Section (in side panel)
   ============================================ */
.panel-rating-section {
    margin: 0 20px;
    padding: 12px 14px;
    background: var(--hover-bg);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.rating-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.rating-stars-display {
    display: flex;
    gap: 2px;
    font-size: 16px;
    color: #f39c12;
}

.rating-stars-display .star-empty {
    color: var(--text-muted);
    opacity: 0.3;
}

.rating-avg {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
}

.rating-count {
    font-size: 12px;
    color: var(--text-muted);
}

.rating-action {
    margin-top: 10px;
}

.btn-rate {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    background: linear-gradient(135deg, rgba(243, 156, 18, 0.12), rgba(243, 156, 18, 0.06));
    border: 1px solid rgba(243, 156, 18, 0.3);
    border-radius: var(--radius-md);
    color: #f39c12;
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font-arabic);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-rate:hover {
    background: linear-gradient(135deg, rgba(243, 156, 18, 0.2), rgba(243, 156, 18, 0.12));
    border-color: #f39c12;
    transform: translateY(-1px);
}

/* ============================================
   Reviews List
   ============================================ */
.reviews-list {
    margin-top: 12px;
}

.reviews-header {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.reviews-header i {
    color: var(--teal);
    font-size: 14px;
}

.review-card {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.review-card:last-child {
    border-bottom: none;
}

.review-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.review-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
    flex-shrink: 0;
}

.review-meta {
    flex: 1;
    min-width: 0;
}

.review-author {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    display: block;
    line-height: 1.3;
}

.review-rating-date {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 2px;
}

.review-stars {
    display: flex;
    gap: 1px;
    font-size: 11px;
    color: #f39c12;
}

.review-stars .star-empty {
    color: var(--text-muted);
    opacity: 0.3;
}

.review-date {
    font-size: 11px;
    color: var(--text-muted);
}

.review-text {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
    word-wrap: break-word;
}

/* ============================================
   Rating Modal
   ============================================ */
.rating-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.rating-modal {
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 28px;
    width: 380px;
    max-width: calc(100vw - 32px);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.25);
    position: relative;
    animation: modalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.rating-modal-close {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--hover-bg-md);
    color: var(--text-muted);
    font-size: 14px;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.rating-modal-close:hover {
    background: var(--hover-bg-lg);
    color: #e74c3c;
}

.rating-modal-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.rating-modal-place {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.rating-stars-input {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
    direction: ltr;
}

.star-input {
    font-size: 32px;
    color: var(--text-muted);
    opacity: 0.3;
    cursor: pointer;
    transition: all 0.15s ease;
}

.star-input:hover,
.star-input.hovered {
    opacity: 1;
    color: #f39c12;
    transform: scale(1.2);
}

.star-input.selected {
    opacity: 1;
    color: #f39c12;
}

.rating-review-input {
    width: 100%;
    padding: 12px;
    background: var(--hover-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-arabic);
    font-size: 13px;
    resize: vertical;
    min-height: 70px;
    transition: border-color var(--transition-fast);
}

.rating-review-input:focus {
    outline: none;
    border-color: #f39c12;
}

.btn-submit-rating {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    margin-top: 16px;
    background: linear-gradient(135deg, #f39c12, #e67e22);
    border: none;
    border-radius: var(--radius-md);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    font-family: var(--font-arabic);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-submit-rating:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(243, 156, 18, 0.35);
}

.btn-submit-rating:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ============================================
   Countries / Cities Browser
   ============================================ */
.countries-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 0;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.breadcrumb-item {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: color var(--transition-fast);
}

.breadcrumb-item:hover {
    color: var(--teal);
}

.breadcrumb-item.active {
    color: var(--text-primary);
    cursor: default;
}

.breadcrumb-sep {
    font-size: 10px;
    color: var(--text-muted);
    opacity: 0.4;
}

.countries-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 60vh;
    overflow-y: auto;
}

.loading-text {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: 14px;
}

.country-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--hover-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.country-card:hover {
    background: var(--hover-bg-md);
    border-color: var(--teal);
    transform: translateX(-4px);
}

.country-card-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(14, 138, 126, 0.12), rgba(14, 138, 126, 0.06));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--teal);
    flex-shrink: 0;
}

.country-card-info h4 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.country-card-info span {
    font-size: 12px;
    color: var(--text-muted);
}

.country-card-arrow {
    margin-right: auto;
    color: var(--text-muted);
    font-size: 12px;
    opacity: 0.5;
}

.country-section-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    padding: 8px 0 6px;
}

.country-section-title i {
    color: var(--teal);
    margin-left: 6px;
}

.cities-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 4px 0 12px;
}

.city-chip {
    padding: 6px 14px;
    background: var(--hover-bg-md);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.city-chip:hover {
    background: rgba(14, 138, 126, 0.12);
    border-color: var(--teal);
    color: var(--teal);
}

.city-chip small {
    color: var(--text-muted);
    font-size: 11px;
}

.country-place-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--hover-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.country-place-card:hover {
    background: var(--hover-bg-md);
    border-color: var(--teal);
}

.place-card-emoji {
    font-size: 24px;
    flex-shrink: 0;
}

.place-card-info h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.place-card-info span {
    font-size: 12px;
    color: var(--text-muted);
}

/* ============================================
   Social Sharing Buttons
   ============================================ */
.share-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.share-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    white-space: nowrap;
}

.share-label i {
    margin-left: 4px;
}

.share-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--hover-bg);
    color: var(--text-secondary);
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.share-btn:hover {
    transform: scale(1.12);
}

.share-whatsapp:hover {
    background: rgba(37, 211, 102, 0.15);
    border-color: #25d366;
    color: #25d366;
}

.share-twitter:hover {
    background: rgba(29, 161, 242, 0.12);
    border-color: #1da1f2;
    color: #1da1f2;
}

.share-telegram:hover {
    background: rgba(0, 136, 204, 0.12);
    border-color: #0088cc;
    color: #0088cc;
}

.share-copy:hover {
    background: rgba(14, 138, 126, 0.12);
    border-color: var(--teal);
    color: var(--teal);
}

/* ============================================
   Date Range Filter
   ============================================ */
.date-range-group {
    display: flex;
    align-items: center;
    gap: 4px;
}

.filter-date-input {
    padding: 5px 8px;
    background: var(--hover-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-arabic);
    font-size: 12px;
    width: 120px;
    cursor: pointer;
}

.filter-date-input:focus {
    outline: none;
    border-color: var(--teal);
}

.date-sep {
    font-size: 12px;
    color: var(--text-muted);
    padding: 0 2px;
}

.date-clear-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    background: var(--hover-bg-md);
    color: var(--text-muted);
    font-size: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.date-clear-btn:hover {
    background: rgba(231, 76, 60, 0.15);
    color: #e74c3c;
}

/* ============================================
   Statistics Dashboard
   ============================================ */
.overlay-wide {
    max-width: 900px;
}

.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--hover-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
}

.stat-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    background: rgba(14, 138, 126, 0.12);
    color: var(--teal);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin: 0 auto 10px;
}

.stat-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.stats-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.stats-section {
    background: var(--hover-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
}

.stats-section h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 14px;
}

.stats-section h4 i {
    color: var(--teal);
    margin-left: 6px;
}

.stats-bars {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.stats-bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.stats-bar-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 70px;
    text-align: right;
}

.stats-bar-track {
    flex: 1;
    height: 8px;
    background: var(--hover-bg-md);
    border-radius: 4px;
    overflow: hidden;
}

.stats-bar-fill {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--teal), var(--teal-light));
    transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.stats-bar-count {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    min-width: 30px;
}

.stats-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stats-list-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.stats-list-rank {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--hover-bg-md);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stats-list-name {
    flex: 1;
    font-weight: 600;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.stats-list-detail {
    font-size: 11px;
    color: var(--text-muted);
}

.stats-list-stars {
    color: #f39c12;
    font-size: 12px;
}

/* ============================================
   Language Toggle Button
   ============================================ */
.lang-toggle {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: var(--hover-bg-md);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 800;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all var(--transition-fast);
    flex-shrink: 0;
    letter-spacing: 0.5px;
}

.lang-toggle:hover {
    background: var(--hover-bg-lg);
    color: var(--teal);
    border-color: var(--teal);
    transform: scale(1.05);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    font-size: 22px;
    color: var(--text-primary);
    padding: 8px;
}

/* ============================================
   Filter Bar
   ============================================ */
.filter-bar {
    position: fixed;
    top: var(--header-height);
    right: 0;
    left: 0;
    height: auto;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-bottom: 1px solid var(--glass-border);
    z-index: 999;
}

.filter-container {
    display: flex;
    align-items: center;
    min-height: var(--filter-height);
    padding: 0 24px;
    gap: 20px;
}

.advanced-filters {
    border-top: 1px solid var(--glass-border);
    padding: 8px 0;
}

.advanced-filters .filter-container {
    min-height: auto;
    flex-wrap: wrap;
    gap: 12px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-group label {
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
}

.filter-group label i {
    margin-left: 4px;
}

.filter-select {
    padding: 6px 32px 6px 12px;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-arabic);
    font-size: 13px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23a0b4c4' viewBox='0 0 16 16'%3E%3Cpath d='M1.646 4.646a.5.5 0 01.708 0L8 10.293l5.646-5.647a.5.5 0 01.708.708l-6 6a.5.5 0 01-.708 0l-6-6a.5.5 0 010-.708z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 10px center;
}

.filter-select:focus {
    outline: none;
    border-color: var(--teal);
}

.filter-select option {
    background: var(--bg-card);
    color: var(--text-primary);
}

/* Category Buttons */
.category-filters {
    display: flex;
    gap: 6px;
}

.category-btn {
    padding: 6px 14px;
    border-radius: var(--radius-xl);
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--hover-bg);
    border: 1px solid var(--border-color);
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.category-btn:hover {
    color: var(--text-primary);
    background: var(--hover-bg-lg);
    border-color: var(--border-light);
}

.category-btn.active {
    color: var(--teal-light);
    background: rgba(14, 138, 126, 0.15);
    border-color: var(--teal);
}

.category-btn i {
    margin-left: 4px;
    font-size: 11px;
}

/* Mobile Filter Toggle (hidden on desktop) */
.mobile-filter-toggle {
    display: none;
}

/* Results Counter */
.results-counter {
    margin-right: auto;
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.results-counter #markerCount {
    color: var(--orange);
    font-weight: 700;
}

/* ============================================
   Map Container
   ============================================ */
.map-wrapper {
    position: fixed;
    top: calc(var(--header-height) + var(--filter-height));
    right: 0;
    left: 0;
    bottom: 0;
}

.map-container {
    width: 100%;
    height: 100%;
}

/* ============================================
   Map Style Switcher
   ============================================ */
.map-style-switcher {
    position: absolute;
    bottom: 24px;
    left: 60px;
    z-index: 500;
}

.map-style-mini-btn {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    border: 3px solid #fff;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.map-style-mini-btn i {
    color: #fff;
    font-size: 16px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
    z-index: 1;
    pointer-events: none;
}

.map-style-mini-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.2);
    transition: background var(--transition-fast);
}

.map-style-mini-btn:hover::after {
    background: rgba(0, 0, 0, 0.1);
}

.map-style-mini-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Expanded panel */
.map-style-panel {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 0;
    display: flex;
    gap: 8px;
    padding: 10px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px) scale(0.95);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
    white-space: nowrap;
}

.map-style-switcher.expanded .map-style-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.map-style-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 6px;
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    background: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    min-width: 64px;
}

.map-style-option:hover {
    background: var(--hover-bg-md);
}

.map-style-option.active {
    border-color: var(--teal);
    background: rgba(14, 138, 126, 0.1);
}

.map-style-thumb {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-sm);
    background-size: cover;
    background-position: center;
    border: 1px solid var(--border-color);
    transition: border-color var(--transition-fast);
}

.map-style-option.active .map-style-thumb {
    border-color: var(--teal);
}

.map-style-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    font-family: var(--font-arabic);
    line-height: 1;
}

.map-style-option.active .map-style-label {
    color: var(--teal-light);
}

/* Map Loading Overlay */
.map-loading {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    bottom: 0;
    background: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: opacity var(--transition-smooth);
}

.map-loading.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-spinner {
    text-align: center;
}

.spinner-ring {
    width: 50px;
    height: 50px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--teal);
    border-right: 3px solid var(--orange);
    border-radius: var(--radius-full);
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

.loading-spinner p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ============================================
   Side Panel (Desktop)
   ============================================ */
.side-panel {
    position: fixed;
    top: calc(var(--header-height) + var(--filter-height));
    left: 0;
    width: var(--panel-width);
    height: calc(100vh - var(--header-height) - var(--filter-height));
    background: var(--bg-card);
    border-right: 1px solid var(--border-light);
    z-index: 998;
    transform: translateX(-100%);
    transition: transform var(--transition-smooth);
    overflow-y: auto;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.1);
}

.side-panel.active {
    transform: translateX(0);
}

.panel-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all var(--transition-fast);
    z-index: 5;
    border: none;
    cursor: pointer;
    backdrop-filter: blur(4px);
}

.panel-close:hover {
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    transform: scale(1.1);
}

.panel-content {
    padding: 0;
}

/* Panel Header */
.panel-header {
    padding: 16px 48px 12px 20px;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(180deg, rgba(14, 138, 126, 0.06), transparent);
}

.panel-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-primary);
    line-height: 1.4;
}

.panel-category {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    background: rgba(14, 138, 126, 0.12);
    border-radius: var(--radius-xl);
    font-size: 11px;
    color: var(--teal);
    font-weight: 500;
}

.panel-date {
    margin-right: 8px;
    font-size: 11px;
    color: var(--text-muted);
}

/* Video Embed */
.panel-video {
    padding: 12px 16px;
}

.video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 */
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-darker);
    box-shadow: var(--shadow-md);
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Traveler Info */
.panel-traveler {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-color);
    background: var(--hover-bg);
}

.traveler-avatar {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-full);
    overflow: hidden;
    border: 2px solid var(--teal);
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(14, 138, 126, 0.2);
}

.traveler-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.traveler-info h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 1px;
}

.traveler-channel {
    font-size: 12px;
    color: #ff0000;
    display: flex;
    align-items: center;
    gap: 4px;
}

.traveler-channel:hover {
    text-decoration: underline;
}

/* Description */
.panel-description {
    padding: 12px 20px;
}

.panel-description p {
    font-size: 13px;
    line-height: 1.7;
    color: var(--text-secondary);
}

/* Pins List in Side Panel */
.panel-pins-list {
    padding: 10px 20px;
    border-bottom: 1px solid var(--border-color);
}

.panel-pins-header {
    font-size: 13px;
    font-weight: 600;
    color: var(--teal-light);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.panel-pin-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.panel-pin-item:hover {
    background: rgba(14, 138, 126, 0.1);
}

.panel-pin-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--teal);
    color: white;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}

.panel-pin-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.panel-pin-title {
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.panel-pin-cat {
    font-size: 11px;
    color: var(--text-muted);
}

.panel-pin-time {
    flex-shrink: 0;
    font-size: 11px;
    color: var(--teal-light);
    background: rgba(14, 138, 126, 0.12);
    padding: 3px 8px;
    border-radius: 12px;
    cursor: pointer;
    transition: all var(--transition-fast);
    direction: ltr;
    font-family: var(--font-latin);
}

.panel-pin-time:hover {
    background: rgba(14, 138, 126, 0.25);
}

.panel-pin-time i {
    margin-right: 3px;
    font-size: 10px;
}

.panel-pin-goto {
    color: var(--text-muted);
    font-size: 12px;
    transition: color var(--transition-fast);
    flex-shrink: 0;
}

.panel-pin-item:hover .panel-pin-goto {
    color: var(--teal-light);
}

/* Per-Pin Rating Section */
.pin-rating-section {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 4px 8px 8px 36px;
    margin-bottom: 4px;
}

.pin-rating-summary {
    display: flex;
    align-items: center;
    gap: 5px;
}

.pin-rating-stars {
    display: flex;
    gap: 1px;
    font-size: 12px;
    color: #f39c12;
}

.pin-rating-stars .star-empty {
    color: var(--text-muted);
    opacity: 0.3;
}

.pin-rating-avg {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}

.pin-rating-count {
    font-size: 11px;
    color: var(--text-muted);
}

.btn-rate-pin {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    background: linear-gradient(135deg, rgba(243, 156, 18, 0.1), rgba(243, 156, 18, 0.05));
    border: 1px solid rgba(243, 156, 18, 0.25);
    border-radius: var(--radius-sm);
    color: #f39c12;
    font-size: 11px;
    font-weight: 600;
    font-family: var(--font-arabic);
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-right: auto;
}

.btn-rate-pin:hover {
    background: linear-gradient(135deg, rgba(243, 156, 18, 0.18), rgba(243, 156, 18, 0.1));
    border-color: #f39c12;
    transform: translateY(-1px);
}

.pin-reviews-list {
    width: 100%;
    margin-top: 4px;
}

/* Info Window Pins Count */
.info-pins-count {
    font-family: var(--font-arabic);
    font-size: 11px;
    color: var(--teal-light);
    margin-top: 4px;
    direction: rtl;
}

/* YouTube Button */
.btn-youtube {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 12px 20px 20px;
    padding: 10px 20px;
    background: #ff0000;
    color: white;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    transition: all var(--transition-fast);
}

.btn-youtube:hover {
    background: #cc0000;
    box-shadow: 0 4px 20px rgba(255, 0, 0, 0.3);
    transform: translateY(-1px);
}

/* ============================================
   Bottom Sheet (Mobile)
   ============================================ */
.bottom-sheet {
    display: none;
    position: fixed;
    bottom: 0;
    right: 0;
    left: 0;
    background: var(--bg-card);
    border-top-left-radius: var(--radius-xl);
    border-top-right-radius: var(--radius-xl);
    z-index: 998;
    transform: translateY(100%);
    transition: transform var(--transition-smooth);
    max-height: 70vh;
    overflow-y: auto;
}

.bottom-sheet.active {
    transform: translateY(0);
}

.sheet-handle {
    width: 40px;
    height: 4px;
    background: var(--text-muted);
    border-radius: 2px;
    margin: 12px auto;
}

.sheet-content {
    padding: 0 20px 24px;
}

/* ============================================
   Custom Google Maps InfoWindow Styles
   ============================================ */
.gm-style-iw {
    background: var(--bg-card) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: var(--shadow-lg) !important;
    padding: 0 !important;
}

.gm-style-iw-d {
    overflow: hidden !important;
}

.gm-ui-hover-effect {
    display: none !important;
}

.marker-info-content {
    padding: 12px;
    min-width: 220px;
    cursor: pointer;
}

.marker-info-content .info-title {
    font-family: var(--font-arabic);
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    direction: rtl;
}

.marker-info-content .info-category {
    font-family: var(--font-arabic);
    font-size: 12px;
    color: var(--teal-light);
    direction: rtl;
}

.marker-info-content .info-traveler {
    font-family: var(--font-arabic);
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
    direction: rtl;
}

/* ============================================
   Animations
   ============================================ */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInFromLeft {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

@keyframes bounceIn {
    0% { transform: scale(0); opacity: 0; }
    60% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Marker drop animation */
.marker-bounce {
    animation: bounceIn 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

/* ============================================
   Scrollbar Styling
   ============================================ */
.side-panel::-webkit-scrollbar,
.search-results::-webkit-scrollbar,
.bottom-sheet::-webkit-scrollbar {
    width: 6px;
}

.side-panel::-webkit-scrollbar-track,
.search-results::-webkit-scrollbar-track,
.bottom-sheet::-webkit-scrollbar-track {
    background: transparent;
}

.side-panel::-webkit-scrollbar-thumb,
.search-results::-webkit-scrollbar-thumb,
.bottom-sheet::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 3px;
}

.side-panel::-webkit-scrollbar-thumb:hover,
.search-results::-webkit-scrollbar-thumb:hover,
.bottom-sheet::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* ============================================
   Traveler Card Actions (in overlay grid)
   ============================================ */
.traveler-card-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 8px;
}

.traveler-card-actions a {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.traveler-card-actions a:hover {
    background: rgba(14, 138, 126, 0.12);
    border-color: var(--teal);
    color: var(--teal);
}

/* ============================================
   Traveler Profile (tp-*)
   ============================================ */
.tp-header {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.tp-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--teal);
    flex-shrink: 0;
}

.tp-header-info {
    flex: 1;
    min-width: 0;
}

.tp-name {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.tp-name-en {
    font-size: 14px;
    color: var(--text-muted);
    font-family: var(--font-latin);
}

.tp-stats {
    display: flex;
    gap: 20px;
    margin: 14px 0;
}

.tp-stat {
    text-align: center;
    padding: 10px 18px;
    background: var(--hover-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.tp-stat strong {
    display: block;
    font-size: 22px;
    font-weight: 800;
    color: var(--teal);
    line-height: 1;
}

.tp-stat span {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

.tp-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tp-channel-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(255, 0, 0, 0.08);
    border: 1px solid rgba(255, 0, 0, 0.25);
    border-radius: var(--radius-md);
    color: #ff0000;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font-arabic);
    transition: all var(--transition-fast);
}

.tp-channel-btn:hover {
    background: rgba(255, 0, 0, 0.15);
    border-color: #ff0000;
    transform: translateY(-1px);
}

.tp-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(14, 138, 126, 0.1);
    border: 1px solid rgba(14, 138, 126, 0.3);
    border-radius: var(--radius-md);
    color: var(--teal);
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font-arabic);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.tp-filter-btn:hover {
    background: rgba(14, 138, 126, 0.2);
    border-color: var(--teal);
    transform: translateY(-1px);
}

.tp-bio {
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 24px;
    padding: 16px;
    background: var(--hover-bg);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.tp-section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 14px;
}

.tp-section-title i {
    color: var(--teal);
    margin-left: 6px;
}

.tp-videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
}

.tp-video-card {
    background: var(--hover-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.tp-video-card:hover {
    border-color: var(--teal);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.tp-video-thumb {
    width: 100%;
    height: 140px;
    background-size: cover;
    background-position: center;
    background-color: var(--hover-bg-lg);
    position: relative;
}

.tp-video-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    padding: 3px 10px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 11px;
    border-radius: var(--radius-xl);
    backdrop-filter: blur(4px);
}

.tp-video-info {
    padding: 10px 14px;
}

.tp-video-info h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tp-video-info span {
    font-size: 11px;
    color: var(--text-muted);
}

/* Traveler profile responsive */
@media (max-width: 600px) {
    .tp-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .tp-avatar {
        width: 90px;
        height: 90px;
    }
    .tp-stats {
        justify-content: center;
    }
    .tp-actions {
        justify-content: center;
    }
    .tp-videos-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1280px) {
    .nav-link {
        padding: 7px 8px;
        font-size: 12px;
    }

    .nav-link i {
        margin-left: 4px;
        font-size: 11px;
    }

    .header-container {
        gap: 10px;
    }
}

@media (max-width: 1024px) {
    .main-nav {
        display: none;
    }

    .mobile-menu-toggle {
        display: block;
    }

    /* Mobile nav overlay */
    .main-nav.mobile-active {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: var(--header-height);
        right: 0;
        left: 0;
        background: var(--glass-bg);
        backdrop-filter: blur(var(--glass-blur));
        padding: 16px;
        gap: 4px;
        border-bottom: 1px solid var(--glass-border);
        z-index: 1001;
        animation: slideDown 0.3s ease;
    }

    .search-container {
        max-width: 300px;
    }

    .side-panel {
        width: 360px;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 56px;
        --filter-height: auto;
        --panel-width: 100%;
    }

    .header-container {
        padding: 0 12px;
        gap: 8px;
    }

    .logo-text {
        display: none;
    }

    .logo-img {
        width: 36px;
        height: 36px;
    }

    .search-container {
        max-width: none;
        flex: 1;
    }

    .search-input {
        padding: 8px 38px 8px 12px;
        font-size: 13px;
    }

    .search-btn {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }

    .btn-login span {
        display: none;
    }

    .btn-login {
        padding: 8px;
        min-width: 36px;
        justify-content: center;
    }

    .theme-toggle {
        width: 34px;
        height: 34px;
        font-size: 14px;
    }

    /* Filter bar: compact single row with toggle */
    .filter-bar {
        position: fixed;
        height: auto;
        padding: 6px 0;
    }

    .filter-container {
        flex-wrap: nowrap;
        padding: 0 10px;
        gap: 6px;
        overflow: visible;
    }

    /* Primary row: only category buttons visible */
    .filter-group.category-filters {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        flex-wrap: nowrap;
        flex: 1;
        min-width: 0;
        order: 1;
    }

    .filter-group.category-filters::-webkit-scrollbar {
        display: none;
    }

    /* Mobile filter toggle button */
    .mobile-filter-toggle {
        display: flex !important;
        order: 0;
        flex-shrink: 0;
    }

    /* Hide secondary filters on mobile by default */
    .filter-group:not(.category-filters):not(.mobile-filter-toggle):not(#favFilterGroup) {
        display: none !important;
    }

    /* When advanced filters are shown */
    .filter-bar.filters-expanded .filter-container {
        flex-wrap: wrap;
    }

    .filter-bar.filters-expanded .filter-group:not(.category-filters):not(.mobile-filter-toggle):not(#favFilterGroup) {
        display: flex !important;
        width: 100%;
        flex: unset;
    }

    .filter-bar.filters-expanded .filter-group.category-filters {
        width: 100%;
        order: 2;
    }

    .filter-bar.filters-expanded .mobile-filter-toggle {
        order: 0;
    }

    .filter-bar.filters-expanded .filter-group.date-range-group {
        order: 4;
    }

    .filter-bar.filters-expanded .filter-group.radius-search-group {
        order: 5;
    }

    .filter-bar.filters-expanded .filter-select {
        flex: 1;
    }

    .results-counter {
        display: none;
    }

    .map-wrapper {
        top: calc(var(--header-height) + 44px);
    }

    .filter-bar.filters-expanded ~ .map-wrapper,
    .filter-bar.filters-expanded ~ #mapWrapper {
        top: calc(var(--header-height) + 160px);
    }

    /* Hide side panel on mobile, use bottom sheet */
    .side-panel {
        display: none;
    }

    .bottom-sheet {
        display: block;
    }

    /* Category buttons compact */
    .category-btn {
        padding: 5px 10px;
        font-size: 11px;
    }

    .category-btn i {
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .category-btn {
        padding: 5px 10px;
        font-size: 11px;
    }
}

/* ============================================
   Footer (hidden by default on map view, visible in modals)
   ============================================ */
.main-footer {
    display: none;
}

/* ============================================
   Overlay Modals (Travelers, About, Contact)
   ============================================ */
.page-overlay {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    bottom: 0;
    background: rgba(10, 18, 25, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 2000;
    overflow-y: auto;
    animation: fadeIn 0.3s ease;
}

.page-overlay.active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.overlay-content {
    width: 100%;
    max-width: 700px;
    margin: 60px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 40px 36px;
    box-shadow: var(--shadow-lg);
    position: relative;
}

.overlay-close {
    position: absolute;
    top: 16px;
    left: 16px;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--close-bg);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all var(--transition-fast);
    z-index: 5;
}

.overlay-close:hover {
    background: var(--close-bg-hover);
    color: var(--text-primary);
}

.overlay-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.overlay-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 28px;
    line-height: 1.7;
}

.overlay-title i {
    color: var(--teal);
    margin-left: 8px;
}

/* Travelers Grid in Overlay */
.overlay-travelers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.overlay-traveler-card {
    background: var(--hover-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px 16px;
    text-align: center;
    transition: all var(--transition-fast);
}

.overlay-traveler-card:hover {
    border-color: var(--teal);
    background: rgba(14, 138, 126, 0.08);
    transform: translateY(-2px);
}

.overlay-traveler-card img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--teal);
    margin-bottom: 10px;
}

.overlay-traveler-card h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
}

.overlay-traveler-card a {
    font-size: 12px;
    color: #ff0000;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.overlay-traveler-card a:hover {
    text-decoration: underline;
}

/* ============================================
   User Profile Overlay
   ============================================ */
.profile-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.profile-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--teal);
    flex-shrink: 0;
}

.profile-info {
    flex: 1;
    min-width: 0;
}

.profile-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.profile-email {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 4px;
    direction: ltr;
    text-align: right;
}

.profile-joined {
    font-size: 12px;
    color: var(--text-muted);
}

.profile-joined i {
    color: var(--teal);
    margin-left: 4px;
}

/* Stats Cards */
.profile-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 24px;
}

.profile-stat-card {
    background: var(--hover-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 10px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.profile-stat-card i {
    font-size: 18px;
    color: var(--teal);
}

.profile-stat-value {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
    font-family: var(--font-latin);
}

.profile-stat-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

/* Profile Tabs */
.profile-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 16px;
}

.profile-tab {
    flex: 1;
    padding: 10px 16px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-arabic);
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.profile-tab:hover {
    color: var(--text-primary);
    background: var(--hover-bg);
}

.profile-tab.active {
    color: var(--teal);
    border-bottom-color: var(--teal);
}

.profile-tab i {
    font-size: 13px;
}

/* Tab Content */
.profile-tab-content {
    display: none;
}

.profile-tab-content.active {
    display: block;
}

/* Profile Loading & Empty */
.profile-loading {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: 14px;
}

.profile-loading i {
    margin-left: 6px;
    color: var(--teal);
}

.profile-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.profile-empty i {
    font-size: 40px;
    color: var(--border-color);
    margin-bottom: 12px;
    display: block;
}

.profile-empty p {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.profile-empty span {
    font-size: 13px;
}

/* Profile List Items */
.profile-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.profile-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--hover-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.profile-item:hover {
    border-color: var(--teal);
    background: rgba(14, 138, 126, 0.05);
}

.profile-item-main {
    flex: 1;
    min-width: 0;
}

.profile-item-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-item-sub {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.profile-item-sub i {
    color: var(--teal);
    font-size: 11px;
}

.profile-item-stars {
    display: flex;
    align-items: center;
    gap: 2px;
    font-size: 13px;
    color: #f39c12;
    margin-top: 4px;
}

.profile-item-date {
    font-size: 11px;
    color: var(--text-muted);
    margin-right: 8px;
}

.profile-rating-review {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-top: 6px;
    padding: 8px 10px;
    background: rgba(14, 138, 126, 0.04);
    border-radius: var(--radius-sm);
    border-right: 3px solid var(--teal);
}

/* Action Buttons (edit / delete) */
.profile-item-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-shrink: 0;
}

.profile-action-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.profile-action-edit:hover {
    color: var(--teal);
    border-color: var(--teal);
    background: rgba(14, 138, 126, 0.08);
}

.profile-action-delete:hover {
    color: #e74c3c;
    border-color: #e74c3c;
    background: rgba(231, 76, 60, 0.08);
}

/* Favorites Thumbnail */
.profile-fav-item {
    cursor: pointer;
}

.profile-fav-thumb {
    width: 80px;
    height: 50px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--hover-bg-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 18px;
}

.profile-fav-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-fav-traveler {
    margin-right: 8px;
}

.profile-fav-traveler i {
    color: var(--text-muted);
}

@media (max-width: 600px) {
    .profile-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    .profile-header {
        flex-direction: column;
        text-align: center;
    }
    .profile-email {
        text-align: center;
    }
    .profile-fav-thumb {
        width: 60px;
        height: 40px;
    }
}

/* About Section Styling */
.about-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 20px;
}

.about-feature {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: var(--hover-bg);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.about-feature i {
    font-size: 20px;
    color: var(--teal-light);
    margin-top: 2px;
}

.about-feature h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.about-feature p {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Contact Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-form input,
.contact-form textarea {
    padding: 12px 16px;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-arabic);
    font-size: 14px;
    transition: all var(--transition-fast);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(14, 138, 126, 0.2);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: var(--text-muted);
}

.contact-form textarea {
    min-height: 120px;
    resize: vertical;
}

.contact-form button {
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--teal), var(--teal-dark));
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 700;
    font-family: var(--font-arabic);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.contact-form button:hover {
    box-shadow: 0 4px 20px rgba(14, 138, 126, 0.4);
    transform: translateY(-2px);
}

/* Social links in contact */
.contact-social {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    justify-content: center;
}

.contact-social a {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 18px;
    transition: all var(--transition-fast);
}

.contact-social a:hover {
    border-color: var(--teal);
    color: var(--teal-light);
    background: rgba(14, 138, 126, 0.1);
    transform: translateY(-2px);
}

/* ============================================
   Leaflet Map Overrides
   ============================================ */
.leaflet-marker-custom {
    background: none !important;
    border: none !important;
}

.polyline-arrow {
    background: none !important;
    border: none !important;
}

/* Dark popup theme */
.dark-popup .leaflet-popup-content-wrapper {
    background: var(--bg-card);
    color: var(--text-primary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-lg);
    font-family: var(--font-arabic);
}

.dark-popup .leaflet-popup-tip {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-top: none;
    border-right: none;
}

.dark-popup .leaflet-popup-close-button {
    color: var(--text-muted) !important;
    font-size: 18px;
}

.dark-popup .leaflet-popup-close-button:hover {
    color: var(--text-primary) !important;
}

.dark-popup .leaflet-popup-content {
    margin: 12px 14px;
    font-size: 14px;
    direction: rtl;
}

.dark-popup .marker-info-content {
    cursor: pointer;
}

.dark-popup .info-title {
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 4px;
}

.dark-popup .info-category {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 2px;
}

.dark-popup .info-traveler {
    font-size: 12px;
    color: var(--text-muted);
}

.dark-popup .info-pins-count {
    font-size: 11px;
    color: var(--teal-light);
    margin-top: 4px;
}

/* Video date badge in panel */
.panel-date {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-right: 10px;
    padding: 2px 8px;
    background: var(--hover-bg-md);
    border-radius: var(--radius-sm);
    font-size: 11px;
    color: var(--text-muted);
}

.panel-date i {
    font-size: 10px;
}

/* Google Maps link in popup */
.info-gmaps-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 10px;
    padding: 8px 12px;
    background: rgba(66, 133, 244, 0.12);
    color: #4285f4;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font-arabic);
    text-decoration: none;
    transition: all var(--transition-fast);
    direction: rtl;
}

.info-gmaps-link:hover {
    background: rgba(66, 133, 244, 0.25);
    color: #6ea5ff;
}

/* Google Maps button in pin list */
.panel-pin-gmaps {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #4285f4;
    background: rgba(66, 133, 244, 0.1);
    font-size: 12px;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.panel-pin-gmaps:hover {
    background: rgba(66, 133, 244, 0.25);
    transform: scale(1.1);
}

/* Google Maps button in bottom sheet */
.btn-gmaps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 14px 18px;
    background: rgba(66, 133, 244, 0.15);
    color: #4285f4;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-arabic);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.btn-gmaps:hover {
    background: rgba(66, 133, 244, 0.3);
}

/* ============================================
   Marker Cluster Styles
   ============================================ */
.leaflet-cluster-icon {
    background: transparent !important;
}

.cluster-marker {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-family: var(--font-arabic);
    font-weight: 800;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    box-shadow: 0 4px 16px rgba(14, 138, 126, 0.4), 0 0 0 4px rgba(14, 138, 126, 0.15);
    transition: transform 0.2s ease;
}

.cluster-marker:hover {
    transform: scale(1.1);
}

.cluster-small {
    width: 36px;
    height: 36px;
    font-size: 13px;
    background: linear-gradient(135deg, #0e8a7e, #12b0a0);
}

.cluster-medium {
    width: 44px;
    height: 44px;
    font-size: 15px;
    background: linear-gradient(135deg, #e8831a, #f0a040);
    box-shadow: 0 4px 16px rgba(232, 131, 26, 0.4), 0 0 0 4px rgba(232, 131, 26, 0.15);
}

.cluster-large {
    width: 52px;
    height: 52px;
    font-size: 17px;
    background: linear-gradient(135deg, #6c5ce7, #a085e0);
    box-shadow: 0 4px 16px rgba(108, 92, 231, 0.4), 0 0 0 5px rgba(108, 92, 231, 0.15);
}

/* Override default MarkerCluster CSS */
.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
    background: transparent !important;
}

.marker-cluster-small div,
.marker-cluster-medium div,
.marker-cluster-large div {
    background: transparent !important;
}

/* Leaflet attribution styling */
.leaflet-control-attribution {
    background: var(--glass-bg) !important;
    color: var(--text-muted) !important;
    font-size: 10px !important;
}

.leaflet-control-attribution a {
    color: var(--teal-light) !important;
}

/* ============================================
   Review Actions (Votes + Replies)
   ============================================ */
.review-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
}

.review-vote-btn,
.review-reply-btn {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 4px 10px;
    font-size: 12px;
    font-family: var(--font-arabic);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all var(--transition-fast);
}

.review-vote-btn:hover { color: var(--teal); border-color: var(--teal); }
.review-vote-btn.vote-down:hover { color: #e74c3c; border-color: #e74c3c; }
.review-vote-btn.active { color: var(--teal); border-color: var(--teal); background: rgba(14,138,126,0.08); }
.review-vote-btn.vote-down.active { color: #e74c3c; border-color: #e74c3c; background: rgba(231,76,60,0.08); }
.review-reply-btn:hover { color: var(--teal); border-color: var(--teal); }

/* Review Replies */
.review-replies {
    margin-top: 8px;
    padding-right: 16px;
    border-right: 2px solid var(--border-color);
}

.review-reply {
    display: flex;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.review-reply:last-child { border-bottom: none; }

.reply-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
}

.reply-body {
    flex: 1;
    min-width: 0;
}

.reply-author {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    margin-left: 8px;
}

.reply-date {
    font-size: 11px;
    color: var(--text-muted);
}

.reply-text {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 3px;
    line-height: 1.5;
}

/* Reply Form */
.review-reply-form {
    margin-top: 8px;
    padding: 8px;
    background: var(--hover-bg);
    border-radius: var(--radius-sm);
}

.reply-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text-primary);
    font-family: var(--font-arabic);
    font-size: 13px;
    resize: vertical;
    margin-bottom: 6px;
}

.reply-input:focus {
    outline: none;
    border-color: var(--teal);
}

.reply-submit-btn {
    padding: 6px 14px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--teal);
    color: #fff;
    font-family: var(--font-arabic);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.reply-submit-btn:hover { background: var(--teal-light); }

/* ============================================
   Photo Gallery
   ============================================ */
.pin-gallery {
    margin-top: 8px;
}

.gallery-header {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.gallery-header i {
    color: var(--teal);
    margin-left: 4px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 6px;
    margin-bottom: 8px;
}

.gallery-thumb {
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s;
}

.gallery-thumb:hover { transform: scale(1.05); }

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.btn-upload-photo,
.btn-upload-photo-sm {
    border: 1px dashed var(--border-color);
    background: none;
    color: var(--text-muted);
    font-family: var(--font-arabic);
    font-size: 12px;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-upload-photo {
    width: 100%;
    padding: 8px;
    border-radius: var(--radius-sm);
    justify-content: center;
}

.btn-upload-photo-sm {
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: 11px;
}

.btn-upload-photo:hover,
.btn-upload-photo-sm:hover {
    color: var(--teal);
    border-color: var(--teal);
}

.photo-count-badge {
    background: var(--teal);
    color: #fff;
    font-size: 10px;
    padding: 1px 5px;
    border-radius: 8px;
    font-weight: 700;
}

/* Pin rating actions row */
.pin-rating-actions {
    display: flex;
    gap: 4px;
    align-items: center;
}

.btn-add-to-trip {
    border: 1px solid var(--border-color);
    background: none;
    color: var(--text-muted);
    font-size: 12px;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-add-to-trip:hover {
    color: #6c5ce7;
    border-color: #6c5ce7;
}

/* Photo Lightbox */
.photo-lightbox {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.92);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    text-align: center;
}

.lightbox-content img {
    max-width: 90vw;
    max-height: 80vh;
    border-radius: var(--radius-md);
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    left: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    font-size: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s;
}

.lightbox-prev:hover,
.lightbox-next:hover { background: rgba(255,255,255,0.3); }

.lightbox-prev { right: -50px; }
.lightbox-next { left: -50px; }

.lightbox-info {
    color: #ccc;
    margin-top: 10px;
    font-size: 13px;
}

.lightbox-caption { margin-bottom: 4px; color: #eee; }
.lightbox-user { font-size: 12px; color: #999; }
.lightbox-user i { margin-left: 4px; }

/* ============================================
   Trip Planner
   ============================================ */
.trip-toolbar {
    margin-bottom: 16px;
}

.btn-create-trip {
    padding: 10px 20px;
    border: 2px dashed var(--teal);
    background: rgba(14,138,126,0.06);
    color: var(--teal);
    font-family: var(--font-arabic);
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    width: 100%;
    transition: all var(--transition-fast);
}

.btn-create-trip:hover {
    background: rgba(14,138,126,0.12);
}

.trip-create-form {
    background: var(--hover-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 16px;
}

.trip-create-form input,
.trip-create-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text-primary);
    font-family: var(--font-arabic);
    font-size: 14px;
    margin-bottom: 8px;
}

.trip-create-form input:focus,
.trip-create-form textarea:focus {
    outline: none;
    border-color: var(--teal);
}

.trip-form-actions {
    display: flex;
    gap: 8px;
}

.btn-save-trip,
.btn-cancel-trip {
    padding: 8px 16px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-arabic);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-save-trip {
    background: var(--teal);
    color: #fff;
}

.btn-save-trip:hover { background: var(--teal-light); }

.btn-cancel-trip {
    background: var(--hover-bg);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

/* Trip Card */
.trip-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--hover-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.trip-card:hover {
    border-color: var(--teal);
    background: rgba(14,138,126,0.05);
}

.trip-card-info h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.trip-card-info span {
    font-size: 12px;
    color: var(--text-muted);
    margin-left: 10px;
}

.trip-card-info span i { color: var(--teal); margin-left: 3px; }

.trip-card-date { color: var(--text-muted) !important; }

.trip-card-actions button {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.trip-card-actions button:hover {
    color: #e74c3c;
    border-color: #e74c3c;
}

/* Trip Detail */
.trip-back-btn {
    background: none;
    border: none;
    color: var(--teal);
    font-family: var(--font-arabic);
    font-size: 14px;
    cursor: pointer;
    margin-bottom: 12px;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.trip-back-btn:hover { text-decoration: underline; }

.trip-detail-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.trip-detail-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.trip-stats-row {
    display: flex;
    gap: 20px;
    padding: 12px 16px;
    background: var(--hover-bg);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    font-size: 14px;
    color: var(--text-secondary);
}

.trip-stats-row i { color: var(--teal); margin-left: 4px; }
.trip-stats-row strong { color: var(--text-primary); font-weight: 700; }

/* Trip Item */
.trip-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: var(--hover-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 6px;
    transition: all var(--transition-fast);
}

.trip-item:hover { border-color: var(--teal); }

.trip-item-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--teal);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.trip-item-info {
    flex: 1;
    min-width: 0;
}

.trip-item-info strong {
    font-size: 14px;
    color: var(--text-primary);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.trip-item-sub {
    font-size: 12px;
    color: var(--text-muted);
    display: block;
}

.trip-item-notes {
    font-size: 11px;
    color: var(--text-muted);
    font-style: italic;
    display: block;
    margin-top: 2px;
}

.trip-item-actions {
    display: flex;
    gap: 3px;
    flex-shrink: 0;
}

.trip-item-actions button {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-muted);
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.trip-item-actions button:hover { color: var(--teal); border-color: var(--teal); }
.trip-item-delete:hover { color: #e74c3c !important; border-color: #e74c3c !important; }

/* Trip Export */
.trip-export-row {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.trip-export-btn {
    flex: 1;
    min-width: 100px;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--hover-bg);
    color: var(--text-secondary);
    font-family: var(--font-arabic);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all var(--transition-fast);
}

.trip-export-btn:hover {
    border-color: var(--teal);
    color: var(--teal);
}

.trip-share-btn:hover {
    border-color: #6c5ce7;
    color: #6c5ce7;
}

/* Trip Picker Popup */
.trip-picker-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.7);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s;
}

.trip-picker-box {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    min-width: 280px;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
}

.trip-picker-box h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.trip-picker-box h4 i { color: var(--teal); margin-left: 6px; }

.trip-picker-option {
    display: block;
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--hover-bg);
    color: var(--text-primary);
    font-family: var(--font-arabic);
    font-size: 14px;
    text-align: right;
    cursor: pointer;
    margin-bottom: 6px;
    transition: all var(--transition-fast);
}

.trip-picker-option:hover {
    border-color: var(--teal);
    background: rgba(14,138,126,0.08);
}

/* ============================================
   Nearby Places
   ============================================ */
.nearby-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.nearby-controls label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.nearby-controls label i { color: var(--teal); margin-left: 4px; }

.nearby-radius-select {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text-primary);
    font-family: var(--font-arabic);
    font-size: 13px;
}

.btn-refresh-nearby {
    padding: 6px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--hover-bg);
    color: var(--text-secondary);
    font-family: var(--font-arabic);
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all var(--transition-fast);
}

.btn-refresh-nearby:hover { border-color: var(--teal); color: var(--teal); }

.nearby-status {
    padding: 12px 16px;
    background: var(--hover-bg);
    border-radius: var(--radius-md);
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.nearby-status i { margin-left: 6px; }

.nearby-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nearby-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--hover-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.nearby-item:hover {
    border-color: var(--teal);
    background: rgba(14,138,126,0.05);
}

.nearby-item-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(14,138,126,0.1);
    color: var(--teal);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.nearby-item-info {
    flex: 1;
    min-width: 0;
}

.nearby-item-info strong {
    display: block;
    font-size: 14px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nearby-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 3px;
    font-size: 11px;
    color: var(--text-muted);
}

.nearby-item-meta span { display: flex; align-items: center; gap: 3px; }
.nearby-item-meta i { font-size: 10px; }

.nearby-item-dist {
    text-align: center;
    flex-shrink: 0;
    min-width: 50px;
}

.nearby-item-dist strong {
    display: block;
    font-size: 18px;
    font-weight: 800;
    color: var(--teal);
    font-family: var(--font-latin);
}

.nearby-item-dist span {
    font-size: 11px;
    color: var(--text-muted);
}

@media (max-width: 600px) {
    .trip-export-row { flex-direction: column; }
    .trip-export-btn { min-width: auto; }
    .lightbox-prev { right: -35px; }
    .lightbox-next { left: -35px; }
    .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(60px, 1fr)); }
}

/* ============================================
   Utility Classes
   ============================================ */
.hidden {
    display: none !important;
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

.text-teal {
    color: var(--teal-light);
}

.text-orange {
    color: var(--orange);
}

/* ============================================
   Map Style Switcher - Mobile
   ============================================ */
@media (max-width: 768px) {
    .map-style-switcher {
        bottom: 16px;
        left: 50px;
    }

    .map-style-mini-btn {
        width: 42px;
        height: 42px;
    }

    .map-style-panel {
        left: 50%;
        transform: translateX(-50%) translateY(8px) scale(0.95);
        gap: 6px;
        padding: 8px;
    }

    .map-style-switcher.expanded .map-style-panel {
        transform: translateX(-50%) translateY(0) scale(1);
    }

    .map-style-thumb {
        width: 44px;
        height: 44px;
    }

    .map-style-option {
        min-width: 52px;
        padding: 4px;
    }

    .map-style-label {
        font-size: 10px;
    }
}
