/*formatting of the date*/
.folkagenda-date {
    font-weight: bold;
    font-size: 1.1em;
    cursor: pointer;
}

/*formatting of the title*/
.folkagenda-title {
    font-weight: bold;
    font-size: 1.6em;
    cursor: pointer;
}


/*formatting of the description*/
.folkagenda-description {
    padding-top: 20px;
    padding-bottom: 20px;
    cursor: pointer;
}


/*the wrapper for the image, inside the container.*/
/*this enables giving the image certain proportions*/
.folkagenda-image-wrapper {
    padding-top: 75%;
    display: block;
    position: relative;
    max-width: 100%;
}


/*the image itself*/
.folkagenda-img {

    cursor: pointer;
    position: absolute;
    height: 100%;
    width: 100%;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    object-fit: cover;
}


.folkagenda-btn-div {
    margin-bottom: 25px;
}

.folkagenda-button {
    padding: 10px;
    border-radius: 5px;
    color: white;
    text-decoration: none;
    font-weight: bold;
    cursor: pointer;
}

.folkagenda-button-tickets {
    background-color: #7daf37;
}


.folkagenda-button-info {
    background-color: #376faf;
}


.folkagenda-row {
    border-bottom: thin solid #e8e8e8;
    margin-bottom: 25px;
    padding-bottom: 25px;
}


.folkagenda-3 {
    text-align: right;
}


/*some media queries to change the look for different screen sizes*/
@media screen and (min-width: 1200px) {
    .folkagenda-row {
        display: grid;
        grid-template-columns: repeat(12, 1fr);
        grid-template-rows: 1fr;
        grid-column-gap: 0px;
        grid-row-gap: 0px;
        grid-auto-rows: max-content;
    }


    .folkagenda-1 {
        grid-area: 1 / 1 / 2 / 4;
    }


    .folkagenda-2 {
        grid-area: 1 / 4 / 2 / 11;
        padding-left: 25px;
    }


    .folkagenda-3 {
        grid-area: 1 / 11 / 2 / 13;
    }
}


/*some media queries to change the look for different screen sizes*/
@media screen and (max-width: 1200px) {
    .folkagenda-row {
        display: grid;
        grid-template-columns: repeat(12, 1fr);
        /*grid-template-rows: repeat(2, 1fr);*/
        grid-column-gap: 0px;
        grid-row-gap: 0px;
        grid-auto-rows: max-content;
    }


    .folkagenda-1 {
        grid-area: 1 / 1 / 2 / 13;
        padding-bottom: 25px;
    }


    .folkagenda-2 {
        grid-area: 2 / 1 / 3 / 10;
    }


    .folkagenda-3 {
        grid-area: 2 / 10 / 3 / 13;
    }
}

@media screen and (max-width: 400px) {
    .folkagenda-row {
        grid-template-columns: repeat(12, 1fr);
        grid-row-gap: 15px;
        border-bottom: transparent;
    }

    .folkagenda-1 {
        grid-area: 1 / 1 / 2 / 13; /* Full width */
    }

    .folkagenda-2 {
        grid-area: 2 / 1 / 3 / 13; /* Full width */
    }

    .folkagenda-3 {
        grid-area: 3 / 1 / 4 / 13; /* Move to full width below the first two columns */
        display: flex;
        flex-direction: row-reverse;
        justify-content: space-between; /* This aligns the buttons to the left and right */
        border-top: thin solid #f3f3f3;
        border-bottom: thin solid #e8e8e8;
        padding-top: 25px;
    }

    .folkagenda-btn-div {
        flex: 1; /* Ensure both divs take equal width */

    }

    .folkagenda-btn-div:first-child {
        /*ticket button*/
    }

    .folkagenda-btn-div:last-child {
        /*info button*/
        text-align: left; /* Align the second button to the right */
    }
}

/*this hides or shows the agenda title. Don't touch*/
.show-agenda- {
    display: none;
}

/*FILTER SECTION*//* Filter toggle button styling */
.fold-btn {
    background-color: #7daf37;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    margin-bottom: 15px;
    transition: background-color 0.3s;
}

.fold-btn:hover {
    background-color: #68992c;
}

/* Hidden class to toggle filter visibility */
.hidden {
    display: none;
}

/* Filter section container */
#filter-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 equal-width columns for large screens */
    grid-gap: 15px; /* Gap between filter inputs */
    margin-bottom: 20px;
}

/* Filter inputs: search-wide to span two columns */
#search-filter.search-wide {
    grid-column: span 2; /* Search field spans 2 columns */
}

/* Responsive layout for smaller screens */
@media (max-width: 768px) {
    #filter-section {
        grid-template-columns: 1fr; /* Single column layout for small screens */
    }

    #search-filter.search-wide {
        grid-column: span 1; /* Search spans 1 column in smaller view */
    }

    .filter-row input,
    .filter-row select,
    .filter-row button {
        width: 100%; /* Input fields take full width on mobile */
    }

    .filter-row button {
        width: 100%; /* Buttons take full width */
    }
}

