/*
Theme Name: I&J Gutenberg
Theme URI: https://www.ijheatingandcooling.com/
Author: I&J Heating and Cooling
Description: A lightweight Gutenberg block theme for I&J Heating and Cooling.
Version: 1.1.0
Requires at least: 6.8
Tested up to: 7.0
Requires PHP: 7.4
Text Domain: ij-gutenberg
*/

:root {
  --ij-orange: #f46004;
  --ij-navy: #044069;
  --ij-navy-dark: #063354;
  --ij-blue: #066aad;
  --ij-blue-bright: #3f9ed5;
  --ij-pale: #e3f2f9;
  --ij-gold: #f9bc02;
  --ij-text: #555555;
  --ij-white: #ffffff;
  --ij-border: #d7e2e8;
  --ij-shadow: 0 16px 45px rgba(4, 64, 105, 0.13);
  --ij-radius: 8px;
  --ij-section-space: clamp(4rem, 7vw, 7rem);
}

html {
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
}

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

:where(a, button, input, select, textarea, summary):focus-visible {
  outline: 3px solid var(--ij-gold);
  outline-offset: 3px;
}

.wp-site-blocks {
  min-height: 100vh;
}

.ij-site-header {
  position: relative;
  z-index: 100;
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.13);
}

.ij-topbar {
  min-height: 44px;
}

.ij-topbar a,
.ij-main-nav a,
.ij-site-footer a {
  text-decoration: none;
}

.ij-topbar a:hover,
.ij-main-nav a:hover,
.ij-site-footer a:hover {
  color: var(--ij-gold) !important;
}

.ij-main-nav {
  min-height: 92px;
}

.ij-main-nav .ij-brand-logo img {
  width: auto;
  max-height: 78px;
}

.ij-main-nav .wp-block-site-title {
  max-width: 240px;
  line-height: 1.05;
}

.ij-main-nav .wp-block-navigation-item__content {
  font-weight: 600;
}

.ij-main-nav .wp-block-navigation__submenu-container {
  border: 0 !important;
  border-radius: 0 0 var(--ij-radius) var(--ij-radius);
  box-shadow: var(--ij-shadow);
  padding: 0.5rem;
  min-width: 240px !important;
  max-height: 72vh;
  overflow-y: auto !important;
}

.ij-main-nav .wp-block-navigation__submenu-container a {
  border-radius: 4px;
  padding: 0.65rem 0.8rem;
}

.ij-main-nav .wp-block-navigation__submenu-container a:hover {
  background: var(--ij-pale);
  color: var(--ij-navy) !important;
}

.ij-hero {
  align-items: center;
  background-color: var(--ij-navy);
  color: var(--ij-white);
  display: flex;
  isolation: isolate;
  justify-content: center;
  min-height: clamp(520px, 62vw, 700px);
  overflow: hidden;
  padding: clamp(5rem, 11vw, 8rem) 1.5rem;
  position: relative;
  text-align: center;
}

.ij-hero::before {
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  content: "";
  inset: 0;
  position: absolute;
  z-index: -2;
}

.ij-hero::after {
  background: rgba(0, 0, 0, 0.12);
  content: "";
  inset: 0;
  position: absolute;
  z-index: -1;
}

.ij-hero--home::before {
  background-image:
    linear-gradient(90deg, rgba(4, 64, 105, 0.86) 0 50%, rgba(244, 96, 4, 0.72) 50% 100%),
    url("assets/images/hero-hvac.png");
}

.ij-hero--inner {
  justify-content: flex-start;
  min-height: clamp(430px, 50vw, 570px);
  text-align: left;
}

.ij-hero--inner::before {
  background-image:
    linear-gradient(90deg, rgba(4, 35, 56, 0.9) 0%, rgba(4, 35, 56, 0.68) 55%, rgba(244, 96, 4, 0.45) 100%),
    url("assets/images/hero-hvac.png");
}

.ij-hero--gallery::before {
  background-image:
    linear-gradient(90deg, rgba(4, 35, 56, 0.92) 0%, rgba(4, 35, 56, 0.64) 58%, rgba(244, 96, 4, 0.36) 100%),
    url("assets/images/site/ij-technicians-rooftop-hvac-service.jpg");
  background-position: center 38%;
}

.ij-hero__content {
  position: relative;
  width: min(100%, 1180px);
  z-index: 1;
}

.ij-hero--home .ij-hero__content {
  margin-inline: auto;
  max-width: 900px;
}

