body {
    font-family: 'Lato', 'Roboto', Arial, sans-serif;
    background-color: #f0f0f0;
    margin: 0;
    padding: 20px;
    color: #333;
}

h1 {
    text-align: center;
    color: #333;
}

/* Filter Container Styling */
.filter-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 auto; /* Center the filter container */
    max-width: 300px; /* Matches the competition card width */
    width: 100%;
    margin-bottom: 20px; /* Space between the filter and content below */
}

/* Toggle Button Styles */
.filter-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #007aff; /* Apple's signature blue color */
    color: white;
    padding: 8px 16px; /* Reduced padding for a more compact size */
    border: none;
    border-radius: 10px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s ease, padding 0.2s ease;
}

.filter-toggle:hover {
    background-color: #005bb5; /* Slightly darker blue on hover */
}

.filter-toggle.open {
    padding: 6px 12px; /* Further reduced padding when the dropdown is open */
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0; /* Flat bottom corners when open */
}

/* Dropdown Filter Styles */
.filter-dropdown {
    display: none; /* Hidden by default */
    background-color: #f9f9f9; /* Light background color */
    border: 1px solid #e0e0e0;
    border-radius: 0 0 12px 12px; /* Rounded bottom corners */
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
    padding: 12px;
    width: 100%;
    max-width: 600px; /* Ensures dropdown width matches design */
}

/* Dropdown visible when the toggle is active */
.filter-dropdown.show {
    display: block;
}

/* Filter Group Styles */
.filter-group {
    display: flex;
    align-items: center;
    margin: 8px 0;
    width: 100%;
}

.filter-group.curated-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    margin: 8px 0;
}

.filter-checkbox {
    margin-right: 8px;
    flex-shrink: 0;
}

.filter-label {
    flex: 1;
}

.filter-label.curated-label {
    display: inline;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
}

/* Styling for filter labels and inputs */
.filter-label {
    flex: 1; /* Ensures labels take up appropriate space */
    font-size: 14px;
    color: #333; /* Dark text color for readability */
}

.filter-select {
    flex: 2; /* Inputs take slightly more space than labels */
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #ffffff; /* White background for dropdowns */
}

/* Responsive Design for Smaller Screens */
@media (max-width: 768px) {
    .filter-group {
        flex-direction: column;
        align-items: flex-start;
    }

    .filter-group.curated-filter {
        flex-direction: row;
        align-items: center;
    }

    .filter-select {
        width: 100%;
    }
}

/* Smooth Fade Animation (if needed) */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}


@media (max-width: 480px) {
    .filter-container {
        align-items: center;
    }

    .filter-dropdown {
        width: 100%;
    }
}

.competition-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

/* .competition-card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 20px;
    width: 300px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.competition-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s, box-shadow 0.2s;
}
*/

.competition-card {
    background-color: white;
    border-radius: 16px; /* More pronounced rounded corners */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); /* Softer shadow */
    padding: 20px;
    width: 300px;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.competition-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); /* More natural hover shadow */
}

/* Competition Header with Larger Logo */
.competition-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 10px;
    gap: 15px;
}

.competition-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.competition-title-wrapper {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    margin-bottom: 5px;
}

.competition-title {
    font-size: 18px;
    font-weight: bold;
    width: 100%;
}

.competition-logo {
    width: 60px; /* Increase the logo size */
    height: 60px; /* Increase height to match width for a larger display */
    border-radius: 8px; /* Optional rounded corners for a softer look */
    object-fit: contain; /* Ensure the logo scales correctly without distortion */
    flex-shrink: 0; /* Prevent the logo from shrinking on smaller screens */
    margin-right: 15px;
}

.competition-location {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 6px; /* Space between location and date */
    font-size: 12px;
    color: #666;
}

.competition-date {
    display: flex;
    align-items: flex-start;
    color: #666;
    font-size: 12px;
}

.competition-date .material-icons {
    font-size: 1.4em;
    margin-right: 4px;
    color: #888;
    margin-top: 1px;
}

.competition-date-text {
    display: inline-block;
    margin-top: 2px; // Adjust this value as needed
}