/* Filter Inputs and Buttons Styling */
#filter-section input[type="text"],
#filter-section input[type="date"],
#filter-section select {
    /*width: 100%;*/
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    background-color: #fff;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
    transition: border-color 0.2s, box-shadow 0.2s;
}

/* Focus state for inputs */
#filter-section input[type="text"]:focus,
#filter-section input[type="date"]:focus,
#filter-section select:focus {
    border-color: #7daf37;
    box-shadow: 0 0 0 2px rgba(125, 175, 55, 0.3);
    outline: none;
}

/* Filter and Reset buttons */
#filter-events,
#reset-filters {
    width: 100%;
    padding: 10px;
    background-color: #7daf37; /* Green color for the main buttons */
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

/* Hover state for Filter and Reset buttons */
#filter-events:hover,
#reset-filters:hover {
    background-color: #68992c;
}

/* Special filter buttons for Today, Tomorrow, This Weekend */
button.special-filter-btn {
    display: block;
    width: 100%;
    padding: 10px;
    background-color: #376faf; /* Blue color for special buttons */
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

/* Hover state for special filter buttons */
button.special-filter-btn:hover {
    background-color: #2d5e91;
}


#filter-wrapper {
    transition: max-height 1s ease-out;
    max-height: 0;
    overflow: hidden;
}


/* Filter section container */
#filter-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 columns for large screens */
    grid-gap: 15px; /* Gap between columns */
    margin-bottom: 20px; /* Bottom margin for spacing */

}

/* Each row uses the full grid layout */
.filter-row {
    display: contents;
}

/* Search field spanning 2 columns */
#search-filter.search-wide {
    grid-column: span 2;
}

/* Buttons in the third row */
button.special-filter-btn {
    display: block;
    width: 100%;
    padding: 10px;
    background-color: #376faf; /* Blue color for special buttons */
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}


.inline_info {
    padding-bottom:20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 1s ease,  opacity 0.3s ease 0.1s;
    opacity: 0;
}

.inline_info_show {

    max-height: 500px; /* Adjust to fit your content */
    opacity: 1;
}

/* Hover state for special buttons */
button.special-filter-btn:hover {
    background-color: #2d5e91;
}

/* Reset and Filter buttons */
#filter-events {
    width: 100%;
    padding: 10px;
    background-color: #7daf37; /* Green color for the main buttons */
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

#reset-filters {
    width: 100%;
    padding: 10px;
    background-color: transparent; /* Green color for the main buttons */
    color: #878787;
    border: thin solid #878787;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color, color 0.3s;

}

#reset-filters:hover {
    background-color: #bcbcbc;
    color: white;
}

/* Hover state for Reset and Filter buttons */
#filter-events:hover {
    background-color: #68992c;
}

/* Empty columns (for layout purposes) */
.filter-row div {
    width: 100%;
}

/* Input fields styling */
#filter-section input[type="text"],
#filter-section input[type="date"],
#filter-section select {
    /*width: 100%;*/
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    background-color: #fff;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
    transition: border-color 0.2s, box-shadow 0.2s;
}

/* Focus and hover state for inputs */
#filter-section input[type="text"]:focus,
#filter-section input[type="date"]:focus,
#filter-section select:focus {
    border-color: #7daf37;
    box-shadow: 0 0 0 2px rgba(125, 175, 55, 0.3);
    outline: none;
}

/* --- Responsive Design for Small Screens --- */
@media (max-width: 768px) {
    #filter-section {
        grid-template-columns: 1fr; /* Single column layout for small screens */
    }

    #search-filter.search-wide {
        grid-column: span 1; /* Search spans 1 column in smaller view */
    }

    .filter-row input,
    .filter-row select,
    .filter-row button {
        width: 100%; /* Input fields take full width on mobile */
    }

    .filter-row button {
        width: 100%; /* Buttons take full width */
    }
}


/* --- Pagination --- */
.folkagenda-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
    padding-top: 30px;
    border-top: thin solid #e8e8e8;
}

.folkagenda-pagination .pagination-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    color: #376faf;
    background-color: #fff;
    border: 1px solid #dce3ec;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
}

.folkagenda-pagination .pagination-button:hover {
    background-color: #376faf;
    border-color: #376faf;
    color: #fff;
}

.folkagenda-pagination .pagination-button:active {
    transform: translateY(1px);
}

.folkagenda-pagination .pagination-button.active {
    background-color: #7daf37;
    border-color: #7daf37;
    color: #fff;
    cursor: default;
    pointer-events: none;
}

.folkagenda-pagination .pagination-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 42px;
    color: #999;
    font-weight: 600;
}

@media (max-width: 480px) {
    .folkagenda-pagination {
        gap: 6px;
    }

    .folkagenda-pagination .pagination-button {
        min-width: 38px;
        height: 38px;
        padding: 0 10px;
        font-size: 13px;
    }
}