* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #423174;
    --accent-color: #ff7a08;
    --table-hover: #f1c8a4;
    --offwhite: #f7f8fb;
    --white: #ffffff;
    --black: #000000;
}

body {
    font-family: "Segoe UI", sans-serif;
    background: linear-gradient(180deg, var(--offwhite) 0%, var(--white) 100%);
    color: var(--black);
    padding: 28px 18px;
}


/* ------------------ Main ------------------ */
.pageContent {
    max-width: 1600px;
    margin: 0 auto;
}

.title {
    color: var(--primary-color);
    font-size: 28px;
    text-align: center;
}

.titleColor {
    color: var(--accent-color);
}

.subTitle {
    color: #555555;
    text-align: center;
    margin-bottom: 22px;
}


/* ------------------ Filtering ------------------ */
#filterSection {
    max-width: 1200px;
    margin: 0 auto;
}

.card {
    background-color: var(--white);
    box-shadow: 0 6px 18px #4231740f;
    border-radius: 10px;
    width: 100%;
    padding: 14px 18px;
}

.filterCard {
    display: grid;
    grid-template-columns: auto auto auto;
    justify-content: space-between;
    align-items: end;
    padding: 18px 22px 20px;
    margin-bottom: 20px;
}

.cardHeader {
    display: contents;
}

.cardHeader h3, .filterGroup h3 {
    color: var(--primary-color);
    font-size: 16px;
    margin: 0 0 12px 0;
}

.cardContent h3 {
    display: none;
}

.filterGroup {
    display: grid;
    justify-items: start;
    column-gap: 14px;
    row-gap: 8px;
}

.filterGroup {
    grid-template-columns: repeat(3, max-content);
}

.filter {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter label {
    margin-left: 5px;
}

select {
    background-color: var(--white);
    border: 1px solid #e6e6e9;
    border-radius: 8px;
    box-sizing: border-box;

    font-size: 15px;
    height: 44px;
    padding: 9px 10px;
}

.filter select {
    min-width: 150px;
}

#countryFilter {
    min-width: 200px;
}

.sortColumn {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 14px;
}

.sortButton {
    display: inline-flex;
    justify-content: center;
    align-items: center;

    background: linear-gradient(90deg, var(--accent-color), #ff9b4a);
    color: var(--primary-color);
    box-shadow: 0 6px 18px #ff7a081f;
    border: none;
    border-radius: 8px;

    font-size: 15px;
    font-weight: 700;
    height: 44px;
    padding: 0 26px;
    cursor: pointer;
}


/* ------------------ Table ------------------ */
.tableWrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
    padding: 6px;
}

table {
    background-color: var(--white);
    border: 1px solid #ff9b4a;
    border-collapse: separate;
    border-radius: 8px;
    border-spacing: 0;

    min-width: 100%;
    width: max-content;
    margin-bottom: 40px;

    overflow: hidden;
}

.tableContent {
    text-align: center;
}

.address {
    text-align: left;
    padding: 5px 10px;
}

.capital {
    text-transform: capitalize;
}

th {
    background: linear-gradient(180deg, var(--accent-color), #ff9b4a);
    color: var(--primary-color);
    font-weight: 700;
    width: 50px;
    padding: 12px 0;
}

tr:nth-child(odd) td {
    background-color: var(--white);
}

tr:nth-child(even) td {
    background-color: #f3f3f3;
}

tr:hover td {
    background-color: #ffe7d2;
}


/* ------------------ Responsiveness ------------------ */
@media (max-width: 900px) {
    .cardHeader {
        display: none;
    }

    .cardContent h3 {
        display: block;
        color: var(--primary-color);
        font-size: 16px;
        margin: 0 0 12px 0;
    }

    .filterCard {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 18px;
    }

    .filterGroup {
        grid-template-columns: 1fr;
    }

    .sortColumn {
        flex-direction: column;
        align-items: flex-start;
    }

    .sortButton {
        width: 100%;
        margin-top: 8px;
    }
}

@media (min-width: 700px) {
    select {
        width: 160px;
    }
}

@media (max-width: 560px) {
    .title {
        font-size: 20px;
    }
    
    .filterCard div, #sorter, #order {
        width: 100%;
    }
    
    th, td {
        padding: 10px;
    }
}