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

:root {
    --primary-gold: #c9a961;
    --dark-gold: #a88742;
    --light-gold: #e8d4a0;
    --deep-blue: #1a2332;
    --navy: #2c3e50;
    --slate: #34495e;
    --cream: #faf8f3;
    --light-cream: #fefdfb;
    --shadow-soft: rgba(0, 0, 0, 0.08);
    --shadow-medium: rgba(0, 0, 0, 0.15);
    --shadow-strong: rgba(0, 0, 0, 0.25);
}

body {
    font-family: 'Cormorant Garamond', serif;
    background: linear-gradient(135deg, var(--deep-blue) 0%, var(--slate) 100%);
    color: var(--navy);
    line-height: 1.7;
    font-size: 17px;
}

.container {
    max-width: 1800px;
    margin: 0 auto;
    background: var(--light-cream);
    min-height: 100vh;
    box-shadow: 0 0 80px rgba(0, 0, 0, 0.4);
}

/* Header Styling */
header {
    background: var(--cream);
    color: var(--navy);
    padding: 1.75rem 2rem 1.5rem;
    text-align: center;
    position: relative;
    border-bottom: 1px solid rgba(201, 169, 97, 0.2);
}

header h1 {
    font-family: 'Cinzel', serif;
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    letter-spacing: 1px;
    color: var(--navy);
    position: relative;
}

.subtitle {
    font-size: 0.95rem;
    font-weight: 400;
    letter-spacing: 0.5px;
    color: var(--slate);
    position: relative;
    font-style: italic;
}

/* Main Content Layout */
.main-content {
    display: flex;
    height: calc(100vh - 140px);
}

/* Sidebar Styling */
.sidebar {
    width: 380px;
    background: var(--cream);
    padding: 1.5rem 1.25rem;
    overflow-y: auto;
    overflow-x: hidden;
    border-right: 1px solid rgba(201, 169, 97, 0.2);
    box-shadow: 2px 0 15px var(--shadow-soft);
    flex-shrink: 0;
}

.sidebar::-webkit-scrollbar {
    width: 8px;
}

.sidebar::-webkit-scrollbar-track {
    background: var(--light-cream);
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--primary-gold);
    border-radius: 4px;
}

.journey-selector {
    margin-bottom: 1.5rem;
}

.journey-selector h2 {
    font-family: 'Cinzel', serif;
    color: var(--navy);
    margin-bottom: 0.85rem;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--primary-gold);
    padding-bottom: 0.5rem;
}

.journey-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.journey-btn {
    background: var(--light-cream);
    border: 1px solid var(--primary-gold);
    padding: 0.65rem 0.85rem;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: 'Cinzel', serif;
    color: var(--navy);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.3px;
}

.journey-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(201, 169, 97, 0.1), transparent);
    transition: left 0.5s;
}

.journey-btn:hover::before {
    left: 100%;
}

.journey-btn:hover {
    background: linear-gradient(135deg, rgba(201, 169, 97, 0.08) 0%, rgba(201, 169, 97, 0.15) 100%);
    border-color: var(--dark-gold);
    transform: translateX(5px);
    box-shadow: -3px 3px 8px var(--shadow-medium);
}

.journey-btn.active {
    background: linear-gradient(135deg, var(--navy) 0%, var(--slate) 100%);
    color: var(--primary-gold);
    border-color: var(--dark-gold);
    box-shadow: 0 4px 12px var(--shadow-strong);
    transform: translateX(3px);
}

.journey-dates {
    display: block;
    font-size: 0.75rem;
    font-weight: 400;
    font-family: 'Cormorant Garamond', serif;
    margin-top: 0.25rem;
    opacity: 0.85;
    letter-spacing: 0.3px;
}

.journey-info {
    background: var(--light-cream);
    padding: 1.25rem;
    border-radius: 2px;
    margin-bottom: 1.25rem;
    box-shadow: 0 2px 8px var(--shadow-soft);
    border: 1px solid rgba(201, 169, 97, 0.15);
    border-left: 3px solid var(--primary-gold);
}

