/*
 * Quality RN Consulting theme.
 * Colors, sizes and breakpoints follow the original WordPress theme (Hestia with the Quality RN
 * Consulting child theme): Bootstrap 3 container widths at 768 / 992 / 1200px, and Hestia's phone
 * layout up to 768px, including the menu button.
 */

/*
 * Self-hosted fonts, the same variable fonts Google Fonts served the old site. Roboto is under the
 * SIL Open Font License (../fonts/OFL.txt), Roboto Slab under the Apache License 2.0
 * (../fonts/LICENSE-2.0.txt).
 */
@font-face { font-family: "Roboto"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../fonts/roboto-latin-wght-normal.woff2") format("woff2"); }
@font-face { font-family: "Roboto Slab"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../fonts/roboto-slab-latin-wght-normal.woff2") format("woff2"); }

:root {
    --primary: #e91e63;
    --text: #3c4858;
    --muted: #999;
    --header-text: #555;
    --input-text: #333;
    --input-line: #d2d2d2;
    --input-focus: #9c27b0;
    --error: #900;
    --page-bg: #e5e5e5;
    --footer-bg: #323437;
    --font-body: "Roboto", "Helvetica", "Arial", sans-serif;
    --font-heading: "Roboto Slab", "Times New Roman", serif;
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    /* Keeps anchor targets clear of the fixed header, at its smaller scrolled height. */
    scroll-padding-top: 80px;
}

/* Full-height column so the footer sits at the bottom of the window on short pages. */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 300;
    line-height: 1.618;
    color: var(--text);
    background-color: var(--page-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; border: 0; }

b, strong { font-weight: 700; }

a {
    color: var(--primary);
    text-decoration: none;
    transition: opacity 0.3s ease, color 0.3s ease;
}

/* The old theme faded every link on hover. */
a:hover { opacity: 0.75; }

.container {
    max-width: 100%;
    margin-right: auto;
    margin-left: auto;
    padding-right: 15px;
    padding-left: 15px;
}

.screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: -3em;
    left: 0.5em;
    z-index: 2000;
    padding: 0.5em 1em;
    color: #000;
    background-color: #fff;
}
.skip-link:focus { top: 0.5em; }

/* ---------- Header ---------- */

.site-header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1030;
    color: var(--header-text);
    background-color: #fff;
    box-shadow: 0 1px 10px -6px rgba(0, 0, 0, 0.42), 0 1px 10px 0 rgba(0, 0, 0, 0.12), 0 4px 5px -2px rgba(0, 0, 0, 0.1);
}

.header-inner {
    display: flex;
    align-items: center;
    padding-top: 10px;
    padding-bottom: 10px;
    transition: padding 0.1s ease;
}

.logo { display: block; min-width: 0; }

.logo img {
    display: block;
    width: auto;
    max-height: 100px;
    transition: max-height 300ms ease-in-out;
}

/* Once the page scrolls, the logo shrinks to half its height. */
.site-header.is-compact .logo img { max-height: 50px; }

