body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: rgba(245, 245, 245, 0.9);
}

header {
    background-color: rgb(41, 44, 126); /* Brand book RGB color */
    color: white;
    padding: 10px 20px; /* Adjust padding to fit the smaller header */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    height: 75px; /* Maximum height of 75px */
}

header .header-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

header .logo {
    max-height: 60px; /* Ensure the logo fits within the header height */
    margin-right: 10px; /* Adjust margin to fit the smaller header */
}

header .header-content {
    display: flex;
    align-items: center;
    justify-content: center;
}

header .header-content h1 {
    margin: 0;
    padding: 0 10px; /* Adjust padding to fit the smaller header */
    text-align: center;
    font-weight: bold;
}

/* Main container for all filters */
.filters {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    margin: 15px auto;
    max-width: 900px;
    padding: 15px;
}

/* Row that holds all filter groups, laid out horizontally */
.filters-row {
    display: flex;
    flex-wrap: wrap; /* Wrap filters onto new lines if needed */
    justify-content: space-between;
    gap: 10px;
}

/* Buttons on their own row, below the filters */
.filter-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end; /* or space-between if you prefer */
    gap: 10px;
    margin-top: 10px; /* optional extra spacing above buttons */
}

/* Filter groups, label + select in one row */
.filter-group {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* Keep label and select minimal spacing */
.filters label {
    flex: 1 1 80px;
    min-width: 80px;
}

.filters select {
    flex: 2 1 150px;
    min-width: 100px;
}

.filters button {
    background-color: #004b8d; /* Your original color here */
    border-radius: 5px; 
    color: #fff;
    border: none;
    padding: 8px 16px;
    cursor: pointer;
    font-weight: bold;
}

.filters button:hover {
    opacity: 0.9; /* Optional hover effect */
}

.reset-button {
    background-color: #004b8d; /* Your original color here */
    border-radius: 5px; 
    color: #fff;
    border: none;
    padding: 8px 16px;
    cursor: pointer;
    font-weight: bold;
}

.reset-button:hover {
    opacity: 0.9; /* Optional hover effect */
}

.competition-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 20px;
}

.competition-card {
    background: rgba(255, 255, 255, 0.8);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    width: 80%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    padding-top: 25px; /* Creates space for the badge above the title */
}

.competition-card.ongoing {
    border: 2px solid #ff4c4c; /* Highlight ongoing events with red color */
}

.ongoing-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #ff4c4c; /* Red color for the badge */
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-weight: bold;
}

.types-container {
    margin: 10px 0;
    display: flex;
    flex-wrap: wrap; /* Allow items to wrap to the next line */
    gap: 10px; /* Add space between items */
}

.type-box {
    display: inline-block;
    background-color: #e0e0e0;
    color: #333;
    padding: 5px 10px;
    border-radius: 15px;
    margin-right: 5px;
    font-size: 0.9em;
}

.results-button {
    background-color: #004b8d;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.results-button.disabled {
    background-color: gray;
    cursor: not-allowed;
    pointer-events: none; /* Make the button non-clickable */
}

.results-button:hover:not(.disabled) {
    background-color: #003366;
}

.month-separator {
    margin: 30px 0 10px 0;
    padding: 5px 10px;
    border-bottom: 2px solid lightgray;
    font-weight: bold;
    max-width: 600px; /* Match or slightly exceed your card width */
    text-align: left;
    color: #666;
}

.location-icon {
    margin-right: 5px;
}

/* Modern link styling with Skating Finland brand colors */

/* Basic link styling */
a {
  color: #2f3173; /* Skating Finland navy blue */
  text-decoration: none;
  position: relative;
  transition: color 0.3s ease;
  font-weight: 500;
}

/* Modern hover effect with animated underline */
a:hover {
  color: #4a4d9e; /* Slightly lighter blue on hover */
}

/* Animated underline effect */
a:not(.results-button):after {
  content: '';
  position: absolute;
  width: 0;
  height: 1px;
  bottom: -2px;
  left: 0;
  background-color: #4a4d9e;
  transition: width 0.3s ease;
}

a:not(.results-button):hover:after {
  width: 100%;
}

/* Special styling for location links */
p.location a {
  color: #2f3173;
  display: inline-flex;
  align-items: center;
}

p.location a:hover {
  color: #4a4d9e;
}

/* Focus state for accessibility */
a:focus {
  outline: 2px solid rgba(47, 49, 115, 0.4);
  outline-offset: 2px;
}

/* Navigation link styling with Skating Finland brand colors */
a.nav-link {
  color: #2f3173; /* Skating Finland navy blue */
  text-decoration: none;
  position: relative;
  transition: all 0.3s ease;
  font-weight: 500;
}

a.nav-link:hover {
  color: #4a4d9e; /* Slightly lighter blue on hover */
}

/* Animated underline effect */
a.nav-link:after {
  content: '';
  position: absolute;
  width: 0;
  height: 1px;
  bottom: -2px;
  left: 0;
  background-color: #4a4d9e;
  transition: width 0.3s ease;
}

a.nav-link:hover:after {
  width: 100%;
}

a.nav-link:hover:before {
  opacity: 1;
  transform: translateX(0);
}

/* Always show navigation icon on touch devices */
@media (hover: none) {
  a.nav-link:before {
    opacity: 1;
    transform: none;
  }
}