@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

*{
    padding: 0;
    margin: 0;
    text-decoration: none;
    box-sizing: border-box; 
    font-family: "Poppins", "sans-serif";
}
body{
    overflow: hidden;
}
header{
    position: fixed;   
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 20px;
    padding: 50px 80px;
    z-index: 99;
    opacity: 0;
    animation: to_bottom 1s ease forwards;
}
header nav a{
    font-size: 24px;
    color: black;
    position: relative;
    margin-left: 70px;
}
header nav a::before{
    content: "";
    position: absolute;
    bottom: -5px;
    left: 0;
    background-color: black;
    width: 100%;
    height: 2.5px;
    transform: scaleX(0);
    transition: .4s; 
    /*transform-origin: left;*/
}
header nav a:hover::before{
    transform: scaleX(1);}
@keyframes to_bottom{
    0%{
        transform: translateY(-50px);
        opacity: 0;
    }
    100%{
        transform: translateY(0);
        opacity: 1;
    }
}
@keyframes to_right{
    0%{
        transform: translateX(-50px);
        opacity: 0;
    }
    100%{
        transform: translateX(0);
        opacity: 1;
    }
}
@keyframes to_left{
    0%{
        transform: translateX(50px);
        opacity: 0;
    }
    100%{
        transform: translateX(0);
        opacity: 1;
    }
}
.main{
    height: 100vh;
    width: 100%;
    display: flex; 
    justify-content: center;
    align-items: center;
    width: 1290px;
    max-width: 95%;
    margin: 0 auto;  
    display: flex;
}
.main img{
    opacity: 0;
    animation: to_right 1s ease forwards 1.1s;
}
.main div{
    opacity: 0;
    animation: to_left 1s ease forwards 0.8s;
}




/* Default Styling for Large Screens */
body {
    overflow: auto;
}

.main {
    height: 100vh; /* Original height */
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: row; /* Image and text side by side */
    width: 1290px;
    max-width: 95%;
    margin: 0 auto;
    padding-top: 0; /* No extra padding on large screens */
}

.main img {
    max-width: 35%;
    height: auto;
    margin-right: 60px;
    opacity: 0;
    animation: to_right 1s ease forwards 1.1s;
}

.main .all-text {
    width: 50%;
    padding-left: 20px;
    opacity: 0;
    animation: to_left 1s ease forwards 0.8s;
}

/* Adjust layout for 1000px and smaller: move image on top, text below */
@media (max-width: 1000px) {
    .main {
        flex-direction: column; /* Stack image on top of text */
        align-items: center;
        text-align: center;
        padding-top: 140px; /* Slightly more space from top to avoid overlap */
        padding-bottom: 40px; /* Space at bottom */
    }

    .main img {
        max-width: 55%; /* Make the image slightly smaller */
        margin-top: 40px; /* Additional space above the image */
        margin-bottom: 20px; /* Space below image */
        margin-right: 0;
    }

    .main .all-text {
        width: 90%; /* Full-width text */
        padding-left: 0;
    }

    .main .all-text h1 {
        font-size: 36px;
    }

    .main .all-text p,
    .main .all-text ul {
        font-size: 18px;
    }
}

/* Further adjustments at 768px */
@media (max-width: 768px) {
    header {
        padding: 30px 20px;
    }

    header nav a {
        font-size: 20px;
        margin-left: 20px;
    }

    .main img {
        max-width: 55%; /* Full-width image */
        margin-top: 50px; /* More top margin to avoid intersection */
        margin-right: 0;
    }

    .main .all-text {
        width: 100%;
    }

    .main .all-text h1 {
        font-size: 32px;
    }

    .main .all-text p,
    .main .all-text ul {
        font-size: 16px;
    }

    .main {
        padding-bottom: 60px; /* Bottom padding for smaller screens */
    }
}

/* For very small screens: 480px and below */
@media (max-width: 480px) {
    header {
        padding: 20px;
    }

    header nav a {
        font-size: 18px;
        margin-left: 10px;
    }

    .main .all-text h1 {
        font-size: 28px;
    }

    .main .all-text p,
    .main .all-text ul {
        font-size: 15px;
    }

    .main img {
        margin-top: 60px; /* Extra top margin for smallest screens */
        margin-right: 0;
    }

    .main {
        padding-bottom: 80px; /* Extra bottom padding on smallest screens */
    }
}


header nav a.active {
    color: #6cd490;
}