/*
Theme Name: OETT
Author: Finn Commerford
Description: Custom theme written for The Orthotic Education and Training Trust.
Version: 1.0
Text Domain: oett
*/


:root {

    --font:             'Open Sans', sans-serif;

    --base-size:        1rem; /* minimum size for accessibility */

    --font-regular:     400;
    --font-semi-bold:   500;
    --font-bold:        600;
    --font-extra-bold:  700;

    --black:          #222222;
    --dark-grey:      #343333;
    --grey:           #676565;
    --light-grey:     #EFEFEF;
    --off-white:      #F8F8F8;
    --white:          #FFFFFF;
    --green:          #11653C;
    --purple:         #5F3F66;
    --light-purple:   #7D7689;

}


/* <html> */
html {
    scroll-behavior: smooth;
    height: 100%;
    margin: 0;
}


/* <body> */
body {
    height: 100%;
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: var(--font)!important;
}


/* <header> */
header {
    background-color: var(--white);
    color: var(--black);
}
.home header {
    background-color: var(--off-white);
}
header {
    padding: 2.5rem 0rem 0rem 0rem;
}
.home header {
    padding: 2.5rem 0rem 5rem 0rem;
}


/* <main> */
main {
    flex: 1;
    padding: 2rem 0rem 4rem 0rem;
}
.page-template-contact main {
    padding: 2rem 0rem 0rem 0rem;
}
.home main {
    padding: 0rem;
}


/* <section> */
.page-template-contact section {
    padding-bottom: 4rem;
}
.home section,
.page-template-contact .contact {
    padding: 4rem 0rem;
}


/* <article> */
article {
    margin: 0.75rem 0rem 1.5rem 0rem;
}
.blog article,
.archive article,
.case-studies article {
    background-color: var(--light-grey);
    padding: 1.5rem 1.5rem;
    border-radius: 1.5rem;
}


/* <hr /> */
hr {
    border: 0.15rem solid var(--purple);
    border-radius: 1rem;
}
header hr {
    border-color: var(--light-purple);
}
article hr {
    margin: 0.75rem 0rem;
}
footer hr {
    margin: 1rem 0rem 2rem 0rem;
}


/* <h1>, <h2>, <h3>, <h4>, <h5>, <h6> */
h1 {
    font-size: 2.5rem;
    margin-bottom: 2rem !important;
}
.home header h1 {
    font-size: 3.25rem;
    width: 55%;
    padding: 3rem 0rem 3rem 0rem;
    font-weight: var(--font-bold);
}
h2 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
}
.home h2 {
    font-size: 2.25rem;
    font-weight: var(--font-regular);
    margin-bottom: 1.5rem !important;
}
.blog article h2,
.archive article h2,
.case-studies article h2,
.home article h3 {
    margin-bottom: 0.25rem;
    color: var(--black);
}
h3 {
    font-size: 1.5rem;
    font-weight: var(--font-bold);
}
h4 {
    font-size: 1.25rem;
}
h5 {
    font-size: 1rem;
    font-weight: var(--font-extra-bold);
}
h6 {
    font-size: 1rem;
    font-weight: var(--font-bold);
    font-style: italic;
}


/* <p>, <ul>, <li>, <span> */
p,
li {
    font-size: var(--base-size);
    color: var(--dark-grey);
    font-weight: var(--font-regular);
}
form p {
    margin: 0rem;
}
.funding .boxes .box p {
    font-weight: var(--font-extra-bold);
    margin: 1rem 0rem 0rem 0rem;
}
.wp-caption p.wp-caption-text {
    margin: 0.25rem 0rem 0rem 0rem;
}
nav ul {
    list-style-type: none !important;
    padding: 0rem !important;
    margin: 0rem !important;
    width: 100%;
}
.pagination ul {
    display: flex;
}
footer nav ul {
    display: grid;
    grid-template-rows: 1fr 1fr 1fr;
    grid-template-columns: 1fr 1fr 1fr;
}
.navbar-nav > .application-site-link {
    margin-left: auto;
}
footer nav ul li {
    margin: 0rem 0rem 1rem 4rem;
}
article .excerpt {
    color: var(--dark-grey);
    margin-bottom: 1rem;
}
article .cta-wrapper .cta {
    color: var(--purple);
    font-weight: var(--font-extra-bold);
    margin-bottom: 0rem;
}


