/**
 * Page sections: the styles behind the patterns in /patterns.
 * Loaded on the site and in the editor, so patterns look the same in both.
 *
 * Each pattern's outer block carries a class named after it (hc-hero,
 * hc-intro, hc-services ...). Colors and radii come from theme.json.
 *
 * Breakpoints: 782px (WordPress columns stack), 992px (header switch).
 *
 * Contents
 *   1. Shared pieces (sections, curves, bars, boxes, photos, arrow links)
 *   2. Home
 *   3. About
 *   4. Products & Services
 *   5. Customers
 *   6. Contact
 *   7. Resources (blog) and posts
 */


/* ------------------------------------------------------------------
 * 1. Shared pieces
 * ------------------------------------------------------------------ */

.hc-section {
    padding-top: 70px;
    padding-bottom: 70px;
}

.hc-main .entry-content > .wp-block-group.alignfull,
.hc-main .entry-content > .wp-block-cover.alignfull {
    margin-block-start: 0;
}

/* Curved bottom edge on the hero and the page banners. */
.hc-curve {
    clip-path: ellipse(75% 100% at 50% 0);
}

.hc-curve.hc-curve--wide {
    clip-path: ellipse(120% 100% at 50% 0);
}

@media (max-width: 781px) {

    .hc-curve,
    .hc-curve.hc-curve--wide {
        clip-path: ellipse(200% 100% at 50% 0);
    }
}

/* Page banner: photo strip under the header. */
.wp-block-cover.hc-banner {
    padding: 0;
}

.hc-banner__spacer {
    margin: 0;
}

/* Page title with the short red bar under it. */
.hc-page-intro {
    padding-top: 70px;
    padding-bottom: 60px;
    text-align: center;
}

.hc-page-intro > * {
    margin-right: auto !important;
    margin-left: auto !important;
}

.hc-page-title,
.hc-page-heading__title {
    font-family: var(--wp--preset--font-family--body);
    font-size: clamp(2.25rem, 1.8rem + 1.6vw, 3rem);
    font-weight: 700;
}

.wp-block-separator.hc-bar {
    width: 100px;
    max-width: 100px;
    height: 3px;
    margin-top: 30px;
    margin-bottom: 30px;
    background-color: var(--wp--preset--color--primary);
    border: 0;
    opacity: 1;
}

.hc-subtitle {
    font-family: var(--wp--preset--font-family--body);
    font-size: 18px;
    font-weight: 700;
}

.hc-lead {
    max-width: 820px;
    font-size: 18px;
}

.hc-small {
    font-size: 14px;
}

/* White box with large rounded corners. */
.hc-box {
    padding: var(--wp--custom--card--padding);
    background-color: var(--wp--custom--card--background);
    border-radius: var(--wp--custom--card--radius);
}

.hc-box > * {
    margin-block: 0;
}

.hc-box > * + * {
    margin-block-start: 15px;
}

.hc-box__head {
    gap: 16px;
    align-items: center;
}

.hc-box .hc-box__title {
    margin: 0;
    font-family: var(--wp--preset--font-family--heading);
    font-size: clamp(1.5rem, 1.3rem + 0.8vw, 1.875rem);
    font-weight: 600;
    line-height: 1.2;
}

.hc-box__title a {
    color: inherit;
    text-decoration: none;
}

.hc-box p {
    font-size: 15px;
    line-height: 1.8;
}

/* Rounded photos. */
.wp-block-image.hc-photo img {
    width: 100%;
    aspect-ratio: 310 / 443;
    object-fit: cover;
    border-radius: var(--wp--custom--radius--large);
}

.wp-block-image.hc-photo--landscape img {
    aspect-ratio: 580 / 510;
}

.wp-block-image.hc-photo--square img {
    aspect-ratio: 1;
}

/* Grids of cards. */
.hc-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 40px;
}

.hc-card-grid > * {
    margin: 0 !important;
}

/* Red arrow link: the text stays for screen readers. */
.hc-arrow-link {
    margin: 0;
    line-height: 0;
}

.hc-arrow-link a {
    display: inline-block;
    width: 42px;
    height: 42px;
    overflow: hidden;
    color: transparent;
    white-space: nowrap;
    background-color: var(--wp--preset--color--primary);
    -webkit-mask: url(../icons/fa-arrow-right.svg) center / 40px no-repeat;
    mask: url(../icons/fa-arrow-right.svg) center / 40px no-repeat;
    transition: transform var(--wp--custom--transition--fast);
}

