:root {
    --primary: #007976;
    --primary-dark: #006361;
    --text-main: #333333;
    --text-muted: #707070;
    --bg-color: #ffffff;
    --card-bg: #ffffff;
    --nav-bg: #1a1a1a;
    --border-color: #eeeeee;
    --font-serif: 'Playfair Display', serif;
    --font-script: 'Dancing Script', cursive;
    --font-sans: 'Inter', sans-serif;
    --max-width: 1400px;

    /* Semantic Colors */
    --color-success: #1e4620;
    --bg-success: #e6f4ea;
    --color-error: #c5221f;
    --bg-error: #fce8e6;
    --color-danger: #ff4d4d;
    --color-danger-dark: #e60000;
    --color-link: #0066cc;
    --color-link-hover: #004080;
    --color-comment-meta: rgb(119, 37, 196);
}

/* Dark Theme */
[data-theme="dark"] {
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --text-main: #e0e0e0;
    --text-muted: #aaaaaa;
    --border-color: #333333;
    --nav-bg: #000000;
}

/* Mauve Theme */
[data-theme="mauve"] {
    --primary: #8e44ad;
    --primary-dark: #7d3c98;
    --color-comment-meta: #8e44ad;
    --bg-color: #f5f0f6;
    --card-bg: #ffffff;
    --text-main: #2c3e50;
    --border-color: #dcd0e0;
}

/* Emerald Theme (Green/Black) */
[data-theme="emerald"] {
    --primary: #219150;
    --primary-dark: #1a7440;
    --nav-bg: #1a1a1a;
    --bg-color: #f4f9f4;
    --text-main: #1b261b;
}

@media (min-width: 2000px) {
    :root {
        --max-width: 2400px;
    }
}

@media (min-width: 3000px) {
    :root {
        --max-width: 3400px;
    }
}
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

html,
body {
    width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    position: relative;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-wrapper {
    flex: 1;
}

/* Screen reader only utility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Respect user preference for reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
/* Typography */
h1,
h2,
h3,
h4 {
    font-family: var(--font-serif);
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.2;
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s ease;
}

/* Global Link Hover behavior */
a:hover {
    color: var(--primary);
}
/* Global Container */
.container {
    max-width: var(--max-width);
    width: 100%;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Navigation */
.top-nav {
    background: var(--nav-bg);
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 10005;
}

.nav-container {
    max-width: var(--max-width);
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.top-nav a,
.top-nav button {
    color: #ffffff;
    padding: 1rem 1.5rem;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    display: block;
}

.top-nav a:hover,
.top-nav a.active,
.top-nav button:hover,
.top-nav button.active {
    background: var(--primary);
    color: #ffffff;
}

/* Dropdowns */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

.nav-dropdown>a,
.nav-dropdown>button {
    color: #ffffff;
    padding: 1rem 1.5rem;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    display: block;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--nav-bg);
    min-width: 200px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    z-index: 10010;
    text-align: left;
}

.dropdown-content a {
    color: white;
    padding: 0.8rem 1rem;
    text-decoration: none;
    display: block;
    text-transform: none;
    letter-spacing: 0;
    font-size: 0.85rem;
    font-weight: 400;
}

.dropdown-content a:hover {
    background-color: var(--primary);
}

.nav-dropdown:hover .dropdown-content {
    display: block;
}

/* Header */
header.main-header {
    padding: 4rem 0;
    text-align: center;
}

.logo-text {
    font-family: var(--font-script);
    font-size: 4.5rem;
    color: var(--text-main);
    display: block;
    margin-bottom: 0.5rem;
}

.tagline {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--text-muted);
}

@media (max-width: 600px) {
    .logo-text {
        font-size: 3rem;
    }
}

/* Footer */
.main-footer {
    background: var(--nav-bg);
    color: #ffffff;
    padding: 2rem 0;
    margin-top: 5rem;
    width: 100%;
}

.main-footer p {
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: #ffffff;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

.footer-links a:hover {
    color: var(--primary);
}/* Buttons Base */
.btn, 
button[type="submit"],
.btn-more,
.action-btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    border-radius: 2px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    text-decoration: none !important;
    text-align: center;
}

/* Primary Button */
.btn--primary,
button[type="submit"],
.btn-more,
.btn-edit {
    background: var(--primary);
    color: #ffffff !important;
}

.btn--primary:hover,
button:hover,
.btn-more:hover,
.btn-edit:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* Danger Button */
.btn--danger,
.btn-delete {
    background: var(--color-danger);
    color: #ffffff !important;
}

.btn--danger:hover,
.btn-delete:hover {
    background: var(--color-danger-dark);
    transform: translateY(-2px);
}

/* Admin Specific Action Buttons */
.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.8rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.action-btn svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

/* Alerts */
.alert {
    padding: 1rem;
    margin-bottom: 2rem;
    font-weight: 700;
    text-align: center;
}

.alert-success {
    background: var(--bg-success);
    color: var(--color-success);
}

.alert-error {
    background: var(--bg-error);
    color: var(--color-error);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 4px;
    letter-spacing: 0.5px;
    vertical-align: middle;
}

.restricted-lock {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    display: block;
    animation: pulse-lock 2s infinite ease-in-out;
}

@keyframes pulse-lock {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Loader */
.loader-container {
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 2rem 0;
}

.premium-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(92, 197, 195, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="url"],
select,
textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    font-family: inherit;
    font-size: 1rem;
    background-color: #fff;
    border-radius: 2px;
}

input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-color: var(--primary);
}

