/* Remove default browser spacing */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Black header bar */
header {
    background-color: #242423;
    width: 100%;
    min-height: 80px;

    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 15px 30px;
    flex-wrap: wrap;
}

/* Website title */
#MyH1 {
    color: tomato;
    font-family: sans-serif;
    font-size: clamp(24px, 4vw, 32px);
}

/* Navigation */
#Buttons ul {
    list-style: none;
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

#Buttons li {
    margin-top: 30px;
}

#Buttons a {
    color: white;
    text-decoration: none;
    font-family: Arial, sans-serif;
    font-size: clamp(15px, 2vw, 18px);
    transition: color 0.3s ease;
}

#Buttons a:hover {
    color: yellowgreen;
}

/* Page background */
body {
    background-color: black;
    color: white;
    overflow-x: hidden;
}

/* Logo */
#MyLogo {
    height: clamp(50px, 8vw, 80px);
}

/* Main photo */
#MyPhoto {
    display: block;
    width: 500PX;
    height: auto;
    margin: -80px auto 20px auto;
    border-radius: 20px;
}




/* Phones */
@media (max-width: 600px) {

    header {
        justify-content: center;
        gap: 15px;
    }

    #Buttons ul {
        justify-content: center;
    }

    #MyPhoto {
        margin-top: 1px;
        width: 90%;
        max-width: 500px;
    }

    #MyH2 {
        font-size: 40px;
    }

    #MyP {
        width: 90%;
        max-width: 500px;
        font-size: 18px;
        height: auto;
    }

    #ButtonContainer {
        flex-direction: column;
        align-items: center;
    }

    #MyButton {
        margin-left: 0;
        width: 80%;
        max-width: 250px;
    }

    #MyButton2 {
        margin-left: 0;
        width: 80%;
        max-width: 250px;
    }
}

html {
    overflow-y: scroll;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
}

#MyH2 {
    color: white;
    font-family: 'Gill Sans', Calibri, sans-serif;
    font-size: 80px;

    white-space: nowrap;
    position: relative;
    width: 100%;

    animation: moveText 8s linear infinite;
}


@keyframes moveText {
    from {
        transform: translateX(-100%);
    }

    to {
        transform: translateX(100vw);
    }
}

#MyButton {
    display: block;
    margin-left: -1400px;
    margin-top: 20px;

    padding: 10px 20px;
    font-size: 18px;
    background-color: tomato;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;

    transition: background-color 0.3s ease;
}
#MyButton2 {
    display: block;
    margin-left: 200px;
    margin-top: 20px;

    padding: 10px 20px;
    font-size: 18px;
    background-color: grey;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;

    transition: background-color 0.3s ease;

   #MyButton {
    transition: background-color 0.3s ease;
}

#MyButton:hover {
    background-color: black;
}

}
#ButtonContainer {
    display: flex;
    gap: 15px;
    justify-content: center;
}

#MyButton2:hover {
    color: black;
    background-color: White;
    font-family: airbnb-cereal, sans-serif;
}
#MyButton:hover {
    color: black;
    background-color: White;
    font-family: airbnb-cereal, sans-serif;
}
#MyP {
    color: white;
    font-family: 'Gill Sans', Calibri, sans-serif;
    font-size: 30px;
    text-align: justify;
    margin-top: 10px;
    height: 150px;
    width: 300px;

    width: 500px;
}
@media (max-width: 600px) {

    header {
        justify-content: center;
        gap: 15px;
    }

    #Buttons ul {
        justify-content: center;
    }

    #MyDiv {
        display: flex;
        flex-direction: column;
        padding: 0 15px;
    }

    #MyPhoto {
        order: -1;          /* forces photo to appear before the paragraph, visually */
        margin: 15px auto;  /* cancels out the -80px desktop margin that was causing the overlap */
        width: 90%;
        max-width: 500px;
    }

    #MyH2 {
        font-size: 40px;
        padding: 0 15px;
        white-space: normal;   /* stops it from overflowing off-screen on mobile */
        animation: none;       /* the scrolling animation doesn't work well at this width */
    }

    #MyP {
        width: 100%;
        max-width: 500px;
        font-size: 18px;
        height: auto;
        padding: 0 15px;
    }

    #ButtonContainer {
        flex-direction: column;
        align-items: center;
        padding: 0 15px;
    }

    #MyButton {
        margin-left: 0;
        width: 80%;
        max-width: 250px;
    }

    #MyButton2 {
        margin-left: 0;
        width: 80%;
        max-width: 250px;
    }
}