/* Mobile menu */
@media (max-width: 768px) {
    header{
        border-bottom: 1px solid var(--darkgray);
    }
    header nav.active {
        top: 56px;
        padding-left: 0;
    }
    header nav ul li a, #about_ai {
        color: var(--darkgray); /* Ensures contrast */
    }
    #sklep div {
        flex: 1 1 100%; /* Full width on small screens */
    }
    #konwersacja, #rozmowa{
        width: 50%;
    }
    #sklep{
        column-gap: 0;
    }

    .ai-school-button-container ul{
        width: 85%;
    }
    #ai-logo{
        margin-left: 0;
        width: 45%;
    }
    .subject-selection ul li{
        font-size: 1.2rem;
    }
    #about_ai a{
        padding: 0;
    }
    #about_ai{
        width: 100%;
        border-radius: 0;
    }
    .tutor-main{
        width: 70%;
    }
}
@media (max-width: 715px){
    #tutorzy{
        flex: 0 0 40%;
    }
    .media-spol{
        width: 82%;
    }

}
@media (max-width: 650px){
    #nonvisible {
        display: none;
    }
    #aismain{
        flex-direction: column;
    }
    .middle-content{
        flex-direction: column;
    }
    .main-content{
        width: 95%;
        margin-right: auto;
        margin-left: auto;
        align-items: center;
        padding: 0 0 0;
    }
    #rights{
        margin-bottom: 0;
    }
    #content-start .row{
        justify-content: space-around;
    }
    #center1, #center2, #center3, #center4, #center5, #ai1, #center6, #center7, #center8, #center9, #center10{
        text-align: center;
    }

    .grupa{
        position: relative;
        top: 0;
        right: 0;
        display: flex;
        flex-direction: column;
        width: 95%;
    }
    .grupa h3{
        width: auto;
        margin-bottom: 0;
        margin-top: 0;
    }

    #sidebuttons, #sidebuttons2{
        display: flex;
        flex-direction: row;
        width: 100%;
        column-gap: 2%;
        margin-top: 10px;
    }
    #sidebuttons a{
        width: 50%;
    }
    #lessons-mobile{
        display: none;
    }
    .grupa p{
        border: 1px solid var(--darkgray);
        width: 35%;
        padding: 2px;
        margin: 0;
        flex-direction: row;
    }

    .ai-school-button-container ul{
        width: 90%;
        gap: 0;
    }
    .ai-school-button-container ul li{
        font-size: 1rem;
    }
    #logo-head{
        margin-top: 0;
    }
    #content-pakiety{
        margin-top: 0;
    }
    #ai-logo{
        margin-top: 20px;
    }
    .row{
        justify-content: center;
    }
}
@media (max-width: 610px){

}
@media (max-width: 600px){
    .ai-school-button-container ul{
        width: 100%;
    }
    li img{
        width: 25px;
        height: 25px;
        margin-right: 5px;
    }
    #ai-logo{
        margin-left: 0;
        width: 55%;
    }
    #dziennikbtn1, #content-statystyki h3, #content-statystyki p, #about p, #dziennikcode {
        width: 80%;
    }
    #center1{
        font-size: 2.5rem;
    }
    #about-div1 h2{
        font-size: 2.2rem;
    }
    #journal-wrapper{
        width: 70%;
    }
}

@media (max-width: 580px){
    #tutorzy, .tutor-list{
        flex: 0 100%;
    }
    #fale{
        aspect-ratio: 450/500;
        width: 70%;
        height: auto;
    }
}
@media (max-width: 500px){
    #center1{
        font-size: 2.3rem;
    }
    #about-div1 h2{
        font-size: 2rem;
    }
    .column{
        width: 100%;
    }
    .card-header{
        margin-top: 0;
    }
    .package-info p{
        margin-top: 5px;
        margin-bottom: 5px;
    }
    .package-info{
        gap: 0;
    }
    .code-activation-form {
        width: 70%;
    }
    .media-spol{
        width: 100%;
        flex-direction: column;
        align-items: center;
    }
    #journal-wrapper{
        width: 80%;
    }
}
@media (max-width: 460px){
    #center1{
        font-size: 2rem;
    }
    #about-div1 h2{
        font-size: 1.8rem;
    }
    .tutor-main{
        width: 90%;
    }
}


@media (max-width: 435px){
    #tutorzy, .tutor-list{
        flex: 0 0 95%;
    }
}
@media (max-width: 415px){
    .row{
        gap: 0;
        row-gap: 30px;
        justify-content: center;
    }
    .tutorzy, .tutor-list{
        width: 95%;
    }
}

@media (max-width: 400px){
    #center1{
        font-size: 1.8rem;
    }

    .main-content{
        padding-left: 0;
        padding-bottom: 20px;
    }
    .subject-selection ul{
        padding-left: 0;
    }
    .content-section{
        padding: 5px;
    }

    #ai-logo{
        margin-left: 0;
        width: 70%;
    }
    .ai-school-button-container ul li{
        font-size: 0.9rem;
    }
    li img{
        width: 20px;
        height: 20px;
    }
    #dziennikbtn1, #content-statystyki h3, #content-statystyki p, #about p {
        width: 80%;
    }
}
@media (max-width: 370px){
    #center1{
        font-size: 1.6rem;
    }
    #about-div1 h2{
        font-size: 1.4rem;
    }
}