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

a, button{
    all: unset;
}

:root{
    --background-color: #f4f1e8;
    
}


body{
    background-color: var(--background-color);
    font-family: 'Poppins', sans-serif;
}


section{
    position: relative;
    overflow-x: hidden !important;
}

/* Nav */

header{
    position: relative;
    height: 125px;
}

nav{
    position: absolute;

    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
    gap: 40px;

    padding: 20px;

    border-bottom: 1px solid rgba(0, 0, 0, 0.25);

    z-index: 99;

    background-color: var(--background-color);
}

nav img{
    margin-right: auto;
    width: 100px;
}

nav a{
    cursor: pointer;
}


nav a:nth-of-type(4){
    background-color: #b71c1c;
    padding: 10px 25px;
    color: white;
    border-radius: 10px;
}


/* Landing Page */


.landing-page{
    position: relative;
    display: flex;
    flex-direction: column;
    z-index: 1;
    overflow-y: hidden;
    min-height: 90vh;
}

.landing-page .text{
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%);

    font-size: clamp(2rem, 4vw, 5rem);
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
    color: #1e1e1e;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);

    z-index: 98;
}

.absolute-images{
    position: absolute !important;
    object-fit: cover;
    transition: all 1s;
    pointer-events: none;
}


.cloud-1 {
    z-index: 5;
    position: absolute;
    top: 20%;
    right: 10%;

    transform: translateX(100%); /* Start off-screen to the right */
    animation: 
        slide-in-from-right 1s ease 0s forwards,
        float-cloud 2s ease-in-out 1s infinite alternate;
}


.cloud-2 {
    z-index: 4;
    position: absolute;
    top: 30%;
    left: 10%;

    transform: translateX(-100%); /* Start off-screen to the left */
    animation: 
        slide-in-from-left 1s ease 0s forwards,
        float-cloud 2s ease-in-out 1s infinite alternate;
}


@keyframes slide-in-from-left {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(0);
    }
}

@keyframes slide-in-from-right {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(0);
    }
}

@keyframes float-cloud {
    0% {
        transform: translateX(0) translateY(0) scale(1);
    }
    100% {
        transform: translateX(0) translateY(10px) scale(1.05);
    }
}








.hack-club-image{
    z-index: 6;
    top: 50%;
    left: 0;
    animation: hack-club-slide 1s ease 1s forwards;
    transform: translateX(-100%);

}

@keyframes hack-club-slide {
    0%{
        transform: translateX(-100%);
    }
    100%{
        transform: translateX(0%);
    }
}

.landing-page-background{
    display: block;
    z-index: -1;

    min-height: 100vh;
    min-width: 700px;
        
    object-fit: cover;
    object-position: right center;
}

.mlh-badge{
    z-index: 7;
    top: 0;
    right: 40px;
    transform: translateY(-200%);
    animation: mlh-badge-slide 1s ease 1s forwards;
}

@keyframes mlh-badge-slide {
    0%{
        transform: translateY(-100%);
    }
    100%{
        transform: translateY(0%);
    }
}



.transition-1-2{
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 120%;
    min-width: 1200px;
    animation: transition-1-2 1s ease 0s forwards;
}

@keyframes transition-1-2 {
    0%{
        transform: translateY(100%);
    }
    100%{
        transform: translateX(-10%);
    }
}



.second-page{
    background-color: #29222D;
    min-height: 750px;

    z-index: 2;
    padding-top: 100px;


    position: relative;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 70px;
}

