/*
Theme Name: Henley's Grading
Theme URI: https://example.com/
Author: Henley's Grading
Description: Editable block theme for Henley's Grading, Inc.
Version: 1.1.0
Requires at least: 6.5
Tested up to: 7.0
Requires PHP: 8.0
Text Domain: henleys-grading
*/

body {
  background: #f5f5f5;
  overflow-x: clip;
}

html {
  overflow-x: hidden;
}

a {
  text-underline-offset: 0.18em;
}

.hg-topbar {
  letter-spacing: 0;
  border-bottom: 3px solid #c41230;
  position: relative;
}

.hg-topbar::before {
  background: repeating-linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.12) 0,
    rgba(255, 255, 255, 0.12) 8px,
    transparent 8px,
    transparent 16px
  );
  content: "";
  inset: 0;
  opacity: 0.32;
  pointer-events: none;
  position: absolute;
}

.hg-topbar > * {
  position: relative;
  z-index: 1;
}

.hg-topbar p {
  font-size: 1.03rem !important;
  margin-bottom: 0;
  margin-top: 0;
}

.hg-topbar a {
  color: #fff;
  text-decoration-color: rgba(255, 255, 255, 0.55);
}

.hg-main-header {
  border-bottom: 1px solid rgba(11, 11, 11, 0.1);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
  position: relative;
  z-index: 4;
}

.hg-main-header::after {
  background: linear-gradient(90deg, #c41230 0 18%, #0b0b0b 18% 30%, transparent 30%);
  bottom: -1px;
  content: "";
  height: 4px;
  left: 24px;
  max-width: 520px;
  position: absolute;
  right: 24px;
}

.hg-main-header .wp-block-site-logo img {
  display: block;
  filter: drop-shadow(0 7px 12px rgba(0, 0, 0, 0.18));
  height: auto;
  width: 100% !important;
}

.hg-main-header .wp-block-site-logo {
  width: min(285px, 34vw) !important;
}

.hg-primary-menu {
  margin-left: auto;
}

.hg-menu-toggle {
  display: none;
}

.hg-primary-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.hg-primary-menu__list {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  justify-content: flex-end;
}

.hg-primary-menu li {
  position: relative;
}

.hg-primary-menu a {
  border-radius: 4px;
  color: #171717;
  display: block;
  padding: 9px 11px;
  text-decoration: none;
  transition: background-color 170ms ease, color 170ms ease, transform 170ms ease;
}

.hg-primary-menu a:hover,
.hg-primary-menu a:focus {
  background: #c41230;
  color: #fff;
  transform: translateY(-1px);
}

.hg-primary-menu a[href*="get-estimate"] {
  background: #0b0b0b;
  color: #fff;
}

.hg-primary-menu a[href*="get-estimate"]:hover,
.hg-primary-menu a[href*="get-estimate"]:focus {
  background: #c41230;
}

.hg-primary-menu .sub-menu {
  background: #fff;
  border: 1px solid rgba(11, 11, 11, 0.12);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.16);
  left: 0;
  min-width: 230px;
  opacity: 0;
  padding: 8px;
  pointer-events: none;
  position: absolute;
  top: 100%;
  transform: translateY(0);
  transition: opacity 160ms ease, transform 160ms ease;
  z-index: 20;
}

.hg-primary-menu li.menu-item-has-children::after {
  bottom: -10px;
  content: "";
  height: 12px;
  left: 0;
  position: absolute;
  right: 0;
}

.hg-primary-menu li:hover > .sub-menu,
.hg-primary-menu li:focus-within > .sub-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.hg-main-header .wp-block-navigation-item__content {
  border-radius: 4px;
  color: #171717;
  padding: 9px 11px;
  position: relative;
  text-decoration: none;
  transition: background-color 170ms ease, color 170ms ease, transform 170ms ease;
}

.hg-main-header .wp-block-navigation-item__content:hover,
.hg-main-header .wp-block-navigation-item__content:focus {
  background: #c41230;
  color: #fff;
  transform: translateY(-1px);
}

.hg-main-header .wp-block-navigation-item__content[href*="get-estimate"] {
  background: #0b0b0b;
  color: #fff;
}