.ij-hero h1 {
  color: var(--ij-white);
  font-size: clamp(2.55rem, 5.2vw, 4rem);
  line-height: 1.08;
  margin: 0;
  text-wrap: balance;
}

.ij-hero p {
  color: var(--ij-white);
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  line-height: 1.65;
}

.ij-hero .wp-block-buttons {
  margin-top: 2rem;
}

.ij-section {
  padding-block: var(--ij-section-space);
}

.ij-section--compact {
  padding-block: clamp(3rem, 5vw, 5rem);
}

.ij-section--pale {
  background: var(--ij-pale);
}

.ij-section--soft {
  background: #f5f7f8;
}

.ij-section--navy {
  background: var(--ij-navy);
  color: var(--ij-white);
}

.ij-section--navy :where(h1, h2, h3, h4, p, li) {
  color: var(--ij-white);
}

.ij-container {
  margin-inline: auto;
  width: min(calc(100% - 3rem), 1180px);
}

.ij-narrow {
  margin-inline: auto;
  width: min(calc(100% - 3rem), 820px);
}

.ij-eyebrow {
  color: var(--ij-orange);
  font-size: clamp(1rem, 1.7vw, 1.2rem);
  font-weight: 600;
  margin-bottom: 0.65rem;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
}

.ij-eyebrow--gold {
  color: var(--ij-gold);
}

.ij-lead {
  font-size: clamp(1.05rem, 1.6vw, 1.22rem);
  line-height: 1.75;
}

.ij-center {
  text-align: center;
}

.ij-center :where(h1, h2, h3, p) {
  margin-inline: auto;
}

.ij-title-limit {
  max-width: 980px;
  text-wrap: balance;
}

.ij-grid {
  display: grid !important;
  gap: clamp(1.25rem, 2.5vw, 2rem);
}

