/* Mobile-first styling */

/*menu 3 kreski mobile*/
.hamburger-menu {
    width: 40px;
    height: 40px;
    position: fixed;
    top: 10px;
    right: 20px;
    transform: translateX(-50%);
    z-index: 9999;
    cursor: pointer;
    background-repeat: no-repeat;
    background-size: cover; /* Zapewnia, że tło będzie wypełniać całą dostępną przestrzeń */
    background-position: center; /* Centruje tło w oknie przeglądarki */
}
.hamburger-menu div {
    display: flex;
    width: 30px;
    height: 3px;
    background-color: white;
    margin: 5px 0;
    transition: 0.4s;
    justify-content: center;
    align-items: center;
}

@media (max-width: 768px){
    .hamburger-menu {
        display: block !important;
        visibility: visible !important;
        background-color: transparent; /* Use the appropriate color */
    }

    header {
        height: 3.5rem;
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
        display: flex;
        justify-content: center;
        align-items: center;
        position: fixed; /* Makes the header fixed at the top */
        box-sizing: border-box; /* Ensure padding is included in the width */
        font-size: 1.5rem;
        top: 0;
        z-index: 1000; /* Ensures the header is above other content */
    }
    header nav {
        display: none; /* Hide the navigation by default on mobile */
    }
    header nav.active {
        display: block;
        position: absolute;
        top: 55px; /* Adjust based on header height */
        width: 100%;
        align-items: center;
        background: #e89938;
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
        z-index: 999; /* Ensure above other elements */
    }
    header nav ul {
        flex-direction: column;
        width: 100%;
    }
    header nav ul li {
        margin: 0 auto;
        border-bottom: 1px solid var(--text-color);
        width: 100%;
        border-radius: 0;
    }
    #mess-li{
        padding: 20px 0;
    }
    .message-icon{
        margin-left: auto;
        margin-right: auto;
    }
    header nav ul li a, #about_ai {
        display: block;
        width: auto;
        /* Larger touch target */
        padding: 20px 0;
        margin: 0 auto;
        font-size: 1.3rem;
        color: var(--text-color); /* Ensures contrast */
        transition: background-color 0.3s, color 0.3s;
    }
    header nav ul{
        background-color: var(--pomarancz);
    }
    .ai-school-button-container{
        top: 56px;
    }
    .ad-space {
        width: 60px;
    }
    .button-group {
        flex-direction: column;
        gap: 10px;
    }
    .posts {
        display: grid;
        grid-template-columns: 1fr;
        gap: 30px;
        margin-top: 30px;
        padding: 0 20px;
        width: 100%;
    }
    .post {
        min-height: auto;
        max-height: none;
    }
    .post-body {
        margin-top: auto;
    }
    .read-more {
        display: block;
        margin-top: auto;
        padding: 10px 20px;
        font-size: 1rem;
        background-color: #007bff;
        color: white;
        border-radius: 5px;
        transition: background-color 0.3s;
    }
    .tutor-info {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
    .tutor-info img {
        margin-bottom: 20px;
    }
    .tutor-details h2 {
        text-align: center;
    }
    .question-group {
        text-align: left;
        padding-right: 10px;
        padding-left: 20px;
        margin-bottom: 20px;
    }
    .custom-radio-check {
        justify-content: center;
        gap: 10px;
        margin-left: 20px;
    }
    .custom-radio-check input[type="radio"] {
        width: 20px;
        height: 20px;
    }
    .flash-popup {
        padding: 18px 40px;
        font-size: 19px;
        width: 90%;
        top: 10px;
    }
    .flash-popup .close-btn {
        font-size: 22px;
    }
    #role-selection-form {
        height: 300px; /* Reduce the height for a more compact design */
        text-align: center;
        padding: 20px; /* Add padding for better spacing */
        width: 80%;
        margin: 0 auto;
    }
    #fttxt{
        width: 80%;
        gap: 0;
    }
    #fttxt a::before{
        display: none;
    }
    #pc1{
        display: none;
    }
    #mobi1{
        display: block;
    }
    .sign-main, .login-main{
        width: 80%;
    }

}

