/*CSS file to define styles for all pages */

*, *::before, *::after {
    box-sizing: border-box;
}

/*Defining font family, color and size for most text elements */
h1, h2, h3, p, a, blockquote, li, label {
    font-family: 'Bebas Neue', Arial, Helvetica, sans-serif;
    color: black;
}

p, li, label{font-size: 20px;}

/*Curving corners on images */
img{border-radius: 25px;}

/*Setting general background colour */
body{background-color: white; margin: 0; padding: 0;}
/*Style for main navigation bar/header */
#logo{
    width:350px;
}
#main-header{
    background-color: white;
    display:flex;
    flex-wrap: nowrap;
    width:96%;
    padding-left: 5%;
    padding-top: 1%;
    padding-bottom: 1%;
}

#main-header h1{
    font-size: 40px;
}

#main-header a{
    text-decoration: none;
}

.hamburger{
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    margin-left: auto;
    margin-right: 10px;
}

.hamburger span{
    display: block;
    width: 25px;
    height: 3px;
    background-color: black;
    border-radius: 3px;
    transition: all 0.3s ease;
}

/*Navigation link positioning*/
#nav-buttons{
    display: flex;
    flex-wrap: wrap;
    justify-content:space-around;
    width:60%;
    margin-left: 20%;
    font-size: 20px;
    margin-top: 2%;
    text-align: center;
}

/*Underline animation when hovering over navigation links */
.nav-button{
    display: inline-block;
    position: relative;
    color: black;
}

.nav-button::after{
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 5px;
    bottom: 0;
    left: 0;
    background-color: black;
    transform-origin: bottom right;
    transition: transform 0.25s ease-out;
}

.nav-button:hover::after{
    transform: scaleX(1);
    transform-origin: bottom left;
}

.welcome{
    position: relative;
    overflow: hidden;
    height: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    gap: 5px;
}

.welcome-layer{
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: opacity 1s ease-in-out;
    opacity: 0;
}

.welcome-sub{
    position: relative;
    z-index: 1;
    color: white;
    font-size: 28px;
    margin: 0;
}

.welcome h1{
    position: relative;
    z-index: 1;
    color: white;
    font-size: 60px;
    margin: 0;
}

