/* General Styles */
@font-face {
    font-family: 'Coco Sharp';
    src: url('Coco-Sharp-Regular.woff2');
}

body {
    font-family: 'Coco Sharp';
    color: #6C6C6C;
    margin: 0 auto; /* Center the body */
    min-height: 100vh;
    background-color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    max-width: 1152px; /* Adjust this value as needed */
    width: 100%;
    padding: 0 5rem; /* Adds space on the sides */
    box-sizing: border-box; /* Ensures padding doesn't affect max-width */
}

h1 {
    margin: 0 0 .7em 0;
    color: #6C6C6C;
    font-size: 1.5em;
    font-variant: small-caps;
    font-weight: normal;
}

h2 {
    margin: 0;
    color: #009900;
    font-size: 1.3em;
    font-variant: small-caps;
    font-weight: normal;
}

h3 {
    margin: 0;
    color: #6C6C6C;
    font-size: 1.1em;
    font-variant: small-caps;
    font-weight: normal;
}

p {
    margin-top: 0;
    margin-bottom: 1em;
}

header {
    background-color: white; /* Updated background color */
    width: 100%;
    #position: sticky;
    #top: 0;
    #z-index: 1000;
    color: #009900;
    transition: all 0.3s ease; /* Add transition for smooth resizing */
    padding: .8em 0 .2em 0;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .2rem 1rem 0rem .15rem;

}

header .logo {
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;

    margin-left: 5px; /* Add space to the left of the logo */
    margin-bottom: .6em;
}

header .logo img {
    max-height: 80%;
}

header .header-text {
    flex-grow: 1;
    text-align: left;
    margin-left: 1rem;
}


nav ul {
    list-style: none;
    padding: 0;
    display: flex;
    align-items: left;
    margin: 0;
    font-weight: normal;
}

nav li {
    margin: 0;
    align-items: left;
}

nav a {
    color: #6C6C6C;
    text-decoration: none;
    position: relative;
    padding: 0.5rem 0 0 0;
    font-size: 1.2em;
}

nav a::after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background: #009900;
    transition: width .3s;
}

nav a:hover::after {
    width: 100%;
    transition: width .3s;
}

.hero {
    height: 44vh;
    width: 96.5%;
    background: url('hero.jpg') no-repeat center 25%/cover;
    display: flex;
    align-items: center;
    justify-content: center;
    #background-attachment: fixed;
    margin: 0 1em 1em 1em; /* Ensure the hero section starts below the fixed header */
}


main {
    flex: 1;
    padding: 1rem 1rem 2rem 1rem;
    display: flex;
    font-size: 1rem;
    flex-direction: column;
}

main a {
    color: #009900;
}

main a:visited {
    color: #009900;
}

h2 {
    color: #009900;
}


.service-overview {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem; /* Adjust spacing between boxes */
    justify-content: space-around;
    margin-top: 2rem;
    margin-left: 1.5rem;
    margin-bottom: 1.75rem;
}

.service-overview .box {
    display: flex;
    flex-direction: row; /* Ensure image and text are side-by-side */
    width: 90%; /* Keep side-by-side alignment */
    box-sizing: border-box; /* Include padding and border in width calculation */
    text-align: left; /* Align text to the left */
    gap: 15px; /* Space between image and text */
    padding: 10px 10px 10px 0;
    height: auto; /* Allow the height to adjust dynamically */
    overflow: hidden; /* Prevent content overflow */
    align-items: flex-start; /* Align items at the top */
    min-width: 300px;
}

.service-overview .box img {
    flex-shrink: 0; /* Prevent the image from shrinking */
    height: 260px; /* Adjust height dynamically */
    width: auto; /* Maintain the image's aspect ratio */
    object-fit: cover; /* Ensure the image fills its allocated space */
    object-position: center; /* Show the middle part of the image */
    margin-top: .2em;
    vertical-align: middle;
    margin: auto;
    display: block;
    padding-right: 28px;
    padding-top: 1.5em;
}

.service-overview .box .text {
    flex-grow: 1; /* Allow text to take up the remaining space */
    word-wrap: break-word; /* Ensure long words break to avoid overflow */
    padding-right: 2em;
}


.service-overview .box p {
    margin: 5px 0 0;
    font-size: 0.9em;
    color: #6C6C6C; /* Optional for text color */
}



.client-overview {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem; /* Adjust spacing between boxes */
    justify-content: space-around;
    margin-top: 1.7em;
}

.client-overview .box {
    display: flex;
    flex-direction: row; /* Ensure image and text are side-by-side */
    width: 45%; /* Keep side-by-side alignment */
    box-sizing: border-box; /* Include padding and border in width calculation */
    text-align: left; /* Align text to the left */
    gap: 15px; /* Space between image and text */
    padding: 0 10px 0 10px;
    height: auto; /* Allow the height to adjust dynamically */
    overflow: hidden; /* Prevent content overflow */
    align-items: flex-start; /* Align items at the top */
    min-width: 300px;
}

