/* Container & Base Styles */

.em-event-wrapper {
    max-width: 1200px;
    margin: 40px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #333;
    background-color: #fcfcfd;
    padding: 20px;
}


/* Header Section */

.em-header-section {
    text-align: center;
    margin-bottom: 40px;
}

.em-subtitle {
    color: #4F46E5;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.em-title {
    font-size: 36px;
    font-weight: 800;
    color: #111827;
    margin: 10px 0;
    line-height: 1.3em;
}

.em-desc {
    color: #6B7280;
    font-size: 16px;
    line-height: 1.4em;
    max-width: 600px;
    margin: 0 auto;
}


/* Filter Bar */

.em-filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    padding: 15px 25px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02), 0 10px 15px rgba(0, 0, 0, 0.03);
    margin-bottom: 30px;
    border: 1px solid #f3f4f6;
    flex-wrap: wrap;
}

.em-filter-left {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.em-filter-left label {
    font-weight: 600;
    color: #111827;
    font-size: 15px;
}

.em-select-wrapper select {
    appearance: none;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    padding: 10px 40px 10px 15px;
    border-radius: 6px;
    font-size: 14px;
    color: #374151;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236B7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
}

.em-clear-btn {
    background: transparent;
    border: none;
    color: #4F46E5;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.2s;
}

.em-clear-btn:hover {
    color: #3730A3;
}


/* Flexbox Container */

.em-event-flex-container {
    display: flex;
    flex-wrap: wrap;
    /* Allows items to wrap to the next line */
    gap: 30px;
    /* Space between cards */
    transition: opacity 0.3s ease;
}


/* Event Card - Base (Mobile) */

.em-event-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid #f3f4f6;
    /* On mobile, cards take up 100% of the row */
    width: 100%;
}


/* Tablet */

@media (min-width: 768px) {
    .em-event-card {
        width: calc(50% - 15px);
    }
}


/* Desktop */

@media (min-width: 1024px) {
    .em-event-card {
        width: calc(33.333% - 20px);
    }
}


/* Event Card */

.em-event-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid #f3f4f6;
}

.em-event-image {
    height: 180px;
    width: 100%;
    background: #e5e7eb;
}

.em-event-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}


/* Card Body with Date Split */

.em-card-body {
    display: flex;
    padding: 20px;
    flex-grow: 1;
    gap: 20px;
    align-items: flex-start
}

.em-date-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    /*padding-right: 20px;*/
    /*margin-right: 20px;*/
    padding: 10px;
    border-radius: 10px;
    background-color: #f7f2f2;
}

.em-day {
    font-size: 28px;
    font-weight: 800;
    color: #111827;
    line-height: 1;
}

.em-month {
    font-size: 13px;
    font-weight: 700;
    color: #4F46E5;
    margin-top: 5px;
}

.em-year {
    font-size: 13px;
    font-weight: 600;
    color: #9CA3AF;
}


/* Card Content */

.em-event-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 100%;
}

.em-event-content h3 {
    /*margin: 0 0 10px 0;*/
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    line-height: 1.3;
}

.em-meta {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #6B7280;
    /*margin-bottom: 12px;*/
}

.em-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    color: #6B7280;
    transition: color 0.2s;
}

a.em-quick-filter {
    min-width: fit-content;
}

.em-meta a.em-quick-filter:hover {
    color: #4F46E5;
    /* Highlights purple on hover */
    text-decoration: underline;
}

.em-meta span svg,
.em-refresh-icon svg {
    max-width: 20px;
    width: 100%;
    height: auto;
}


/* CSS icons for Loc/User */

.em-icon-loc::before {
    content: "📍 ";
    font-size: 12px;
}

.em-icon-user::before {
    content: "👤 ";
    font-size: 12px;
}

.em-excerpt,
.em-excerpt p {
    font-size: 14px;
    color: #4B5563;
    line-height: 1.5;
    margin-bottom: 0;
    /*margin-bottom: 20px;*/
    flex-grow: 1;
}


/* Buttons */

.em-register-btn {
    display: inline-block;
    background-color: #4F46E5;
    color: #fff;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    text-align: center;
    align-self: flex-start;
    transition: background 0.2s;
    border: none;
}

.em-register-btn:hover {
    background-color: #4338CA;
    color: #fff;
}


/* Pagination */

.em-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}

.em-page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid #E5E7EB;
    background: #fff;
    color: #374151;
    font-weight: 600;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s;
}

.em-page-link:hover {
    background: #F3F4F6;
}

.em-page-link.active {
    background: #4F46E5;
    color: #fff;
    border-color: #4F46E5;
}


/* Single Page Details Box */

.em-single-details-box {
    background: #F9FAFB;
    padding: 30px;
    border-radius: 12px;
    margin-top: 40px;
    border: 1px solid #E5E7EB;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.em-single-details-box h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 22px;
    color: #111827;
}

.em-single-details-box ul {
    list-style-type: none;
    padding-left: 0;
    margin-bottom: 25px;
    font-size: 16px;
    color: #374151;
    line-height: 2;
}

.em-single-details-box ul li strong {
    color: #111827;
    margin-right: 8px;
}