/**
 * Klartextmedia Events Module - Frontend Styles
 */

/* Common Styles */
.klartextmedia-events-widget {
    max-width: 1280px;
    margin: 0 auto 30px;
    padding: 0 20px;
}
.klartextmedia-events-widget .events-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 30px;
    color: #333;
}
.klartextmedia-events-widget .no-events {
    color: #666;
    font-style: italic;
}

/* List View */
.events-list .events-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}
.events-list .event-item {
    padding: 30px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}
.events-list .event-item:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.events-list .event-field {
    margin-bottom: 15px;
}
.events-list .event-field:last-child {
    margin-bottom: 0;
}
.events-list .field-label {
    font-weight: 600;
    color: #666;
    margin-right: 5px;
}
.events-list .event-image {
    margin-bottom: 15px;
}
.events-list .event-image img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}
.events-list .event-description .field-content {
    line-height: 1.6;
}
.events-list .event-description .field-content p {
    margin-bottom: 10px;
}
.events-list .event-location {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 4px;
}
.events-list .event-location .location-details p {
    margin-bottom: 5px;
}
.events-list .event-location .location-details p:last-child {
    margin-bottom: 0;
}
.events-list .event-location .location-map-link a {
    display: inline-block;
    margin-top: 10px;
    color: #0066cc;
    text-decoration: underline;
}
.events-list .event-location .location-map-link a:hover {
    text-decoration: none;
}
.events-list .event-date-field,
.events-list .event-text-field {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
}

/* Custom Template: remove default event-item styling */
.events-list .events-custom-template .event-item {
    padding: 0;
    background: none;
    border: none;
    border-radius: 0;
}
.events-list .events-custom-template .event-item:hover {
    box-shadow: none;
}

/* Grid View */
.events-grid .events-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}
.events-grid .event-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}
.events-grid .event-card:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.events-grid .event-card-image {
    aspect-ratio: 16/9;
    overflow: hidden;
}
.events-grid .event-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.events-grid .event-card-content {
    padding: 15px;
}
.events-grid .event-card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}
.events-grid .event-card-date,
.events-grid .event-card-location {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}
.events-grid .event-card-description {
    font-size: 14px;
    line-height: 1.5;
    color: #666;
    margin-top: 10px;
}

/* Compact List View */
.events-compact .events-compact-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.events-compact .event-compact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
}
.events-compact .event-compact-item:last-child {
    border-bottom: none;
}
.events-compact .event-date {
    flex-shrink: 0;
    font-weight: 600;
    color: #333;
    min-width: 100px;
}
.events-compact .event-title {
    flex-grow: 1;
    color: #333;
}
.events-compact .event-location {
    flex-shrink: 0;
    font-size: 14px;
    color: #666;
}

/* Responsive */
@media (max-width: 768px) {
    .events-grid .events-grid-container {
        grid-template-columns: 1fr;
    }
    .events-compact .event-compact-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}