/* <i> */
.navbar-toggler i {
    color: var(--purple);
    font-size: 2rem;
}
article .cta-wrapper .cta i {
    transition: all 0.25s;
}
article a:hover .cta-wrapper .cta i {
    transition: all 0.25s;
    margin-left: 1rem;
}
.funding .boxes .box i {
    color: var(--purple);
    font-size: 3.5rem;
}


/* <nav> */
header nav {
    padding: 0rem 0rem 0.5rem 0rem !important;
}
footer nav {
    color: var(--black);
    float: right;
}
.dropdown:hover > .dropdown-menu {
    display: block;
}
.dropdown-menu {
    background-color: var(--white);
    border: 0.1rem solid var(--light-grey);
    border-radius: 0.75rem;
    min-width: min-content;
}
.navbar-collapse {
    text-align: right !important;
    padding-top: 0.5rem;
}


/* <a>, <input>, <button> */
a {
    color: var(--purple);
    transition: all 0.25s;
    font-size: var(--base-size);
    font-weight: var(--font-semi-bold);
}
nav a {
    color: var(--black) !important;
    padding: 0.5rem 0.75rem !important;
}
.header-logo a {
    display: inline-block;
    position: relative;
    z-index: 1;
}
.header-logo a::before {
    content: '';
    position: absolute;
    z-index: -1; 
}
.application-site-link a {
    margin-top: 0rem !important;
}
.dropdown-item:hover,
.dropdown-item.active,
.dropdown-item:active {
    color: var(--purple);
    background-color: var(--off-white);
}
.pagination a {
    display: inline-block;
    color: var(--purple) !important;
    font-size: 1.25rem;
}
.pagination .active a {
    color: var(--purple) !important;
    font-weight: var(--font-extra-bold) !important;
}
a:hover {
    text-decoration: none;
    color: var(--green);
    transition: all 0.25s;
}
nav a:hover {
    color: var(--purple) !important;
}
.pagination a:hover {
    color: var(--green) !important;
}
article > a {
    display: flex;
    flex-direction: column;
    height: 100%;
}
form input[type=submit] {
    width: auto;
    transition: all 0.25s;
    font-size: var(--base-size);
}
.btn,
.application-site-link a,
form input[type=submit] {
    color: var(--white) !important;
    padding: 0.5rem 1.75rem !important;
    border-radius: 1.5rem;
    margin-top: 1.25rem;
}
header .btn {
    margin-top: 0rem;
}
.btn:hover,
.application-site-link a:hover,
form input[type=submit]:hover {
    color: var(--white) !important;
}
.btn-purple,
.application-site-link a,
form input[type=submit] {
    background-color: var(--purple);
}
.btn-purple:hover,
.application-site-link a:hover,
form input[type=submit]:hover {
    background-color: var(--green);
}
.btn-green {
    background-color: var(--green);
}
header .btn-green {
    margin-right: 1rem;
}
.btn-green:hover {
    background-color: var(--purple);
}
form input,
form textarea {
    width: 100%;
    padding: 0.75rem 1.25rem;
    color: var(--grey);
    background-color: var(--white);
    border: none;
    border-radius: 1.5rem;
}
form textarea {
    height: 12rem;
}
.navbar-toggler {
    float: right;
    padding: 0.25rem 0rem 0rem 0rem;
}


/* <img> */
.header-logo a img {
    display: block;  
    height: auto;
    width: 11.25rem;
}
footer img {
    width: 14rem;
}


/* bg-img */
.bg-img {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.bg-img .about {
    background: linear-gradient(90deg,rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.5) 50%);
}
.bg-img .contact {
    background-color: #f8f8f88a;
}


/* align */
.alignnone {
    margin: 0.5rem 1.75rem 0.75rem 0rem;
}
.alignleft {
    float: left;
    margin: 0.5rem 1.75rem 0.75rem 0rem;
}
.alignright {
    float: right;
    margin: 0.5rem 0rem 0.75rem 1.75rem;
}
.aligncenter,
div.aligncenter {
    display: block;
    margin: 0.5rem auto 0.75rem auto;
}


/* caption */
.wp-caption {
    background: var(--white);
    border: 0.1rem solid var(--light-grey);
    padding: 0.5rem;
    text-align: center;
    max-width: 100%;
}


/* screen-reader-text */
.screen-reader-text {
    border: 0;
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}
.screen-reader-text:focus {
    background-color: var(--light-grey);
    clip-path: none;
    color: var(--dark-grey);
    display: block;
    font-size: 1em;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000; /* above WP toolbar. */
}