/* Fluid validation states */
input:invalid:not(:placeholder-shown),
textarea:invalid:not(:placeholder-shown) {
    border-color: var(--error, #e74c3c);
    box-shadow: 0 0 0 1px var(--error, #e74c3c);
}

input:valid:not(:placeholder-shown),
textarea:valid:not(:placeholder-shown) {
    border-color: #2ecc71;
}

select {
    cursor: pointer;
}
/* --- HOME PAGE / POST LIST --- */

.posts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem 3rem;
    margin-bottom: 5rem;
}

@media (min-width: 800px) { .posts-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1300px) { .posts-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 2200px) { .posts-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 3200px) { .posts-grid { grid-template-columns: repeat(5, 1fr); } }

.post-list-item {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
    align-items: center;
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--border-color);
}

.post-title {
    font-family: var(--font-sans);
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-main);
    width: 100%;
}

.post-thumbnail {
    width: 100%;
}

.post-thumbnail img {
    width: 100%;
    max-height: 50vh;
    aspect-ratio: 3/2;
    object-fit: cover;
    display: block;
    border-radius: 4px;
}

.post-list-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    gap: 1rem;
}

.post-tags {
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.post-tags a { color: var(--primary); }
.post-tags .sep {
    margin: 0 0.5rem;
    color: var(--primary);
    font-size: 0.7rem;
}

.post-summary {
    color: var(--text-muted);
    font-size: 0.9rem;
    max-width: 100%;
    line-height: 1.5;
}

.post-actions {
    margin-top: 0.5rem;
}

/* --- SINGLE POST PAGE --- */

.post-card h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    margin-top: 2rem;
    text-align: left;
}