.second-page h2{
    font-size: 2rem;
    color: white;
    background: linear-gradient(to top, #9c2a2a 0%, #b71c1c 100%);
    padding: 20px;
}


.trees{
    top: 100px;
    height: 600px;
}
.trees-left{
    left: 0%;
    transform: translateX(-50%);
}

.trees-right{
    right: 0%;
    transform: translateX(50%);
}



.about-us-background {
  position: relative;
  width: clamp(250px, 80%, 800px);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
}

.about-us-background::before{

    position: absolute;
    content: 'Engineering Society was founded on a simple idea: every student deserves the chance to explore their passion for engineering in a space where big ideas feel possible. Through hands-on challenges, creative problem-solving, and STEM-inspired projects, over 35 active members return each meeting to grow, build, and innovate together.';
    top: 50%;
    left: 50%;
    transform: translateX(-50%) translateY(-50%);
    font-size: 1rem;

    width: 60%;
}

.about-us-background img{
  width: 750px;
  height: auto;
  display: block;
}










/* Third Page */


.third-page{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    background-color: #29222D;
    padding: 50px 20px;
    padding-top: 100px;
}

.third-page h3{
    font-size: 2rem;
    color: white;
}



.third-page-inner{
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;

    gap: 5px;
}

.sliderContainer{
    width: 600px;
    height: auto;
    aspect-ratio: 16 / 9;
    background-color: lightgray;

    overflow-y: hidden;
    overflow-x: scroll;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;

    border: 5px solid var(--blue);

    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;

    position: relative;
    

}

.sliderContainer::-webkit-scrollbar{
    display: none;
}

.sliderContainer img{
    min-width: 100%;
    height: auto;
    object-fit: cover;

    scroll-snap-align: start;
}

.sliderButtons{
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;

    gap: 5px;

    bottom: 100%;
    right: 0;
}

.sliderButtons i{
    background-color: white;
    padding: 10px;
    color: black;
    border-radius: 5px;

    cursor: pointer;

    transition: all 0.2s;
}

.sliderButtons i:hover{
    background-color: white;
    
}

.sliderButtons i:active{
    background-color: white;

}



/* Fourth Page */


.fourth-page{
    background-color: black;
    position: relative;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 30px;

    width: 100%;
    padding-top: 200px;
    padding-bottom: 200px;
}

.top-rock-svg{
    position: absolute;
    left: 0;
    top: 0;
    min-width: 1000px;
    min-height: 150px;
}


.top-rock-svg path{
    fill: #29222D;
    z-index: 99;
}




.lightImage {
    width: 50px;
    position: absolute;
    z-index: 0;
    pointer-events: none;
}



@keyframes lightImageAnimation {
    0% {
        transform: translate(0px, 0px) scale(1);
        opacity: 0.7;
    }
    50% {
        transform: translate(10px, -10px) scale(1.1);
        opacity: 1;
    }
    100% {
        transform: translate(-10px, 10px) scale(1);
        opacity: 0.8;
    }
}







.fourth-page .line-1,
.fourth-page .line-2{
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-around;

    width: 100%;

    z-index: 2;
}

.fourth-page .line-1 div,
.fourth-page .line-2 div{
    position: relative;
}

.rock-2, .rock-3{
    width: 300px;
}

.fourth-page a{
    cursor: pointer;
}



.rock-1-section::before{
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translateX(-50%) translateY(-50%);
    content: "Old Event (Coming Soon)";

    color: white;
    font-size: 1.5rem;
    text-align: center;
}


.rock-2-section::before{
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translateX(-50%) translateY(-50%);
    content: "Upcoming Event (Coming Soon)";

    color: white;
    font-size: 1.5rem;
    text-align: center;
}



.rock-3-section::before{
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translateX(-50%) translateY(-50%);
    content: "Upcoming Event (Coming Soon)";

    color: white;
    font-size: 1.5rem;
    text-align: center;
}




.bottom-rock-svg{
    position: absolute;
    left: 0;
    bottom: 0;
    transform: rotate(180deg);
    min-width: 1000px;
    min-height: 150px;
}


.bottom-rock-svg path{
    fill: #2E2C38;
    z-index: 99;
}



/* Page 5 */


.page-5{
    background-color: #2E2C38;
    color: white;
    padding-bottom: 300px;
}

.page-5 h2{
    text-align: center;
    font-size: 2em;
}


.founders-container{
    width: 90%;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
    flex-wrap: wrap;

    gap: 100px 100px;

    margin: 50px auto 150px;
}

.founder-box{
    flex: 1;
    max-width: 500px;
    min-width: 250px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 40px;
}


.founder-box img{
    width: 100%;
    border: 2px solid #C24040;
    box-shadow: 4px 4px 20px  2px rgba(255, 255, 255, 0.25);
}




/* Donate */
.donate-now{
    width: 100%;
    height: 100%;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    margin-top: 150px;
    margin-bottom: 150px;
    gap: 40px;
}

.donate-now iframe{
    width: clamp(300px, 85%, 1000px);
    height: 700px;
    border-radius: 20px;
    overflow-x: hidden;

    box-shadow: 4px 4px 20px  2px rgba(255, 255, 255, 0.25);
}

.donate-now span{
    font-size: 1.5rem;
}

.donate-now a{
    border-bottom: solid 1px white;
    cursor: pointer;
}



/* Footer */


footer{
    background-color: #333;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px 10px;
    color: white;
}

footer img{
    width: 150px;
    margin-bottom: 20px;
}

footer h6{
    font-size: 1.5rem;
}


footer a, footer p{
    cursor: pointer;
}







@media (max-width: 768px){


    nav a{
        display: none;
    }

    nav a:nth-of-type(4){
        display: block;
    }


    .mlh-badge{
        width: 75px;
        right: 0px;
    }


    .hack-club-image{
        width: 150px;
    }


    .cloud-2{
        width: 200px;
    }


    .cloud-1{
        width: 200px;
    }


    .about-us-background img{
        width: 90vw;
        height: 500px;
    }


    .sliderContainer{
        width: 90vw;
    }





    .line-1 img, .line-2 img{
        width: 60%;
        margin: 0 auto;
    }
    .line-1 a, .line-2 a{
        width: 100%;
        margin: 0 auto;
    }

    .line-1 a div, .line-2 a div{
        width: 100%;
        margin: 0 auto;
        display: flex;
        flex-direction: row;
        align-items: center;
    }
    .fourth-page .line-1, .fourth-page .line-2{
        width: 80%;
        margin: 0 auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 40px;
    }


    .fourth-page .line-1{
        margin-bottom: 40px;
    }


}


@media (max-width: 500px) {
    .trees-left{
        transform: translateX(-70%);
    }

    .trees-right{
        transform: translateX(70%);
    }

    .about-us-background img{
        width: 100vw;
        height: 500px;
    }

    .about-us-background::before{
        width: 90%;
        font-size: 0.9rem;
    }

    .line-1 img, .line-2 img{
        width: 90%;
    }
}