.hg-main-header .wp-block-navigation-item__content[href*="get-estimate"]:hover,
.hg-main-header .wp-block-navigation-item__content[href*="get-estimate"]:focus {
  background: #c41230;
}

.hg-hero {
  margin-left: calc(50% - 50dvw) !important;
  margin-right: calc(50% - 50dvw) !important;
  max-width: 100vw !important;
  min-height: calc(78vh - 50px) !important;
  padding-bottom: 65px !important;
  padding-top: 65px !important;
  position: relative;
  width: 100dvw !important;
}

.wp-site-blocks .hg-hero.alignfull,
.entry-content .hg-hero.alignfull,
.is-layout-constrained > .hg-hero.alignfull,
.is-layout-constrained > .hg-hero,
.wp-site-blocks > .hg-hero {
  margin-left: calc(50% - 50dvw) !important;
  margin-right: calc(50% - 50dvw) !important;
  max-width: 100vw !important;
  width: 100dvw !important;
}

.hg-media-cover video {
  object-fit: cover;
}

.hg-hero .wp-block-cover__inner-container {
  margin-left: auto;
  margin-right: auto;
  max-width: 1120px;
  width: calc(100% - 48px);
}

.hg-card {
  border-radius: 6px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.hg-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.16);
}

.hg-card img {
  aspect-ratio: 16 / 10;
  display: block;
  object-fit: cover;
  transition: transform 450ms ease, filter 450ms ease;
  width: 100%;
}

.hg-card:hover img {
  filter: saturate(1.08) contrast(1.03);
  transform: scale(1.075);
}

.hg-service-grid,
.hg-gallery-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hg-service-tile {
  background: #fff;
  color: inherit;
  display: block;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.hg-service-tile:hover,
.hg-service-tile:focus {
  color: inherit;
  transform: translateY(-2px);
}

.hg-service-tile:focus-visible {
  outline: 3px solid #b21f24;
  outline-offset: 4px;
}

.hg-service-tile .hg-card {
  margin: 0;
  max-width: 100%;
  width: 100%;
}

.hg-service-tile .hg-card img {
  height: auto;
  max-width: 100%;
}

.hg-service-tile h3 {
  margin-bottom: 8px;
  margin-top: 18px;
}

.hg-gallery-grid {
  margin-top: 28px;
}

.hg-gallery-grid a {
  border-radius: 6px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
  display: block;
  overflow: hidden;
}

.hg-gallery-grid img {
  aspect-ratio: 4 / 3;
  display: block;
  height: 100%;
  object-fit: cover;
  transition: transform 240ms ease, filter 240ms ease;
  width: 100%;
}

.hg-gallery-grid a:hover img,
.hg-gallery-grid a:focus img {
  filter: saturate(1.08) contrast(1.04);
  transform: scale(1.045);
}

.hg-about-story-box,
.hg-home-groundwork-box {
  --hg-story-pad: clamp(22px, 3vw, 36px);
  background: #f7f6f2;
  border: 1px solid #ded8ce;
  border-radius: 6px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  padding-left: var(--hg-story-pad);
  padding-right: var(--hg-story-pad);
  padding-top: 0 !important;
}

.hg-home-groundwork-box {
  --hg-story-pad: 24px;
  margin-top: 32px;
}

.hg-about-story-box > h2:first-child,
.hg-home-groundwork-box > h2:first-child {
  background: #0b0b0b;
  border-bottom: 3px solid #c41230;
  box-sizing: border-box;
  color: #fff;
  left: calc(0px - var(--hg-story-pad));
  margin: 0 0 30px !important;
  max-width: none !important;
  padding: 22px var(--hg-story-pad);
  position: relative;
  width: calc(100% + var(--hg-story-pad) + var(--hg-story-pad));
}

.hg-about-story-box > h2:first-child::before,
.hg-home-groundwork-box > h2:first-child::before {
  background: repeating-linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.12) 0,
    rgba(255, 255, 255, 0.12) 8px,
    transparent 8px,
    transparent 16px
  );
  content: "";
  inset: 0;
  opacity: 0.32;
  pointer-events: none;
  position: absolute;
}