.journey-info h3 {
    font-family: 'Cinzel', serif;
    color: var(--navy);
    margin-bottom: 0.65rem;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.journey-info p {
    line-height: 1.6;
    color: var(--slate);
    font-size: 0.9rem;
}

.bible-reference {
    background: linear-gradient(135deg, rgba(201, 169, 97, 0.08) 0%, rgba(201, 169, 97, 0.03) 100%);
    padding: 0.65rem 0.85rem;
    border-left: 2px solid var(--dark-gold);
    margin-top: 0.75rem;
    font-style: italic;
    border-radius: 2px;
    color: var(--navy);
    font-weight: 500;
    letter-spacing: 0.3px;
    font-size: 0.85rem;
}

.city-info {
    background: var(--light-cream);
    padding: 1.25rem;
    border-radius: 2px;
    box-shadow: 0 2px 8px var(--shadow-soft);
    border: 1px solid rgba(201, 169, 97, 0.15);
    border-left: 3px solid var(--dark-gold);
}

.city-info h3 {
    font-family: 'Cinzel', serif;
    color: var(--navy);
    margin-bottom: 0.75rem;
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.city-info h4 {
    font-family: 'Cinzel', serif;
    color: var(--slate);
    margin-top: 1rem;
    margin-bottom: 0.65rem;
    font-size: 0.95rem;
    font-weight: 600;
}

.city-info p {
    margin-bottom: 0.5rem;
    line-height: 1.6;
    color: var(--slate);
    font-size: 0.9rem;
}

.city-info strong {
    color: var(--navy);
    font-weight: 600;
}

.city-events {
    margin-top: 1rem;
}

.event-item {
    background: linear-gradient(135deg, rgba(201, 169, 97, 0.05) 0%, rgba(201, 169, 97, 0.02) 100%);
    padding: 0.65rem 0.85rem;
    margin-bottom: 0.5rem;
    border-radius: 2px;
    border-left: 2px solid var(--primary-gold);
    line-height: 1.5;
    color: var(--navy);
    transition: all 0.3s ease;
    font-size: 0.85rem;
}

.event-item:hover {
    background: linear-gradient(135deg, rgba(201, 169, 97, 0.12) 0%, rgba(201, 169, 97, 0.06) 100%);
    transform: translateX(3px);
    box-shadow: 0 2px 6px var(--shadow-soft);
}

/* Map Container */
.map-container {
    flex: 1;
    position: relative;
    background: var(--slate);
    overflow: hidden;
}

#map {
    width: 100%;
    height: 100%;
}

/* Map Legend */
.map-legend {
    position: absolute;
    bottom: 30px;
    right: 30px;
    background: rgba(250, 248, 243, 0.97);
    backdrop-filter: blur(10px);
    padding: 1.5rem 1.75rem;
    border-radius: 2px;
    box-shadow: 0 8px 30px var(--shadow-strong);
    z-index: 1000;
    border: 1px solid rgba(201, 169, 97, 0.3);
}

.map-legend h4 {
    font-family: 'Cinzel', serif;
    margin-bottom: 1rem;
    color: var(--navy);
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--primary-gold);
    padding-bottom: 0.5rem;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.7rem;
    font-size: 1rem;
    color: var(--slate);
}

.legend-item:last-child {
    margin-bottom: 0;
}

.legend-line {
    width: 36px;
    height: 4px;
    margin-right: 0.9rem;
    border-radius: 2px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.legend-line.journey-1 {
    background: linear-gradient(90deg, #c0392b 0%, #e74c3c 100%);
}

.legend-line.journey-2 {
    background: linear-gradient(90deg, #2980b9 0%, #3498db 100%);
}

.legend-line.journey-3 {
    background: linear-gradient(90deg, #27ae60 0%, #2ecc71 100%);
}

.legend-line.journey-4 {
    background: linear-gradient(90deg, #d68910 0%, #f39c12 100%);
}

/* Stop Navigation Controls */
.stop-navigation {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(250, 248, 243, 0.95);
    backdrop-filter: blur(8px);
    padding: 0.5rem 0.9rem;
    border-radius: 20px;
    box-shadow: 0 4px 16px var(--shadow-medium);
    z-index: 1000;
    border: 1px solid rgba(201, 169, 97, 0.25);
    display: none;
    align-items: center;
    gap: 0.75rem;
}

.stop-navigation.visible {
    display: flex;
}

.stop-navigation .current-stop {
    font-family: 'Cinzel', serif;
    color: var(--navy);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    min-width: 120px;
    text-align: center;
    line-height: 1.2;
}

.stop-navigation .stop-counter {
    font-family: 'Cormorant Garamond', serif;
    color: var(--slate);
    font-size: 0.7rem;
    margin-top: 0.15rem;
}

.nav-btn {
    background: linear-gradient(135deg, var(--primary-gold) 0%, var(--dark-gold) 100%);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: all 0.25s ease;
    box-shadow: 0 2px 6px var(--shadow-medium);
    flex-shrink: 0;
}

.nav-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--dark-gold) 0%, var(--primary-gold) 100%);
    transform: scale(1.08);
    box-shadow: 0 3px 10px var(--shadow-strong);
}

.nav-btn:disabled {
    background: #d0d0d0;
    cursor: not-allowed;
    opacity: 0.5;
}

.nav-btn:active:not(:disabled) {
    transform: scale(0.96);
}

/* Footer */
footer {
    background: var(--cream);
    color: var(--slate);
    text-align: center;
    padding: 1rem;
    font-size: 0.85rem;
    letter-spacing: 0.3px;
    border-top: 1px solid rgba(201, 169, 97, 0.2);
}

/* Custom Leaflet Popup Styles */
.leaflet-popup-content-wrapper {
    border-radius: 2px;
    padding: 0;
    background: var(--cream);
    box-shadow: 0 6px 25px var(--shadow-strong);
    border: 1px solid rgba(201, 169, 97, 0.3);
}

.leaflet-popup-content {
    margin: 1.5rem;
    min-width: 240px;
    font-family: 'Cormorant Garamond', serif;
}

.leaflet-popup-tip {
    background: var(--cream);
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.2);
}

.popup-city-name {
    font-family: 'Cinzel', serif;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 0.75rem;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--primary-gold);
    padding-bottom: 0.5rem;
}