.welcome-btn{
    position: relative;
    z-index: 1;
    padding: 15px 40px;
    background-color: white;
    color: black;
    font-family: 'Bebas Neue', Arial, Helvetica, sans-serif;
    font-size: 22px;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.welcome-btn:hover{
    background-color: black;
    color: white;
}

.products-grid{
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    padding: 6px;
    background-color: white;
}

.product-item{
    aspect-ratio: 1;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: default;
    overflow: hidden;
}

.product-item::before{
    content: '';
    position: absolute;
    inset: 0;
    background-color: rgba(0,0,0,0.45);
    transition: background-color 0.3s ease;
}

.product-item:hover::before{
    background-color: rgba(0,0,0,0.25);
}

.product-more{
    background-color: #888;
}

.product-item span{
    position: relative;
    z-index: 1;
    color: white;
    font-family: 'Bebas Neue', Arial, Helvetica, sans-serif;
    font-size: 32px;
    letter-spacing: 2px;
    text-align: center;
}

.contact-form-section{
    background-color: white;
    padding: 60px 8%;
}

.contact-form-wrapper{
    display: flex;
    gap: 60px;
    align-items: flex-start;
}

.contact-form-left{
    flex: 0 0 65%;
}

.contact-form-left h2{
    font-size: 40px;
    margin-bottom: 10px;
}

.contact-form-left > p{
    font-size: 18px;
    color: #555;
    margin-bottom: 40px;
}

.contact-info{
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 30px;
    padding-top: 10px;
}

.contact-info-item h3{
    font-size: 22px;
    margin-bottom: 6px;
    border-bottom: 2px solid black;
    padding-bottom: 4px;
}

.contact-info-item p{
    font-size: 16px;
    color: #444;
    margin: 4px 0;
}

.contact-map{
    width: 100%;
    height: 250px;
    border: 0;
    border-radius: 4px;
}

.contact-form{
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: left;
}

.form-row{
    display: flex;
    gap: 20px;
}

.form-group{
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.form-group label{
    font-size: 16px;
    color: #333;
}

.form-group input,
.form-group textarea{
    padding: 12px 15px;
    font-size: 16px;
    font-family: 'Bebas Neue', Arial, Helvetica, sans-serif;
    border: 2px solid #ddd;
    border-radius: 4px;
    outline: none;
    transition: border-color 0.2s ease;
    width: 100%;
}

.form-group input:focus,
.form-group textarea:focus{
    border-color: black;
}

.form-group textarea{
    resize: vertical;
}

.form-submit{
    padding: 14px;
    background-color: black;
    color: white;
    font-family: 'Bebas Neue', Arial, Helvetica, sans-serif;
    font-size: 22px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.form-submit:hover{
    background-color: #333;
}

.success-page{
    padding: 100px 20%;
    text-align: center;
    background-color: white;
}

.success-page h1{
    font-size: 60px;
    margin-bottom: 20px;
}

.success-page p{
    font-size: 22px;
    color: #555;
    margin-bottom: 40px;
}

.form-message{
    padding: 15px 20px;
    border-radius: 4px;
    font-size: 18px;
    margin-bottom: 20px;
    text-align: center;
}

.form-message--success{
    background-color: #e6f4ea;
    color: #2d6a4f;
    border: 2px solid #2d6a4f;
}

.form-message--error{
    background-color: #fdecea;
    color: #b00020;
    border: 2px solid #b00020;
}

.page-banner{
    background-color: black;
    padding: 60px 8%;
    text-align: center;
}

.page-banner h1{
    color: white;
    font-size: 80px;
    margin: 0;
}

.about-section{
    background-color: white;
    padding: 60px 20%;
    text-align: center;
}

.about-section h2{
    font-size: 36px;
    margin-bottom: 10px;
}

.about-section p{
    font-size: 20px;
    margin-bottom: 40px;
    color: #333;
}

.about-snippet{
    padding: 60px 20%;
    text-align: center;
    background-color: white;
}

.about-snippet p{
    font-size: 22px;
    margin-bottom: 30px;
}

.snippet-tagline{
    font-size: 32px;
    margin-bottom: 10px;
}

.snippet-btn{
    display: inline-block;
    padding: 12px 35px;
    background-color: black;
    color: white;
    font-family: 'Bebas Neue', Arial, Helvetica, sans-serif;
    font-size: 20px;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.snippet-btn:hover{
    background-color: white;
    color: black;
    outline: 2px solid black;
}

.contact-strip{
    background-color: black;
    padding: 60px 20%;
    text-align: center;
}

.contact-strip p{
    color: white;
    font-size: 22px;
    margin-bottom: 30px;
}

.contact-strip-btn{
    display: inline-block;
    padding: 12px 35px;
    background-color: white;
    color: black;
    font-family: 'Bebas Neue', Arial, Helvetica, sans-serif;
    font-size: 20px;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.contact-strip-btn:hover{
    background-color: black;
    color: white;
    outline: 2px solid white;
}

#main-footer{
    background-color: #1a1a1a;
    color: white;
    display: flex;
    flex-direction: column;
    padding: 50px 8% 0;
}

.footer-top{
    display: flex;
    flex-direction: row;
    gap: 0;
    padding-bottom: 40px;
}

.footer-row{
    display: flex;
    flex: 1;
    padding: 0 40px;
    border-right: 1px solid #333;
}

.footer-row:last-child{
    border-right: none;
}

.footer-brand{
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
}

.footer-contact-details{
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-row h3{
    color: white;
    font-size: 20px;
    margin: 0;
}

.footer-row p{
    color: #bbbbbb;
    font-size: 16px;
    margin: 0;
}

.footer-row a{
    color: #bbbbbb;
    font-size: 16px;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-row a:hover{
    color: white;
}

.footer-bottom{
    width: 100%;
    border-top: 1px solid #333;
    padding-top: 20px;
    text-align: center;
}

.footer-bottom p{
    color: #777;
    font-size: 14px;
}

@media (max-width: 768px) {

    /* Header */
    #logo{
        width: 200px;
    }

    /* Welcome */
    .welcome{
        height: 420px;
        gap: 12px;
    }

    .welcome h1{
        font-size: 32px;
        padding: 0 15px;
    }

    .welcome-sub{
        font-size: 18px;
        padding: 0 15px;
    }

    .welcome-btn{
        font-size: 18px;
        padding: 12px 28px;
    }

    /* About snippet */
    .about-snippet{
        padding: 40px 6%;
    }

    .snippet-tagline{
        font-size: 24px;
    }

    .about-snippet p{
        font-size: 18px;
    }

    /* Contact strip */
    .contact-strip{
        padding: 40px 6%;
    }

    .contact-strip p{
        font-size: 18px;
    }

    /* Products grid */
    .products-grid{
        grid-template-columns: repeat(2, 1fr);
    }

    .product-item span{
        font-size: 24px;
    }

    /* Page banner */
    .page-banner{
        padding: 40px 6%;
    }

    .page-banner h1{
        font-size: 50px;
    }

    /* About section */
    .about-section{
        padding: 40px 6%;
    }

    .about-section h2{
        font-size: 28px;
    }

    .about-section p{
        font-size: 17px;
    }

    /* Contact form page */
    .contact-form-section{
        padding: 40px 6%;
    }

    .contact-form-wrapper{
        flex-direction: column;
    }

    .contact-form-left{
        flex: none;
        width: 100%;
    }

    .form-row{
        flex-direction: column;
    }

    .contact-info{
        padding-top: 0;
    }

    .contact-map{
        height: 200px;
    }

    /* Footer */
    #main-footer{
        padding: 30px 6% 0;
    }

    .footer-top{
        flex-direction: column;
    }

    .footer-row{
        border-right: none;
        border-bottom: 1px solid #333;
        padding: 20px 0;
    }

    .footer-row:last-child{
        border-bottom: none;
    }

    .footer-bottom{
        padding: 15px 0 20px;
    }
}

@media (max-width: 900px) {
    .hamburger{
        display: flex;
        align-self: center;
        margin-left: auto;
        order: 2;
    }

    #main-header{
        flex-wrap: nowrap;
        align-items: center;
        padding-right: 5%;
        position: relative;
        width: 100%;
    }

    #nav-buttons{
        display: flex;
        flex-direction: column;
        align-items: center;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: white;
        padding: 15px 0 25px;
        text-align: center;
        gap: 15px;
        z-index: 100;
        opacity: 0;
        transform: translateY(-8px);
        pointer-events: none;
        transition: opacity 0.25s ease, transform 0.25s ease;
        margin: 0;
        width: 100%;
    }

    #nav-buttons.open{
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

    #nav-buttons .nav-button{
        width: fit-content;
        margin: 0 auto;
    }

    .hamburger.open span:nth-child(1){
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.open span:nth-child(2){
        opacity: 0;
    }

    .hamburger.open span:nth-child(3){
        transform: translateY(-8px) rotate(-45deg);
    }
}