/* boxes, box */
.funding .boxes {
    display: flex;
    gap: 1.75rem;
}
.funding .boxes .box {
    flex: 1;
    background-color: var(--light-grey);
    border-radius: 1.5rem;
    padding: 1.5rem;
    text-align: center;
}


/* header-logo */
.header-logo {
    position: relative;
}


/* cta-wrapper */
.cta-wrapper {
    margin-top: auto;
}


/* Contact Form 7 plugin */
.wpcf7-not-valid-tip {
    color: var(--purple);
    font-size: 1rem;
    font-weight: var(--font-bold);
    padding: 0.5rem 0rem 0rem 1rem;
}
.wpcf7 form .wpcf7-response-output {
    margin: 1rem 0rem;
    padding: 0.5rem;
    border: none;
    color: var(--purple);
    font-weight: var(--font-bold);
}


/* <footer> */
footer {
    background-color: var(--light-grey);
    color: var(--dark-grey);
    padding: 4rem 0rem 0.5rem 0rem;
}


/* lg down */
@media (max-width: 1199px) {

    .home header h1 {
        width: 65%;
        margin-bottom: 1rem !important;
    }

    header nav {
        padding: 0rem 0rem 0.5rem 2rem !important;
    }

    .header-logo img {
        width: 10rem;
    }

}


/* md down */
@media (max-width: 991px) {

    .home header h1 {
        font-size: 3rem;
        width: 80%;
    }
    .home h2 {
        font-size: 2rem;
    }
    h3 {
        font-size: 1.25rem;
    }

    footer nav ul {
        grid-template-rows: 1fr 1fr 1fr;
        grid-template-columns: 1fr 1fr;
    }
    footer nav ul li:nth-child(2),
    footer nav ul li:nth-child(5),
    footer nav ul li:nth-child(8) {
        display: none; /* reduce number of menu items on smaller screens */
    }
    footer nav ul li {
        margin: 0rem 0rem 1rem 2rem;
    }

    header nav {
        padding: 0rem !important;
        justify-content: flex-end !important;
    }
    .dropdown-toggle::after {
        display: none;
    }
    header nav .menu-item-has-children .dropdown-menu {
        display: block;
        border: none;
        background-color: transparent;
        text-align: right;
    }

    header nav a {
        padding: 0.5rem 0rem !important;
    }
    .application-site-link a {
        margin-top: 0.5rem !important;
    }
    .dropdown-item:hover {
        color: var(--purple);
        background-color: transparent;
    }

    .funding .boxes .box {
        margin: 1rem 0rem 1.25rem 0rem;
    }

}


/* sm down */
@media (max-width: 767px) {

    .home header h1 {
        font-size: 2.5rem;
        width: 95%;
        margin-bottom: 0rem !important;
    }

    footer nav ul li {
        margin: 0rem 0rem 1rem 1rem;
    }

}


/* xs down */
@media (max-width: 575px) {

    .home header h1 {
        font-size: 2.25rem;
        width: 100%;
    }

    .funding .boxes .box p {
        margin: 0rem;
    }
    footer nav ul {
        grid-template-rows: 1fr;
        grid-template-columns: 1fr 1fr 1fr;
    }
    footer nav ul li:nth-child(1),
    footer nav ul li:nth-child(4),
    footer nav ul li:nth-child(7) {
        display: none; /* reduce number of menu items on smaller screens */
    }
    footer nav ul li {
        margin: 0rem 0rem 1rem 0rem;
    }

    .funding .boxes .box i {
        font-size: 3.5rem;
        width: 70px; /* width of widest icon */
    }

    footer nav {
        float: none;
        margin-top: 2rem;
    }
    
    .alignnone,
    .alignleft,
    .alignright,
    .aligncenter {
        display: block;
        float: none !important;
        margin-left: auto;
        margin-right: auto;
        clear: both;
        width: 100%;
        height: auto;
    }

    .wp-caption,
    .wp-caption img {
        width: 100% !important;
    }

    .funding .boxes {
        display: block;
    }
    .funding .boxes .box {
        display: flex;
        text-align: left;
        gap: 1.75rem;
        align-items: center;
    }
    
    footer {
        text-align: center;
        padding: 3rem 0rem 0.5rem 0rem;
    }

}


/* custom down */
@media (max-width: 359px) {

    header nav a,
    footer nav a {
        padding: 0.5rem 0rem !important;
    }

    header .row:nth-child(1) {
        flex-wrap: nowrap; /* prevent col-11 from spilling onto new line */
    }
    
}