/* Container styling for consistent alignment */
.filter-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
}


/* Dropdown styling */
.filter-container .custom-select {
    flex: 1 1 15rem;
    height: 40px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    background-color: #00c0f3;
    color: #fff;
    border: 1px solid #00a8d1;
    text-align: left;
    padding-left: 8px;
} 

/* Dropdown options styling */
.custom-select option {
    background-color: #00c0f3;
    color: #333;
}

/* Button group styling */
.button-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
    width: auto;
}

.button-group .btn {
    background-color: #00c0f3;
    color: #fff;
    border-color: #00c0f3;
    font-size: 1rem;
    font-weight: 500;
    height: 42px;
    min-width: 6rem;
    max-width: 8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    transition: background-color 0.3s, border-color 0.3s;
    border: 1px solid #00a8d1;
}

.button-group .btn:hover {
    background-color: #003b70;
    border-color: #005da4;
}

/* Responsive adjustments */
@media (min-width: 1024px) {
    .filter-container {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr auto;
        /* Three equal columns for dropdowns, and one for button group */
        gap: 8px;
        width: 100%;
    }

    .filter-container .custom-select {
        width: 100% +1rem;
        /* Ensures full width of grid cell */
        height: 40px;
        box-sizing: border-box;
        display: flex;
        align-items: center;
        background-color: #00c0f3;
        color: #fff;
        border: 1px solid #00a8d1;
        padding-left: 8px;
    }

    .button-group {
        display: flex;
        gap: 8px;
        justify-content: flex-start;
        align-items: center;
        width: 100%;
    }

    .button-group .btn {
        flex: 1;
        /* Equal space for each button */
        background-color: #1a6fb8;
        color: #fff;
        border-color: #003b70;
        font-size: 1rem;
        font-weight: 500;
        height: 42px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 5px;
        transition: background-color 0.3s, border-color 0.3s;
        border: 1px solid #1a6fb8;
    }
}



@media (max-width: 1023px) and (min-width: 769px) {
    .filter-container {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto;
        /* Adjust to two rows */
        gap: 8px;
    }

    .filter-container #selector-valid_year {
        grid-column: 1 / 2;
        grid-row: 1;
        width: 100%;
    }

    .filter-container #selector-ciclo {
        grid-column: 2 / 3;
        grid-row: 1;
        width: 100%;
        max-width: 100%;
    }

    .filter-container #selector-carrera {
        grid-column: 1 / 2;
        grid-row: 2;
        width: 100%;
        max-width: 100%;
    }

    .button-group .btn {
        background-color: #005da4;

    }


    .button-group {
        border-color: #003b70;
        grid-column: 2 / 3;
        grid-row: 2;
        /* Move buttons to the second row, next to "Carrera" */
        display: flex;
        justify-content: flex-start;
        gap: 8px;
        width: 100%;
        max-width: 100%;

    }
}

@media (max-width: 768px) {
    .filter-container {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-container .custom-select {
        width: 100%;
        max-width: 100%;
    }

    .button-group .btn {
        background-color: #1a6fb8;
        color: #fff;
        border-color: #003b70;
        width: auto;
        min-width: 10rem;
        max-width: 15rem;
        margin: 5px auto;
    }
}

/* Pagination styling */
.pager-container {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.pager-container .page-numbers {
    background-color: #00c0f3;
    color: #fff;
    border: 1px solid #00a8d1;
    padding: 8px 12px;
    margin: 0 5px;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.3s, color 0.3s;
    font-size: 1rem;
    font-weight: 500;
}

.pager-container .page-numbers:hover {
    background-color: #005da4;
    color: #fff;
    border-color: #005da4;
}

.pager-container .current {
    background-color: #00c0f3;
    color: #fff;
    font-weight: bold;
    cursor: default;
}