.post-meta {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.post-content {
    font-size: 1.1rem;
    color: var(--text-main);
    display: flow-root;
}

.post-content p {
    margin-bottom: 1rem;
}

.post-content p:has(br:only-child) {
    margin-bottom: 0.5rem;
}

.post-content img, 
.post-content video {
    max-width: 100%;
    height: auto;
}

.post-content a {
    color: var(--color-link);
    text-decoration: underline;
}

.post-content a:hover {
    color: var(--color-link-hover);
}

/* --- A11Y TOOLBAR & MODES --- */
.a11y-toolbar {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    background: var(--card-bg, #f9f9f9);
    padding: 0.8rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.a11y-group {
    display: flex;
    gap: 0.5rem;
}

.a11y-toolbar button {
    background: #fff;
    border: 1px solid var(--border-color);
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    font-family: var(--font-sans);
    color: var(--text-main);
    transition: all 0.2s;
}

.a11y-toolbar button:hover, .a11y-toolbar button[aria-pressed="true"] {
    background: var(--nav-bg);
    color: #fff;
    border-color: var(--nav-bg);
}

.reading-progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: transparent;
    z-index: 9999;
}

.reading-progress-bar {
    height: 100%;
    width: 0%;
    background: var(--primary);
    transition: width 0.1s ease-out;
}

/* Text Size Modifiers */
.text-size-1 .post-content { font-size: 1.25rem !important; }
.text-size-2 .post-content { font-size: 1.4rem !important; }
.text-size-3 .post-content { font-size: 1.6rem !important; }

/* Dyslexia / High Legibility Mode */
.a11y-dyslexia .post-content {
    font-family: Arial, Helvetica, sans-serif !important;
    letter-spacing: 0.05em !important;
    line-height: 2 !important;
    word-spacing: 0.1em !important;
}

/* Zen / Focus Mode */
body.a11y-focus-mode {
    background-color: #121212 !important;
    color: #f1f1f1 !important;
}

body.a11y-focus-mode .main-header,
body.a11y-focus-mode .top-nav,
body.a11y-focus-mode .main-footer,
body.a11y-focus-mode .post-tags,
body.a11y-focus-mode .comments-section,
body.a11y-focus-mode .post-meta {
    display: none !important;
}

body.a11y-focus-mode .a11y-toolbar {
    background: #222;
    border-color: #444;
}

body.a11y-focus-mode .a11y-toolbar button {
    background: #333;
    color: #fff;
    border-color: #555;
}

body.a11y-focus-mode .a11y-toolbar button[aria-pressed="true"] {
    background: var(--primary);
}

body.a11y-focus-mode .post-content {
    color: #e0e0e0 !important;
}

body.a11y-focus-mode h1 {
    color: #ffffff !important;
}

/* A11y Captions */
.a11y-caption {
    font-size: 0.9rem;
    font-style: italic;
    color: var(--text-muted);
    text-align: center;
    margin-top: 0.5rem;
    margin-bottom: 1.5rem;
    padding: 0.5rem;
    background: rgba(0,0,0,0.03);
    border-radius: 4px;
    display: block;
}

body.a11y-focus-mode .a11y-caption {
    background: rgba(255,255,255,0.05);
    color: #ccc;
}

/* --- COMMENTS --- */

.comments-section {
    margin-top: 5rem;
    padding-top: 3rem;
    border-top: 2px solid var(--nav-bg);
}

.comments-section h3 {
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 1.2rem;
}

.comment {
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem 0;
}

.comment-meta {
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--color-comment-meta);
}

.comment-date {
    font-weight: 400;
    color: var(--primary);
    margin-left: 1rem;
    font-size: 0.8rem;
}

.comment-replies {
    margin-left: 2rem;
    border-left: 2px solid var(--border-color);
    padding-left: 1rem;
    margin-top: 1rem;
}

.reply-link {
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
}

.reply-link:hover {
    text-decoration: underline;
}

/* --- ADMIN --- */

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.5rem;
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.admin-table th, .admin-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.admin-table th {
    background: var(--nav-bg);
    color: #ffffff;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
}

.action-btn-container {
    display: flex;
    gap: 0.5rem;
}

/* --- RESPONSIVE ADJUSTMENTS --- */

@media (max-width: 768px) {
    .admin-table, .admin-table thead, .admin-table tbody, .admin-table th, .admin-table td, .admin-table tr {
        display: block;
    }

    .admin-table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    .admin-table tr {
        border: 1px solid var(--border-color);
        margin-bottom: 1rem;
        border-radius: 8px;
        padding: 0.5rem;
        background: var(--card-bg);
    }

    .admin-table td {
        border: none;
        position: relative;
        padding-left: 50% !important;
        text-align: right !important;
        min-height: 2.5rem;
        display: flex;
        align-items: center;
        justify-content: flex-end;
    }

    .admin-table td:before {
        content: attr(data-label);
        position: absolute;
        left: 1rem;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        text-align: left;
        font-weight: 700;
        color: var(--text-muted);
        text-transform: uppercase;
        font-size: 0.7rem;
    }

    .action-btn-container {
        justify-content: flex-end;
        width: 100%;
    }

    /* Form improvements */
    form[id="post-form"] div[style*="display:flex"] {
        flex-direction: column !important;
        gap: 0 !important;
    }

    #editor-container {
        min-height: 400px !important;
    }
}

