/* Mobile menu */
@media (max-width: 768px) {
    .hamburger-menu {
        width: 30px;
        height: 30px;
        top: 15px;
    }
    header nav ul {
        background: var(--jasny);
    }
    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 */
    }

    .okienko{
    max-width: none;
    }

    #konwersacja, #rozmowa{
        width: 50%;
    }

    .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%;
    }
    #about-photo, #film{
        justify-content: center;
    }
    #phone, #okladka{
        width: 60%;
        max-width: 270px;
        height: auto;
        margin-top:0;
        aspect-ratio: 486 / 540;
        object-fit: contain;
    }
    #banerh2{
        text-align: center;
    }
    #wspolne{
        width: 100%;
        max-width: 420px;
        margin-left: auto;
        margin-right: auto;
    }
    #graf{
        width: 90%;
    }

    #whatis > .info-section__step-card:last-child{
        width: 100%;
    }
}
@media (max-width: 715px){
    #tutorzy{
        flex: 0 0 40%;
    }
    .media-spol{
        width: 82%;
    }

    .column{
        width: 100%;
    }

}
@media (max-width: 768px){
    #mentor_main_content,
    #mentor_main_shop,
    .mentor-shop-wrapper {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    #mentor_main_shop > * {
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
    }

    #section2 {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    #section2 .tutors-mobile-controls {
        display: flex;
        justify-content: flex-end;
        align-items: center;
        gap: 0.35rem;
        margin: 0.25rem 0 0.5rem;
    }

    #section2 .tutors-mobile-slider-nav {
        width: 36px;
        height: 36px;
        border: 1px solid rgba(0, 0, 0, 0.18);
        border-radius: 50%;
        background: #fff;
        color: var(--darkgray);
        font-size: 1.2rem;
        line-height: 1;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    }

    #section2 .tutors-container {
        --tutor-card-width: min(420px, 100%);
        --tutors-slide-width: var(--tutor-card-width);
        width: 100%;
        max-width: 100%;
        min-width: 0;
        overflow-x: auto;
        overflow-y: hidden;
        -ms-overflow-style: none;
        scrollbar-width: none;
        flex-wrap: nowrap;
        justify-content: flex-start;
        align-items: stretch;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        gap: 0;
        column-gap: 0;
        padding-inline: 0;
        scroll-padding-inline: max(0px, calc((100% - var(--tutors-slide-width)) / 2));
        padding-bottom: 0.7rem;
        background: transparent;
        box-sizing: border-box;
        overscroll-behavior-x: contain;
        contain: layout paint;
    }

    #section2 .tutors-container::-webkit-scrollbar {
        display: none;
    }

    #section2 .tutor-slide {
        flex: 0 0 var(--tutors-slide-width);
        max-width: var(--tutors-slide-width);
        width: var(--tutors-slide-width);
        min-width: 0;
        scroll-snap-align: center;
        scroll-snap-stop: always;
        display: flex;
        justify-content: center;
        margin-top: 0;
        padding: 0;
        background: transparent;
    }

    #section2 .tutor-slide .tutor-list {
        flex: 0 0 auto;
        width: 95%;
        max-width: 420px;
        min-width: 0;
        margin-top: 10px;
        box-sizing: border-box;
    }

    #section2 .tutor-slide .row {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        margin-top: 10px;
        flex-wrap: wrap;
        justify-content: center;
    }

    #section2 .tutor-slide .tutorzy {
        flex: 0 0 auto;
        width: 95%;
        max-width: 100%;
        min-width: 0;
    }

    #section2 .start-card h3,
    #section2 .card-header h3 {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    #section2 #center3 {
        max-width: 100%;
        min-width: 0;
    }

    #section2 .tutors-mobile-dots {
        display: flex;
        justify-content: center;
        gap: 0.35rem;
        margin-top: 0.25rem;
    }

    #section2 .tutors-mobile-dots .tutors-mobile-dot {
        width: 9px;
        height: 9px;
        border-radius: 50%;
        border: 0;
        background: rgba(0, 0, 0, 0.28);
        padding: 0;
        cursor: pointer;
    }

    #section2 .tutors-mobile-dots .tutors-mobile-dot.is-active {
        background: var(--poma);
        transform: scale(1.1);
    }
}
@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;
    }
    #ai-logo{
        margin-top: 20px;
    }
    #section2 .row{
        justify-content: center;
    }
}
@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-preview {
        padding: 0 0.75rem;
        margin-bottom: 2rem;
    }
    .journal-preview__lead {
        font-size: 1.1rem;
        margin-top: 30px;
    }
    .journal-preview-table th,
    .journal-preview-table td {
        padding: 0.5rem 0.6rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 580px){
    #tutorzy, .tutor-list{
        flex: 0 100%;
    }
    #fale{
        aspect-ratio: 2301/1375;
        width: 100%;
        height: auto;
    }
}
@media (max-width: 500px){
    .instruction-section {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
    }

    #center1, #content-start{
        font-size: 2.3rem;
        width:90%;
    }
    #about-div1 h2{
        font-size: 2rem;
    }

    .card-header{
        margin-top: 0;
    }
    .package-info p{
        margin-top: 5px;
        margin-bottom: 5px;
    }
    .package-info{
        gap: 0;
    }
    .code-activation-form {
        width: 90%;
    }
    .media-spol{
        width: 100%;
        flex-direction: column;
        align-items: center;
    }
}
@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;
    }
    #banerh2{
        font-size: 1rem;
    }
}