/* GEM2GO Events Styles */

/* ===================================
   Event Listing Wrapper
   =================================== */
.gem2go-events-wrapper {
    margin: 0 auto;
    padding: 0;
}

/* ===================================
   Filters & Search
   =================================== */
.gem2go-search-input-wrapper .fa-search {
    z-index: 10;
}

.gem2go-search-input {
    border-radius: 0.5rem !important;
}

.gem2go-search-input:focus {
    box-shadow: none !important;
    background-color: rgba(0, 0, 0, 0.05) !important;
}

#gem2go-button-search {
    border-radius: 0.4rem !important;
}

.gem2go-category-filters .btn {
    border-radius: 0.5rem;
    padding: 12px 18px;
    font-size: 0.9rem;
    font-weight: 500;
    border-width: 2px;
    transition: all 0.2s ease-in-out;
}

/* UNIFIED COLOR SYSTEM (Applies to both Buttons and Badges) */
.cat-color-0 { border-color: #892323 !important; color: #892323 !important; }
.cat-color-0:hover, .cat-color-0.active, span.cat-color-0 { background-color: #892323 !important; color: #fff !important; }

.cat-color-1 { border-color: #FF500B !important; color: #FF500B !important; }
.cat-color-1:hover, .cat-color-1.active, span.cat-color-1 { background-color: #FF500B !important; color: #fff !important; }

.cat-color-2 { border-color: #EDB512 !important; color: #EDB512 !important; }
.cat-color-2:hover, .cat-color-2.active, span.cat-color-2 { background-color: #EDB512 !important; color: #fff !important; }

.cat-color-3 { border-color: #292929 !important; color: #292929 !important; }
.cat-color-3:hover, .cat-color-3.active, span.cat-color-3 { background-color: #292929 !important; color: #fff !important; }

.cat-color-4 { border-color: #7C7C7C !important; color: #7C7C7C !important; }
.cat-color-4:hover, .cat-color-4.active, span.cat-color-4 { background-color: #7C7C7C !important; color: #fff !important; }

.cat-color-5 { border-color: #A52A2A !important; color: #A52A2A !important; }
.cat-color-5:hover, .cat-color-5.active, span.cat-color-5 { background-color: #A52A2A !important; color: #fff !important; }

.cat-color-6 { border-color: #556B2F !important; color: #556B2F !important; }
.cat-color-6:hover, .cat-color-6.active, span.cat-color-6 { background-color: #556B2F !important; color: #fff !important; }

.cat-color-7 { border-color: #4682B4 !important; color: #4682B4 !important; }
.cat-color-7:hover, .cat-color-7.active, span.cat-color-7 { background-color: #4682B4 !important; color: #fff !important; }

/* Special Styling for the "All" button */
.gem2go-category-filters .btn-outline-dark {
    border-color: #292929 !important;
    color: #292929 !important;
}
.gem2go-category-filters .btn-outline-dark:hover,
.gem2go-category-filters .btn-dark.active {
    background-color: #292929 !important;
    color: #fff !important;
}

/* ===================================
   Loading & States
   =================================== */
#gem2go-browse-content-container {
    transition: min-height 0.3s ease-in-out;
}

#gem2go-browse-content-container.loading {
    overflow: hidden;
}

#gem2go-browse-content-container.loading .gem2go-events-grid,
#gem2go-browse-content-container.loading .gem2go-pagination {
    filter: blur(4px);
    transition: filter 0.3s ease;
}

#gem2go-browse-content-container.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.5);
    z-index: 5;
}

#gem2go-browse-content-container.loading::after {
    content: '\f110'; /* Font Awesome spinner icon */
    font-family: 'FontAwesome';
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: #212529;
    z-index: 6;
    animation: fa-spin 1s infinite linear;
}

@keyframes fa-spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ===================================
   Event Grid
   =================================== */
.gem2go-events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.gem2go-event-card {
    transition: transform 0.2s ease-in-out;
    display: flex;
}

.gem2go-event-card .card {
    display: flex;
    flex-direction: column;
    width: 100%;
    border: none !important;
}

.gem2go-event-card .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.gem2go-event-card .row {
    flex: 1;
}

.gem2go-event-card .col-8 {
    display: flex;
    flex-direction: column;
}

.gem2go-event-card .card-body .col-4 {
    padding:inherit;
}

.gem2go-event-card .btn-underline {
    margin-top: auto;
    width: fit-content;
    text-decoration: none;
    border-bottom: 2px solid #212529 !important;
    border-radius: 0 !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    font-size: 0.8rem !important;
}

.gem2go-event-card .btn-underline:hover {
    opacity: 0.7;
}

.gem2go-event-card:hover {
    transform: translateY(-5px);
}

.gem2go-event-image-wrap {
    height: 240px;
    border-radius: 0.8rem;
    overflow: hidden;
}

.gem2go-event-img {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
}

.gem2go-event-card:hover .gem2go-event-img {
    transform: scale(1.05);
}

/* Date Column & Box */
.gem2go-event-date-box {
    background-color: #292929;
    color: #fff;
    padding: 1.5rem 1rem;
    border-radius: 12px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100%;
}

.gem2go-event-date-day {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.2rem;
}

.gem2go-event-date-month,
.gem2go-event-date-year {
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.2;
}

.gem2go-event-date-year {
    margin-top: 0.2rem;
}

/* Category Badges in Cards & Single Page */
.gem2go-category-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    padding: 0.3rem 1rem;
    border-radius: 2rem;
    margin-right: 8px;
    margin-bottom: 8px;
    border-style: solid;
    border-width: 1px;
}

.card-title {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.75rem;
}

.card-title a:hover {
    color: #000 !important;
    opacity: 0.7;
}

/* ===================================
   Pagination
   =================================== */
.gem2go-pagination {
    margin-top: 4rem;
}

.maultasch-pagination .pagination {
    border: 1px solid #292929;
    border-radius: 14px;
    padding: 1.75rem 2rem;
    gap: 0.75rem;
    background: #fff;
    justify-content: center;
    align-items: center;
    display: flex;
    list-style: none;
    margin: 0;
}

.maultasch-pagination .page-item {
    display: flex;
    align-items: center;
}

.maultasch-pagination .page-item.disabled .page-link {
    opacity: 0.4;
    pointer-events: none;
}

.maultasch-pagination .page-item.active .page-link {
    background: rgba(124, 124, 124, 0.1);
    font-weight: 600;
}

.maultasch-pagination .page-link {
    border: none;
    background: transparent;
    color: #000;
    font-weight: 500;
    padding: 0.5rem 0.9rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.maultasch-pagination .page-link:hover {
    background: rgba(124, 124, 124, 0.1);
}

.maultasch-pagination .page-item:first-child .page-link,
.maultasch-pagination .page-item:last-child .page-link {
    font-weight: 600;
    color: #292929;
}

.maultasch-pagination .page-item:first-child .page-link:hover,
.maultasch-pagination .page-item:last-child .page-link:hover {
    background: transparent;
    color: #892323;
}

/* ===================================
   Single Event Page
   =================================== */
.gem2go-single-event-article .entry-title {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.1;
    color: #292929;
}

.single-page-date {
    min-width: 140px;
    padding: 1rem 1.5rem !important;
    flex-direction: row !important;
    text-align: left !important;
}

.single-page-date .gem2go-event-date-day {
    font-size: 3rem;
    margin-bottom: 0;
    line-height: 1;
}

.single-page-date .gem2go-event-date-month,
.single-page-date .gem2go-event-date-year {
    font-size: 1rem;
    text-align: left;
}

.gem2go-single-event-article .gem2go-event-description {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #444;
}

.gem2go-single-event-article .btn-underline {
    text-decoration: none;
    border-bottom: 2px solid #212529 !important;
    border-radius: 0 !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    font-size: 0.8rem !important;
}

.gem2go-single-event-article .btn-underline:hover {
    opacity: 0.7;
}

.portrait-image-container {
    position: relative;
    display: block;
    width: 100%;
    padding-top: 56.25%;
    background-color: #f0f0f0;
}

.portrait-image-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: var(--bg-image-url);
    background-size: cover;
    background-position: center;
    filter: blur(20px);
    transform: scale(1.1);
    z-index: 1;
}

.portrait-image-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    z-index: 2;
}

.social-share-footer a {
    font-size: 1.2rem;
    transition: opacity 0.2s;
}

.social-share-footer a:hover {
    opacity: 0.7;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .gem2go-events-grid {
        grid-template-columns: 1fr;
    }
    .gem2go-single-event-article .entry-title {
        font-size: 2.2rem;
    }
    .single-page-date {
        min-width: 120px;
        align-self: flex-start;
    }
}