@media (max-width: 600px) {
    .post-list-item {
        flex-direction: column;
        gap: 1.2rem;
        text-align: center;
    }

    .post-thumbnail {
        width: 100%;
    }

    .nav-container {
        justify-content: center;
    }
}
/* Lightbox */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    cursor: zoom-out;
}

.lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-img, .lightbox-vid {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    cursor: zoom-out;
}

.lightbox-overlay.active .lightbox-img {
    transform: scale(1);
}

/* Address Search Suggestions */
.address-suggestions {
    position: relative;
    width: 100%;
}

.suggestions-list {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #fff;
    border: 1px solid #ddd;
    border-top: none;
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.suggestion-item {
    padding: 0.8rem;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    font-size: 0.9rem;
    color: var(--text-main);
}

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

.suggestion-item:hover {
    background-color: #f5f5f5;
}

/* Brut Video Player */
.brut-video-container {
    position: relative;
    max-width: 100%;
    margin: 2rem auto;
    border-radius: 8px;
    overflow: hidden;
    padding: 6px;
    background: #000;
}

.brut-video-container video {
    display: block;
    width: 100%;
    border-radius: 4px;
}

.brut-video-progress {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.brut-video-progress svg {
    width: 100%;
    height: 100%;
}

.brut-video-progress rect {
    fill: none;
    stroke: var(--primary);
    stroke-width: 6;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    transition: stroke-dashoffset 0.1s linear;
}

/* Video Thumbnails */
.video-thumbnail {
    position: relative;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.video-placeholder {
    width: 100%;
    height: 100%;
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #222;
    color: #666;
}

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.5);
    color: #fff;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    pointer-events: none;
}

.post-thumbnail:hover .play-overlay {
    background: var(--primary);
    transform: translate(-50%, -50%) scale(1.1);
}

.post-content video {
    display: block;
    margin: 2rem auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-radius: 8px;
}
/* Map Styles */

#map {
    width: 100%;
    height: 600px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.15);
    margin-bottom: 1.5rem;
}

.map-container {
    position: relative;
}

/* Selector and Stats Container */
.map-controls-container {
    margin-bottom: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    background: var(--glass-bg, rgba(255, 255, 255, 0.8));
    backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border, rgba(0, 0, 0, 0.1));
    padding: 1rem 1.5rem;
    border-radius: 12px;
}

.trip-selector {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.trip-selector label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    font-weight: 700;
}

.trip-selector select {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    border-radius: 6px;
    border: 1px solid var(--border-color, rgba(0,0,0,0.1));
    background: var(--bg-color, #fff);
    color: var(--text-main, #333);
    cursor: pointer;
    font-weight: 600;
}

/* Statistics view styling */
.trip-stats {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-item .stat-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    font-weight: 700;
}

.stat-item .stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
}

/* Marker divIcon Customizations */
.map-marker {
    position: relative;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 3px solid var(--marker-color, var(--primary));
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    background: #fff;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.map-marker:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
    z-index: 1000 !important;
}

.map-marker-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
}

.map-marker-initial {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
}

.map-marker-step {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--marker-color, var(--primary));
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    border: 1px solid #fff;
}

