/* Just In Time: Events Toolkit Styles*/
.jit-ect-showcase { margin: 2em 0; }
.jit-ect-filter-controls { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; margin-bottom: 25px; padding: 15px; background: #f9f9f9; border-radius: 8px; }
.jit-ect-filter-group { display: flex; align-items: center; gap: 10px; }
.jit-ect-filter-label { font-weight: 600; color: #333; }
.jit-ect-filter-options { display: flex; list-style: none; margin: 0; padding: 0; gap: 5px; }
.jit-ect-filter-link { display: block; padding: 8px 15px; border-radius: 20px; text-decoration: none; color: #333; background-color: #e0e0e0; transition: all 0.3s ease; cursor: pointer; }
.jit-ect-filter-link:hover { background-color: #ccc; }
.jit-ect-filter-link.active { background-color: #005a9c; color: #fff; font-weight: 600; }

/* Calendar link styling */
.jit-ect-calendar-link { 
    display: inline-block; 
    padding: 10px 20px; 
    background: linear-gradient(135deg, #005a9c, #0074d9); 
    color: #fff !important; 
    text-decoration: none; 
    border-radius: 25px; 
    font-weight: 600; 
    transition: all 0.3s ease; 
    box-shadow: 0 3px 10px rgba(0,90,156,0.3);
}
.jit-ect-calendar-link:hover { 
    background: linear-gradient(135deg, #004080, #005a9c); 
    transform: translateY(-2px); 
    box-shadow: 0 5px 15px rgba(0,90,156,0.4);
    color: #fff;
}

.jit-ect-events-container .jit-ect-loader { text-align: center; padding: 50px; font-size: 1.2em; color: #666; display: flex; align-items: center; justify-content: center; gap: 10px; }
.jit-ect-spinner { width: 24px; height: 24px; border: 3px solid rgba(0,0,0,0.1); border-radius: 50%; border-top-color: #005a9c; animation: jit-ect-spin 1s linear infinite; }
@keyframes jit-ect-spin { to { transform: rotate(360deg); } }

/* Grid Layout - 3x3 Fixed */
.jit-ect-events-grid { 
    display: grid; 
    gap: 20px; 
}

.jit-ect-layout-grid { 
    grid-template-columns: repeat(3, 1fr); 
}

.jit-ect-layout-list { 
    grid-template-columns: 1fr; 
}

/* Event Card */
.jit-ect-event-card { 
    background: #fff; 
    border-radius: 8px; 
    box-shadow: 0 2px 8px rgba(0,0,0,0.06); 
    overflow: hidden; 
    transition: all 0.3s ease; 
    display: flex; 
    flex-direction: column;
    border: 1px solid transparent;
}

.jit-ect-layout-list .jit-ect-event-card { 
    flex-direction: row; 
    align-items: stretch; 
}

.jit-ect-event-card:hover { 
    border-color: #e5e7eb;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1); 
}

.jit-ect-card-link { 
    text-decoration: none; 
    color: inherit; 
    display: flex; 
    flex-direction: column; 
    height: 100%; 
}

.jit-ect-layout-list .jit-ect-card-link { 
    flex-direction: row; 
    width: 100%; 
}

/* Image and Category */
.jit-ect-card-image { 
    position: relative; 
    overflow: hidden; 
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.jit-ect-layout-grid .jit-ect-card-image { 
    height: 180px; 
}

.jit-ect-layout-list .jit-ect-card-image { 
    width: 240px; 
    flex-shrink: 0; 
}

.jit-ect-card-image img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    transition: transform 0.3s ease; 
}

.jit-ect-event-card:hover .jit-ect-card-image img { 
    transform: scale(1.02); 
}

.jit-ect-category-pill { 
    position: absolute; 
    top: 12px; 
    left: 12px; 
    background: #fbbf24; 
    color: #1f2937; 
    padding: 4px 10px; 
    border-radius: 12px; 
    font-size: 0.75em; 
    font-weight: 700; 
    text-transform: uppercase; 
    letter-spacing: 0.5px;
}

/* Card Content */
.jit-ect-card-content { 
    padding: 16px; 
    flex-grow: 1; 
    display: flex;
    flex-direction: column;
    gap: 8px; /* Vertical spacing between content blocks */
}

/* Header with Field and Title */
.jit-ect-card-header {
   
}

/* Event Field */
.jit-ect-field {
    font-size: 0.85em;
    color: #2563eb;
    font-weight: 600;
    margin-bottom: 2px;
}

/* Title */
.jit-ect-title { 
    font-size: 1.25em; 
    margin: 0; 
    color: #1f2937; 
    line-height: 1.3; 
    font-weight: 700;
}

/* Location Styling */
.jit-ect-location {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 1em;
    font-weight: 500;
    color: #374151; 
    margin-top: -4px; 
}

.jit-ect-location-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    color: #9ca3af;
}

/* Subtitle */
.jit-ect-subtitle {
    font-size: 0.9em;
    color: #6b7280;
    line-height: 1.4;
    margin: 0;
}

/* Date Container */
.jit-ect-date-container {
    /* No margin needed, flex gap handles it */
}

.jit-ect-date-main {
    font-size: 0.9em;
    font-weight: 600;
    color: #374151;
    line-height: 1.4;
}

/* Organizer Info */
.jit-ect-organizer-info {
    font-size: 0.85em;
    color: #9ca3af; /* Lighter gray for subtlety */
    font-style: italic;
}

/* Action Button */
.jit-ect-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto; /* Pushes to the bottom */
    padding-top: 8px;
    border-top: 1px solid #f3f4f6;
    font-size: 0.9em;
    color: #374151;
    font-weight: 500;
}

.jit-ect-arrow {
    width: 14px;
    height: 14px;
    transition: transform 0.2s ease;
    color: #9ca3af;
}

.jit-ect-event-card:hover .jit-ect-arrow {
    transform: translateX(2px);
    color: #374151;
}

/* Pagination */
.jit-ect-pagination { margin-top: 30px; text-align: center; }
.jit-ect-pagination .page-numbers { display: inline-block; padding: 8px 14px; margin: 0 3px; border-radius: 4px; background: #eee; text-decoration: none; color: #333; }
.jit-ect-pagination a.page-numbers:hover { background: #ddd; }
.jit-ect-pagination .page-numbers.current { background: #005a9c; color: #fff; font-weight: bold; }
.jit-ect-no-events { text-align: center; padding: 40px; background: #f9f9f9; border-radius: 8px; color: #666; }

/* Responsive Design */
@media (max-width: 1200px) {
    .jit-ect-layout-grid { 
        grid-template-columns: repeat(2, 1fr); 
    }
}

@media (max-width: 768px) {
    .jit-ect-filter-controls { 
        flex-direction: column; 
        align-items: stretch; 
        gap: 15px; 
    }
    .jit-ect-filter-group { 
        justify-content: center; 
        flex-wrap: wrap; 
    }
    .jit-ect-calendar-link { 
        text-align: center; 
        padding: 12px 16px; 
    }
    
    .jit-ect-layout-grid { 
        grid-template-columns: 1fr; 
    }
    
    .jit-ect-layout-list .jit-ect-event-card { 
        flex-direction: column; 
    }
    
    .jit-ect-layout-list .jit-ect-card-image { 
        width: 100%; 
        height: 160px; 
    }
}