/* 🔹 Yleinen muotoilu */
body {
    font-family: Arial, sans-serif;
    text-align: center;
    background-color: #f4f4f4;
    margin: 0;
    padding: 0;
    color: #333;
}

h1 {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 10px;
}

/* 🔹 Navigaatiopainikkeet */
.nav {
    margin: 20px;
}

/* 🔹 Normaalikokoiset painikkeet tietokoneilla */
.nav a {
    text-decoration: none;
    padding: 12px 15px;
    border: 1px solid #ccc;
    margin: 5px;
    display: inline-block;
    background: white;
    color: #333;
    border-radius: 6px;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease-in-out;
    font-size: 14px;
}

.nav a:hover {
    background: #ddd;
    transform: scale(1.05);
}

/* 🔹 Kalenterin perusrakenne */
.calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);  /* 🔹 Tietokoneella viikkonäkymä yhdellä rivillä */
    gap: 10px;
    padding: 20px;
    max-width: 1400px;
    margin: auto;
}

/* 🔹 Päivän tapahtumat */
.day {
    border: 1px solid #ccc;
    padding: 10px;
    background: white;
    min-height: 120px;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
}

/* 🔹 Tapahtumat (turnaukset ja valmennukset) */
.event {
    padding: 8px;
    margin: 5px 0;
    border-radius: 5px;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.2s ease-in-out;
}

/* 🔹 Turnaustapahtumat (vihreä) */
.tournament-event {
    background: #4CAF50;
    color: white;
}

.tournament-event:hover {
    background: #45a049;
    transform: translateY(-2px);
}

/* 🔹 Valmennustapahtumat (oranssi) */
.class-event {
    background: #FF9800;
    color: white;
}

.class-event:hover {
    background: #e68900;
    transform: translateY(-2px);
}

/* 🔹 Linkit tapahtumissa */
.event a {
    color: white;
    font-weight: normal;
    text-decoration: none;
}

/* 🔹 Responsiivisuus: Tabletilla 2 saraketta */
@media (max-width: 1024px) {
    .calendar {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 🔹 Responsiivisuus: Mobiilissa 1 sarake */
@media (max-width: 768px) {
    .calendar {
        grid-template-columns: repeat(1, 1fr);
    }

    h1 {
        font-size: 18px;
    }

    .nav a {
        padding: 8px 10px; /* Pienemmät marginaalit */
        font-size: 12px; /* Pienempi fonttikoko */
        border-radius: 4px;
    }

    .event {
        font-size: 12px;
    }
}

/* 🔹 Tehdään painikkeista entistä pienemmät hyvin pienillä näytöillä */
@media (max-width: 480px) {
    .nav a {
        padding: 6px 8px;
        font-size: 10px;
    }
}

/* 🔹 Avoimet ottelut (sininen tausta) */
.match-event {
    background: #007BFF;
    color: white;
}

.match-event:hover {
    background: #0066cc;
    transform: translateY(-2px);
}

/* 🔹 Kurssitapahtumat (vihreä, erottuva sävy) */
.course-event {
    background: #388E3C;  /* hieman tummempi vihreä kuin .tournament-event */
    color: white;
}

.course-event:hover {
    background: #2e7d32;
    transform: translateY(-2px);
}


/* 🔹 Klubivalikko */
.nav form {
    display: inline-block;
    margin-left: 10px;
}

.nav label {
    font-size: 14px;
    margin-right: 5px;
}

.nav select {
    padding: 5px;
    font-size: 14px;
    border-radius: 5px;
    border: 1px solid #ccc;
}

.nav select:hover {
    cursor: pointer;
}
