/**
 * JBM Africa Map - Styles
 * Version 2.3.1
 */

/* ==========================================================================
   Map Wrapper
   ========================================================================== */

.jbm-africa-map-wrapper {
    position: relative;
    width: 100%;
}

.jbm-africa-map {
    width: 100%;
    min-height: 400px;
    border-radius: 8px;
    overflow: hidden;
    z-index: 1;
}

/* ==========================================================================
   Category Indicator (Shows which categories are displayed)
   ========================================================================== */

.jbm-category-indicator {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px 8px 0 0;
    border-bottom: none;
}

.jbm-category-indicator .indicator-label {
    font-weight: 600;
    color: #475569;
    font-size: 13px;
    margin-right: 4px;
}

.jbm-category-indicator .category-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: white;
}

.jbm-category-indicator .category-badge .badge-count {
    opacity: 0.85;
    font-weight: 400;
}

.jbm-category-indicator .status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    margin-left: auto;
}

.jbm-category-indicator .status-badge.upcoming {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.jbm-category-indicator .status-badge.occurred {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

/* ==========================================================================
   Legend - Horizontal (Top/Bottom)
   ========================================================================== */

.jbm-legend.jbm-legend-horizontal {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 0 0 8px 8px;
    border-top: none;
}

.jbm-legend .legend-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1;
}

.jbm-legend .legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.jbm-legend .legend-item:hover {
    background: #e2e8f0;
}

.jbm-legend .legend-item.active {
    background: white;
    border-color: var(--cat-color, #3b82f6);
    box-shadow: 0 0 0 2px var(--cat-color, #3b82f6), inset 0 0 0 2px var(--cat-color, #3b82f6);
}

.jbm-legend .legend-item:not(.active) {
    opacity: 0.5;
}

.jbm-legend .legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.jbm-legend .legend-name {
    font-weight: 500;
    color: #334155;
}

.jbm-legend .legend-count {
    font-size: 11px;
    color: #64748b;
}

.jbm-legend .legend-check {
    display: none;
    color: var(--cat-color, #3b82f6);
    font-weight: bold;
}

.jbm-legend .legend-item.active .legend-check {
    display: inline;
}

/* Time Filter Buttons */
.jbm-legend .legend-time-filter {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: #f1f5f9;
    border-radius: 8px;
}

.jbm-legend .time-filter-btn {
    padding: 6px 12px;
    background: transparent;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.jbm-legend .time-filter-btn:hover {
    background: #e2e8f0;
    color: #334155;
}

.jbm-legend .time-filter-btn.active {
    background: white;
    color: #334155;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Reset Button */
.jbm-legend .legend-reset {
    padding: 6px 12px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 12px;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.jbm-legend .legend-reset:hover {
    background: #e2e8f0;
    color: #334155;
}

/* ==========================================================================
   Markers
   ========================================================================== */

.jbm-marker {
    background: transparent !important;
    border: none !important;
}

.jbm-marker-future {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Cluster Icons */
.jbm-cluster-icon {
    background: transparent !important;
}

.jbm-cluster {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #3b82f6;
    color: white;
    font-weight: bold;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

.jbm-cluster-small {
    width: 36px;
    height: 36px;
    font-size: 13px;
}

.jbm-cluster-medium {
    width: 44px;
    height: 44px;
    font-size: 15px;
}

.jbm-cluster-large {
    width: 50px;
    height: 50px;
    font-size: 16px;
}

/* ==========================================================================
   Popup Styles
   ========================================================================== */

.jbm-popup-wrapper .leaflet-popup-content-wrapper {
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.jbm-popup-wrapper .leaflet-popup-content {
    margin: 0;
    padding: 0;
    min-width: 220px;
}

.jbm-popup {
    padding: 16px;
}

.jbm-popup .popup-status-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.jbm-popup .popup-status-badge.upcoming {
    background: #fef3c7;
    color: #92400e;
}

.jbm-popup .popup-status-badge.occurred {
    background: #d1fae5;
    color: #065f46;
}

.jbm-popup .popup-thumbnail {
    margin: -16px -16px 12px -16px;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
}

.jbm-popup .popup-thumbnail img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

.jbm-popup .popup-title {
    margin: 0 0 8px 0;
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.3;
}

.jbm-popup .popup-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 8px;
}

.jbm-popup .popup-category {
    display: inline-block;
    padding: 2px 8px;
    background: #f1f5f9;
    border-radius: 4px;
    font-size: 11px;
    color: #64748b;
}

.jbm-popup .popup-date {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 6px;
}

.jbm-popup .popup-address {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 8px;
}

.jbm-popup .popup-excerpt {
    font-size: 13px;
    color: #475569;
    line-height: 1.5;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.jbm-popup .popup-link {
    display: inline-block;
    padding: 6px 12px;
    background: #3b82f6;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    transition: background 0.2s ease;
}

.jbm-popup .popup-link:hover {
    background: #2563eb;
    color: white;
}

/* ==========================================================================
   Center Button
   ========================================================================== */

.jbm-center-control {
    background: white;
    border-radius: 4px;
}

.jbm-center-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    font-size: 18px;
    color: #333;
    text-decoration: none;
}

.jbm-center-btn:hover {
    background: #f1f5f9;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
    .jbm-category-indicator {
        padding: 10px 12px;
    }
    
    .jbm-category-indicator .indicator-label {
        width: 100%;
        margin-bottom: 4px;
    }
    
    .jbm-category-indicator .status-badge {
        margin-left: 0;
    }
    
    .jbm-legend.jbm-legend-horizontal {
        flex-direction: column;
        align-items: stretch;
    }
    
    .jbm-legend .legend-categories {
        justify-content: center;
    }
    
    .jbm-legend .legend-time-filter {
        justify-content: center;
    }
    
    .jbm-legend .legend-reset {
        align-self: center;
    }
}

@media (max-width: 480px) {
    .jbm-legend .legend-item {
        padding: 5px 10px;
        font-size: 12px;
    }
    
    .jbm-popup {
        padding: 12px;
    }
    
    .jbm-popup .popup-title {
        font-size: 14px;
    }
}

/* ==========================================================================
   Mobile Behavior Classes
   ========================================================================== */

/* Mobile Legend - Scroll */
@media (max-width: 768px) {
    .mobile-legend-scroll .jbm-legend .legend-categories {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    
    .mobile-legend-scroll .jbm-legend .legend-item {
        flex-shrink: 0;
    }
}

/* Mobile Legend - Wrap */
@media (max-width: 768px) {
    .mobile-legend-wrap .jbm-legend .legend-categories {
        flex-wrap: wrap;
    }
}

/* Mobile Legend - Hide */
@media (max-width: 768px) {
    .mobile-legend-hide .jbm-legend {
        display: none;
    }
}

/* Mobile Indicator - Scroll */
@media (max-width: 768px) {
    .mobile-indicator-scroll .jbm-category-indicator {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    
    .mobile-indicator-scroll .jbm-category-indicator .category-badge,
    .mobile-indicator-scroll .jbm-category-indicator .status-badge {
        flex-shrink: 0;
    }
}

/* Mobile Indicator - Wrap */
@media (max-width: 768px) {
    .mobile-indicator-wrap .jbm-category-indicator {
        flex-wrap: wrap;
    }
    
    .mobile-indicator-wrap .jbm-category-indicator .indicator-label {
        width: 100%;
        margin-bottom: 6px;
    }
}

/* Mobile Indicator - Hide */
@media (max-width: 768px) {
    .mobile-indicator-hide .jbm-category-indicator {
        display: none;
    }
}

/* ==========================================================================
   Marker Animations
   ========================================================================== */

.jbm-marker-pulse {
    animation: jbm-pulse 2s infinite;
}

@keyframes jbm-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.15);
        opacity: 0.8;
    }
}

/* ==========================================================================
   Timeline Styles - Version 2.4.1
   ========================================================================== */

.jbm-timeline-wrapper {
    position: relative;
    margin: 20px 0;
    background: linear-gradient(to bottom, #f8fafc, #fff);
    border-radius: 12px;
    overflow: hidden;
}

/* ==========================================================================
   Horizontal Timeline - Cards Style
   ========================================================================== */

.jbm-timeline-horizontal-container {
    display: flex;
    align-items: stretch;
    position: relative;
}

/* Navigation Buttons - Smaller and more subtle */
.jbm-timeline-nav {
    flex-shrink: 0;
    width: 36px;
    height: auto;
    min-height: 200px;
    border: none;
    background: rgba(255,255,255,0.9);
    color: #94a3b8;
    font-size: 24px;
    font-weight: 300;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    opacity: 0.6;
}

.jbm-timeline-nav:hover {
    color: #8B4513;
    background: rgba(254,247,237,0.95);
    opacity: 1;
}

.jbm-timeline-nav:active {
    transform: scale(0.95);
}

/* Scroll Container - with drag cursor */
.jbm-timeline-scroll {
    flex: 1;
    overflow-x: auto;
    overflow-y: visible;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding: 24px 0;
    position: relative;
    scrollbar-width: none;
    -ms-overflow-style: none;
    cursor: grab;
    user-select: none;
}

.jbm-timeline-scroll:active {
    cursor: grabbing;
}

.jbm-timeline-scroll::-webkit-scrollbar {
    display: none;
}

/* Timeline Line - Solid, no fade */
.jbm-timeline-line {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 35px;
    height: 3px;
    background: #cbd5e1;
    z-index: 1;
}

/* Items Row */
.jbm-timeline-items-row {
    display: flex;
    gap: 24px;
    padding: 0 24px 50px;
    position: relative;
    z-index: 2;
}

/* Timeline Card */
.jbm-timeline-card {
    flex-shrink: 0;
    width: 300px;
    min-width: 300px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.05);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    /* Initial state for reveal animation */
    opacity: 0;
    transform: translateY(30px);
}

/* Revealed state */
.jbm-timeline-card.revealed {
    opacity: 1;
    transform: translateY(0);
}

.jbm-timeline-card:hover {
    box-shadow: 0 12px 40px rgba(0,0,0,0.15), 0 4px 12px rgba(0,0,0,0.08);
    transform: translateY(-8px);
}

.jbm-timeline-card.revealed:hover {
    transform: translateY(-8px);
}

.jbm-timeline-card.active {
    box-shadow: 0 0 0 3px #8B4513, 0 12px 40px rgba(139,69,19,0.2);
}

/* Connecting Line from card to timeline */
.jbm-timeline-card-connector {
    position: absolute;
    bottom: -15px;
    left: 50%;
    width: 2px;
    height: 0;
    background: #cbd5e1;
    transform: translateX(-50%);
    z-index: 4;
    transition: height 0.4s ease 0.2s;
}

.jbm-timeline-card.revealed .jbm-timeline-card-connector {
    height: 15px;
}

/* Card Dot */
.jbm-timeline-card-dot {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%) scale(0);
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #8B4513;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 5;
    transition: transform 0.3s ease 0.4s;
}

.jbm-timeline-card.revealed .jbm-timeline-card-dot {
    transform: translateX(-50%) scale(1);
}

.jbm-timeline-card:hover .jbm-timeline-card-dot {
    transform: translateX(-50%) scale(1.3);
}

/* Card Image */
.jbm-timeline-card-image {
    width: 100%;
    height: 160px;
    overflow: hidden;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

.jbm-timeline-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.jbm-timeline-card:hover .jbm-timeline-card-image img {
    transform: scale(1.1);
}

/* Card Body */
.jbm-timeline-card-body {
    padding: 20px;
}

.jbm-timeline-card-title {
    margin: 0 0 12px;
    font-size: 17px;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.jbm-timeline-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.jbm-timeline-card-date {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}

.jbm-timeline-card-category {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.jbm-timeline-card-excerpt {
    margin: 0;
    font-size: 14px;
    color: #64748b;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ==========================================================================
   Horizontal Alternating Timeline (Top/Bottom Cards)
   ========================================================================== */

.jbm-timeline-horizontal-alternating .jbm-timeline-scroll {
    padding: 24px 0 24px;
}

.jbm-timeline-horizontal-alternating .jbm-timeline-items-row {
    padding-bottom: 0;
    align-items: center;
    min-height: 480px;
}

.jbm-timeline-horizontal-alternating .jbm-timeline-line {
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
}

.jbm-timeline-horizontal-alternating .jbm-timeline-card {
    width: 280px;
    min-width: 280px;
}

.jbm-timeline-horizontal-alternating .jbm-timeline-card:nth-child(odd) {
    align-self: flex-start;
    margin-bottom: 70px;
}

.jbm-timeline-horizontal-alternating .jbm-timeline-card:nth-child(even) {
    align-self: flex-end;
    margin-top: 70px;
}

/* Connecting lines for alternating */
.jbm-timeline-horizontal-alternating .jbm-timeline-card:nth-child(odd) .jbm-timeline-card-connector {
    bottom: -25px;
}

.jbm-timeline-horizontal-alternating .jbm-timeline-card:nth-child(odd).revealed .jbm-timeline-card-connector {
    height: 25px;
}

.jbm-timeline-horizontal-alternating .jbm-timeline-card:nth-child(even) .jbm-timeline-card-connector {
    top: -25px;
    bottom: auto;
    height: 0;
}

.jbm-timeline-horizontal-alternating .jbm-timeline-card:nth-child(even).revealed .jbm-timeline-card-connector {
    height: 25px;
}

.jbm-timeline-horizontal-alternating .jbm-timeline-card:nth-child(odd) .jbm-timeline-card-dot {
    bottom: -40px;
}

.jbm-timeline-horizontal-alternating .jbm-timeline-card:nth-child(even) .jbm-timeline-card-dot {
    top: -40px;
    bottom: auto;
}

.jbm-timeline-horizontal-alternating .jbm-timeline-card-image {
    height: 130px;
}

/* ==========================================================================
   Minimal Horizontal Timeline
   ========================================================================== */

.jbm-timeline-horizontal-minimal .jbm-timeline-card {
    width: 180px;
    min-width: 180px;
    background: transparent;
    box-shadow: none;
    text-align: center;
    border-radius: 12px;
}

.jbm-timeline-horizontal-minimal .jbm-timeline-card.revealed {
    opacity: 1;
}

.jbm-timeline-horizontal-minimal .jbm-timeline-card:hover {
    background: rgba(139,69,19,0.06);
    box-shadow: none;
    transform: translateY(0);
}

.jbm-timeline-horizontal-minimal .jbm-timeline-card-image {
    display: none;
}

.jbm-timeline-horizontal-minimal .jbm-timeline-card-connector {
    display: none;
}

.jbm-timeline-horizontal-minimal .jbm-timeline-card-body {
    padding: 16px 12px;
}

.jbm-timeline-horizontal-minimal .jbm-timeline-card-title {
    font-size: 14px;
    -webkit-line-clamp: 3;
}

.jbm-timeline-horizontal-minimal .jbm-timeline-card-excerpt {
    display: none;
}

.jbm-timeline-horizontal-minimal .jbm-timeline-card-dot {
    position: relative;
    bottom: auto;
    left: auto;
    transform: scale(1);
    margin: 12px auto 0;
    transition: transform 0.3s ease;
}

.jbm-timeline-horizontal-minimal .jbm-timeline-card.revealed .jbm-timeline-card-dot {
    transform: scale(1);
}

/* ==========================================================================
   Vertical Timeline
   ========================================================================== */

.jbm-timeline-vertical-container {
    position: relative;
    padding: 30px 40px;
    max-width: 900px;
    margin: 0 auto;
}

.jbm-timeline-vertical-container::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #cbd5e1;
    transform: translateX(-50%);
}

.jbm-timeline-vertical-left .jbm-timeline-vertical-container::before {
    left: 25px;
    transform: none;
}

.jbm-timeline-vertical-item {
    position: relative;
    margin-bottom: 35px;
    width: 45%;
    cursor: pointer;
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.jbm-timeline-vertical-item.jbm-timeline-side-right {
    transform: translateX(30px);
}

.jbm-timeline-vertical-item.revealed {
    opacity: 1;
    transform: translateX(0);
}

.jbm-timeline-vertical-item.jbm-timeline-side-left {
    margin-right: auto;
    padding-right: 40px;
}

.jbm-timeline-vertical-item.jbm-timeline-side-right {
    margin-left: auto;
    padding-left: 40px;
}

.jbm-timeline-vertical-left .jbm-timeline-vertical-item {
    width: calc(100% - 60px);
    margin-left: 60px;
    padding-left: 0;
    padding-right: 0;
    transform: translateX(-30px);
}

/* Horizontal connector for vertical timeline */
.jbm-timeline-vertical-connector {
    position: absolute;
    top: 28px;
    height: 2px;
    width: 0;
    background: #cbd5e1;
    transition: width 0.4s ease 0.3s;
}

.jbm-timeline-side-left .jbm-timeline-vertical-connector {
    right: 0;
}

.jbm-timeline-side-right .jbm-timeline-vertical-connector {
    left: 0;
}

.jbm-timeline-vertical-item.revealed .jbm-timeline-vertical-connector {
    width: 30px;
}

.jbm-timeline-vertical-dot {
    position: absolute;
    top: 24px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #8B4513;
    border: 4px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 5;
    transform: scale(0);
    transition: transform 0.3s ease 0.5s;
}

.jbm-timeline-vertical-item.revealed .jbm-timeline-vertical-dot {
    transform: scale(1);
}

.jbm-timeline-vertical-item:hover .jbm-timeline-vertical-dot {
    transform: scale(1.3);
}

.jbm-timeline-side-left .jbm-timeline-vertical-dot {
    right: -9px;
}

.jbm-timeline-side-right .jbm-timeline-vertical-dot {
    left: -9px;
}

.jbm-timeline-vertical-left .jbm-timeline-vertical-dot {
    left: -43px;
}

.jbm-timeline-vertical-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.jbm-timeline-vertical-item:hover .jbm-timeline-vertical-card {
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
    transform: translateX(5px);
}

.jbm-timeline-side-left:hover .jbm-timeline-vertical-card {
    transform: translateX(-5px);
}

.jbm-timeline-vertical-card .jbm-timeline-card-image {
    height: 140px;
}

/* ==========================================================================
   Mobile Responsive
   ========================================================================== */

@media (max-width: 768px) {
    .jbm-timeline-nav {
        width: 28px;
        font-size: 20px;
    }
    
    .jbm-timeline-card {
        width: 260px;
        min-width: 260px;
    }
    
    .jbm-timeline-card-image {
        height: 140px;
    }
    
    .jbm-timeline-card-body {
        padding: 16px;
    }
    
    .jbm-timeline-card-title {
        font-size: 15px;
    }
    
    .jbm-timeline-horizontal-alternating .jbm-timeline-items-row {
        min-height: auto;
        align-items: flex-start;
    }
    
    .jbm-timeline-horizontal-alternating .jbm-timeline-card {
        margin-top: 0 !important;
        margin-bottom: 50px !important;
        align-self: flex-start !important;
    }
    
    .jbm-timeline-horizontal-alternating .jbm-timeline-card:nth-child(even) .jbm-timeline-card-dot {
        top: auto;
        bottom: -40px;
    }
    
    .jbm-timeline-horizontal-alternating .jbm-timeline-card:nth-child(even) .jbm-timeline-card-connector {
        top: auto;
        bottom: -25px;
    }
    
    .jbm-timeline-horizontal-alternating .jbm-timeline-line {
        top: auto;
        bottom: 20px;
        transform: none;
    }
    
    /* Vertical becomes single column */
    .jbm-timeline-vertical-container::before {
        left: 25px;
        transform: none;
    }
    
    .jbm-timeline-vertical-item {
        width: calc(100% - 60px) !important;
        margin-left: 60px !important;
        margin-right: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    .jbm-timeline-vertical-dot {
        left: -43px !important;
        right: auto !important;
    }
    
    .jbm-timeline-vertical-connector {
        left: -30px !important;
        right: auto !important;
    }
}

@media (max-width: 480px) {
    .jbm-timeline-wrapper {
        margin: 15px 0;
    }
    
    .jbm-timeline-nav {
        width: 24px;
        font-size: 18px;
        opacity: 0.5;
    }
    
    .jbm-timeline-card {
        width: 240px;
        min-width: 240px;
    }
    
    .jbm-timeline-card-image {
        height: 120px;
    }
    
    .jbm-timeline-card-title {
        font-size: 14px;
    }
    
    .jbm-timeline-card-excerpt {
        font-size: 13px;
        -webkit-line-clamp: 2;
    }
    
    .jbm-timeline-items-row {
        gap: 16px;
        padding: 0 16px 50px;
    }
}
