html {
    scroll-behavior: smooth;
}

body {
    background-color: #fff7f1;
    background-image: url('images/background_pattern.png');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: top center;
    margin: 0;
    padding: 0;
    max-width: 100%;
    overflow-x: hidden;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

div {
    max-width: 100%;
    height: auto;
}

h1 {
    font-family: 'Aleo', serif;
    font-weight: 700;
    font-size: clamp(32px, 5vw, 48px);
    line-height: 1.2;
    color: #2e4057;
}

h2 {
    font-family: 'Aleo', serif;
    font-weight: 700;
    font-size: clamp(24px, 4vw, 37.32px);
    line-height: 1.3;
    color: #2e4057;
}

h3 {
    font-family: 'Aleo', serif;
    font-weight: 500;
    font-size: clamp(18px, 2.5vw, 26.66px);
    line-height: 1.3;
    color: #2e4057;
}

body {
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 400;
    font-size: clamp(16px, 2vw, 21.33px);
    line-height: 1.5;
    color: #2e4057;
}

#site_wrap {
    min-height: 100vh;
    display: grid;
    grid-template-columns:
        1fr repeat(4, minmax(0, 290px)) 1fr;
    grid-gap: 0px;
    grid-template-rows:
        auto auto auto auto auto;
    grid-template-areas:
        "menu menu menu menu menu menu"
        "hero hero hero hero hero hero"
        "welcome welcome welcome welcome welcome welcome"
        ". resources resources resources resources ."
        "footer footer footer footer footer footer"
}


.menu {
    grid-area: menu;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to right, #495f77, #2e4057);
    height: 60px;
    top: 0;
    z-index: 1000;
}

.menu .nav {
    list-style: none;
    padding: 0;
    display: flex;
    gap: 0px;
    margin-right: 1rem;
}

.menu > img {
    margin-left: 1rem;
    margin-top: 10px;
}


.menu .nav a {
    display: inline-block;
    text-decoration: none;
    background-color: #0892a5;
    color: #fff7f1;
    border: 1px solid #a9a5a2;
    border-radius: 7px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    padding:4px 26px;
    white-space: nowrap;
    margin: 0 20px; 
    font-family: 'Aleo', serif;
    font-size: clamp(16px, 2vw, 20px);
}

.menu .nav a[aria-current="page"] {
    background-color: #fff7f1;
    color: #0892a5;
    border-color: #a9a5a2;
    font-weight: 700;
    font-size: inherit;
}

.menu .nav a:hover {
    background-color: #9bcbce;
    border-color: #a9a5a2;
    color: #05616d;
    font-weight: 700;
    font-size: inherit;
    transition: all 0.2s ease-in-out;
}

.menu .nav a:active {
    background-color: #fff7f1;
    border-color: #a9a5a2;
    color: #0892a5;
    font-weight: 700;
    font-size: inherit;
}

.menu .nav a:focus-visible {
    outline: 3px solid #ef6b32;
    outline-offset: 2px;
}

.menu-toggle {
    display: none;
    font-size: 32px;
    background: none;
    border: none;
    color: white;
    margin-left: 20px;
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropbutton {
    background-color: #0892a5;
    color: #fff7f1;
    border: 1px solid #a9a5a2;
    border-radius: 7px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    padding: 8px 26px;
    font-family: 'Aleo', serif;
    font-size: clamp(16px, 2vw, 20px);
    cursor: pointer;
    white-space: nowrap;
    margin: 0 20px;
}

.dropdown-content {
    display: none;
    position: absolute;
    width: clamp(250px, 35vw, 330px);
    z-index: 1000;
    list-style: none;
    padding: 0;
}

.dropdown-content a {
    display: block;
    width: 100%;
    box-sizing: border-box; 
}

.dropdown:hover .dropdown-content {
    display: block;
}


.hero {
    grid-area: hero;
    position: relative;
    background-image: url('images/hero_image.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    height: 486px;
    width: 100%;
}

.hero-overlay {
    position: absolute;
    top: 50%;
    right: 5%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1.5rem;
    z-index: 2;
}

.hero-logo {
    
    width: 100%;
    height: auto;
}

.hero-cta {
    font-family: 'Aleo', serif;
    font-size: 24pt;
    font-weight: 700;
    text-align: center;
    background-color: #ef6b32;
    color: #fff7f1;
    border: 1px solid #a9a5a2;
    padding: 16px 32px;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    text-decoration: none;
    display: inline-block;
    margin-right: 70px;
}

.hero-cta .cta-line1 {
    display: block;
    font-size: 1.25em;
    line-height: 1.2;
}

.hero-cta .cta-line2 {
    display: block;
    font-size: 1em;
}

.hero-cta:hover {
    background-color: #fff7f1;
    color: #ef6b32;
    font-weight: 900;
    border: 1.5px solid #ef6b32;
    transition: all 0.2s ease-in-out;
}

.welcome {
    grid-area: welcome;
    padding: 0 2rem;
    max-width: 75%;
    margin: 0 auto;
}

.welcome h3 {
    margin-bottom: 0;
}

.welcome p {
    margin-top: 8px;
}

.welcome h2 {
    padding-top: 30px;
}

#resources_wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-gap: 40px;
    grid-area: resources;
    margin-bottom: 50px;
}

.resource_card {
    display: flex;
    flex-direction: row;
    background-color: #e4dfda;
    max-width: 100%;
    min-height: 240px;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    align-items: center;
    cursor: pointer;
}

.card_image {
    width: 200px;
    height: 200px;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
    margin-left: 10px;
}

.card_image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    box-shadow: none;
}

