:root {
    --aurora: #59A297;
    --forest: #2E6F6A;
    --mint: #A8D9C5;
    --slate: #3B3B3B;
    --white: #FFFFFF;
}

body {
    margin: 0;
    font-family: 'Roboto', sans-serif;
    background: var(--white);
    color: var(--slate);
    overflow-x: hidden;
}

/* HERO */

.hero {
    background: linear-gradient(135deg, var(--aurora), var(--forest));
    padding: 3rem 1.5rem;
    color: var(--white);
    /*border-bottom-left-radius: 40px;*/
    /*border-bottom-right-radius: 40px;*/
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.hero_inner {
    max-width: 1100px;
    margin: auto;
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.hero_photo {
    width: 160px;
    height: 160px;
    border-radius: 999px;
    overflow: hidden;
    border: 4px solid var(--mint);
    box-shadow: 0 6px 18px rgba(0,0,0,0.3);
}

.hero_photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* NAVIGATION */

/* NAVIGATION – FIXED FOR MOBILE AND DESKTOP */

.top_bar {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--white);
    padding: 0.5rem 1rem;
    box-shadow: 0 3px 12px rgba(0,0,0,0.1);
}

/* Desktop default */
.nav {
    display: flex;
    justify-content: left;
    gap: 0.6rem;
    flex-wrap: nowrap;
}

.nav_button {
    background: var(--mint);
    border: none;
    padding: 0.45rem 1rem;
    border-radius: 14px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: 0.2s ease;
}

.nav_button:hover,
.nav_button.active {
    background: var(--forest);
    color: var(--white);
}

/* MOBILE FIX */
@media (max-width: 630px) {

    .nav {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding-bottom: 0.6rem;
        gap: 0.8rem;
        -webkit-overflow-scrolling: touch;
    }

    /* Hide scrollbar */
    .nav::-webkit-scrollbar {
        display: none;
    }

    .nav_button {
        flex: 0 0 auto;
        scroll-snap-align: center;
        font-size: 0.9rem;
        padding: 0.55rem 1.1rem;
        border-radius: 20px;
        white-space: nowrap;
    }
}


/* BOOK LAYOUT */

.book {
    padding: 2rem 1rem;
}

.page {
    max-width: 900px;
    margin: 2rem auto;
    background: var(--white);
    border-radius: 18px;
    padding: 2rem;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.page_image {
    width: 100%;
    border-radius: 14px;
    margin: 1rem 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* FOUNDATIONS CAROUSEL */
/* Button inside foundation cards */
.foundation_button {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.55rem 1.4rem;
    background: var(--forest);
    color: var(--white);
    border: none;
    border-radius: 999px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: 0.2s ease;
}

.foundation_button:hover {
    background: var(--aurora);
    transform: translateY(-2px);
}

/* Remove blue underline on link wrappers */
.foundation_link {
    text-decoration: none;
    color: inherit;
}

/* Vertical Foundation Cards */

.foundation_stack {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.foundation_item {
    background: var(--mint);
    border: 3px solid var(--forest);
    border-radius: 18px;
    padding: 1.5rem;
    box-shadow: 0 6px 18px rgba(0,0,0,0.1);
}

.foundation_item h3 {
    margin-top: 0;
    margin-bottom: 0.8rem;
    font-size: 1.25rem;
    font-weight: 700;
}

.foundation_img {
    width: 300px;
    border-radius: 14px;
    margin-bottom: 0.9rem;
    display: block;
}

/* Hide broken or missing images automatically */
.foundation_img[src=""],
.foundation_img[src="#"],
.foundation_img:not([src]) {
    display: none;
}

/* Desktop styling */
@media (min-width: 900px) {
    .foundation_item {
        padding: 2rem;
    }

    .foundation_item h3 {
        font-size: 1.3rem;
    }
}


/* DESKTOP GRID */
@media (min-width: 900px) {
    .foundations_slider {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        overflow: visible;
    }
    .foundation_card {
        flex: none;
        width: auto;
    }
}

/* GALLERY */

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1rem;
}

.gallery img {
    width: 100%;
    border-radius: 14px;
}



/* CONTACT SECTION – MOBILE FIX */

.page#contact {
    padding-top: 2.5rem; /* space below sticky nav */
}

.contact_wrapper {
    max-width: 650px;
    margin: 0 auto;
    text-align: left;
}

/* Intro text */
.contact_intro {
    font-size: 1rem;
    margin: 0 auto 1.4rem;
    max-width: 500px;
    line-height: 1.45;
}

/* Contact card */
.contact_card {
    width: 100%;
    padding: 1.4rem 1.2rem;
    border-radius: 16px;
    box-shadow: none;
}
/* Form labels */
.form_group label {
    font-weight: 500;
    font-size: 0.95rem;
    margin-bottom: 0.3rem;
    display: block;
}

/* Inputs look too big - FIX */
.form_group input,
.form_group textarea {
    width: 100%;
    padding: 0.8rem 0.8rem;
    border-radius: 10px;
    border: 1px solid var(--mint);
    font-size: 1rem;
}

/* Make textareas not giant on mobile */
.form_group textarea {
    min-height: 100px;
    resize: vertical;
}

/* Send button fix */
.submit_button {
    padding: 0.7rem 2.5rem;
    background: var(--forest);
    color: var(--white);
    border: none;
    border-radius: 999px;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.2s;
    align-self: center;
    width: auto;
    min-width: 140px;
}

.submit_button:hover {
    background: var(--aurora);
    transform: translateY(-2px);
}



/* TWO COLUMN LAYOUT FOR FOUNDATIONS ON DESKTOP */
@media (min-width: 900px) {

    .foundation_stack {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem 2rem; /* vertical and horizontal gap */
    }

    .foundation_link {
        display: block;
        height: 100 percent;
    }

    .foundation_item {
        height: 100 percent;
    }
}




/* MOBILE RULES */
@media (max-width: 600px) {

    /* Reduce spacing above heading */
    .page#contact {
        padding-top: 1.2rem;
    }

    .contact_card {
        display: flex;
        flex-direction: column;
        width: 100%;
        padding: 1.1rem 1rem;
        border-radius: 14px;
        /* box-shadow: 0 4px 12px rgba(0,0,0,0.06); */
    }

    .form_group input,
    .form_group textarea {
    width: 100%;
    margin: 0;
    border-radius: 10px;
}
    .submit_button {
        width: 100%;
        padding: 0.85rem 0;
        border-radius: 999px;
        font-size: 1rem;
    }
}


/* Mobile adjustments */

@media (max-width: 600px) {
    #contact .page_inner {
        padding: 1.5rem 1rem;
        max-width: 100 percent;
    }

    .contact_card {
        width: 100 percent;
        margin: 0 auto;
        padding: 1.2rem 1rem;
        border-radius: 14px;
        box-shadow: none;
        box-sizing: border-box;
    }

    .form_group {
        margin-bottom: 1rem;
        text-align: left;
    }

    .form_group input,
    .form_group textarea {
        width: 100 percent;
        padding: 0.8rem;
        font-size: 0.95rem;
        box-sizing: border-box; /* THIS FIXES YOUR OVERFLOW */
    }

    .submit_button {
        width: 100 percent;
        margin-top: 1rem;
        padding: 0.85rem 0;
        border-radius: 999px;
        font-size: 1rem;
    }
}

/* FOOTER */

.footer {
    text-align: center;
    padding: 2rem;
    font-size: 0.9rem;
}

@media screen and (max-width: 600px) {

    .hero_inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1.5rem;
    }

    .hero_text {
        text-align: center;
    }

    .hero_photo {
        margin: 0 auto;
    }
    
    .nav {
    display: flex;
    justify-content: left;
    flex-direction: column;
    gap: 0.6rem;
    flex-wrap: nowrap;
   }
  
}

/* Fix individual foundation pages on mobile */
@media screen and (max-width: 700px) {

    .page.page-mobile {
        max-width: 100% !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0.5rem !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        background: var(--white) !important;
    }

    .page.page-mobile .foundation_item {
        padding: 1.4rem !important;
        border-radius: 6px !important;
        width: 100% !important;
        margin: 0 !important;
    }

    /* Make text readable */
    .page.page-mobile,
    .page.page-mobile * {
        font-size: 1.15rem !important;
        line-height: 1.55 !important;
    }

    .page.page-mobile h2 {
        font-size: 1.45rem !important;
        margin-bottom: 1rem !important;
    }
}