.popup-description {
    margin-bottom: 0.5rem;
    color: var(--slate);
    line-height: 1.7;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .sidebar {
        width: 380px;
    }
}

@media (max-width: 1024px) {
    .main-content {
        flex-direction: column;
        height: calc(100vh - 140px);
    }

    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid rgba(201, 169, 97, 0.2);
        height: 350px;
        flex-shrink: 0;
    }

    .map-container {
        flex: 1;
        min-height: 0;
    }

    .map-legend {
        bottom: 20px;
        right: 20px;
        padding: 1rem 1.25rem;
        font-size: 0.9rem;
    }

    .map-legend h4 {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }

    .stop-navigation {
        top: 15px;
        padding: 0.85rem 1.25rem;
    }

    .stop-navigation .current-stop {
        font-size: 1rem;
        min-width: 140px;
    }
}

@media (max-width: 768px) {
    header {
        padding: 1.5rem 1.25rem 1.25rem;
    }

    header h1 {
        font-size: 1.5rem;
        letter-spacing: 0.75px;
    }

    .subtitle {
        font-size: 0.85rem;
    }

    .sidebar {
        padding: 1.5rem;
        height: 280px;
    }

    .journey-selector h2,
    .city-info h3 {
        font-size: 1.2rem;
    }

    .journey-btn {
        padding: 0.9rem 1.1rem;
        font-size: 0.95rem;
    }

    .map-legend {
        bottom: 12px;
        right: 12px;
        padding: 0.85rem 1rem;
        font-size: 0.85rem;
    }

    .map-legend h4 {
        font-size: 0.95rem;
        margin-bottom: 0.65rem;
    }

    .legend-item {
        margin-bottom: 0.5rem;
        font-size: 0.85rem;
    }

    .legend-line {
        width: 28px;
        height: 3px;
    }

    .stop-navigation {
        top: 10px;
        padding: 0.65rem 0.9rem;
        gap: 0.85rem;
    }

    .stop-navigation .current-stop {
        font-size: 0.9rem;
        min-width: 100px;
    }

    .stop-navigation .stop-counter {
        font-size: 0.75rem;
    }

    .nav-btn {
        width: 32px;
        height: 32px;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    header {
        padding: 1.25rem 1rem 1rem;
    }

    header h1 {
        font-size: 1.3rem;
        letter-spacing: 0.5px;
    }

    .subtitle {
        font-size: 0.8rem;
    }

    body {
        font-size: 16px;
    }

    .sidebar {
        padding: 1.25rem;
        height: 240px;
    }

    .journey-selector {
        margin-bottom: 1.5rem;
    }

    .journey-selector h2 {
        font-size: 1.1rem;
    }

    .journey-info,
    .city-info {
        padding: 1.25rem;
    }

    .journey-btn {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }

    .journey-dates {
        font-size: 0.8rem;
    }

    .map-legend {
        bottom: 8px;
        right: 8px;
        padding: 0.7rem 0.85rem;
        font-size: 0.8rem;
    }

    .map-legend h4 {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }

    .legend-item {
        font-size: 0.8rem;
        margin-bottom: 0.4rem;
    }

    .legend-line {
        width: 24px;
        height: 3px;
        margin-right: 0.6rem;
    }

    .stop-navigation {
        top: 8px;
        padding: 0.6rem 0.8rem;
        gap: 0.7rem;
    }

    .stop-navigation .current-stop {
        font-size: 0.85rem;
        min-width: 90px;
    }

    .stop-navigation .stop-counter {
        font-size: 0.7rem;
    }

    .nav-btn {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }
}
