html, body {
    overflow-x: hidden;
    max-width: 100%;
}

.container {
    overflow-x: hidden;
}

.row {
    margin-left: 0;
    margin-right: 0;
    max-width: 100%;
}

/* Ensure columns don't overflow */
.col, .col-md-6, .col-md-2, .col-lg-3, [class*="col-"] {
    padding-left: 10px;
    padding-right: 10px;
    min-width: 0; /* Prevents flex items from overflowing */
}

.event-card {
    height: 100%;
    margin-bottom: 20px;
    border-radius: 15px;
    border: none; /* Remove default border */
    box-shadow: none; /* No shadow initially */
    transition: box-shadow 0.3s ease; /* Only animate shadow */
    background-color: #fff; /* Ensure background is solid */
    position: relative;
    overflow: hidden;
}

.event-card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15); /* More visible shadow */
}

.card-img-top {
    height: 200px;
    object-fit: cover;
}

.card.event-card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15) !important;
     position: relative;
}

.card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    position: relative;
}

.filter {
    height: 40px;
    border: 1px solid rgb(116, 116, 116);
}

.btn-isqgreen:focus {
    border-color: #D65F00;
    text-decoration: none;
    border: 2px solid #D65F00;
    border-radius: 4px;
    opacity: 0.8;
    z-index: 100;
    box-shadow: none !important; /* prevent Bootstrap focus glow */
}

.event-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #D65F00;
}

.info-item {
    margin-bottom: 8px;
}
.info-label {
    font-weight: 600;
    color: #6c757d;
}
.description-content {
    max-height: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
}

.hidden {
    display: none !important;
}

.body {
    font-family: 'Roboto', sans-serif;
    color: rgb(57, 54, 79);
}

#eventCategoryNav {
    background-color: white !important;
    border: 0px solid transparent !important;
}
.nav-item .nav-link {
    border-radius: 0;
    font-weight: 500;
    color: #444 !important;
}

.nav-item .nav-link:hover {
    color: #000 !important;
    border-color: transparent;
}

.nav-item .nav-link.active {
    color: rgb(214, 95, 0) !important;
    background-color: transparent !important;
    border-bottom: 2px solid rgb(214, 95, 0) !important;
    border-color: transparent;
}

.nav-item .nav-link:focus,
.nav-item .nav-link:active {
    outline: none;
    box-shadow: none;
    border-color: transparent;
}

.search-container {
    display: flex;
    margin-bottom: 1.5rem;
    width: 100%;
}

.search-container .row {
    width: 100%;
}

#eventCardsContainer {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#event-list {
    width: 100%;
}

#event-skeletons {
    width: 100%;
}


/* Keep the nav left-aligned as it currently is */
#eventCategoryNav {
    background-color: white !important;
    border: 0px solid transparent !important;
    justify-content: flex-start; /* Explicitly keep left-aligned */
}

/* Optional: Center the no results message */
#noResultsMessage {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 768px) {
    
    .search-container .row {
        max-width: 100%;
        padding: 0 10px;
        justify-content: center;

    }
    #event-list {
        justify-content: center;
        max-width: 100%;
    }
    
    .row {
        margin-left: -5px;
        margin-right: -5px;
    }
    
    [class*="col-"] {
        padding-left: 5px;
        padding-right: 5px;
    }
    
    /* Ensure search input doesn't overflow */
    #eventSearch {
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* Make sure nav pills wrap properly */
    #eventCategoryNav {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .nav-item {
        margin-bottom: 5px;
    }
    
    /* Fix any potential image overflow */
    .card-img-top {
        height: 200px;
        object-fit: cover;
        max-width: 100%;
        width: 100%;
    }
    
    /* Ensure no element extends beyond viewport */
    * {
        max-width: 100%;
        box-sizing: border-box;
    }
}