.nav-menu {
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-menu a {
    display: block;
    padding: 15px;
    font-size: 12px;
    font-weight: 400;
    line-height: 20px;
    text-transform: uppercase;
    color: inherit;
    border-radius: 3px;
}

.nav-menu a:hover,
.nav-menu a:focus,
.page .nav-menu a[aria-current="page"] { color: var(--primary); }

/* Phones: the menu button opens the links in a panel under the header. */
.nav-toggle {
    display: block;
    flex: none;
    margin: 8px 0 8px auto;
    padding: 9px 10px;
    color: var(--header-text);
    background: transparent;
    border: 0;
    border-radius: 4px;
    cursor: pointer;
}

.nav-toggle:hover,
.nav-toggle:focus-visible { color: var(--primary); }

.nav-toggle-bar {
    display: block;
    width: 22px;
    height: 2px;
    background-color: currentColor;
    border-radius: 1px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle-bar + .nav-toggle-bar { margin-top: 4px; }

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.main-nav {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    max-height: calc(100vh - 100%);
    overflow-y: auto;
    padding: 7.5px 15px;
    background-color: #fff;
    box-shadow: 0 4px 5px -2px rgba(0, 0, 0, 0.1);
}

.main-nav.is-open { display: block; }

/* ---------- Home page: photo and title ---------- */

.hero {
    position: relative;
    display: flex;
    min-height: 100vh;
    padding: 0 30px;
    color: #fff;
    text-align: center;
    background: var(--text) center / cover no-repeat;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
}

.hero-inner {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    padding: 170px 0 100px;
}

.hero-text { width: 100%; padding: 0 15px; }

.hero-title {
    margin: 0 0 20px;
    font-size: 36px;
    font-weight: 700;
    line-height: 1.4;
    overflow-wrap: break-word;
}

/* The old site asked for a lighter weight than it loaded, so the subtitle showed in the regular one. */
.hero-subtitle {
    margin: 10px 0 0;
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 400;
}

/* ---------- Other pages: title band ---------- */

.page-header {
    padding-bottom: 60px;
    color: #fff;
    text-align: center;
    background-image: linear-gradient(45deg, #a81d84 0%, #ea396f 100%);
}

.page-header .container { padding-top: 120px; padding-bottom: 50px; }

.page-title {
    margin: 0 0 10px;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.4;
    overflow-wrap: break-word;
}

/* ---------- Content ---------- */

/* Grows with the window, so on short pages the white card reaches down to the footer. */
.site-main {
    display: flex;
    flex: 1 0 auto;
    flex-direction: column;
}

/* The white content card overlaps the band above it (on the home page, only on larger screens). */
.main-card {
    position: relative;
    flex: 1 0 auto;
    margin-top: -60px;
    background-color: #fff;
    box-shadow: 0 16px 24px 2px rgba(0, 0, 0, 0.14), 0 6px 30px 5px rgba(0, 0, 0, 0.12), 0 8px 10px -5px rgba(0, 0, 0, 0.2);
}

.home .main-card { margin-top: 0; }

/* Keeps the last element's bottom margin inside the card. */
.page-content {
    display: flow-root;
    padding: 30px 0;
    font-size: 16px;
}

.page-content p { margin: 0 0 15px; }

.page-content h1,
.page-content h2,
.page-content h3,
.page-content h4,
.page-content h5,
.page-content h6 {
    margin: 0 0 15px;
    font-weight: 500;
    line-height: 1.618;
    color: var(--text);
}

.page-content h1 { font-size: 30px; }
.page-content h2 { font-size: 28px; }
.page-content h3 { font-size: 24px; }
.page-content h4 { font-size: 22px; }
.page-content h5 { font-size: 20px; }
.page-content h6 { font-size: 18px; }

.page-content ul,
.page-content ol { margin: 0 0 30px; padding-left: 40px; }

.page-content li ul,
.page-content li ol { margin-bottom: 0; }

.page-content table {
    width: 100%;
    margin: 0 0 1em;
    border-collapse: collapse;
}

.page-content td,
.page-content th { padding: 0.5em; border: 1px solid; }

/* Link buttons in the content, e.g. [**Request Services**](/contact?classes=button). */
.page-content a.button {
    display: inline-block;
    margin-bottom: 9px;
    padding: calc(0.667em + 2px) calc(1.333em + 2px);
    color: #fff;
    background-color: var(--primary);
    border-radius: 9999px;
}

/* ---------- Home page: features ---------- */

.features {
    padding: 40px 0 55px;
    text-align: center;
}

.features-intro,
.contact-intro { padding: 0 10px; }

.section-title {
    margin: 10px 0;
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    line-height: 1.618;
    color: var(--text);
    overflow-wrap: break-word;
}

.features-text {
    margin: 10px 0 15px;
    font-size: 18px;
    line-height: 1.5;
    color: var(--muted);
}

.feature {
    max-width: 360px;
    margin: 0 auto;
    padding: 70px 0 30px;
}

.feature a { display: block; }

.feature .icon {
    display: block;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.feature .icon svg {
    display: block;
    height: 61.6px;
    width: auto;
    margin: 0 auto;
    fill: currentColor;
}

.feature-title {
    margin: 30px 0 15px;
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.618;
    color: var(--text);
    transition: opacity 0.3s ease;
}

.feature a:hover .icon { opacity: 0.75; transform: scale(1.05) translateY(-5px); }
.feature a:hover .feature-title { opacity: 0.75; }

.feature p {
    margin: 0 0 10px;
    font-size: 16px;
    color: var(--muted);
}

/* ---------- Home page: contact section ---------- */

/* #101010 is how the old theme's #343434 showed under its 70% black overlay. */
.contact-section {
    padding: 90px 0 70px;
    color: #eaeaea;
    background-color: #101010;
}

.contact-section .section-title { margin: 20px 0 30px; color: #fff; }

.contact-item { display: flow-root; max-width: 360px; }
.contact-item:first-of-type { margin-top: 30px; }

.contact-item .icon {
    float: left;
    margin: 14px 10px 0 0;
    color: #fff;
}

.contact-item .icon svg {
    display: block;
    height: 36.4px;
    width: auto;
    fill: currentColor;
}

.contact-item-text { overflow: hidden; }

.contact-item-title {
    margin: 20px 0 15px;
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.618;
    color: #fff;
}

.contact-item p { margin: 0; }

.contact-card {
    margin: 30px 0;
    color: rgba(0, 0, 0, 0.87);
    background-color: #fff;
    border-radius: 6px;
    box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 1px 5px 0 rgba(0, 0, 0, 0.12);
}

.contact-card-header {
    margin: -20px 15px 15px;
    padding: 17px 10px;
    text-align: center;
    background-color: var(--primary);
    border-radius: 3px;
    box-shadow: 0 16px 38px -12px rgba(0, 0, 0, 0.56), 0 4px 25px 0 rgba(0, 0, 0, 0.12), 0 8px 10px -5px rgba(0, 0, 0, 0.2);
}

.contact-card-title {
    margin: 10px 0;
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    color: #fff;
}

.contact-card-body { padding: 54px 15px 48px; }

/* ---------- Contact form ---------- */

.page-content .form-wrapper { margin: 24px 0; }

.form-wrapper form {
    display: flex;
    flex-wrap: wrap;
    column-gap: 20px;
}

.form-field {
    flex: 1 1 100%;
    min-width: 0;
    padding-bottom: 24px;
}

/* Name and email share a row. */
.form-field.half { flex-basis: calc(50% - 10px); }

.form-wrapper input[type="text"],
.form-wrapper input[type="email"],
.form-wrapper textarea {
    display: block;
    width: 100%;
    height: 38px;
    margin: 0;
    padding: 7px 0;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.3;
    color: var(--input-text);
    background-color: transparent;
    /* A grey line, with a purple one that grows over it while the field has focus. */
    background-image: linear-gradient(var(--input-focus), var(--input-focus)), linear-gradient(var(--input-line), var(--input-line));
    background-repeat: no-repeat;
    background-position: center bottom, center calc(100% - 1px);
    background-size: 0 2px, 100% 1px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    transition: background 0s ease-out;
}

.form-wrapper textarea {
    height: 120px;
    min-height: 38px;
    resize: vertical;
}

.form-wrapper input:focus,
.form-wrapper textarea:focus {
    outline: none;
    background-size: 100% 2px, 100% 1px;
    transition-duration: 0.3s;
}

.form-wrapper ::placeholder { color: var(--muted); opacity: 1; }

.form-field.has-errors input,
.form-field.has-errors textarea {
    background-image: linear-gradient(var(--input-focus), var(--input-focus)), linear-gradient(var(--error), var(--error));
}

/* Room for the hCaptcha checkbox before it loads. */
.h-captcha-container { min-height: 76px; }
.h-captcha-widget iframe { display: block; }

/* The checkbox is 302px wide, so on the narrowest phones it is scaled down to fit. */
@media (max-width: 359px) {
    .h-captcha-widget { transform: scale(0.85); transform-origin: 0 0; }
}

.buttons {
    flex: 1 1 100%;
    padding-top: 10px;
    text-align: right;
}

.buttons .button {
    display: inline-block;
    max-width: 100%;
    margin: 0;
    padding: 15px 33px;
    font-family: var(--font-body);
    font-size: inherit;
    font-weight: 400;
    line-height: 1.618;
    text-transform: uppercase;
    color: #fff;
    background-color: var(--primary);
    border: 0;
    border-radius: 3px;
    cursor: pointer;
    box-shadow: 0 2px 2px 0 rgba(233, 30, 99, 0.14), 0 3px 1px -2px rgba(233, 30, 99, 0.2), 0 1px 5px 0 rgba(233, 30, 99, 0.12);
    transition: box-shadow 0.2s cubic-bezier(0.4, 0, 1, 1);
}

.buttons .button:hover,
.buttons .button:focus-visible {
    box-shadow: 0 14px 26px -12px rgba(233, 30, 99, 0.42), 0 4px 23px 0 rgba(0, 0, 0, 0.12), 0 8px 10px -5px rgba(233, 30, 99, 0.2);
}

/* Form messages, in the colors of the old form's confirmation and error boxes. */
.notices {
    margin: 0 0 24px;
    padding: 15px;
    font-size: 16px;
    color: var(--input-text);
    background-color: #e0ffc7;
    border: 1px solid #b4d39b;
}

.notices p { margin: 0; }

.notices.red,
.notices.yellow {
    font-weight: 700;
    color: var(--error);
    background-color: #fff;
    border: 1px solid var(--error);
    border-left-width: 5px;
}

/* ---------- Footer ---------- */

.site-footer {
    padding: 30px 0 26px;
    color: #fff;
    text-align: center;
    background-color: var(--footer-bg);
}

.footer-menu {
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-menu li { display: inline-block; }

.footer-menu a {
    display: inline-block;
    padding: 15px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.site-footer a { color: #fff; opacity: 0.86; }
.site-footer a:hover { opacity: 0.75; }

.copyright { margin: 0; padding: 10px 0; }

/* ---------- Larger screens ---------- */

@media (min-width: 481px) {
    .features { padding-top: 75px; }
    .contact-card { margin: 90px 15px 30px; }
    .contact-card-body { padding-right: 45px; padding-left: 45px; }
}

@media (min-width: 768px) {
    .container { width: 750px; }

    /* Eight of twelve Bootstrap columns, centered. */
    .hero-inner { padding-right: 15px; padding-left: 15px; }
    .hero-text { width: 66.6667%; margin-left: 16.6667%; }
}

/* Hestia switched from the phone layout at 769px, one pixel past Bootstrap's 768px. */
@media (min-width: 769px) {
    .nav-toggle { display: none; }

    .main-nav {
        display: block;
        position: static;
        max-height: none;
        margin-left: auto;
        padding: 0;
        overflow: visible;
        background: none;
        box-shadow: none;
    }

    .nav-menu {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    /* The home page's header is see-through over the photo until the page scrolls. */
    .site-header.is-transparent:not(.is-scrolled) {
        color: #fff;
        background-color: transparent;
        box-shadow: none;
    }

    .site-header.is-transparent:not(.is-scrolled) .header-inner { padding-top: 25px; }
    .site-header.is-transparent:not(.is-scrolled) .nav-menu a { color: inherit; }

    .hero { min-height: 90vh; }
    .hero-inner { padding-top: 185px; }
    .hero-title { font-size: 44px; }
    .hero-subtitle { font-size: 16px; }

    .page-header { min-height: 300px; }
    .page-header .container { padding-top: 220px; padding-bottom: 110px; }
    .page-title { margin-top: 20px; font-size: 42px; }

    .main-card,
    .home .main-card {
        margin: -60px 15px 0;
        border-radius: 6px 6px 0 0;
    }

    .page-content { padding: 70px 0 0; font-size: 18px; }
    .page-content h1 { font-size: 42px; }
    .page-content h2 { font-size: 37px; }
    .page-content h3 { font-size: 32px; }
    .page-content h4 { font-size: 27px; }
    .page-content h5 { font-size: 23px; }

    .section-title { font-size: 37px; }

    .contact-card { margin-top: 30px; }

    .site-footer { padding-bottom: 18px; }

    .footer-inner {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: flex-start;
    }

    .copyright { padding: 15px 0; }
}

@media (min-width: 992px) {
    .container { width: 970px; }

    .hero { padding: 0; }

    .page-title { margin-right: 8.3333%; margin-left: 8.3333%; }

    /* Eight of twelve Bootstrap columns, centered. The full-width template uses all twelve. */
    .page-content:not(.is-fullwidth),
    .features-intro {
        width: calc((100% + 30px) * 2 / 3 - 30px);
        margin-left: calc((100% + 30px) / 6);
    }

    .features-intro,
    .contact-intro { padding: 0; }

    .feature-list {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 360px));
        justify-content: center;
        column-gap: 25px;
    }

    /* Five columns each, two apart. */
    .contact-inner {
        display: flex;
        align-items: flex-start;
    }

    .contact-intro { width: calc((100% + 30px) * 5 / 12 - 30px); }

    .contact-card {
        width: calc((100% + 30px) * 5 / 12 - 40px);
        margin-right: 0;
        margin-left: calc((100% + 30px) / 6 + 35px);
    }
}

@media (min-width: 1200px) {
    .container { width: 1170px; }

    .main-card,
    .home .main-card {
        margin-right: 30px;
        margin-left: 30px;
    }

    /* From the old child theme, which moved the title further down the photo on wide screens. */
    .hero-title { padding-top: 240px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; }
}

@media print {
    .skip-link, .nav-toggle, .main-nav, .contact-card, .site-footer nav { display: none; }
    .site-header { position: static; box-shadow: none; }
    .hero, .page-header, .contact-section { color: #000; background: none; }
    .hero::before { display: none; }
    .hero, .hero-inner, .page-header .container { min-height: 0; padding-top: 20px; padding-bottom: 20px; }
    .page-title, .hero-title, .section-title, .contact-item-title { color: #000; }
    .main-card { margin: 0; box-shadow: none; }
    .site-footer, .site-footer a { color: #000; background: none; }
}
