/*
Theme Name: RICOHP
Theme URI: https://ricohp.org
Author: Anthony Thompson
Author URI: https://ricohp.orc
Description: Custom theme for the RI Coalition of Housing Providers
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ricohp
*/

/* reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
body { line-height: 1.5; -webkit-font-smoothing: antialiased; }
img, picture, video, canvas, svg { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; }
p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }

/* variables */
:root {
    --softwhite: #faf9f6;
    --softblack: #0e1111;
    --darkblue: #282164;
    --paleyellow: #fff0b4;
    --lightgray: #d6d6d6;
    --activeblue: #4a90e2;
}

body {
    background-color: var(--softwhite);
    color: var(--softblack);
    font: 1.2rem/1.3 "Charis SIL", serif;
}
body main article { padding: 0 3.125rem; /* 50px */ }
p { margin: 1.5rem 0; }
article p:first-child { margin-top: 2em; }
h2 {
    font: bold 1.8rem "Antonio", sans-serif;
    color: var(--darkblue);
    text-align: center;
    margin-top: 1.5rem;
}

header {
    background-color: var(--darkblue);
    /* individual pages will specify a background-image */
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem 2rem;
}
header nav {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: right;
}
.navlink {
    text-decoration: none;
    color: var(--softwhite);
    letter-spacing: 0.05rem;
    transition: all 0.4s;
}
a.navlink:hover, a.navlink:active {
    text-decoration: underline; color: var(--activeblue);
}
.side-menu { display: none; }
header div.titlebar {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: center;
}
header h1 {
    font: bold 1.8rem "IBM Plex Sans", sans-serif; /* 24px */
    letter-spacing: 0.25rem;
    text-align: center;
    color: var(--paleyellow);
    text-shadow:
        -1px -1px 0 var(--darkblue), /* top-left */
        1px -1px 0 var(--darkblue),  /* top-right */
        -1px 1px 0 var(--darkblue),  /* bot-left */
        1px 1px 0 var(--darkblue);   /* bot-right */
}
header img.logo {
    width: 216px; /* img 432 x 450*/
    height: auto;
    max-width: 100%;
}

span.avoidwrap { display: inline-block; }
hr {
    width: 90%;
    margin: 3rem auto 2rem auto;
    border: none;
    border-top: 1px solid black;
}
li { margin-bottom: 1rem; }
.splashimg {
    width: 90%;
    height: auto;
    margin: 2rem auto;
    border: 1px solid var(--lightgray);
}
.rightimg {
    float: right;
    margin: 0 1rem 1rem 1rem;
    border: 1px solid var(--lightgray);
}
.button {
    border: 0px solid var(--darkblue);
    background-color: var(--darkblue);
    color: var(--softwhite);
    line-height: 1rem;
    font: bold 0.9375rem "Antonio", sans-serif; /* 15px */
    border-radius: 0.1875rem; /* 3px */
    padding: 0.75rem 1.5625rem; /* 12px top-bottom, 25px left-right */
    text-decoration: none;
    transition: all 0.4s;
}
.button:hover {
    color: var(--lightgray);
    background-color: var(--softblack);
    border-color: var(--softblack);
}
.button:focus {
    color: var(--lightgray);
    background-color: var(--softblack);
    border-color: var(--softblack);
}
p.calltoaction {
    text-align: center;
    margin: 2em 1em 2em 1em;
}

/* legislative */
.legiscanmobile { display: none; }

/* contact form */
.wpcf7-spinner { display: none; }
.hidden-fields-container { display: none; }
.screen-reader-response { display: none; }
.contactdesc { text-align: center; margin: 2rem 0; }
.contactrow {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 2rem;
    align-items: start;
}
.contacticons { font-size: 85%; }
.contactbelowform { display: none; }
.alsofindus { font-style: italic; }
.contactmethod {
    display: grid;
    grid-template-columns: 50px 1fr;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 3rem;
}
.contactmethod a { text-decoration: none; }
.contactmethod a:hover, .contactmethod a:active {
    text-decoration: underline;
    color: var(--activeblue);
}
.wp-block-contact-form-7-contact-form-selector { grid-column: 2; }
.wpcf7-form {
    max-width: 750px;
    margin: 0 auto;
    border-radius: 12px 12px 12px 12px;
    box-shadow: 0px 0px 10px 0px rgba(14, 17, 17, 0.5);
    padding: 1rem 2rem;
}
.form-group, .form-submit {
    display: grid;
    grid-template-columns: 30% 70%;
    gap: 1rem;
    align-items: start;
    margin-bottom: 1.5rem;
}
.form-group label {
    padding-top: 0.5rem;
    font-weight: 500;
}
.form-group input,
.form-group textarea {
    padding: 0.5rem;
    border: 1px solid var(--lightgray);
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    width: 90%;
}
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--activeblue);
    box-shadow: 0 0 0 3px rgba(40, 33, 100, 0.1);
}

footer {
    display: flex;
    justify-content: space-evenly;
    gap: 2rem;
    align-items: center;
    padding: 2rem;
    text-align: center;
}
footer img.logo {
    /* width: 65px; */ /* img 432 x 450 - RICOHP logo */
    width: 40px; /* IG */
    height: auto;
    max-width: 100%;
}
footer p { font-size: 0.85rem; }

/* accordion */
.detailsbox {
    margin: 1.5rem;
    transition: all 2s;
}
summary, details p {
    border: 1px solid var(--lightgray);
    margin: 0;
    padding: 1rem;
}
summary { font-weight: bold; }
details::details-content {
    opacity: 0;
    transition: opacity 600ms;
}
details[open]::details-content { opacity: 1; }

/* responsive */
@media screen and (max-width: 850px) {
    .form-submit { grid-template-columns: none; }
    .legiscanmobile { display: block; }
}
@media screen and (max-width: 650px) {
    footer { flex-direction: column; }
    .splashimg { width: 95%; }
    .form-group { grid-template-columns: 1fr; }
    input[type="submit"] { margin-left: 0; width: 100%; }
    .form-group input, .form-group textarea { width: 100%; }
    .tocontactus { display: none; }
    .contactrow { display: block; }
    .contacticons { display: none; }
    .contactbelowform { display: block; width: fit-content; margin: 2rem auto 0 auto; }
    hr.contactbelowform { width: 95%; }
}
@media screen and (max-width: 505px) {
    .splashimg { width: 100%; }
    .titlebar { margin-top: -3rem; }
    .titlebar h1 { display: none; }
    .sitenav { flex-direction: column; display: none; }
    .navlink { border-bottom: 1px solid var(--softwhite); }
    .hamb {
        cursor: pointer;
        margin-left: auto;
        padding: 1rem 0.5rem;
        background-color: var(--darkblue);
    }
    .hamb-line {
        background: var(--softwhite);
        display: block;
        height: 2px;
        position: relative;
        width: 24px;
    }
    .hamb-line::before,
    .hamb-line::after {
        background: var(--softwhite);
        content: '';
        display: block;
        height: 100%;
        position: absolute;
        transition: all .2s ease-out;
        width: 100%;
    }
    .hamb-line::before { top: 5px; }
    .hamb-line::after { top: -5px; }
    .side-menu { display: none; }               /* base case, hide menu */
    .side-menu:checked ~ nav { display: flex; } /* show menu if clicked */
    .side-menu:checked ~ .hamb .hamb-line { background: transparent; }
    .side-menu:checked ~ .hamb .hamb-line::before { transform: rotate(-45deg); top:0; }
    .side-menu:checked ~ .hamb .hamb-line::after { transform: rotate(45deg); top:0; }
    .side-menu:checked ~ .titlebar { margin-top: 0; }
}
