html, body {
    margin:0;
    padding:0;
    box-sizing: border-box;
    background-image: url("./images/gpt_bg_2.png");
    background-size: cover;           /* Makes sure the image covers the entire screen */
    background-position: center;      /* Centers the image */
    background-repeat: no-repeat;     /* Prevents tiling */
    height: 100vh;                    /* Ensures the background covers the viewport height */
    overflow-x: hidden; 
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.webpage {
    width:100%;
    height:auto;
    display:flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index:1;
}

a {
    text-decoration: none;
    color: inherit; /* Inherit color from parent */
}

.header {
    width:90%;
    max-width:1000px;
    height:200px;
    margin:auto;
    display:flex;
    flex-direction:row;
    justify-content:space-between;
    align-items:center;
    margin-top:50px;
    background-color: #E7E4E5;
    border-top-left-radius: 50px;
    border-top-right-radius: 50px;
}

/* -----logo----- */
.logo{
    display:flex;
    justify-content: center;
    align-items:center;
    margin:0;
    padding:0;
    gap:15px;
    margin-left:40px;
}
.logo_image {
    width:150px;
    height:auto;
    display:block;
    margin:0;
    padding:0;
}
.logo_text {
    font-size:5rem;
    font-family: "Crete Round", "Arial" serif;
    font-weight:100;
}
h1 {
    font-family: "Crete Round", serif;
}

/* -----navbar----- */
.nav {
    display:flex;
    align-items: flex-end;
    height:100%;
    margin-right:50px;
}
.nav_content {
    height:100px;
    display:flex;
    flex-direction: row;
    list-style:none;
    gap:20px;
    margin-bottom:22px;
}
ul {
    
    justify-content: center;
    align-items: center;
    margin-bottom:10px;
}
li{
    font-size:18px;
    font-family: "Inter", sans-serif;
    margin-bottom:10px;
}

.nihongo {
    font-family: "Noto Sans JP", sans-serif;
    font-weight: 400;
}

/* -----page_content----- */


main {
    margin:0;
    padding:0;
    background-color: #E7E4E5;
    border-bottom-left-radius: 50px;
    border-bottom-right-radius: 50px;
    display:flex;
    flex-direction:column;
    justify-content: center;
    align-items: center;
    margin: 10px auto;
    margin-bottom:0;
    width:90%;
    max-width:1000px;
    height:auto;
    padding-bottom:50px;
    overflow: visible;

}
/* h2 {
        font-family: "Crete Round", serif;
        font-weight: 300;
        font-size:3rem;
        margin-bottom:50px;
} */



.content_container  {
    width:90%;
    max-width:1000px;
    height:auto;
    display:flex;
    flex-direction: column;
    justify-content:center;
    align-items:center;
    gap:20px;
    padding-left:20px;
    padding-right:20px;
    position:relative;
    margin:auto;
    margin-top:50px;
    z-index:2;
}

 
.text_wrapper_a {
    height:auto;
    width:90%;
    max-width:750px;
    display: inline-block;
    flex-direction: column;
    justify-content:center;
    align-items: center;
    margin:auto;
}

h3 {
    font-family: "Crete Round", serif;
    margin-top:30px;
    
}
.content_title {
    display:flex;
    justify-content: center;
    margin-bottom:30px;

}
.content_text {
    width:100%;
    max-width:750px;
    height:auto;
    display:flex;
    padding-bottom:10px;
    margin:auto;
    flex-wrap:wrap;
   
}
p{
    font-family: "Noto Sans Jp", sans-serif;
}

/* ------------- */
.help_section {
    margin-top:10px;
    height:500px;
    width:100%;
    max-width:750px;
    display: flex;
    flex-direction: column;
    justify-content:center;
    align-items: center;
    margin-left: auto;
    margin-right: auto;
}

.help_categories {
    width:100%;
    max-width:700px;
    display: flex;
    flex-direction: row;
    gap: 30px;
    justify-content: space-between;
    text-align: center;
}

.help_img {
    width:150px;
}
.text_wrapper_b {
    width:200px;
    
}

h4 {
    width:100%;
    font-family: "Noto sans JP", sans-serif;
    margin-top: 10px;

}
.torn_paper {
    display: block;
    justify-content: center;;
    margin: 0;
    padding:0;
    width:100%;
    max-width: 1000px; /* Match this to your <main>'s width */
    height: auto; /* Adjust as needed */
    margin-top: -100px; /* Pull it upwards to overlap with <main> (it was -100) */
    z-index: 1;
}

/* --------css for mobile--------- */

/* Media query for screens smaller than 1000px (Tablets, small laptops) */
@media (max-width: 999px) {

    .webpage {
        width: 100%;
        height: auto !important; /* Allow it to grow dynamically */
        min-height: 100vh; /* Ensure it fills the viewport */
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        overflow: visible;
    }

    .header, main {
        width: 90%;
    }
    main {
        height: auto !important; /* Allow the height to expand */
        min-height: 100vh; /* Prevents collapsing */
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
    }

    .content_container {
        width: 100%;
        height: auto; /* Allow it to expand naturally */
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding: 0 10px;
        gap: 20px;
    }

    .help_section {
        width: 100%;
        height: auto; /* Allow this section to grow as needed */
        padding: 0 10px;
        margin-top: 20px; /* Prevent overlapping */
    }

    .help_categories {
        width: 100%;
        display: flex;
        flex-direction: column; /* Stack categories vertically */
        align-items: center;
        gap: 20px;
    }

    .help_img {
        width: 120px;
    }

    .text_wrapper_b {
        width: 100%;
        max-width: 350px;
        text-align: center;
    }

    .bottom_edge {
        width: 100%;
        display: flex;
        justify-content: center;
        position: relative;
        margin-top: 100px; /* Fine-tune this to get the overhang just right */
    }
    
    /* Torn Paper Image */
    .torn_paper {
        width: 100%;
        max-width: 1000px;
        height: auto;
        object-fit: cover;
        position: relative;
        z-index: 1;
    }



    .logo_image {
        width:100px;
        height:auto;
        display:block;
        margin:0;
        padding:0;
    }
    .logo_text {
        font-size:3rem;
        font-family: "Crete Round", "Arial" serif;
        font-weight:100;
    }



}

@media (max-width: 950px) {

    .header{
    flex-direction:column;
    
    
}

.logo {
    margin-left:0;
    margin-top:10px;
}
    .nav {
        height:50px;
        margin-right:0;
    }
}

@media (max-width: 600px) {

    .header, main {
        width: 90%;
    }

    .webpage {
        width: 100%;
        height: auto !important; /* Allow it to grow dynamically */
        min-height: 100vh; /* Make sure it doesn't collapse */
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        overflow: visible;
    }

    main {
        height: auto !important; /* Allows the height to expand as needed */
        min-height: 100vh; /* Prevents it from being too short */
    }

    .content_container {
        width: 100%;
        height: auto; /* Allow it to expand naturally */
        display: flex;
        flex-direction: column;
        justify-content: flex-start; /* Aligns content to the top */
        align-items: center;
        padding: 0 10px;
        gap: 20px;
    }

    .help_section {
        width: 100%;
        height: auto; /* Allow this section to grow as needed */
        padding: 0 10px;
        margin-top: 20px; /* Add margin to prevent overlapping */
    }

    .help_categories {
        width: 100%;
        display: flex;
        flex-direction: column; /* Stack categories vertically */
        align-items: center;
        gap: 20px;
    }

    .help_img {
        width: 120px;
    }

    .text_wrapper_b {
        width: 100%;
        max-width: 300px;
    }

    .torn_paper {
        width: 100%;
        min-height: 100px;
        object-fit: cover;
    }


    .logo_image {
        width:75px;
        height:auto;
        display:block;
        margin:0;
        padding:0;
    }
    .logo_text {
        font-size:2rem;
        font-family: "Crete Round", "Arial" serif;
        font-weight:100;
    }
}