.client-overview .box img {
    flex-shrink: 0; /* Prevent the image from shrinking */
    height: 250px; /* Adjust height dynamically */
    width: auto; /* Maintain the image's aspect ratio */
    max-width: 25%; /* Ensure the image takes up no more than 25% of the box width */
    object-fit: cover; /* Ensure the image fills its allocated space */
    object-position: center; /* Show the middle part of the image */
    filter: grayscale(100%);
    opacity: 0.75;
    margin-top: .2em;
}

.client-overview .box .text {
    flex-grow: 1; /* Allow text to take up the remaining space */
    word-wrap: break-word; /* Ensure long words break to avoid overflow */
}


.client-overview .box p {
    margin: 5px 0 0;
    font-size: 0.9em;
    color: #6C6C6C; /* Optional for text color */
}

@keyframes textFlash {
    0% { color: #009900; font-weight: bold; }
    50% { color: #6C6C6C; font-weight: bold; }
    100% { color: #6C6C6C; font-weight: normal; }
}

#contact:target, #contact:target * {
    animation: textFlash 2s ease-in-out 1;
}

footer {
    background-color: #6C6C6C; /* Ensure footer color is correct */
    color: white;
    text-align: center;
    padding: 1em .8em .8em .8em; /* Reduced height of the footer */
    margin: auto 1rem 0 1rem;
    font-size: 0.9rem;
    box-sizing: border-box;
    width: 98%;

}

/* Services Page */
.services-intro {
    text-align: center;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3.5rem 2.5rem; /* Add space between rows and columns */
    padding-bottom: 2em;
    margin-left: 2rem;
    margin-right: 2rem;
}

.contact-grid {
    display: inline-grid;
    grid-template-columns: 1;
    padding-bottom: 2em;
}

.service {
    background-color: #fff;
    border: 1px solid #ccc;
    padding: 1rem 1rem 0 1rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Align items to the start to remove gap */
    justify-content: flex-start; /* Ensure there is no gap */
    height: 100%;
    position: relative;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    text-align: left;
}

.contact {
    background-color: #fff;
    border: 1px solid #ccc;
    padding: 0 4rem 1rem 4rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Align items to the start to remove gap */
    justify-content: flex-start; /* Ensure there is no gap */
    height: 100%;
    position: relative;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    text-align: left;
}

.service-header {
    width: 100%;
    height: 5px;
    background-color: #009900; /* Line color at the top */
    position: absolute;
    top: 0;
    left: 0;
}

.service h3 {
    color: #009900;
    margin: 1rem 0 0 0; /* Remove top margin to remove gap */
    text-align: left;
    width: 100%;
}

.service p {
    text-align: left; /* Ensure the text is left-aligned */
    margin-top: 1rem; /* Remove top margin to remove gap */
}

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

    body {
        margin: 0;
        padding: 0;
    }

    nav a {
        font-size: 1rem;
    }

    .hero {
        height: 40vh; /* Reduce hero height on mobile */
        padding: 0;
        margin: 0;
        width: 100%;
    }

    main {
        padding: 1rem .5rem 0.5rem .5rem;
    }

    .services-grid {
        grid-template-columns: 1fr; /* Ensure grid collapses to one column on small screens */
        gap: 1.5rem 1rem; /* Reduce gap on mobile */
        margin-left: 1rem;
        margin-right: 1rem;
    }


    .service-overview {
        padding: 0;
        margin: 0 0 2em 0;
    }

    .service-overview .box {
        padding: 0;
        margin: 0;
    }

    .service-overview .box img {
        width: 0;
        margin: 0;
        padding: 0;
    }

    .service-overview .box .text {
        padding: 0;
        margin: 0;
        width: 100%;
    }

    header {
        padding: 0 0 0 0;
        margin: 0 0 0 0;
    }

    .header-container {
        padding: 0 .5rem 0 0;
        margin: 0 0 0 0;
    }

    header .logo {
        padding: 0 0 0 0;
        margin: 0 0 0 0;

    }

    header .logo img {
        padding: 0 0 0 0;
        margin: 0 0 0 0;

    }

    header .header-text {
        padding: 0 0 0 0;
        margin: 0 0 0 0;
        width: 100%;
    }


    .client-overview div {
        width: 100%;
    }

    .client-overview .box {
        width: 90%; /* Keep side-by-side alignment */
    }

    footer {
        padding: 0.5rem 0.4rem 0.4rem 0.4rem; /* Adjust footer padding on mobile */
    }
}