.ij-grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ij-grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ij-grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ij-card {
  background: var(--ij-white);
  border: 1px solid rgba(4, 64, 105, 0.08);
  border-radius: var(--ij-radius);
  box-shadow: var(--ij-shadow);
  height: 100%;
  overflow: hidden;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.ij-card:hover {
  box-shadow: 0 20px 52px rgba(4, 64, 105, 0.2);
  transform: translateY(-4px);
}

.ij-card h3 {
  margin-top: 0;
}

.ij-card__icon {
  align-items: center;
  background: var(--ij-orange);
  border-radius: 50%;
  color: var(--ij-white);
  display: inline-flex;
  font-family: Inter, sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  height: 48px;
  justify-content: center;
  margin-bottom: 1.2rem;
  width: 48px;
}

.ij-card a:not(.wp-block-button__link) {
  color: var(--ij-orange);
  font-weight: 700;
}

.ij-photo-card {
  border-radius: var(--ij-radius);
  box-shadow: var(--ij-shadow);
  margin: 0 0 1.5rem;
  overflow: hidden;
}

.ij-photo-card img {
  aspect-ratio: 4 / 3;
  display: block;
  height: auto;
  object-fit: cover;
  object-position: center 35%;
  width: 100%;
}

.ij-gallery {
  margin-inline: auto;
  width: min(calc(100% - 3rem), 1180px);
}

.ij-gallery .wp-block-image {
  border-radius: var(--ij-radius);
  box-shadow: 0 12px 34px rgba(4, 35, 56, 0.18);
  overflow: hidden;
}

.ij-gallery .wp-block-image img {
  transition: transform 260ms ease;
}

.ij-gallery .wp-block-image:hover img {
  transform: scale(1.025);
}

.ij-gallery--teaser {
  margin-top: var(--wp--preset--spacing--50);
}

.ij-gallery--teaser .wp-block-image img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.ij-gallery--full .wp-block-image img {
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.ij-check-list {
  list-style: none;
  padding-left: 0;
}

.ij-check-list li {
  margin-bottom: 0.9rem;
  padding-left: 2rem;
  position: relative;
}

.ij-check-list li::before {
  align-items: center;
  background: var(--ij-orange);
  border-radius: 50%;
  color: var(--ij-white);
  content: "✓";
  display: flex;
  font-size: 0.72rem;
  font-weight: 800;
  height: 1.25rem;
  justify-content: center;
  left: 0;
  position: absolute;
  top: 0.22rem;
  width: 1.25rem;
}

.ij-process-card {
  border-top: 4px solid var(--ij-orange);
  position: relative;
}

.ij-process-card .ij-step {
  color: rgba(4, 64, 105, 0.12);
  font-family: "Racing Sans One", sans-serif;
  font-size: 4.5rem;
  line-height: 1;
  position: absolute;
  right: 1rem;
  top: 0.65rem;
}

.ij-cta {
  background:
    linear-gradient(100deg, rgba(4, 64, 105, 0.95), rgba(6, 53, 86, 0.9)),
    url("assets/images/hero-hvac.png") center / cover;
  color: var(--ij-white);
  overflow: hidden;
  padding-block: clamp(4.5rem, 8vw, 7rem);
}

.ij-cta :where(h2, p) {
  color: var(--ij-white);
}

.ij-contact-panel {
  background: linear-gradient(145deg, var(--ij-navy), #0c5d91);
  border-radius: var(--ij-radius);
  color: var(--ij-white);
  padding: clamp(2rem, 5vw, 3.5rem);
}

.ij-contact-panel :where(h2, h3, p, a) {
  color: var(--ij-white);
}

.ij-contact-panel a:hover {
  color: var(--ij-gold);
}

.ij-contact-layout {
  align-items: flex-start !important;
}

.ij-contact-details h2,
.ij-contact-details h3 {
  text-wrap: balance;
}

.ij-contact-details h3 {
  margin-top: 2.2rem;
}

.ij-contact-line {
  align-items: flex-start;
  display: flex;
  font-size: 1.05rem;
  font-weight: 600;
  gap: 0.85rem;
  margin-block: 1rem;
}

.ij-contact-line__icon {
  color: var(--ij-orange);
  flex: 0 0 1.4rem;
  font-family: Inter, sans-serif;
  font-size: 1.4rem;
  line-height: 1.25;
  text-align: center;
}

.ij-contact-line a {
  color: var(--ij-text);
  text-decoration: none;
}

.ij-contact-line a:hover {
  color: var(--ij-orange);
}

.ij-form-panel {
  background: var(--ij-pale);
  border-radius: 10px;
  box-shadow: 0 18px 48px rgba(4, 64, 105, 0.13);
  padding: clamp(1.6rem, 4vw, 2.6rem);
}

.ij-form-panel > .ij-eyebrow {
  font-size: clamp(1.35rem, 2.5vw, 2rem);
  font-weight: 400;
}

.ij-form-panel h2 {
  font-size: clamp(1.75rem, 3vw, 2.3rem);
}

.ij-form-panel progress {
  accent-color: var(--ij-orange);
  min-height: 34px;
  width: 100%;
}

.ij-form-panel :where(.wp-block-jetpack-contact-form-step-navigation, .wp-block-jetpack-contact-form__step-navigation) button {
  background: var(--ij-navy);
}

.ij-form-panel :where(.wp-block-jetpack-contact-form-progress, .wp-block-jetpack-contact-form__progress) {
  --wp--preset--color--accent: var(--ij-orange);
  --wp--preset--color--contrast: var(--ij-navy);
}

.ij-area-grid {
  display: grid !important;
  gap: 0.85rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ij-area-link {
  align-items: center;
  background: var(--ij-white);
  border-left: 4px solid var(--ij-orange);
  border-radius: 4px;
  box-shadow: 0 8px 22px rgba(4, 64, 105, 0.08);
  display: flex;
  min-height: 58px;
  padding: 0.85rem 1rem;
}

.ij-area-link a {
  color: var(--ij-navy);
  font-weight: 700;
  text-decoration: none;
}

.ij-area-link:hover {
  border-left-color: var(--ij-navy);
  transform: translateY(-2px);
}

.ij-faq details {
  background: var(--ij-white);
  border: 1px solid var(--ij-border);
  border-radius: var(--ij-radius);
  box-shadow: 0 8px 25px rgba(4, 64, 105, 0.06);
  margin-bottom: 1rem;
  padding: 1.2rem 1.4rem;
}

.ij-faq summary {
  color: var(--ij-navy);
  cursor: pointer;
  font-family: "Racing Sans One", sans-serif;
  font-size: 1.15rem;
}

.ij-faq details[open] {
  border-color: var(--ij-orange);
}

.wp-block-button__link,
button[type="submit"],
.wp-element-button {
  transition: background-color 150ms ease, color 150ms ease, transform 150ms ease;
}

.wp-block-button__link:hover,
button[type="submit"]:hover,
.wp-element-button:hover {
  background: var(--ij-navy-dark) !important;
  color: var(--ij-white) !important;
  transform: translateY(-1px);
}

.is-style-outline > .wp-block-button__link:hover {
  background: var(--ij-white) !important;
  border-color: var(--ij-white) !important;
  color: var(--ij-navy) !important;
}

.wp-block-jetpack-contact-form,
.wp-block-jetpack-contact-form-container,
.contact-form {
  --jetpack--contact-form--primary-color: var(--ij-orange);
  --jetpack--contact-form--button-background: var(--ij-orange);
  --jetpack--contact-form--button-text-color: var(--ij-white);
}

.wp-block-jetpack-contact-form :where(input, select, textarea),
.contact-form :where(input, select, textarea) {
  background: var(--ij-white);
  border: 1px solid #c9d5dc;
  border-radius: 4px;
  box-sizing: border-box;
  color: #333333;
  font-family: Inter, sans-serif;
  font-size: 1rem;
  min-height: 50px;
  padding: 0.8rem 0.9rem;
  width: 100%;
}

.wp-block-jetpack-contact-form :where(input, select, textarea):focus,
.contact-form :where(input, select, textarea):focus {
  border-color: var(--ij-orange);
  box-shadow: 0 0 0 2px rgba(244, 96, 4, 0.16);
  outline: none;
}

.wp-block-jetpack-contact-form label,
.contact-form label {
  color: var(--ij-navy);
  font-weight: 600;
}

.wp-block-jetpack-contact-form button,
.contact-form button,
.contact-form input[type="submit"] {
  background: var(--ij-orange);
  border: 0;
  border-radius: 3px;
  color: var(--ij-white);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
  min-height: 52px;
  padding: 1rem 1.8rem;
}

.ij-post-shell {
  padding-block: var(--ij-section-space);
}

.ij-post-shell .wp-block-post-title {
  max-width: 900px;
}

.ij-query-grid .wp-block-post-template {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ij-query-grid .wp-block-post {
  background: var(--ij-white);
  border-radius: var(--ij-radius);
  box-shadow: var(--ij-shadow);
  overflow: hidden;
  padding-bottom: 1.5rem;
}

.ij-query-grid .wp-block-post > :not(.wp-block-post-featured-image) {
  margin-inline: 1.5rem;
}

.ij-site-footer {
  background: linear-gradient(180deg, #2c70af 0%, #43a0d2 100%);
  color: var(--ij-white);
  padding-top: clamp(3.5rem, 7vw, 5.5rem);
}

.ij-site-footer :where(h2, h3, h4, p, li, a) {
  color: var(--ij-white);
}

.ij-site-footer :where(p, li, a) {
  color: var(--ij-white) !important;
}

.ij-site-footer h3 {
  color: var(--ij-gold);
  font-size: 1.2rem;
}

.ij-site-footer .ij-brand-logo img {
  width: auto;
  max-height: 100px;
}

.ij-footer-links {
  list-style: none;
  padding-left: 0;
}

.ij-footer-links li {
  margin-bottom: 0.6rem;
}

.ij-footer-links li::before {
  color: var(--ij-orange);
  content: "»";
  font-weight: 800;
  margin-right: 0.55rem;
}

.ij-footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  margin-top: 3rem;
  padding-block: 1.3rem;
  text-align: center;
}

@media (max-width: 1023px) {
  .ij-grid--4,
  .ij-grid--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ij-query-grid .wp-block-post-template {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ij-area-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 781px) {
  .ij-topbar .ij-topbar-email,
  .ij-topbar .wp-block-social-links {
    display: none;
  }

  .ij-main-nav {
    min-height: 76px;
  }

  .ij-main-nav .ij-brand-logo img {
    max-height: 64px;
  }

  .ij-hero {
    min-height: 560px;
    padding-inline: 1.25rem;
  }

  .ij-hero--home::before {
    background-image:
      linear-gradient(145deg, rgba(4, 64, 105, 0.9), rgba(244, 96, 4, 0.68)),
      url("assets/images/hero-hvac.png");
  }

  .ij-hero--inner {
    min-height: 470px;
  }

  .ij-container,
  .ij-narrow,
  .ij-gallery {
    width: min(calc(100% - 2rem), 1180px);
  }

  .ij-gallery .wp-block-image {
    flex-basis: calc(50% - 0.5rem) !important;
    width: calc(50% - 0.5rem) !important;
  }

  .ij-grid--4,
  .ij-grid--3,
  .ij-grid--2,
  .ij-query-grid .wp-block-post-template {
    grid-template-columns: 1fr;
  }

  .ij-area-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ij-site-footer .wp-block-columns {
    gap: 2rem;
  }
}

@media (max-width: 520px) {
  .ij-area-grid {
    grid-template-columns: 1fr;
  }

  .ij-gallery .wp-block-image {
    flex-basis: 100% !important;
    width: 100% !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
