/* start general formatting */
:root {
    --green-dark: #1d6c43;
    --green-mid: #319561;
    --green-light: #38a96f;
    --text: #2b3a30;
    --card-bg: #ffffff;
    --shadow: 0 4px 14px rgba(0, 0, 0, 0.12), 0 2px 4px rgba(0, 0, 0, 0.06);
}

html {
    height: 100%;
}

body {
    background-color: rgb(233, 255, 237);
    /* very faint repeating leaf outlines - remove these two lines to go back to plain mint */
    background-image: url('images/leaf-pattern.svg');
    background-size: 160px 160px;
    color: var(--text);
    font-family: 'Nunito Sans', sans-serif;
    line-height: 1.6;
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1, h2, h3 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: var(--green-dark);
    line-height: 1.3;
}


.about-us h2::after,
.quote-form h2::after,
.client-section h3::after {
    content: "";
    display: block;
    width: 60px;
    height: 3px;
    margin: 0.5rem auto 0;
    background-color: var(--green-light);
    border-radius: 2px;
}

/* form controls don't inherit the page font by default */
input, textarea, button {
    font-family: inherit;
    font-size: 1rem;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--green-light);
    box-shadow: 0 0 0 3px rgba(56, 169, 111, 0.25);
}

a, button {
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

a:focus-visible,
button:focus-visible {
    outline: 3px solid var(--green-light);
    outline-offset: 2px;
}

.page-heading {
    text-align: center;
    margin: 1.75rem 0 0.5rem;
}
/* end general formatting */


/* start header */
header {
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2vw;
    background-color: #ffffff;
    isolation: isolate;
}

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 0% 67%;
    opacity: 19%;
    filter: brightness(1);
    z-index: -1;
}

.header-logo {
    height: 17.5vh;
}

.social-links {
    display: flex;
    gap: 1vw;
}

.social-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    background-color: #1d6c43;
    color: azure;
    border-radius: 50%;
    box-shadow: var(--shadow);
}

.social-button svg {
    width: 1.4rem;
    height: 1.4rem;
}

.social-button:hover {
    background-color: #38a96f;
    transform: translateY(-2px);
}
/* end headre */


/* start footer */
footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 2vh 0;
    background-color: #1d6c43;
    color: azure;
    border-radius: 20px 20px 0 0;
    box-sizing: border-box;
    /* auto pushes the footer to the bottom of the screen on short pages */
    margin-top: auto;
}

/* the last content block before the footer always keeps a 5vh gap above the footer
   (its own last child gets no extra margin, so the gap is exactly 5vh) */
body > :nth-last-child(2 of :not(script)) {
    margin-bottom: 5vh;
}

body > :nth-last-child(2 of :not(script)) > :last-child {
    margin-bottom: 0;
}

.left-footer {
    margin-left: 5vw;
}

.right-footer {
    margin-right: 5vw;
}

footer .social-button {
    background-color: whitesmoke;
    color: #1d6c43;
}