.hg-about-story-box > h2:first-child strong,
.hg-about-story-box > h2:first-child span,
.hg-home-groundwork-box > h2:first-child strong,
.hg-home-groundwork-box > h2:first-child span {
  position: relative;
  z-index: 1;
}

.hg-about-video {
  margin-top: 32px;
  max-width: none;
  width: 100%;
}

.hg-about-video video {
  border-radius: 6px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
  display: block;
  width: 100%;
}

.hg-about-youtube {
  aspect-ratio: 16 / 9;
  margin-top: 28px;
  max-width: none;
  width: 100%;
}

.hg-about-youtube iframe {
  border: 0;
  border-radius: 6px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
  display: block;
  height: 100%;
  width: 100%;
}

.hg-service-detail-gallery {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 28px;
}

.hg-service-detail-copy {
  max-width: 980px;
}

.hg-service-detail-gallery a {
  border-radius: 6px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
  display: block;
  overflow: hidden;
}

.hg-service-detail-gallery img {
  aspect-ratio: 4 / 3;
  display: block;
  height: 100%;
  object-fit: cover;
  transition: transform 240ms ease, filter 240ms ease;
  width: 100%;
}

.hg-service-detail-gallery a:hover img,
.hg-service-detail-gallery a:focus img {
  filter: saturate(1.08) contrast(1.04);
  transform: scale(1.045);
}

.hg-material-intro-gallery {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 42px;
  margin-top: 28px;
}

.hg-material-intro-card {
  margin: 0;
}

.hg-material-intro-card a {
  border-radius: 6px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
  display: block;
  overflow: hidden;
}

.hg-material-intro-card img {
  aspect-ratio: 4 / 3;
  display: block;
  height: 100%;
  object-fit: cover;
  transition: transform 240ms ease, filter 240ms ease;
  width: 100%;
}

.hg-material-intro-card a:hover img,
.hg-material-intro-card a:focus img {
  filter: saturate(1.08) contrast(1.04);
  transform: scale(1.045);
}

.hg-material-intro-card figcaption {
  font-size: 1.08rem;
  font-weight: 800;
  margin-top: 12px;
}

.hg-material-intro-card p {
  font-size: 0.96rem;
  margin-bottom: 0;
  margin-top: 6px;
}

.hg-material-section {
  border-top: 1px solid rgba(11, 11, 11, 0.12);
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  padding: 42px 0;
}

.hg-material-copy h2 {
  margin-bottom: 10px;
  margin-top: 0;
}

.hg-material-copy h3 {
  margin-bottom: 8px;
}

.hg-material-lists {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 22px;
}

.hg-material-lists ul {
  margin-bottom: 0;
}

.hg-material-use-list {
  margin-top: 8px;
}

