/**
 * PAFA design: the look of rapidfiress.com/pafa on top of HC Starter.
 * Loaded on the site and in the editor.
 *
 * Colors, fonts and sizes come from theme.json. This file holds the layout
 * of the header, footer and the home page sections (patterns/home-*.php).
 *
 * Breakpoints: 782px (mobile / desktop) and 1024px (tablet).
 *
 * Contents
 *   1. Global
 *   2. Header
 *   3. Interior pages
 *   4. Home: hero
 *   5. Home: intro and estimate form
 *   6. Home: services
 *   7. Home: Why PAFA
 *   8. Home: numbers
 *   9. Home: certifications and page summary
 *  10. Call to action band
 *  11. Footer
 *  12. Scroll to top
 */


/* ------------------------------------------------------------------
 * 1. Global
 * ------------------------------------------------------------------ */

/* Phones: everything set in rem scales down a step, like the original. */
@media (max-width: 544px) {

    html {
        font-size: 91.2%;
    }

    body {
        --wp--preset--font-size--huge: 1.875rem;
        --wp--preset--font-size--xxx-large: 1.5625rem;
        --wp--preset--font-size--x-large: 1.25rem;
    }
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

:where(.entry-content) p {
    margin-block: 0 16px;
}

:where(.entry-content) :where(h1, h2, h3, h4, h5, h6) {
    margin-block: 0 20px;
}

/* Full-width sections sit flush against each other. */
.entry-content > .alignfull {
    margin-block: 0;
}

/* Buttons: block buttons and theme buttons share the same size. */
.wp-block-button__link,
a.hc-button,
.hc-button {
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1;
    border: 1px solid var(--wp--preset--color--primary);
    border-radius: 4px;
}

.wp-block-button:not([class*="is-style-"]) .wp-block-button__link {
    background-color: var(--wp--preset--color--primary);
}

.wp-block-button:not([class*="is-style-"]) .wp-block-button__link:hover {
    color: var(--wp--preset--color--base);
    background-color: var(--wp--preset--color--primary-hover);
    border-color: var(--wp--preset--color--primary-hover);
}

.wp-block-button.is-style-pafa-white .wp-block-button__link {
    color: var(--wp--preset--color--primary);
    background-color: var(--wp--preset--color--base);
    border-color: var(--wp--preset--color--base);
    box-shadow: 0 24px 80px -8px rgba(0, 0, 0, 0.5);
}

.wp-block-button.is-style-pafa-white .wp-block-button__link:hover {
    color: var(--wp--preset--color--base);
    background-color: var(--wp--preset--color--primary);
    border-color: var(--wp--preset--color--primary);
}

.wp-block-button.is-style-pafa-ghost .wp-block-button__link {
    color: var(--wp--preset--color--base);
    background-color: transparent;
    border-color: var(--wp--preset--color--base);
}

.wp-block-button.is-style-pafa-ghost .wp-block-button__link:hover {
    color: var(--wp--preset--color--contrast);
    background-color: var(--wp--preset--color--base);
}

/* Phone icon before "Call Us Now". */
.pafa-has-phone-icon .wp-block-button__link::before {
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: 10px;
    vertical-align: -2px;
    content: "";
    background-color: currentcolor;
    -webkit-mask: url("../icons/fa-phone.svg") center / contain no-repeat;
    mask: url("../icons/fa-phone.svg") center / contain no-repeat;
}

/* Icons from the Icon block keep their own colors when none is set. */
.pafa-why__mark .hc-icon-box {
    background: none;
}


/* ------------------------------------------------------------------
 * 2. Header
 * Not sticky, like the original. Transparent over the home page hero.
 * ------------------------------------------------------------------ */

.hc-site-header {
    position: relative;
    top: auto;
}

.hc-header {
    border-bottom: 1px solid #030101;
}

.hc-header__inner {
    max-width: calc(1200px + var(--wp--style--root--padding-left) + var(--wp--style--root--padding-right));
}

.hc-header .wp-block-site-logo img {
    max-height: none;
}

.hc-header .hc-header__cta a.hc-button,
.hc-header .hc-header__cta a.hc-button:hover,
.hc-header .hc-header__cta a.hc-button:focus-visible {
    padding: 12px 30px;
    letter-spacing: normal;
    color: var(--wp--preset--color--contrast-alt);
    background-color: transparent;
    border-color: var(--wp--preset--color--contrast-alt);
    border-radius: 5px;
}

.hc-header .hc-header__cta a.hc-button:hover,
.hc-header .hc-header__cta a.hc-button:focus-visible {
    color: var(--wp--preset--color--base);
    background-color: var(--wp--preset--color--primary);
    border-color: var(--wp--preset--color--primary);
}

.hc-header .hc-header__cta .hc-button__icon {
    display: none;
}

.hc-header .hc-header__cta a.hc-button {
    line-height: 16px;
}

.has-transparent-header .hc-site-header {
    position: absolute;
}

.has-transparent-header .hc-site-header .hc-header {
    background-color: transparent;
    border-bottom-color: transparent;
}

.has-transparent-header .hc-site-header.is-scrolled .hc-header {
    box-shadow: none;
}

.has-transparent-header .hc-header .hc-header__cta a.hc-button {
    color: var(--wp--preset--color--base);
    border-color: var(--wp--preset--color--base);
}

/* Phones: logo only, like the original. */
@media (max-width: 781px) {

    .hc-header .wp-block-site-logo img {
        width: 200px;
    }
}


/* ------------------------------------------------------------------
 * 3. Interior pages: plain title on the light background.
 * ------------------------------------------------------------------ */

.hc-page-heading__inner {
    max-width: calc(1200px + var(--wp--style--root--padding-left) + var(--wp--style--root--padding-right));
    padding-top: 60px;
    padding-bottom: 0;
}

.hc-page-heading__title {
    max-width: none;
    font-size: 2rem;
    line-height: 1.2;
}

.hc-page-heading .hc-breadcrumbs {
    display: none;
}

.hc-page-heading + article > .entry-content {
    padding-top: 27px;
    padding-bottom: 58px;
}

.entry-content :where(ul, ol) {
    padding-left: 20px;
}


/* ------------------------------------------------------------------
 * 4. Home: hero
 * ------------------------------------------------------------------ */

.pafa-hero.wp-block-cover {
    align-items: flex-start;
    padding: 150px 20px 100px;
}

.pafa-hero.wp-block-cover .wp-block-cover__inner-container {
    width: 100% !important;
    max-width: 1140px;
    margin-inline: auto !important;
}

.pafa-hero .wp-block-cover__inner-container > .pafa-hero__content {
    max-width: 775px;
    margin-left: 0 !important;
}

.pafa-hero__content > * {
    margin-block: 0;
}

.pafa-hero h1,
.pafa-hero h6,
.pafa-hero p {
    color: var(--wp--preset--color--base);
}

.pafa-hero__eyebrow {
    font-size: 1rem;
    line-height: 1.25;
}

.pafa-hero__title {
    margin-top: 24px !important;
}

.pafa-hero__text {
    max-width: 575px;
    margin-top: 24px !important;
}

.pafa-hero__buttons {
    margin-top: 40px !important;
}

@media (max-width: 1024px) {

    .pafa-hero.wp-block-cover {
        padding: 200px 64px 40px 40px;
    }

    .pafa-hero__title {
        font-size: 3rem;
    }
}

@media (max-width: 781px) {

    .pafa-hero.wp-block-cover {
        min-height: 0 !important;
        padding: 120px 32px 40px 24px;
    }

    .pafa-hero .wp-block-cover__image-background {
        object-position: center right;
    }

    .pafa-hero__title {
        font-size: var(--wp--preset--font-size--huge);
    }

    .pafa-hero__buttons .wp-block-button {
        width: 100%;
    }
}


/* ------------------------------------------------------------------
 * 5. Home: intro and estimate form
 * ------------------------------------------------------------------ */

.pafa-intro {
    padding-top: 0;
    padding-bottom: 154px;
}

.pafa-intro__columns.wp-block-columns {
    gap: 80px;
    justify-content: space-between;
    margin: 0;
}

.pafa-intro__columns > .pafa-intro__text.wp-block-column {
    flex: 0 0 570px;
    padding-top: 80px;
}

.pafa-intro__columns > .pafa-intro__form.wp-block-column {
    flex: 0 0 490px;
}

.pafa-intro__text h2 {
    margin: 0 0 32px;
}

.pafa-intro__text p {
    max-width: 530px;
    margin: 0 0 16px;
}

.pafa-intro__lead strong {
    font-weight: 700;
}

.pafa-intro__rule.wp-block-separator {
    max-width: 513px;
    margin: 36px 0 20px;
    border: 0;
    border-top: 1px solid var(--wp--preset--color--base);
    opacity: 1;
}

.pafa-emergency.wp-block-group {
    gap: 24px;
}

.pafa-emergency__text p {
    margin: 0;
}

.pafa-emergency__label {
    line-height: 20px;
}

.pafa-emergency__label a {
    font-weight: 600;
    line-height: 1.25;
    color: var(--wp--preset--color--contrast);
}

.pafa-emergency__phone {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.65;
}

.pafa-emergency__phone a {
    color: var(--wp--preset--color--primary);
}

.pafa-intro__form > .pafa-form-card {
    padding: 72px 48px 78px;
    margin-top: -105px !important;
    background-color: var(--wp--preset--color--accent);
    border-radius: 4px;
    box-shadow: 0 104px 104px -40px rgba(0, 0, 0, 0.16);
}

.pafa-form-card h4 {
    margin: 0 0 20px;
    color: var(--wp--preset--color--base);
}

/* Ninja Forms inside the red card. */
.pafa-form-card .nf-form-content {
    max-width: none;
    padding: 0;
}

.pafa-form-card .nf-form-fields-required,
.pafa-form-card .nf-field-label {
    display: none;
}

.pafa-form-card .nf-field-container {
    margin-bottom: 25px;
}

.pafa-form-card input:not([type="submit"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]),
.pafa-form-card textarea,
.pafa-form-card .nf-form-content .ninja-forms-field {
    width: 100%;
    height: 40px;
    padding: 8px 16px;
    font-size: 1rem;
    color: #475569;
    background-color: var(--wp--preset--color--base);
    border: 1px solid var(--wp--preset--color--base);
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.pafa-form-card ::placeholder {
    color: #666666;
    opacity: 1;
}

.pafa-form-card textarea,
.pafa-form-card .nf-form-content textarea.ninja-forms-field {
    height: 200px;
}

.pafa-form-card input[type="submit"],
.pafa-form-card input[type="button"],
.pafa-form-card .nf-form-content input[type="submit"].ninja-forms-field,
.pafa-form-card .nf-form-content button,
.pafa-form-card button[type="submit"] {
    width: 120px;
    height: 46px;
    padding: 0;
    font-size: 1rem;
    font-weight: 500;
    color: var(--wp--preset--color--base);
    cursor: pointer;
    background-color: var(--wp--preset--color--contrast);
    border: 1px solid var(--wp--preset--color--contrast);
    border-radius: 4px;
}

.pafa-form-card input[type="submit"]:hover,
.pafa-form-card .nf-form-content input[type="submit"].ninja-forms-field:hover {
    color: var(--wp--preset--color--contrast);
    background-color: var(--wp--preset--color--base);
}

.pafa-form-card .nf-error-msg,
.pafa-form-card .nf-response-msg {
    color: var(--wp--preset--color--base);
}

@media (max-width: 1024px) {

    .pafa-intro {
        padding: 80px 0 80px 40px;
    }

    .pafa-intro__columns > .pafa-intro__text.wp-block-column {
        flex: 1 1 50%;
    }
}

@media (max-width: 781px) {

    .pafa-intro {
        padding: 64px 24px 0;
    }

    .pafa-intro__columns.wp-block-columns {
        gap: 64px;
    }

    .pafa-intro__columns > .pafa-intro__text.wp-block-column,
    .pafa-intro__columns > .pafa-intro__form.wp-block-column {
        flex-basis: 100%;
        padding-top: 0;
    }

    .pafa-intro__form > .pafa-form-card {
        padding: 32px 24px;
        margin: 0 -24px !important;
        border-radius: 0;
    }

    .pafa-emergency.wp-block-group {
        flex-direction: column;
        gap: 8px;
    }

    .pafa-emergency__phone {
        font-size: 24px;
    }
}


/* ------------------------------------------------------------------
 * 6. Home: services (three image tiles)
 * ------------------------------------------------------------------ */

.pafa-services {
    padding: 0 !important;
}

.pafa-services__grid.wp-block-group {
    gap: 0;
}

.pafa-service.wp-block-cover {
    align-items: flex-start;
    padding: 40px;
    margin: 0;
}

.pafa-service .wp-block-cover__background {
    transition: opacity 0.3s, background-color 0.3s;
}

.pafa-service:hover .wp-block-cover__background {
    background-color: #000000 !important;
    opacity: 0.75 !important;
}

.pafa-service .wp-block-cover__inner-container {
    width: 100%;
    color: var(--wp--preset--color--base);
}

.pafa-service .wp-block-cover__inner-container > * {
    margin: 0;
    color: var(--wp--preset--color--base);
}

.pafa-service__title {
    margin-top: 208px !important;
    margin-bottom: 8px !important;
}

@media (max-width: 781px) {

    .pafa-services__grid.wp-block-group {
        grid-template-columns: 1fr;
    }

    .pafa-service.wp-block-cover {
        min-height: 0 !important;
        padding: 24px 24px 44px;
    }

    .pafa-service__title {
        margin-top: 48px !important;
    }
}


/* ------------------------------------------------------------------
 * 7. Home: Why PAFA
 * ------------------------------------------------------------------ */

.pafa-why {
    position: relative;
    padding: 160px 40px 131px;
    background-image: url("../images/attab-symbol-bg.png");
    background-repeat: no-repeat;
    background-position: bottom left;
    background-size: 64vw auto;
}

.pafa-why > * {
    position: relative;
}

.pafa-why__mark {
    margin: -10px 0 0;
    line-height: 0;
}

.pafa-why__mark .hc-icon-box {
    width: 21px;
    height: 8px;
}

.pafa-why h2 {
    margin: 28px 0 0;
}

.pafa-why__tagline {
    margin: 21px 0 0;
    color: var(--wp--preset--color--accent);
}

.pafa-why > .pafa-why__columns.wp-block-columns {
    gap: 48px;
    max-width: 1140px;
    margin: 79px auto 0;
}

.pafa-why__columns > .wp-block-column {
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.pafa-card {
    padding: 40px;
    margin: 0 !important;
    background-color: var(--wp--preset--color--base);
    border: 1px solid rgba(219, 221, 238, 0.41);
    border-radius: 4px;
    box-shadow: 0 32px 120px -25px rgba(0, 0, 0, 0.08);
}

.pafa-card > * {
    margin: 0;
}

.pafa-card__title {
    margin: 24px 0 8px;
}

@media (max-width: 1024px) {

    .pafa-why {
        padding: 80px 40px;
        background-size: contain;
    }

    .pafa-why__columns.wp-block-columns {
        padding: 0;
    }
}

@media (max-width: 781px) {

    .pafa-why {
        padding: 64px 24px;
    }

    .pafa-why > .pafa-why__columns.wp-block-columns {
        gap: 48px;
        margin-top: 48px;
    }

    .pafa-card {
        padding: 24px;
    }
}


/* ------------------------------------------------------------------
 * 8. Home: numbers
 * ------------------------------------------------------------------ */

.pafa-stats {
    display: flex;
    align-items: center;
    min-height: 280px;
    padding: 64px 0;
}

.pafa-stats__grid.wp-block-group {
    gap: 0;
    width: 100%;
    max-width: 1140px;
    margin-inline: auto;
}

.pafa-stat p {
    margin: 0;
}

.pafa-stat__number {
    font-size: 64px;
    font-weight: 600;
    line-height: 1;
    color: var(--wp--preset--color--contrast);
}

.pafa-stat__label {
    font-size: 16px;
    line-height: 40px;
}

@media (max-width: 781px) {

    .pafa-stats__grid.wp-block-group {
        grid-template-columns: 1fr;
        row-gap: 8px;
    }
}


/* ------------------------------------------------------------------
 * 9. Home: certifications and page summary
 * ------------------------------------------------------------------ */

.pafa-certs {
    padding: 10px 0 0;
}

.pafa-certs h2 {
    margin: 0;
}

.pafa-certs__logos.wp-block-group {
    gap: 0;
    max-width: 1140px;
    margin: 20px auto 0;
}

.pafa-certs__logos .wp-block-image {
    margin: 0;
}

.pafa-certs__logos img {
    width: auto;
    height: 146px;
    object-fit: contain;
}

.pafa-summary {
    padding: 75px 10px;
}

.pafa-summary__title {
    margin: 0 0 20px;
    font-size: 24px;
}

.pafa-summary p {
    margin: 0;
}

@media (max-width: 781px) {

    .pafa-certs__logos img {
        height: 110px;
    }
}


/* ------------------------------------------------------------------
 * 10. Call to action band (top of the footer part)
 * ------------------------------------------------------------------ */

.pafa-cta {
    position: relative;
    padding: 200px 40px 120px;
    margin: 0;
    overflow: hidden;
    background-image: linear-gradient(180deg, rgba(0, 5, 47, 0) 16%, #383838 16%);
}

.pafa-cta::before {
    position: absolute;
    inset: 0;
    content: "";
    background-image: url("../images/attab-logo-symbol-cta-bg.png");
    background-repeat: no-repeat;
    background-position: bottom right;
    background-size: contain;
}

.pafa-cta > * {
    position: relative;
}

.pafa-cta > .pafa-cta__content {
    max-width: 1140px;
}

.pafa-cta__content > * {
    max-width: 684px;
}

.pafa-cta h2,
.pafa-cta p {
    margin: 0;
    color: var(--wp--preset--color--base);
}

.pafa-cta p {
    max-width: 524px;
    margin-top: 20px;
}

.pafa-cta__buttons.wp-block-buttons {
    gap: 32px;
    margin-top: 28px;
}

@media (max-width: 1024px) {

    .pafa-cta {
        padding: 120px 40px 80px;
    }

    .pafa-cta::before {
        background-size: cover;
    }
}

@media (max-width: 781px) {

    .pafa-cta {
        padding: 64px 24px;
    }

    .pafa-cta__buttons.wp-block-buttons {
        flex-direction: column;
        gap: 14px;
    }

    .pafa-cta__buttons .wp-block-button,
    .pafa-cta__buttons .wp-block-button__link {
        width: 100%;
    }
}


/* ------------------------------------------------------------------
 * 11. Footer
 * ------------------------------------------------------------------ */

.hc-footer {
    font-size: 1rem;
    line-height: 1.5;
    color: var(--wp--preset--color--muted);
    border-top: 1px solid #444444;
}

.hc-footer__main.wp-block-group,
.hc-footer__bottom.wp-block-group {
    max-width: calc(1140px + 40px);
    padding-right: 20px;
    padding-left: 20px;
}

.hc-footer__main.wp-block-group {
    display: grid;
    grid-template-columns: 264px 1fr 264px 264px;
    gap: 19px;
    padding-top: 86px;
    padding-bottom: 75px;
}

.hc-footer__column > * {
    margin: 0;
}

.hc-footer__column p {
    margin: 0 0 15px;
}

.hc-footer__column:not(.hc-footer__column--brand) p {
    max-width: 190px;
}

.hc-footer a {
    color: var(--wp--preset--color--muted);
}

.hc-footer a:hover {
    color: var(--wp--preset--color--base);
}

.hc-footer__heading.wp-block-heading {
    margin: 0 0 27px;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.2;
    color: var(--wp--preset--color--base);
    text-transform: none;
    letter-spacing: normal;
}

.hc-footer .hc-logo__image {
    width: 264px;
    max-width: 100%;
    max-height: none;
}

.hc-footer__column--brand .hc-info,
.hc-footer__column--brand .hc-logo {
    margin-bottom: 20px;
}

.hc-footer__map iframe {
    display: block;
    width: 100%;
    max-width: 264px;
    height: 150px;
}

.hc-footer__bottom.wp-block-group {
    padding-top: 55px;
    padding-bottom: 55px;
    border-top: 1px solid #333333;
}

.hc-footer__copyright {
    margin: 0;
    line-height: 1;
    color: var(--wp--preset--color--muted);
}

@media (max-width: 781px) {

    .hc-footer__main.wp-block-group,
    .hc-footer__bottom.wp-block-group {
        padding-right: 10px;
        padding-left: 10px;
    }

    .hc-footer__main.wp-block-group {
        grid-template-columns: 1fr;
        padding-top: 56px;
    }

    .hc-footer__column--spacer {
        display: none;
    }
}


/* ------------------------------------------------------------------
 * 12. Scroll to top
 * ------------------------------------------------------------------ */

.pafa-to-top {
    position: fixed;
    right: 29px;
    bottom: 29px;
    z-index: 99;
    display: none;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    color: var(--wp--preset--color--base);
    cursor: pointer;
    background-color: var(--wp--preset--color--primary);
    border: 0;
    border-radius: 2px;
}

.pafa-to-top.is-visible {
    display: inline-flex;
}