@media (max-width: 700px){
    .profilegrid1, #p-table{
        width:100%;
        margin-left: auto;
        margin-right: auto;
    }
    .content {
        flex-grow: 1;
    }

    #role-selection-form button{
        font-size: 1.1rem;
        width: 85%
    }
    .banner-main{
        height: 200px;
    }
    .banner-text-main {
        margin: 90px auto 0;
    }
    .banner-text-main h1{
        font-size: 2.75rem;
        line-height: 3.5rem;
    }

}

/* Additional mobile-specific styling for smaller screens */
@media (max-width: 600px) {
     #posts-section {
        grid-template-columns: repeat(1, minmax(200px, 1fr)); /* One column for small screens */
     }
    .flash-popup {
        padding: 15px 30px;
        font-size: 18px;
        top: 10px;
    }
    .flash-popup .close-btn {
        font-size: 20px;
    }
    .profile-photo {
        margin-right: auto;
        margin-left: auto;
        margin-bottom: 15px;
    }
    #fttxt{
        width: 60%;
        flex-direction: column;
        row-gap: 30px;
    }
    h2{
        font-size: 1.8rem;
    }
    .banner-main{
        height: 200px;
    }
    .banner-text-main h1{
        font-size: 2.5rem;
        line-height: 3.25rem;
    }

}

@media (max-width: 560px){
    header nav ul li a {
        font-size: 1rem;
    }
    .profile-photo {
        width: 80%;
        aspect-ratio: 1/1;
        height: auto;
        margin: 0 auto;
    }
    .profile-photo img {
        width: 100%; /* Ensures the image fills the container */
        object-fit: cover; /* Ensures the image covers the area without distortion */
        border-radius: 2%; /* Makes the image round */
    }

    #role-selection-form{
        width: 100%;
        padding: 0;
    }

    #btn-highlight {
        margin-top: 10px;
    }

    #high p {
        text-align: left; /* Align text normally */
    }

    #profile-table{
        padding: 0;
    }
    .page-content{
        width: 100%;
    }
    .index-main{
        margin: 10px auto 0;
    }
        .banner-text {
        margin-top: 70px;
    }

    .banner-text h1 {
        font-size: 3.75rem;
        line-height: 4.75rem;
        height: 160px;
    }

    .banner-text h3 {
        font-size: 1.25rem;
        line-height: 2rem;
    }

    .banner button {
        font-size: 1.5rem;
    }

    .banner-main {
        height: 190px;
    }

    .banner-text-main {
        margin: 90px auto 0;
    }

    .banner-text-main h1 {
        font-size: 2.25rem;
        line-height: 3.25rem;
    }
}

@media (max-width: 520px){
    .tutor-main{
        width: 85%;
        min-height: 100%;
    }
    .banner-text h1{
        font-size: 3.5rem;
        line-height: 4.25rem;
    }
    .banner-main{
        height: 190px;
    }
    .banner-text-main h1{
        font-size: 1.8rem;
        line-height: 2rem;
    }

}

@media (max-width: 450px) {
    .content{
        width: 100%;
        min-height: 100%;
    }

    #customButton, #customButton1{
         margin-top: 20px;
     }
    .test-results table, .interpretation, .test-results h3, .tutor-main table {
        width: 90%;
        margin: 0 auto;
    }
    .test-results h2{
        width: 90%;
        margin-left: auto;
        margin-right: auto;
    }
    .categories button{
    width: 80%;
    }
    .ai-school-button{
        width: 50%;
    }
    .ai-school-button:hover{
        width: 55%;
    }
        .banner-main {
        height: 190px;
    }

    .banner-text {
        margin-top: 80px;
    }

    .banner-text h1 {
        font-size: 3rem;
        line-height: 4rem;
        height: 140px;
    }

    .banner-text h3 {
        font-size: 1.1rem;
        line-height: 1.3rem;
        height: 50px;
    }

}

@media (max-width: 400px){
    .logo-menu{
        height: 70%;
    }
    .hamburger-menu{
        right: 10px;
    }
    .banner-text h1 {
        font-size: 2.75rem;
        line-height: 3.5rem;
        height: 120px;
    }

    .banner-text h3 {
        font-size: 1rem;
    }

    .banner-main {
        height: 190px;
    }

    .banner-text-main {
        margin-top: 100px;
    }


}

@media (max-width: 350px) {
    .banner-text h1 {
        font-size: 2.5rem;
        line-height: 3.2rem;
        height: 110px;
    }
    .banner-text h3 {
        font-size: 0.9rem;
        line-height: 1.1rem;
    }

}