/* Popup Customizations */
.leaflet-popup-content-wrapper {
    border-radius: 12px;
    overflow: hidden;
    padding: 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.leaflet-popup-content {
    margin: 0;
    width: 300px !important;
}

.map-popup-card {
    display: flex;
    flex-direction: column;
}

.map-popup-card .popup-image {
    width: 100%;
    height: 140px;
    background-size: cover;
    background-position: center;
}

.map-popup-card .popup-body {
    padding: 1rem;
}

.map-popup-card h4 {
    margin: 0 0 0.25rem 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
}

.map-popup-card .popup-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.map-popup-card p {
    font-size: 0.8rem;
    margin: 0 0 0.75rem 0;
    line-height: 1.4;
    color: var(--text-main);
}

.map-popup-card a {
    align-self: flex-start;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

.map-popup-card a:hover {
    color: var(--primary-dark);
}

/* Mini map inside post details */
.mini-map-card {
    margin-top: 1rem;
    margin-bottom: 2rem;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.mini-map-card #mini-map {
    width: 100%;
    height: 250px;
}

/* Step navigation */
.step-navigation-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0;
    padding: 1rem 0;
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
}

.step-nav-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--text-main);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    background: var(--card-bg, rgba(255, 255, 255, 0.5));
    border: 1px solid var(--glass-border);
    transition: background 0.2s, transform 0.2s;
}

.step-nav-btn:hover {
    background: var(--card-bg-hover, rgba(255, 255, 255, 0.8));
    transform: translateY(-2px);
}

.step-nav-btn.prev {
    align-items: flex-start;
}

.step-nav-btn.next {
    align-items: flex-end;
}

.step-nav-btn .nav-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    font-weight: 700;
}

.step-nav-btn .nav-title {
    font-size: 0.85rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* Cluster custom style overrides */
.marker-cluster-small {
    background-color: rgba(0, 121, 118, 0.6);
}
.marker-cluster-small div {
    background-color: rgba(0, 121, 118, 0.8);
    color: #fff;
    font-weight: 700;
}
.marker-cluster-medium {
    background-color: rgba(0, 121, 118, 0.6);
}
.marker-cluster-medium div {
    background-color: rgba(0, 121, 118, 0.8);
    color: #fff;
    font-weight: 700;
}
.marker-cluster-large {
    background-color: rgba(0, 121, 118, 0.6);
}
.marker-cluster-large div {
    background-color: rgba(0, 121, 118, 0.8);
    color: #fff;
    font-weight: 700;
}

/* Adaptive Sizes for Screen Resolutions (Media Queries) */
@media (max-width: 600px) {
    #map {
        height: 400px;
    }
    .map-controls-container {
        flex-direction: column;
        align-items: stretch;
    }
    .trip-selector select {
        width: 100%;
    }
    .trip-stats {
        justify-content: space-between;
        gap: 0.75rem;
    }
    .map-marker {
        width: 36px;
        height: 36px;
        border-width: 2px;
    }
    .map-marker-step {
        width: 16px;
        height: 16px;
        font-size: 0.6rem;
    }
    .leaflet-popup-content {
        width: 220px !important;
    }
    .map-popup-card .popup-image {
        height: 100px;
    }
    .step-navigation-container {
        flex-direction: column;
    }
    .step-nav-btn {
        width: 100%;
    }
}

@media (min-width: 601px) and (max-width: 1024px) {
    .map-marker {
        width: 42px;
        height: 42px;
    }
    .map-marker-step {
        width: 17px;
        height: 17px;
        font-size: 0.65rem;
    }
    .leaflet-popup-content {
        width: 260px !important;
    }
}

/* 4K Screens and Ultra HD Support */
@media (min-width: 2000px) {
    #map {
        height: 800px;
    }
    .map-marker {
        width: 64px;
        height: 64px;
        border-width: 4px;
    }
    .map-marker-step {
        width: 24px;
        height: 24px;
        font-size: 0.8rem;
        top: -8px;
        right: -8px;
    }
    .leaflet-popup-content {
        width: 400px !important;
    }
    .map-popup-card .popup-image {
        height: 200px;
    }
    .map-popup-card h4 {
        font-size: 1.3rem;
    }
    .map-popup-card p {
        font-size: 0.95rem;
    }
    .map-popup-card a {
        font-size: 0.95rem;
    }
}