.hg-material-gallery {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hg-material-gallery a,
.hg-material-gallery-single a {
  border-radius: 6px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
  display: block;
  overflow: hidden;
}

.hg-material-gallery img {
  aspect-ratio: 4 / 3;
  display: block;
  height: 100%;
  object-fit: cover;
  transition: transform 240ms ease, filter 240ms ease;
  width: 100%;
}

.hg-material-gallery a:hover img,
.hg-material-gallery a:focus img {
  filter: saturate(1.08) contrast(1.04);
  transform: scale(1.045);
}

.hg-material-gallery-single {
  grid-template-columns: 1fr;
}

.hg-material-cta {
  margin-top: 10px;
}

.hg-lightbox[hidden] {
  display: none;
}

.hg-lightbox {
  align-items: center;
  background: rgba(0, 0, 0, 0.88);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 56px;
  position: fixed;
  z-index: 99999;
}

.hg-lightbox img {
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  max-height: 88vh;
  max-width: 92vw;
  object-fit: contain;
}

.hg-lightbox button {
  align-items: center;
  background: rgba(255, 255, 255, 0.92);
  border: 0;
  border-radius: 4px;
  color: #0b0b0b;
  cursor: pointer;
  display: flex;
  font-size: 38px;
  font-weight: 700;
  height: 48px;
  justify-content: center;
  line-height: 1;
  position: fixed;
  width: 48px;
}

.hg-lightbox__close {
  right: 22px;
  top: 22px;
}

.hg-lightbox__prev {
  left: 22px;
  top: 50%;
}

.hg-lightbox__next {
  right: 22px;
  top: 50%;
}

.hg-lightbox-open {
  overflow: hidden;
}

.hg-form {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hg-form-row {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 2fr) minmax(74px, 1fr) minmax(88px, 1fr);
}

.hg-form label {
  display: grid;
  font-weight: 700;
  gap: 6px;
  min-width: 0;
}

.hg-form .hg-form-wide {
  grid-column: 1 / -1;
}

.hg-form input,
.hg-form textarea {
  border: 1px solid rgba(11, 11, 11, 0.22);
  border-radius: 4px;
  box-sizing: border-box;
  font: inherit;
  min-width: 0;
  padding: 12px 14px;
  width: 100%;
}

.hg-form textarea {
  min-height: 150px;
}

.hg-map iframe {
  border: 0;
  border-radius: 6px;
  min-height: 490px;
  width: 100%;
}

.hg-contact-business {
  font-size: 1.05rem;
  line-height: 1.45;
  margin-bottom: 22px;
  text-align: center;
}

.hg-contact-business-name {
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 8px;
}

.hg-contact-phone {
  font-size: 1.18rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.hg-contact-layout {
  align-items: flex-start;
  display: grid !important;
  gap: 32px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  margin-top: 32px;
}

.hg-contact-layout > .wp-block-column {
  width: 100%;
}

.hg-contact-layout .hg-form-row {
  grid-template-columns: minmax(0, 1.35fr) minmax(86px, 0.8fr) minmax(104px, 0.9fr);
}

@media (prefers-reduced-motion: reduce) {
  .hg-card,
  .hg-card img,
  .hg-social-link,
  .hg-primary-menu a,
  .hg-primary-menu .sub-menu,
  .hg-main-header .wp-block-navigation-item__content {
    transition: none;
  }

  .hg-card:hover img,
  .hg-social-link:hover,
  .hg-social-link:focus,
  .hg-primary-menu a:hover,
  .hg-primary-menu a:focus,
  .hg-main-header .wp-block-navigation-item__content:hover,
  .hg-main-header .wp-block-navigation-item__content:focus {
    transform: none;
  }
}

@media (max-width: 900px) {
  .hg-service-grid,
  .hg-gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hg-service-detail-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hg-material-section {
    grid-template-columns: 1fr;
  }

  body.page-id-12 .entry-content > .wp-block-columns:first-child,
  body.page-id-12 .entry-content > .wp-block-columns:first-child > .wp-block-column:nth-child(2) {
    grid-template-columns: 1fr;
  }

  body.page-id-12 .entry-content > .wp-block-columns:first-child .hg-map,
  body.page-id-12 .entry-content > .wp-block-columns:first-child .hg-form {
    grid-column: 1;
    grid-row: auto;
  }
}

@media (max-width: 640px) {
  .wp-site-blocks > main.wp-block-group,
  main.wp-block-group {
    box-sizing: border-box;
    padding-left: 24px !important;
    padding-right: 24px !important;
  }

  .hg-main-header,
  .hg-topbar,
  .hg-footer {
    box-sizing: border-box;
    padding-left: 24px !important;
    padding-right: 24px !important;
  }

  .hg-main-header .wp-block-site-logo img {
    max-width: min(250px, calc(100vw - 140px));
  }

  .hg-main-header .wp-block-site-logo {
    width: min(250px, calc(100vw - 140px)) !important;
  }

  .hg-service-grid,
  .hg-gallery-grid,
  .hg-service-detail-gallery,
  .hg-material-intro-gallery,
  .hg-material-gallery,
  .hg-material-lists,
  .hg-form,
  .hg-form-row {
    grid-template-columns: 1fr;
  }

  .hg-lightbox {
    padding: 48px 14px;
  }

  .hg-menu-toggle {
    align-items: center;
    background: #0b0b0b;
    border: 0;
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    height: 46px;
    justify-content: center;
    margin-left: auto;
    position: relative;
    width: 46px;
    z-index: 100001;
  }

  .hg-menu-toggle span[aria-hidden="true"],
  .hg-menu-toggle span[aria-hidden="true"]::before,
  .hg-menu-toggle span[aria-hidden="true"]::after {
    background: currentColor;
    content: "";
    display: block;
    height: 3px;
    position: absolute;
    transition: transform 160ms ease, opacity 160ms ease;
    width: 25px;
  }

  .hg-menu-toggle span[aria-hidden="true"]::before {
    transform: translateY(-8px);
  }

  .hg-menu-toggle span[aria-hidden="true"]::after {
    transform: translateY(8px);
  }

  body.hg-menu-open .hg-menu-toggle span[aria-hidden="true"] {
    background: transparent;
  }

  body.hg-menu-open .hg-menu-toggle span[aria-hidden="true"]::before {
    transform: rotate(45deg);
  }

  body.hg-menu-open .hg-menu-toggle span[aria-hidden="true"]::after {
    transform: rotate(-45deg);
  }

  .hg-primary-menu {
    background: #fff;
    border-top: 1px solid rgba(11, 11, 11, 0.12);
    box-shadow: none;
    box-sizing: border-box;
    display: none;
    margin-top: 18px;
    padding: 16px 0 0;
    position: static;
    width: 100%;
  }

  .hg-primary-menu.is-open,
  body.hg-menu-open .hg-primary-menu {
    display: block;
  }

  .hg-primary-menu__list {
    align-items: stretch;
    display: grid;
    gap: 6px;
    justify-content: stretch;
  }

  .hg-primary-menu a {
    font-size: 1.05rem;
    padding: 11px 10px;
  }

  .hg-primary-menu .sub-menu {
    border: 0;
    box-shadow: none;
    display: block;
    left: auto;
    margin-left: 14px;
    min-width: 0;
    opacity: 1;
    padding-bottom: 0;
    padding-top: 4px;
    pointer-events: auto;
    position: static;
    transform: none;
  }

  .hg-primary-menu .sub-menu a {
    font-size: 0.96rem;
    padding-bottom: 8px;
    padding-top: 8px;
  }
}

.hg-shadow {
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.16);
}

.hg-footer {
  border-top: 5px solid #c41230;
  position: relative;
}

.hg-footer::before {
  background: linear-gradient(90deg, rgba(196, 18, 48, 0.92), transparent 58%);
  content: "";
  height: 1px;
  left: 24px;
  max-width: 680px;
  position: absolute;
  right: 24px;
  top: 14px;
}

.hg-footer .wp-block-site-logo img {
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.34));
}