.card_text {
    padding: 1rem;
    width: 55%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.card_heading {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: 10px;
    margin-bottom: 0.5rem;
}

.card_heading h3{
    font-weight: 700;
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    color: #0892a5;
    margin-top: 0;
    margin-bottom: 5px ;
}

.card_icon {
    height: 50px;
    width: auto;
    flex-shrink: 0;
    margin-right: 5px;
}

.card_text p{
    text-align: center;
    margin: 0;
}

.card_text p:first-of-type {
    display:block;
    font-family: 'Aleo', serif;
    font-weight: 400;
    font-size: clamp(0.9rem, 2vw, 1.125rem);
    color: #2e4057;
    margin-bottom: 0.5rem;
}

.card_divider {
    height: 1px;
    background-color: #a9a5a2;
    border: none;
    margin: 0 auto;
    width: 90%;
}

.card_text p:last-of-type {
    font-family: 'Source Sans 3', sans-serif;
    font-size: clamp(0.9rem, 2vw, 1.125rem);
    line-height: 1.4;
    margin-top: 8px;
}

.resource_card_link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.resource_card_link:focus-visible {
    outline: 3px solid #ef6b32;
    outline-offset: 2px;
}

.resource_card_link:hover .resource_card {
    background-color: #dce5e4;
    transition: background-color 0.2s ease-in-out;
}

.resource_card:hover {
    transform: translateY(-3px);
    transition: transform 0.2s ease-in-out;
}


.footer {
    background: linear-gradient(to right, #495f77, #2e4057);
    color: #fff7f1;
    padding: 40px;
    grid-area: footer;
}

.footer a,
.footer a:visited {
    color: rgb(229, 246, 254);
}

.footer_container {
    margin: 0;
    display: grid;
    grid-template-columns: 20px 1fr auto auto 20px;
    grid-template-rows: auto auto auto;
    grid-template-areas:
        ". email email email ."
        ". about logo credits ."
        ". copyright copyright copyright .";
    gap: 0.5rem 1rem;
    color: #fff7f1;
}

.broken_link_note {
    grid-area: email;    
    margin-bottom: 1rem;
}


.footer_about{
    grid-area: about;
    font-size: clamp(0.9rem, 1.5vw, 1rem);
    padding-right: 70px;
}

.footer h3{
    color: #fff7f1;
    font-size: clamp(1.125rem, 2vw, 1.25rem);
}

.footer_copyright{
    grid-area: copyright;
    font-size: clamp(0.9rem, 1.5vw, 1rem);
}

.footer_logo {
    grid-area: logo;
    width: 150px;
    margin-top: 1.5rem;

}

.footer_credits {
    grid-area: credits;
    font-size: clamp(0.85rem, 1.2vw, 0.9rem);
    margin-top: 1.5rem;
}

.footer_credits h3{
    font-size: clamp(0.95rem, 1.5vw, 1rem);
    text-decoration: underline;
}






@media screen and (max-width:768px) {
    #site_wrap {
        display: grid;
        grid-template-columns: 1fr;
        grid-template-areas:
            "menu"
            "hero"
            "welcome"
            "resources"           
            "footer";
        padding: 16px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }


    .menu-toggle {
        display: block;
        font-size: 34px;
        background: none;
        color:#fff7f1;
        border: none;
        margin-left: auto;
        padding: 0;
        align-self: flex-start;
        z-index: 1100;
    }

    .menu {
        display: flex;
        justify-content: space-between;
        height: auto; 
        align-items: center;
        padding: 0 16px;
    }

    .menu .nav {
        display: none;
    }

    .menu > img {
        height: 50px;
        width: auto;
        margin: 0;
        padding-top: 4px;
    }

    .nav-wrapper {
        position: relative;
        overflow: visible;
    }

    .nav-wrapper.open .nav {
        position: absolute;
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        top: 100%;
        width: 100%;
        padding: 0;
    }

    .menu .nav a,
    .menu .nav .dropbutton {
        display: inline-block;
        min-width: 155px;
        text-align: center;
    }

    .nav-wrapper.open .nav .dropdown {
        order: 99;
    }


    .hero {
        height: 226px;
    }

    .hero-overlay {
        right: 10px;
        gap: 1rem;
    }

    .hero-logo {
        max-width: 50%;
        height: auto;
    }

    .hero-cta {
        font-size: 14pt;
        padding: 10px 20px;
        margin-right: 10px;
    }

    .welcome {
        max-width: 100%;
    }
    
    .welcome h2 {
        margin-bottom: 10px;
    }


    #resources_wrapper{
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 20px;
        justify-self: center;
    }

    .resource_card {
        flex-direction: column;
        max-width: 500px;
        min-height: 240px;
        text-align: center;
        padding: 10px 10px;
        margin: 16px 0;
    }

    .card_image {
        width: 100%;
        margin: 0;
        padding: 0;
        overflow: hidden;
    }

    .card_image img {
        max-width: 100%;
        height: auto;
        object-fit: cover;
        display: block;
    }

    .card_heading h3{
        text-align: left;
    }

    .card_icon {
        margin-right: 5px;
        margin-bottom: 5px;
    }

    .card_text {
        padding: 16px;
        width: 90%;
    }

    .card_text h3 {
        font-size: 22px;
        margin-bottom: 4px;
    }

    .card_text p {
        font-size: 0.95rem;
        line-height: 1.4;
    }

    .card_divider {
        margin: 8px;
    }

    .footer_container {
        grid-template-columns: 1fr;
        grid-template-areas: 
            "email"
            "about"
            "copyright"
            "logo"
            "credits";
        gap: .5em;
        padding: 0;
        margin: 0;
    }

    .broken_link_note {
        font-size: 20px;
        padding-bottom: 24px;
    }
    
    .footer_about {
        padding-right: 0;
    }

    .footer_copyright{
        padding-bottom: 15px;
    }
            
    .footer_logo {
        max-width: 70%;
        display: block;
        margin: 0 auto;
    }

    .footer_credits {
        text-align: center;
        margin: 0;
    }
}

