body {
    font-family: 'Montserrat', sans-serif;
    margin: 0;
    padding: 0;
    background: #f8f9fa;
    color: #333;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100vh;
}

button,
select {
    font-family: 'Montserrat', sans-serif;
}

main {
    flex: 1;
}

header {
    padding: 10px 30px;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
}

.header-inner {
    flex: 1;
    display: flex;
    align-items: center;
}

.header-items {
    width: 60%;
    margin: 0 auto;
}

footer {
    padding: 20px 30px;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

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

.logo {
    height: 45px;
}

header nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1 1 100%;
    justify-content: center;
    gap: 20px;
}

header nav ul li a {
    text-decoration: none;
    font-weight: 600;
    color: #888;
}

header nav ul li a.active {
    text-decoration: underline;
    color: #000;
}

header select {
    width: 33%;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #ccc;
}

.week-switch {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 19px;
    align-items: center;
}

.week-switch button {
    flex: 1;
    margin-left: 10px;
    padding: 10px 15px;
    border: none;
    background: #f1f1f1;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
}

.week-switch button.active {
    background-color: #0056d6;
    color: #fff;
}

.days-nav {
    display: flex;
    justify-content: space-around;
    background: #fff;
    padding: 10px 0;
    border-bottom: 1px solid #ddd;
}

.days-nav button {
    flex: 1;
    padding: 10px;
    border: none;
    background: none;
    font-weight: bold;
    cursor: pointer;
    border-bottom: 3px solid transparent;
}

.days-nav button.active {
    border-bottom: 3px solid #0056d6;
    color: #0056d6;
}

.schedule {
    display: flex;
    flex-direction: column;
    padding: 10px;
}

.day {
    background: #fff;
    border-radius: 12px;
    padding: 10px;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.day h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    text-align: center;
}

.lesson {
    margin-bottom: 15px;
    border-top: 1px solid #eee;
    padding-top: 10px;
}


/* ДОДАНО: обгортка для часу початку і кінця */

.time-range {
    margin-bottom: 5px;
    font-size: 14px;
    font-weight: bold;
    color: #333;
}


/* час початку */

.time {
    display: inline-block;
    background: #0056d6;
    color: #fff;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 14px;
}

.week-buttons {
    display: flex;
}


/* час закінчення */

.time.end {
    background: #d6c7ff;
    color: #333;
}

.card {
    background: #F0F4FF;
    border-radius: 10px;
    padding: 10px;
    margin-top: 5px;
}

.card p {
    margin: 0;
    font-size:14px;
    margin-top: 5px;
}

.card h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
}

.card span {
    display: inline-block;
    background: #d6c7ff;
    color: #333;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 6px;
    margin-bottom: 5px;
    margin-right: 5px;
}

.card.crossed {
    position: relative;
    opacity: 0.6;
}

.card.crossed::after {
    content: "✖";
    color: red;
    font-size: 22px;
    position: absolute;
    top: 5px;
    right: 10px;
}

.card.online {
    /* border: 2px solid blue; */
}

@media (min-width: 768px) {
    .days-nav {
        display: none;
    }
    .schedule {
        flex-direction: row;
        justify-content: space-around;
    }
    .day {
        width: 17%;
        margin-bottom: 0;
        display: block !important;
    }
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: center;
    }
    .header-items {
        width: 100%;
        margin: 0 auto;
    }
    header nav ul {
        flex-direction: column;
        align-items: center;
        margin-top: 15px;
        gap: 10px;
    }
    .week-switch {
        flex-direction: column;
    }
    header select {
        width: 100%;
        margin-bottom: 10px;
    }
    .header-inner {
        width: 100%;
    }
    .week-switch button:first-child {
        margin-left: 0px;
    }
}