.flag-icon {
    width: 1.2em;
    height: 1.2em;
    border-radius: 2px; /* Slightly rounded corners */
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05); /* Very subtle border */
    background-color: transparent; /* Remove the background */
    display: inline-flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative; /* For pseudo-element positioning */
}

.flag-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.2); /* Slightly enlarge the flag image */
}

.curated {
    background-color: #e6f7e6;
    color: #28a745;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 12px;
    white-space: nowrap;
    align-self: flex-start;
}

.competition-details {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.competition-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 10px;
}

competition-info {
    flex-grow: 1;
}

.competition-location {
    display: flex;
    align-items: center;
    gap: 5px;
}

/*
.label {
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 12px;
}

.label {
    font-weight: 500;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}
*/

.label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 10px;
    font-weight: 500;
    background-color: #f0f0f0; /* Light gray for all labels */
    color: #555; /* Consistent text color */
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.label .material-icons {
    font-size: 16px; /* Adjust as needed */
}

.label-Offline {
    background-color: #fff3e0;
    color: #ff9800;
}

.label-Online {
    background-color: #e8f5e9;
    color: #4caf50;
}

.label-language {
    background-color: #f3e5f5;
    color: #9c27b0;
}

/* .label-grades {
    background-color: #fff9c4;
    color: #fbc02d;
}
*/
.label-grades {
    background-color: #e3f2fd; /* Light blue background */
    color: #1976d2; /* Soft blue text */
}

.register-container {
    margin-top: auto;
    padding-top: 10px;
}

/*.register-btn {
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    width: auto;
    display: inline-block;
}
    
.register-btn {
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 50px;
    padding: 10px 20px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.register-btn:hover {
    background-color: #0056b3;
}

*/

.register-btn {
    background: linear-gradient(to bottom right, #007bff, #0056b3); /* Subtle gradient */
    color: white;
    border: none;
    border-radius: 22px; /* Rounded button shape */
    padding: 10px 20px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.1s ease;
}

.register-btn:hover {
    background: linear-gradient(to bottom right, #0056b3, #003f7f); /* Darker gradient on hover */
    transform: scale(1.02); /* Slightly enlarge on hover */
}


.show-more {
    background: none;
    border: none;
    color: #666; /* Black color */
    font-size: 13px;
    cursor: pointer;
    padding: 5px 0;
    margin-top: 10px;
    display: flex;
    align-items: center;
    text-align: left;
    width: 100%;
}

.show-more:hover {
    text-decoration: underline;
}

.show-more-icon {
    margin-right: 5px;
    transition: transform 0.3s ease;
}

.show-more-text {
    font-weight: 500; /* Make the text slightly bolder */
}

/* Rotate the icon when the additional info is shown */
.show-more.active .show-more-icon {
    transform: rotate(180deg);
}

.additional-info {
    display: none;
    margin-top: 10px;
    font-size: 14px;
    color: #666;
    border-top: 1px solid #eee;
    padding-top: 10px;
}

.additional-info h3 {
    font-size: 16px;
    margin: 10px 0 5px;
    color: #333;
}

/* Smaller gap within fields for line breaks */
.small-gap {
    display: block;
    height: 7px; /* Adjust this value to control the gap size within a field */
}

.additional-info p {
    margin: 10px 0; /* Space between different fields */
}

.additional-info br + br {
    margin: 0; /* Reset margin between two consecutive <br> tags */
}


.prerequisites-list {
    padding-left: 20px;
    margin: 5px 0;
    line-height: 1.2;
}

@media (min-width: 1200px) {
    .competition-list {
        flex-direction: column;
        align-items: center;
    }

    .competition-card {
        width: 100%;
        max-width: 800px;
    }
}
/*
@media (max-width: 480px) {
    .competition-card {
        width: 100%;
    }

    .competition-header {
        flex-direction: column;
    }

    .curated {
        margin-top: 5px;
    }
}

@media (max-width: 480px) {
    .filters {
        display: block;
        text-align: center;
    }
}
*/
@media (max-width: 480px) {
    .competition-card {
        width: 95%;
    }

    .filters {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .competition-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .competition-logo {
        align-self: flex-start;
        margin-bottom: 10px;
    }

    .competition-title-wrapper {
        flex-direction: column;
        align-items: flex-start;
    }

    .curated {
        margin-bottom: 5px;
    }
}

