.hg-footer-legal {
  font-size: 0.92rem;
  line-height: 1.55;
  margin-bottom: 10px;
  margin-top: 0;
}

.hg-footer-legal a {
  color: #fff;
}

.hg-footer-ada {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.78rem;
  line-height: 1.5;
  margin-left: auto;
  margin-right: auto;
  max-width: 680px;
}

.hg-footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  margin-top: 34px;
  padding-top: 24px;
  text-align: center;
}

.hg-footer-actions {
  gap: 12px;
}

.hg-social-link {
  align-items: center;
  background: #c41230;
  border-radius: 4px;
  color: #fff;
  display: inline-flex;
  height: 46px;
  justify-content: center;
  text-decoration: none;
  transition: background-color 170ms ease, transform 170ms ease;
  width: 46px;
}

.hg-social-link:hover,
.hg-social-link:focus {
  background: #fff;
  color: #c41230;
  transform: translateY(-2px);
}

.hg-social-link svg {
  fill: currentColor;
  height: 22px;
  width: 22px;
}

.wp-block-navigation__responsive-container.is-menu-open {
  padding: 24px;
}

.wp-block-navigation__responsive-container-open svg {
  display: none;
}

.wp-block-navigation__responsive-container-open {
  align-items: center;
  border-radius: 4px;
  color: #0b0b0b;
  display: inline-flex;
  height: 44px;
  justify-content: center;
  position: relative;
  width: 44px;
}

.wp-block-navigation__responsive-container-open::before {
  background: currentColor;
  box-shadow: 0 -8px 0 currentColor, 0 8px 0 currentColor;
  content: "";
  height: 3px;
  width: 26px;
}

.wp-block-navigation__responsive-container-open:hover,
.wp-block-navigation__responsive-container-open:focus {
  background: #c41230;
  color: #fff;
}