.hc-arrow-link a:hover,
.hc-arrow-link a:focus-visible {
    transform: translateX(4px);
}

@media (max-width: 991px) {

    .hc-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px;
    }
}

@media (max-width: 599px) {

    .hc-section {
        padding-top: 50px;
        padding-bottom: 50px;
    }

    .hc-card-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}


/* ------------------------------------------------------------------
 * 2. Home
 * ------------------------------------------------------------------ */

/* Hero */
.wp-block-cover.hc-hero {
    padding-top: 120px;
    padding-bottom: 140px;
    color: var(--wp--preset--color--base);
    text-align: center;
}

.hc-hero .wp-block-cover__inner-container {
    max-width: 1100px;
}

.hc-hero .hc-hero__title {
    margin: 0 auto;
    font-family: var(--wp--preset--font-family--heading);
    font-size: clamp(2.5rem, 1.2rem + 4.6vw, 5rem);
    font-weight: 700;
    line-height: 1.1;
    color: var(--wp--preset--color--base);
    text-shadow: 2px 2px 3px #000;
}

.hc-hero .hc-hero__subtitle {
    margin-top: 30px;
    font-family: var(--wp--preset--font-family--heading);
    font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
    font-weight: 600;
    line-height: 1.3;
    text-shadow: 2px 2px 3px #000;
}

.hc-hero .hc-hero__text {
    max-width: 820px;
    margin: 20px auto 0;
    font-size: 18px;
    text-shadow: 1px 1px 2px #000;
}

.hc-hero .wp-block-buttons {
    margin-top: 40px;
}

.hc-hero .wp-block-button__link {
    padding-right: 40px;
    padding-left: 40px;
}

/* Intro */
.hc-intro {
    padding-top: 100px;
    padding-bottom: 60px;
    text-align: center;
}

.hc-intro > * {
    max-width: 800px !important;
}

.hc-intro .hc-intro__mark img {
    width: 140px;
    height: auto;
}

.hc-intro .wp-block-image {
    margin-bottom: 20px;
}

.hc-intro .hc-intro__title {
    margin-right: auto;
    margin-left: auto;
    font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.25rem);
    font-weight: 500;
}

.hc-intro .wp-block-buttons {
    margin-top: 40px;
}

/* Staggered photo row */
.hc-photos {
    padding: 40px;
}

.hc-photo-row.wp-block-columns {
    gap: 40px;
    margin: 0;
}

.hc-photo-row > .wp-block-column:nth-child(even) {
    padding-top: 80px;
}

@media (max-width: 781px) {

    .hc-photos {
        padding: 20px 10px;
    }

    .hc-photo-row.wp-block-columns {
        flex-wrap: wrap !important;
        gap: 20px;
    }

    .wp-block-columns.hc-photo-row:not(.is-not-stacked-on-mobile) > .wp-block-column {
        flex-basis: calc(50% - 10px) !important;
    }

    .hc-photo-row > .wp-block-column:nth-child(even) {
        padding-top: 50px;
    }
}

/* Tabs */
.hc-home-tabs {
    max-width: 1130px;
    margin-right: auto;
    margin-left: auto;
}

.hc-home-tabs.is-ready > .hc-tabs__list {
    gap: 30px;
    margin-bottom: 30px;
    border-bottom: 0;
}

.hc-home-tabs .hc-tabs__tab {
    padding: 22px 20px;
    margin: 0;
    font-family: var(--wp--preset--font-family--body);
    font-size: 22px;
    font-weight: 400;
    color: var(--wp--preset--color--contrast);
    border-bottom: 3px solid var(--wp--preset--color--primary);
}

.hc-home-tabs .hc-tabs__tab[aria-selected="true"] {
    color: var(--wp--preset--color--base);
    background-color: var(--wp--preset--color--primary);
}

.hc-tab-columns.wp-block-columns {
    gap: 30px;
}

.hc-tab-image {
    text-align: center;
}

.hc-tab-image img {
    max-height: 300px;
    width: auto;
}

.hc-tab-title.wp-block-heading {
    margin-top: 0;
    font-family: var(--wp--preset--font-family--body);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.35;
}

.hc-tab-columns p {
    font-size: 15px;
}

