/* Fonts */
@font-face {
    font-family: 'Fontin Sans';
    src: url('../Fonts/fontinsans_r.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Fontin Sans';
    src: url('../Fonts/fontinsans_i.woff2') format('woff2');
    font-weight: 400;
    font-style: italic;
}

@font-face {
    font-family: 'Fontin Sans';
    src: url('../Fonts/fontinsans_b.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
}

/* Base styles */
body {
    font-family: 'Fontin Sans', Arial, sans-serif;
    font-weight: 400;
}

main {
    padding: 2rem 0;
    font-size: 1.5rem;
    color: #58585A;
}

section img {
    max-width: 100%;
    height: auto;
    margin-top: 1rem;
}

input,
textarea {
    font-family: inherit;  /* use the same font as body */
    font-size: 1rem;       /* keep consistent sizing */
    line-height: 1.4;
}

/* Text colour on About page */
body.about main {
    color: #ffffff;
}

body.about h2 {
    color: #ffffff;
}

/* h2 size on About page */
body.about h2 {
    font-size: 2.5rem;
}

/* Footnote on About Page */
.rules {
    font-style: italic;
    font-size: 1.2rem;
}

/* Hides text but keeps space */
.invisible-heading {
    visibility: hidden;
}

/* Contact page text */
body.contact main {
    font-size: 1.5rem;
    color: #48474b;
    padding-top: 0rem;
}

/* Home page text */
body.home main {
    margin-left: 1rem;
    width: 70%;
}    

/* Aboutpage text */
body.about main {
    width: 82%;
} 

/* Page-specific background colors */
body.home {
    background-color: #ffffff;
}

body.about {
    background-color: #1F839A;
}

body.contact {
    background-color: #E3C900;
}

/* Contact form */
body.contact form {
    display: flex;
    flex-direction: column;
    max-width: 500px;
    margin-top: 1rem;
    padding: 1rem;
    padding-left: 0%;
    border-radius: 8px;
}

body.contact form input,
body.contact form textarea {
    background-color: #ffffff;
    margin-bottom: 1rem;
    padding: 0.75rem;
    border: none;
    outline: none;
    border-radius: 0;
}

body.contact form button {
    background-color: transparent;
    padding: 0.75rem;
    color: #444291;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    width: 50%;
    align-self: center;
}

body.contact form button:hover {
    color: #555;
}

body.contact form button {
    font-size: 2.5rem;
    font-family: 'Fontin Sans', Arial, sans-serif;
}

/* Container with margins */
.content-container {
    margin: 3%;
    min-height: 90vh;
}

/* Split left and right side */
.main-content {
    display: flex;
    gap: 2rem;
}

/* Left side */
.left-side {
    width: 50%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
}

/* Right side  */
.right-side {
    width: 50%;
    text-align: right;
}

/* About page layout: three-column */
body.about .left-side {
    width: 20%;
}

body.about .middle-side {
    width: 30%;
    margin-top: 10rem;
}

body.about .right-side {
    width: 30%;
    text-align: left;
    margin-top: 10rem;
}

body.about .nav-bar {
    width: 15%;
}

/* Logo Image */
.logo {
    width: 300px;
    height: auto;
}

/* Logo 2 */
.logo2 {
    width: 220px;
    height: auto;
}

/* LinkedIn Image */
.linkedin {
    display: inline-block;
    width: 50px;
    height: auto;
}

/* Mari Image */
.mari {
    width: 220px;
    height: auto;
    margin-top: 2rem;
}

/* Dock 1 Image */
.dock {
    margin-left: auto;
    display: flex;
    flex-direction: column;
    width: 650px;
    height: auto;
    margin-bottom: 2rem;
    margin-top: 4rem;
}

/* Dock 2 Image */
.dock2 {
    margin-left: auto;
    display: flex;
    flex-direction: column;
    width: 600px;
    height: auto;
    margin-bottom: 1rem;
    margin-top: 10rem;
}

/* Hide Mobile Dock Images */
.dock-mobile {
    display: none;
}

/* Hide Mobile Nav Bar */
.nav-bar-mobile {
    display: none;
}

/* Top-right menu */
nav.top-menu {
    margin-left: auto;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    align-items: flex-end;
    padding-top: 0rem;
    padding-right: 0;
    margin-bottom: 2rem;
}

nav.top-menu a {
    white-space: nowrap;
    text-decoration: none;
    color: #444291;
    font-weight: bold;
    padding: 0;
    text-align: right;
    width: 100%;
    transition: color 0.2s ease;
}

nav.top-menu a:hover {
    color: #555;
}

body.about nav.top-menu a {
    color: #ffffff;
}

body.about nav.top-menu a:hover {
    color: #dddddd;
}

body.about nav.top-menu {
    margin-bottom: 0;
}

nav.top-menu a.active {
    color: #555;
    font-weight: bold;
}

body.about nav.top-menu a.active {
    color: #dddddd;
}

/* Mobile Layout */
@media (max-width: 768px) {

    /* Stack all columns vertically */
    .main-content {
        flex-direction: column;
        align-items: center;
        gap: 0 !important;
        
    }

    /* Make every column full width on mobile */
    .left-side,
    .middle-side,
    .right-side,
    .nav-bar {
        width: 100% !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        margin-left: 0 !important;
        padding: 0 !important;
        text-align: left;
    }
    
    body.about main {
    width: 100% !important;
    } 
    
    body.home main {
    width: 100% !important;
    }
    
    body.contact main {
    width: 100% !important;
    } 

    /* Hide Desktop Nav Bar */
    .nav-bar {
        display: none;
    }

    /* Show Mobile Nav Bar */
    .nav-bar-mobile {
        display: block;
    }

    /* Make nav horizontal on mobile */
    nav.top-menu {
        flex-direction: row;
        justify-content: center;
        gap: 1rem;
        order: -1;
    }

    /* Ensure images scale down */
    img {
        max-width: 50%;
        height: auto;
    }

    /* Show Mobile Dock Images */
    .dock-mobile {
        display: block;
    }

    /* Hide Desktop Dock Images */
    .dock {
        display: none;
    }

    /* Hide Desktop Dock Images */
    .dock2 {
        display: none;
    }

    /* Remove invisible heading */
    .invisible-heading {
        display: none;
    }

    /* Remove margin and padding from all children except paragraphs */
    body.about .middle-side>*,
    body.about .right-side>* {
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Remove margin for the first <p> in .right-side */
    body.about .right-side p:first-of-type {
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Horizontal About Page Images */
    body.about .left-side {
        width: 100% !important;
        display: flex;
        flex-direction: row;
        gap: 1rem;
        align-items: center;
        justify-content: center;
        flex-wrap: nowrap;
    }

    /* Horizontal Index/Contact Page Images */
    .image-row {
        width: 100% !important;
        display: flex;
        flex-direction: row;
        gap: 1rem;
        align-items: center;
        justify-content: center;
        flex-wrap: nowrap;
    }

    .mari {
        margin-top: 0rem;
    }

    nav.top-menu {
        display: flex;
        justify-content: center;
        gap: 1rem;
        /* spacing between links */
    }

    nav.top-menu a {
        display: inline-block;
        width: 100px;
        /* or any fixed width */
        text-align: center;
    }

    body.home main {
        margin-left: 0rem;
    }

}