@media screen and (max-width: 1040px) and (min-width: 769px) {
        #site_wrap {
        display: grid;
        grid-template-columns: 1fr;
        grid-template-areas:
            "menu"
            "hero"
            "welcome"
            "resources"           
            "footer";
        padding: 16px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    
    .menu {
        display: flex;
        justify-content: space-between;
        height: 60px; 
        padding: 0 16px;
    }

    .hero {
        height: 240px;
        width: 100%;
    }

    .hero-overlay {
        right: 2rem;
        gap: 1rem;
    }

    .hero-logo {
        max-width: 50%;
        height: auto;
    }

    .hero-cta {
        font-size: 14pt;
        padding: 10px 20px;
        margin-right: 10px;
    }

    .welcome {
        max-width: 100%;
    }
   
    #resources_wrapper{
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 20px; 
        justify-self: center;
               
    }

    .resource_card {
        flex-direction: column;
        max-width: 600px;
        min-height: 240px;
        text-align: center;
        padding: 10px 10px;
        margin: 16px 0;
    }

    .card_image {
        width: 50%;
        margin: 0;
        overflow: hidden;
    }

    .card_image img {
        max-width: 100%;
        height: auto;
        object-fit: cover;
        display: block;
    }


    .card_text h3 {
        font-size: 22px;
        margin-bottom: 4px;
        text-align: left;
    }

    
    .footer_container {
        grid-template-columns: 1fr 1fr;
        grid-template-areas: 
            "email email"
            "about about"
            "copyright copyright"
            "logo credits";
        gap: .5em;
        padding: 0;
        margin: 0;
    }

    .broken_link_note {
        font-size: 20px;
     }
    
    .footer_about {
        padding-right: 0;
    }
            
    .footer_logo {
        max-width: 70%;
        display: block;
        margin: 0 auto;
    }

    .footer_credits {
        text-align: center;
        margin: 0;
    }

}