ul.hc-dash-list {
    padding: 0;
    font-size: 15px;
    list-style: none;
}

ul.hc-dash-list li::before {
    content: "- ";
}

/* Services cards on the gray band with the extinguisher photo. */
.hc-services {
    padding-top: 100px;
    padding-bottom: 100px;
    background-image: url(../images/bg-fire-extinguisher-wall.webp);
    background-repeat: no-repeat;
    background-position: right center;
    background-size: auto 100%;
}

.hc-services > * {
    max-width: 1360px !important;
}

.hc-services .hc-services__title {
    max-width: 880px;
    margin-left: 0;
    font-family: var(--wp--preset--font-family--body);
    font-size: clamp(1.5rem, 1.3rem + 0.8vw, 1.875rem);
    font-weight: 700;
    line-height: 1.25;
}

.hc-services .wp-block-buttons {
    margin-top: 30px;
}

.hc-card-grid--services {
    max-width: 1010px;
    margin-top: 70px !important;
}

@media (max-width: 1199px) {

    .hc-services {
        background-image: none;
    }
}

/* Helpful Resources mosaic */
.hc-resources > * {
    max-width: 1200px !important;
}

.hc-resources__header {
    justify-content: space-between;
    margin-bottom: 30px;
}

.hc-resources .hc-resources__title {
    margin: 0;
    font-size: clamp(2rem, 1.5rem + 1.8vw, 3rem);
    font-weight: 500;
}

.hc-mosaic .wp-block-post-template {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: 282px;
    gap: 3px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.hc-mosaic .wp-block-post-template > li {
    margin: 0;
}

.hc-mosaic .wp-block-post-template > li:nth-child(1) {
    grid-row: span 2;
    grid-column: span 2;
}

.hc-mosaic .wp-block-post-template > li:nth-child(2) {
    grid-column: span 2;
}

.hc-mosaic .hc-mosaic__tile {
    position: relative;
    height: 100%;
    min-height: 0 !important;
    padding: 20px;
}

.hc-mosaic .hc-mosaic__tile > * {
    margin: 0;
}

.hc-mosaic__term {
    margin: 0 0 8px;
    font-size: 15px;
}

.hc-mosaic__term a {
    position: relative;
    z-index: 2;
    display: inline-block;
    padding: 4px 8px;
    color: var(--wp--preset--color--base);
    text-decoration: none;
    background-color: var(--wp--preset--color--primary);
}

.hc-mosaic__term .wp-block-post-terms__separator {
    display: none;
}

.hc-mosaic .hc-mosaic__title {
    margin: 0;
    font-family: var(--wp--preset--font-family--body);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--wp--preset--color--base);
    text-shadow: 1px 1px 2px rgb(0 0 0 / 50%);
}

.hc-mosaic li:first-child .hc-mosaic__title {
    font-size: 30px;
}

.hc-mosaic__title a {
    color: inherit;
    text-decoration: none;
}

/* The whole tile is the link. */
.hc-mosaic__title a::after {
    position: absolute;
    inset: 0;
    z-index: 1;
    content: "";
}

.hc-mosaic__date {
    margin-top: 6px;
    font-size: 15px;
    color: var(--wp--preset--color--base);
}

.hc-mosaic li:not(:first-child) .hc-mosaic__date {
    display: none;
}

@media (max-width: 781px) {

    .hc-mosaic .wp-block-post-template {
        grid-template-columns: minmax(0, 1fr);
        grid-auto-rows: 240px;
    }

    .hc-mosaic .wp-block-post-template > li:nth-child(n) {
        grid-row: auto;
        grid-column: auto;
    }

    .hc-mosaic li:first-child .hc-mosaic__title {
        font-size: 22px;
    }
}

/* Three link cards on the blue band */
.hc-links {
    background: var(--wp--preset--gradient--blue);
}

.hc-links > * {
    max-width: 1220px !important;
}

.hc-card-grid--links {
    gap: 20px;
}

.hc-link-card.hc-box {
    padding: 0 0 50px;
    overflow: hidden;
}

.hc-link-card .hc-link-card__image {
    margin: 0;
}

.hc-link-card .hc-link-card__image img {
    display: block;
    width: 100%;
    aspect-ratio: 393 / 196;
    object-fit: cover;
    border-bottom-left-radius: 100% 100%;
}