footer .social-button:hover {
    background-color: azure;
}
.footer-link {
    color: azure;
    margin-left: 0.5rem;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.footer-link:hover {
    color: #ffffff;
}
/* end footer */


/* start navigation formatting */
.nav-bar {
    background-color: #1d6c43;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
    height: 50px;
}

.nav-text-left {
    padding-left: 2vw;
    padding-bottom: 1vh;
    padding-top: 1vh;
}

.nav-text-right {
    padding-right: 2vw;
    padding-bottom: 1vh;
    padding-top: 1vh;
    display: flex;
    align-items: center;
}

.nav-text-left a,
.nav-text-right a {
    color: azure;
    text-decoration: none;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 17.5px;
    font-weight: 600;
}

.nav-text-left a:hover,
.nav-text-right a:hover {
    background-color: #38a96f;
}

.nav-user-full {
    display: flex;
    align-items: center;
}

/* profile button + dropdown: hidden until nav.js finds the full version doesn't fit */
.profile-menu {
    display: none;
    position: relative;
}

.nav-compact .nav-user-full {
    display: none;
}

.nav-compact .profile-menu {
    display: block;
}

.profile-button {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background-color: var(--green-mid);
    color: azure;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.profile-button::-webkit-details-marker {
    display: none;
}

.profile-button:hover,
.profile-menu[open] .profile-button {
    background-color: var(--green-light);
}

.profile-button svg {
    width: 1.3rem;
    height: 1.3rem;
}

.profile-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 0.5rem);
    z-index: 20;
    display: flex;
    flex-direction: column;
    min-width: 11rem;
    padding: 0.4rem;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.profile-name {
    padding: 0.45rem 0.75rem;
    color: var(--text);
    font-weight: 600;
    border-bottom: 1px solid #dcebe1;
    margin-bottom: 0.3rem;
    overflow-wrap: anywhere;
}

.nav-text-right .profile-dropdown a {
    color: var(--green-dark);
    padding: 0.45rem 0.75rem;
    border-radius: 6px;
}

.nav-text-right .profile-dropdown a:hover {
    background-color: rgb(233, 255, 237);
}

.nav-greeting {
    color: azure;
    padding-right: 0.5vw;
    padding-left: 0.5vw;
}

.active-page {
    background-color: #319561;
}
/* end navigation formatting */


/* start flash messages */
.flash-messages {
    width: 50vw;
    margin: 1vh auto;
    padding: 1vh 1vw;
    background-color: rgb(79, 122, 79);
    color: azure;
    border-radius: 10px;
    box-sizing: border-box;
}

.flash-messages p {
    margin: 0;
}
/* end flash messages */


/* start auth forms */
.auth-form {
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    width: 30vw;
    margin: 2vh auto;
    padding: 1.5vw;
    border: 2px solid #1d6c43;
    border-radius: 20px;
    background-color: var(--card-bg);
    box-shadow: var(--shadow);
}

.auth-form label {
    margin-top: 1vh;
}

.auth-form input {
    padding: 1vh 0.5vw;
    margin-top: 0.5vh;
    border: 1px solid #1d6c43;
    border-radius: 5px;
}

.auth-form button {
    margin-top: 2vh;
    padding: 1vh;
    background-color: #1d6c43;
    color: azure;
    border: none;
    border-radius: 10px;
    cursor: pointer;
}

.auth-form button:hover {
    background-color: #38a96f;
}

.auth-switch {
    text-align: center;
    color: #1d6c43;
}

.auth-switch a {
    color: #1d6c43;
    font-weight: bold;
    text-decoration: none;
}

.auth-switch a:hover {
    color: #38a96f;
    text-decoration: underline;
}
/* end auth forms */


/* start index page */
/* same width, padding and border as the About Us box so their edges line up */
.index-cta {
    width: 100%;
    max-width: 70vw;
    margin: 2.5rem auto 0;
    padding: 2.5rem 1.5vw;
    border: 2px solid var(--green-dark);
    text-align: center;
    background-color: var(--green-dark);
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.index-cta h1 {
    margin: 0 1rem 0.75rem;
    color: #ffffff;
    font-size: clamp(1.5rem, 3vw, 2.25rem);
}

.index-cta p {
    margin: 0 auto 1.5rem;
    padding: 0 1rem;
    max-width: 36rem;
    color: #e6f5ea;
    font-size: 1.1rem;
}

.cta-button {
    display: inline-block;
    padding: 0.8rem 1.75rem;
    background-color: #ffffff;
    color: var(--green-dark);
    font-weight: 700;
    text-decoration: none;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.cta-button:hover {
    background-color: var(--green-light);
    color: #ffffff;
    transform: translateY(-2px);
}



.about-us {
    max-width: 70vw;
    margin: 0 auto;
    margin-top: 5vh;
    margin-bottom: 5vh;
    border: 2px solid #1d6c43;
    border-radius: 20px;
    padding: 1.5vw;
    background-color: var(--card-bg);
    box-shadow: var(--shadow);
}

.about-us h2{
    text-align: center;
}

.about-us > div {
    display: flex;
    align-items: center;
}

.about-us li {
    margin-left: 2vw;
}

.about-us-img-left {
    max-width: 34vw;
    margin-right: 2vw;
}
.about-us-img-right {
    max-width: 34vw;
    margin-left: 2vw;
}

.about-us-img-left,
.about-us-img-right {
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.about-us > div + div {
    margin-top: 2rem;
}
.service-list {
    margin: 0;
    padding: 0;
}
/* end index page */


/* start contact page */
.quote-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 40vw;
    margin: 0 auto;
    margin-top: 5vh;
    text-align: center;

    max-width: 70vw;
    width: 70vw;
    border: 2px solid #1d6c43;
    border-radius: 20px;
    padding: 1.5vw;

    background-color: var(--card-bg);
    box-shadow: var(--shadow);
}

.quote-form input,
.quote-form textarea {
    display: block;
    width: 100%;
    max-width: 28rem;
    margin-top: 0.75rem;
    padding: 0.7rem 0.9rem;
    box-sizing: border-box;
    color: var(--text);
    background-color: #fbfefc;
    border: 1px solid #b7d3c1;
    border-radius: 8px;
}

.quote-form input::placeholder,
.quote-form textarea::placeholder {
    color: #6b7f72;
}

.quote-form textarea {
    height: 9rem;
    resize: vertical;
}

.quote-form button {
    margin-top: 2vh;
    padding: 1vh 2vw;
    background-color: #1d6c43;
    color: azure;
    border: none;
    border-radius: 10px;
    cursor: pointer;
}

.quote-form button:hover {
    background-color: #38a96f;
    transform: translateY(-2px);
}

.contact-info {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5vw;
    margin: 3vh auto 0;
}

.contact-info-link {
    display: flex;
    align-items: center;
    gap: 0.5vw;
    padding: 1vh 1.5vw;
    background-color: #1d6c43;
    color: azure;
    text-decoration: none;
    font-weight: bold;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.contact-info-link:hover {
    background-color: #38a96f;
    transform: translateY(-2px);
}

.contact-info-link svg {
    width: 1.2rem;
    height: 1.2rem;
    flex-shrink: 0;
}
/* hidden spam trap field - kept off-screen rather than display:none so bots still see it */
.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.form-note {
    margin: 1rem 0 0;
    font-size: 0.9rem;
}

.form-note-top {
    margin: 0 0 0.5rem;
}

.form-note a {
    color: var(--green-dark);
    font-weight: 600;
}
/* end contact page */


/* start privacy page */
.privacy-notice {
    max-width: 70vw;
    margin: 3vh auto 0;
    padding: 1.5vw 2.5vw;
    border: 2px solid var(--green-dark);
    border-radius: 20px;
    background-color: var(--card-bg);
    box-shadow: var(--shadow);
}

.privacy-notice h2 {
    margin-top: 1.75rem;
    font-size: 1.2rem;
}

.privacy-notice a {
    color: var(--green-dark);
    font-weight: 600;
}
/* end privacy page */


/* start gallery posts */
.gallery-carousel {
    position: relative;
    max-width: 70vw;
    margin: 1rem auto 3vh;
}

.gallery-posts {
    display: flex;
    flex-direction: row;
    gap: 2vh;
    padding: 1.5vh 0.75vw;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 0.75vw;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

/* .gallery-posts has 1.5vh bottom padding (room for the card shadow), so use 1.5vh less
   margin here to keep the card itself 5vh above the footer */
body > .gallery-carousel:nth-last-child(2 of :not(script)) {
    margin-bottom: 3.5vh;
}

.gallery-posts::-webkit-scrollbar {
    display: none;
}

.gallery-post {
    flex: 0 0 100%;
    scroll-snap-align: start;
    box-sizing: border-box;
    border: 2px solid #1d6c43;
    border-radius: 20px;
    padding: 1.5vw;
    background-color: var(--card-bg);
    box-shadow: var(--shadow);
}

.gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
    width: 2.75rem;
    height: 2.75rem;
    border: none;
    border-radius: 50%;
    background-color: #1d6c43;
    color: azure;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-arrow:hover {
    background-color: #38a96f;
    transform: translateY(-50%) scale(1.1);
}

.gallery-arrow-left {
    left: 0.5rem;
}

.gallery-arrow-right {
    right: 0.5rem;
}

.gallery-post-images {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 2vw;
}

.gallery-delete-button {
    display: block;
    margin: 1vh auto 0;
    padding: 0.5vh 1vw;
    background-color: #b03a2e;
    color: azure;
    border: none;
    border-radius: 10px;
    cursor: pointer;
}

.gallery-delete-button:hover {
    background-color: #8e2f25;
    transform: translateY(-2px);
}

.gallery-post-images > div {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gallery-post-images img {
    width: 30vw;
    height: 40vh;
    object-fit: cover;
    border-radius: 10px;
}

.gallery-post-images p {
    margin-top: 0.5vh;
    font-weight: bold;
    color: #1d6c43;
}
/* end gallery posts */


/* start clients page */
.client-section {
    max-width: 60vw;
    margin: 3vh auto;
}

.client-section h3 {
    text-align: center;
}

.client-quote {
    border: 2px solid #1d6c43;
    border-radius: 20px;
    padding: 1vw 1.5vw;
    margin-top: 2vh;
    background-color: var(--card-bg);
    box-shadow: var(--shadow);
}

.client-quote p {
    margin: 0.3vh 0;
}

.client-close-button {
    margin-top: 1vh;
    padding: 0.5vh 1vw;
    background-color: #1d6c43;
    color: azure;
    border: none;
    border-radius: 10px;
    cursor: pointer;
}

.client-close-button:hover {
    background-color: #38a96f;
    transform: translateY(-2px);
}

.client-search {
    display: flex;
    justify-content: center;
    gap: 1vw;
    margin-top: 2vh;
}

.client-search input {
    padding: 1vh 0.5vw;
    border: 1px solid #1d6c43;
    border-radius: 5px;
    width: 20vw;
}

.client-search button {
    padding: 1vh 1vw;
    background-color: #1d6c43;
    color: azure;
    border: none;
    border-radius: 10px;
    cursor: pointer;
}

.client-search button:hover {
    background-color: #38a96f;
    transform: translateY(-2px);
}
/* end clients page */


/* start responsive: tablet and phone (max-width: 768px) */
@media (max-width: 768px) {
    /* start header */
    header {
        padding: 1vh 2vw;
        box-sizing: border-box;
    }

    .header-logo {
        height: 12.5vh;
    }
    /* end header */

    /* start footer */
    footer {
        flex-direction: column;
        gap: 1vh;
        text-align: center;
    }

    .left-footer,
    .right-footer {
        margin-left: 0;
        margin-right: 0;
    }
    /* end footer */

    /* start navigation formatting */
    .nav-bar {
        flex-wrap: wrap;
        row-gap: 0.5vh;
        height: auto;
        padding: 1vh 2vw;
    }

    .nav-text-left,
    .nav-text-right {
        flex-wrap: wrap;
    }
    /* end navigation formatting */

    /* start flash messages */
    .flash-messages {
        width: 90vw;
    }
    /* end flash messages */

    /* start auth forms */
    .auth-form {
        width: 90vw;
    }
    /* end auth forms */

    /* start index page */
    .index-cta {
        max-width: 90vw;
        margin-top: 1.5rem;
        padding: 2rem 1.5vw;
    }

    .about-us {
        max-width: 90vw;
    }

    .about-us > div {
        flex-direction: column;
    }

    .about-us-text1 {
        order: -1;
    }

    .about-us li {
        margin-left: 5vw;
    }

    .about-us-img-left,
    .about-us-img-right {
        max-width: 90vw;
        margin: 0 0 1.5vh 0;
    }
    /* end index page */

    /* start contact page */
    .quote-form {
        width: 90vw;
        max-width: 90vw;
    }

    .quote-form input,
    .quote-form textarea {
        max-width: 100%;
    }
    /* end contact page */

    /* start gallery posts */
    .gallery-carousel {
        max-width: 90vw;
    }

    .gallery-post-images {
        flex-direction: column;
        align-items: center;
    }

    .gallery-post-images img {
        width: 80vw;
        height: 30vh;
    }
    /* end gallery posts */

    /* start clients page */
    .client-section {
        max-width: 90vw;
    }

    .client-search {
        flex-direction: column;
        align-items: center;
    }

    .client-search input {
        width: 80vw;
    }
    /* end clients page */

    /* start privacy page */
    .privacy-notice {
        max-width: 90vw;
        padding: 3vh 5vw;
    }
    /* end privacy page */
}
/* end responsive: tablet and phone */


/* start responsive: small phone (max-width: 480px) */
@media (max-width: 480px) {
    .contact-info-link {
        width: 80vw;
        justify-content: center;
    }

    .social-button {
        width: 2.25rem;
        height: 2.25rem;
    }
}
/* end responsive: small phone */