/*
This page was Coded and created by:  
Leen Kharraz  
ID: 2412099 
*/

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Courier New', Courier, monospace;
}

/*
Grid References:  
1. https://youtu.be/uuOXPWCh-6o?si=fJlb-cExFHWD8MnN  
2. https://youtu.be/oeOQQT7Xn7w?si=flOrq3WcsiRD2_C6  
3. https://youtu.be/S9OiWe5iBYo?si=mLIVQuvVexCd6Oi2  
4. https://youtu.be/EiNiSFIPIQE?si=1nJ2jHai4OquTYOX  
*/

body {
    display: grid;
    grid-template-rows: auto auto 1fr;
    grid-template-columns: 1fr;
    gap: 10px;
    height: 100vh;
    background-color: whitesmoke;
}
.header {
    width: 100%;
    background: #7851a9;
    padding: 20px;
    text-align: center;
  }

.header a{
    color: whitesmoke;
    font-weight: bold;
    font-size: 35px;
}

.navBar {
    background:white;
    text-align: center;
    padding: 15px;
    font-size: 20px;
}

.navBar a{
    color: #7851a9;
    font-weight: bold;
    padding: 10px;
}
.navBar a:hover {
    color: black;
  }

.grid-container {
    display: grid;
    grid-template-columns: 2fr 1fr; 
    grid-template-rows: auto auto; 
    row-gap: 20px;
    column-gap: 20px; 
}

.section {
    grid-column: 1; 
    background: whitesmoke;
    padding: 15px;
    border-radius: 5px;
    text-align: center;
}

.article {
    background: #7851a9;
    padding: 15px;
    border-radius: 5px;
    text-align: center;
}

.title {
    background: #8D6BC1 ;
    padding: 10px;
    text-align: center;
    font-weight: bold;
    border-radius: 5px;
}

p {
    background: whitesmoke;
    padding: 10px;
    text-align: center;
    border-radius: 5px;
}

.aside {
    grid-column: 2;
    grid-row: 1 / span 2; 
    background: white;
    padding: 15px;
    margin-right: 10px;
    border-radius: 5px;
    text-align: center;
}

.aside h3{
    padding: 30px;
    margin: auto;
    color: #7851a9;
    font-size: 30px;
}

.aside p{
    color: #7851a9;

}


aside input[type="email"] {
    width: 80%;
    padding: 10px;
    border: 2px solid #7851a9;
    border-radius: 5px;
    font-size: 16px;
    outline: none;
    margin-top: 15px;
}
button {
    background: #7851a9;
    color: whitesmoke;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    margin-top: 15px;
  }
  
  button:hover {
    background: #7851a9
  }

  /*
Made several changes to the footer since Grid caused layout issues. 
Fixed alignment, responsiveness, and ensured it stays properly positioned. 
*/

.footer {
    background-color: #7851a9;
    color: whitesmoke;
    text-align: center;
    width: 100%;
    position: relative;
    height: auto;
    padding: 20px 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.footer p{
    margin: 0;
    padding: 0;
    background-color: #7851a9;
}

/* (small screens: 576px) */
@media (max-width: 576px) {
    .grid-container {
        grid-template-columns: 1fr; 
        grid-template-rows: auto; 
    }
    
    .aside {
        grid-column: 1; 
        grid-row: auto;
    }

    .navBar {
        flex-direction: column;
    }
}

/* (medium screens: 768px) */
@media (max-width: 768px) {
    .grid-container {
        grid-template-columns: 1fr; 
        grid-template-rows: auto; 
    }

    .aside {
        grid-column: 1; 
        grid-row: auto;
    }
}

/* (larger screens: 992px ) */
@media (max-width: 992px) {
    .grid-container {
        grid-template-columns: 1fr 1fr; 
        grid-template-rows: auto auto; 
    }

    .aside {
        grid-column: 2; 
        grid-row: 1 / span 2; 
    }
}

/*
The JavaScript effects were inspired by several YouTube tutorials.
*/
.message-box {
    position: fixed;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    color: #7851a9;
    padding: 20px 30px;
    border: 2px solid #7851a9;
    border-radius: 10px;
    box-shadow: 0px 0px 10px #ccc;
    text-align: center;
    z-index: 1000;
  }