.hc-link-card .hc-link-card__title {
    padding: 0 40px;
    margin-top: 45px;
    font-size: clamp(2.25rem, 1.6rem + 2vw, 3.625rem);
    font-weight: 500;
    line-height: 1.1;
}

.hc-link-card__title a {
    color: inherit;
    text-decoration: none;
}

.hc-link-card .hc-arrow-link {
    padding: 0 40px;
    margin-top: 30px;
}


/* ------------------------------------------------------------------
 * 3. About
 * ------------------------------------------------------------------ */

.hc-badge {
    margin-block-start: 0;
}

.wp-block-cover.hc-badge__photo {
    padding: 70px 20px 0;
}

.hc-badge__logo {
    margin: 0;
    text-align: center;
}

.hc-badge__logo img {
    display: block;
    width: 148px;
    margin: 0 auto;
}

.hc-badge__band {
    padding: 25px 20px 70px;
    margin: 0 !important;
    color: var(--wp--preset--color--base);
    text-align: center;
    background-color: #808080;
}

.hc-badge__text {
    max-width: 640px;
    margin: 0 auto;
    font-family: var(--wp--preset--font-family--heading);
    font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem);
    font-weight: 500;
    line-height: 1.3;
    text-shadow: 2px 2px 3px rgb(0 0 0 / 60%);
}

.hc-values.wp-block-columns {
    gap: 40px;
}

.hc-values > .wp-block-column:last-child {
    display: flex;
    flex-direction: column;
    gap: 40px;
    padding-top: 180px;
}

.hc-values > .wp-block-column:last-child > * {
    margin: 0;
}

.hc-box--value .hc-box__title {
    font-size: 32px;
    font-weight: 500;
}

@media (max-width: 781px) {

    .hc-values > .wp-block-column:last-child {
        padding-top: 0;
    }
}


/* ------------------------------------------------------------------
 * 4. Products & Services (accordion)
 * ------------------------------------------------------------------ */

.hc-accordion-section > * {
    max-width: 860px !important;
}

.wp-block-details.hc-accordion {
    margin-top: 10px;
    background-color: var(--wp--preset--color--base);
    border-radius: 30px;
}

.wp-block-details.hc-accordion summary {
    position: relative;
    padding: 14px 60px 14px 30px;
    font-family: var(--wp--preset--font-family--heading);
    font-size: 20px;
    font-weight: 500;
    cursor: pointer;
    list-style: none;
}

.wp-block-details.hc-accordion summary::-webkit-details-marker {
    display: none;
}

.wp-block-details.hc-accordion summary::after {
    position: absolute;
    top: 50%;
    right: 30px;
    width: 14px;
    height: 14px;
    content: "";
    background-color: var(--wp--preset--color--primary);
    -webkit-mask: url(../icons/fa-plus.svg) center / contain no-repeat;
    mask: url(../icons/fa-plus.svg) center / contain no-repeat;
    transform: translateY(-50%);
}

.wp-block-details.hc-accordion[open] summary::after {
    -webkit-mask-image: url(../icons/fa-minus.svg);
    mask-image: url(../icons/fa-minus.svg);
}

.wp-block-details.hc-accordion > :not(summary) {
    padding-right: 30px;
    padding-left: 30px;
    margin-top: 0;
    margin-bottom: 0;
    font-size: 15px;
}

.wp-block-details.hc-accordion > :last-child {
    padding-bottom: 24px;
}

.wp-block-details.hc-accordion ul {
    padding-left: 50px;
}


/* ------------------------------------------------------------------
 * 5. Customers
 * ------------------------------------------------------------------ */

.hc-customers > * {
    max-width: 1040px !important;
}

.hc-box.hc-customer {
    padding: 28px 36px 40px;
}

.hc-customer__logo img {
    width: auto;
    max-height: 100px;
}

.hc-customer .hc-customer__name {
    font-family: var(--wp--preset--font-family--heading);
    font-size: 18px;
    font-weight: 500;
    line-height: 1.2;
}

.hc-customer .hc-customer__link {
    margin-top: 20px;
    font-size: 14px;
}

.hc-customer__link a {
    text-decoration: none;
}


/* ------------------------------------------------------------------
 * 6. Contact
 * ------------------------------------------------------------------ */

.hc-page-intro .hc-contact__phone {
    margin-top: 0;
    font-size: 18px;
}

.hc-page-intro .hc-contact__phone a {
    color: inherit;
    text-decoration: none;
}

.hc-page-intro .hc-lead + .hc-contact__phone {
    margin-top: 0;
}

.hc-contact-form > * {
    max-width: 960px !important;
}

.hc-contact-columns.wp-block-columns {
    gap: 32px;
}

.hc-box.hc-box--form {
    padding: 32px;
}

.hc-box--form .hc-box__title {
    font-weight: 500;
}

.hc-map {
    line-height: 0;
}

.hc-map__frame {
    display: block;
    width: 100%;
    height: 400px;
    border: 0;
}


/* ------------------------------------------------------------------
 * 7. Resources (blog) and posts
 * ------------------------------------------------------------------ */

.hc-page-heading {
    color: var(--wp--preset--color--contrast);
    background-color: transparent;
}

.hc-page-heading__banner {
    height: 206px;
    background-color: var(--wp--preset--color--contrast-alt);
    background-position: center;
    background-size: cover;
}

.hc-page-heading__inner {
    align-items: center;
    padding-top: 60px;
    padding-bottom: 20px;
    text-align: center;
}

.hc-page-heading .hc-page-heading__title {
    margin: 0 auto;
}

.hc-page-heading .hc-page-heading__lead,
.hc-page-heading .hc-breadcrumbs {
    color: var(--wp--preset--color--muted);
}

/* Post cards on the Resources page: gray card, photo on top. */
.hc-template .hc-post-grid {
    align-items: start;
    max-width: 1100px;
    margin: 0 auto;
    gap: 18px;
}

.hc-post-card {
    gap: 0;
    overflow: hidden;
    background-color: var(--wp--preset--color--surface);
    border-radius: var(--wp--custom--radius--large);
}

.hc-post-card__media {
    border-radius: 0;
}

.hc-post-card__media img {
    aspect-ratio: 327 / 218;
}

.hc-post-card__body {
    gap: 20px;
    padding: 28px 18px 30px;
}

.hc-post-card .hc-post-card__title {
    font-family: var(--wp--preset--font-family--body);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
}

.hc-post-card .hc-post-card__meta,
.hc-post-card__terms {
    font-size: 13px;
    font-weight: 400;
    color: var(--wp--preset--color--contrast);
    text-transform: none;
    letter-spacing: 0;
}

.hc-post-card__meta a,
.hc-post-card__terms a {
    color: inherit;
}

.hc-post-card__terms a {
    text-decoration: none;
}

.hc-post-card__excerpt {
    font-size: 15px;
    color: var(--wp--preset--color--contrast);
}

.hc-post-card .hc-button {
    padding: 10px 14px;
    margin-top: 0;
    font-size: 14px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Ninja Forms inside the Send A Message card: the card has its own
   heading, so the form title and the "required" note are hidden. */
.hc-box--form .nf-form-title,
.hc-box--form .nf-before-form-content {
    display: none;
}

.hc-box--form .nf-form-content {
    padding: 0;
}

/* Single post */
.hc-single__banner {
    height: 206px;
    background-position: center;
    background-size: cover;
}

.hc-single__inner {
    max-width: calc(1160px + var(--wp--style--root--padding-left) + var(--wp--style--root--padding-right));
    padding: 50px var(--wp--style--root--padding-right) 70px var(--wp--style--root--padding-left);
    margin: 0 auto;
}

.hc-single .hc-single__media {
    margin: 0 0 30px;
}

.hc-single .hc-single__media img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 0;
}

.hc-single .hc-single__header {
    padding: 0;
}

.hc-single .hc-single__title {
    font-family: var(--wp--preset--font-family--body);
    font-size: clamp(2rem, 1.6rem + 1.4vw, 3rem);
    font-weight: 700;
}

.hc-single .hc-single__meta {
    margin: 20px 0 0;
    font-size: 14px;
    font-weight: 400;
    color: var(--wp--preset--color--contrast);
    text-transform: none;
    letter-spacing: 0;
}

.hc-single__meta a {
    color: inherit;
}

.hc-single .entry-content {
    padding-bottom: 0;
    margin-top: 30px;
}

/* Keep the hero text centered in the editor too. */
.hc-hero .wp-block-cover__inner-container > * {
    margin-right: auto;
    margin-left: auto;
    text-align: center;
}
