/*
Theme Name: First In Restoration
Theme URI: https://www.firstinrestoration.com/
Author: Awtrey Media Group
Author URI: https://awtreymediagroup.com/
Description: Custom WordPress theme designed and developed by Awtrey Media Group for First In Restoration.
Version: 1.0.0
Text Domain: first-in-restoration
*/

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: #111111;
  background: #0b2545;
}

main,
#primary,
#content,
.site-main,
.site-content,
.fir-page,
.fir-resources-page-hero,
.fir-resources-list-section {
  background: #ffffff;
}

.fir-site-header {
  width: 100%;
  margin: 0;
  padding: 0;
  background: #ffffff;
  color: #0b2545;
  position: sticky;
  top: 0;
  z-index: 99999;
  box-shadow: 0 8px 20px rgba(11, 37, 69, 0.08);
}

.fir-top-bar {
  width: 100%;
  background: #0b2545;
  color: #ffffff;
  padding: 12px 40px;
}

.fir-top-bar-inner {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 28px;
}

.fir-top-bar p {
  margin: 0;
  color: #ffffff;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.2;
}

.fir-top-bar a,
.fir-top-bar a:link,
.fir-top-bar a:visited {
  color: #ffffff;
  text-decoration: none;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.2;
}

.fir-top-bar a:hover {
  color: #d71920;
}

.fir-main-header {
  width: 100%;
  background: #ffffff;
  border-bottom: 1px solid rgba(11, 37, 69, 0.15);
}

.fir-main-header-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 24px 40px;
  display: grid;
  grid-template-columns: 280px 1fr;
  align-items: center;
  gap: 44px;
  transition: all 0.3s ease;
}

.fir-logo-area {
  display: flex;
  align-items: center;
}

.fir-logo {
  display: inline-block;
  line-height: 0;
  text-decoration: none;
}

.fir-logo img {
  display: block;
  width: auto;
  max-width: 260px;
  max-height: 95px;
  transition: all 0.3s ease;
}

body.fir-scrolled .fir-main-header-inner {
  padding-top: 12px;
  padding-bottom: 12px;
}

body.fir-scrolled .fir-logo img {
  max-width: 190px;
  max-height: 70px;
}

.fir-main-nav {
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.fir-main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 36px;
}

.fir-main-nav li {
  margin: 0;
  padding: 0;
}

.fir-main-nav a,
.fir-main-nav a:link,
.fir-main-nav a:visited {
  display: block;
  color: #0b2545;
  text-decoration: none;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 20px;
  font-weight: 300;
  line-height: 1;
  padding: 12px 0;
  letter-spacing: 0.2px;
}

.fir-main-nav a:hover,
.fir-main-nav a:active,
.fir-main-nav .current-menu-item > a {
  color: #d71920;
}

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

.fir-mobile-menu {
  display: none;
}

.fir-emergency-call-bar {
  display: none;
}

.fir-hero {
  min-height: 78vh;
  background: #0b2545;
  color: #ffffff;
  display: flex;
  align-items: center;
  padding: 120px 40px;
}

.fir-hero-content {
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

.fir-eyebrow {
  margin: 0 0 18px;
  color: #d71920;
  font-size: 16px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.fir-hero h1 {
  max-width: 900px;
  margin: 0 0 28px;
  font-size: clamp(46px, 7vw, 88px);
  line-height: 0.95;
  font-weight: 900;
  text-transform: uppercase;
}

.fir-hero p:not(.fir-eyebrow) {
  max-width: 720px;
  margin: 0 0 36px;
  font-size: 22px;
  line-height: 1.5;
}

.fir-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 320px;
  height: 52px;
  background: #d71920;
  color: #ffffff;
  text-decoration: none;
  padding: 0 56px;
  font-size: 17px;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.fir-button:hover {
  background: #ffffff;
  color: #0b2545;
}

.fir-page {
  padding: 80px 40px;
}

.fir-page-content {
  max-width: 1100px;
  margin: 0 auto;
}

/* Header switches to hamburger earlier so Get a Quote does not cut off */
@media (max-width: 1240px) {
  .fir-top-bar-inner {
    justify-content: center;
    flex-wrap: wrap;
    text-align: center;
  }

  .fir-main-header-inner {
    grid-template-columns: 1fr auto;
    gap: 22px;
    text-align: left;
  }

  .fir-logo-area {
    justify-content: flex-start;
  }

  .fir-main-nav {
    display: none;
  }

  .fir-menu-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    background: transparent;
    border: 0;
    padding: 0;
    cursor: pointer;
    color: #0b2545;
  }

  .fir-menu-toggle span {
    display: block;
    width: 46px;
    height: 4px;
    background: #0b2545;
  }

  .fir-mobile-menu {
    display: block;
    position: fixed;
    inset: 0;
    background: #d71920;
    color: #ffffff;
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    padding: 90px 32px 140px;
  }

  body.fir-menu-open .fir-mobile-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .fir-mobile-close {
    position: absolute;
    top: 28px;
    right: 32px;
    background: transparent;
    border: 0;
    color: #ffffff;
    font-size: 58px;
    font-weight: 200;
    line-height: 1;
    cursor: pointer;
  }

  .fir-mobile-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .fir-mobile-nav li {
    margin: 0;
    padding: 0;
  }

  .fir-mobile-nav a,
  .fir-mobile-nav a:link,
  .fir-mobile-nav a:visited {
    display: block;
    color: #ffffff;
    text-decoration: none;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: clamp(28px, 4.8vw, 42px);
    font-weight: 300;
    line-height: 1.45;
    letter-spacing: 0.4px;
  }

  .fir-mobile-nav a:hover {
    color: #0b2545;
  }
}

/* Bottom emergency call bar — includes iPad and spans full width */
@media (max-width: 1420px) {
  .fir-emergency-call-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999998;
    transform: none;
    width: 100%;
    max-width: none;
    background: #ffffff;
    color: #0b2545;
    text-decoration: none;
    padding: 24px 30px 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 42px;
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.18);
    border-top: 4px solid #d71920;
  }

  .fir-emergency-call-bar span {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 25px;
    font-weight: 500;
    line-height: 1;
    color: #0b2545;
  }

  .fir-emergency-call-bar strong {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 28px;
    font-weight: 400;
    line-height: 1;
    color: #0b2545;
  }

  body {
    padding-bottom: 0;
  }
}

@media (max-width: 640px) {
  .fir-top-bar {
    padding: 10px 20px;
  }

  .fir-top-bar-inner {
    gap: 10px;
  }

  .fir-top-bar p {
    font-size: 14px;
  }

  .fir-top-bar a {
    font-size: 16px;
  }

  .fir-main-header-inner {
    padding: 20px;
  }

  .fir-logo img {
    max-width: 230px;
  }

  body.fir-scrolled .fir-logo img {
    max-width: 180px;
    max-height: 65px;
  }

  .fir-menu-toggle span {
    width: 40px;
    height: 3px;
  }

  .fir-mobile-menu {
    padding: 78px 28px 130px;
  }

  .fir-mobile-nav a,
  .fir-mobile-nav a:link,
  .fir-mobile-nav a:visited {
    font-size: 32px;
    line-height: 1.5;
  }

  .fir-hero {
    min-height: 70vh;
    padding: 90px 24px;
  }

  .fir-hero p:not(.fir-eyebrow) {
    font-size: 19px;
  }

  .fir-button {
    min-width: 260px;
    height: 50px;
    padding: 0 42px;
    font-size: 16px;
  }

  .fir-emergency-call-bar {
    flex-direction: column;
    gap: 8px;
    padding: 18px 20px 20px;
  }

  .fir-emergency-call-bar span {
    font-size: 19px;
  }

  .fir-emergency-call-bar strong {
    font-size: 26px;
  }

  body {
    padding-bottom: 0;
  }
}

.fir-resources-page-hero {
  background: #ffffff;
  padding: 86px 24px 58px;
  overflow: hidden;
}

.fir-resources-page-hero-inner {
  max-width: 1350px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 48% 52%;
  gap: 54px;
  align-items: center;
}

.fir-resources-page-hero-content {
  padding: 20px 0;
}

.fir-resources-page-eyebrow {
  margin: 0 0 18px;
  color: #d71920;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 2.4px;
  text-transform: uppercase;
}

.fir-resources-page-hero-content h1 {
  margin: 0 0 22px;
  color: #0b2545;
  font-size: 56px;
  font-weight: 400;
  line-height: 1.08;
}

.fir-resources-page-hero-content p {
  margin: 0 0 34px;
  color: #334155;
  font-size: 20px;
  line-height: 1.6;
  max-width: 680px;
}

.fir-resources-page-button {
  display: inline-block;
  background: #d71920;
  color: #ffffff;
  text-decoration: none;
  font-size: 17px;
  font-weight: 800;
  padding: 17px 42px;
  transition: background .25s ease, color .25s ease;
}

.fir-resources-page-button:hover {
  background: #0b2545;
  color: #ffffff;
}

.fir-resources-page-hero-image-wrap {
  position: relative;
}

.fir-resources-page-hero-image-wrap::after {
  content: "";
  position: absolute;
  right: -36px;
  top: 34px;
  width: 90px;
  height: 75%;
  background: #0b2545;
  z-index: 0;
}

.fir-resources-page-hero-image {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 520px;
  object-fit: cover;
}

.fir-resources-list-section {
  background: #ffffff;
  padding: 52px 24px 95px;
}

.fir-resources-list-inner {
  max-width: 1180px;
  margin: 0 auto;
}

.fir-resource-card {
  display: grid;
  grid-template-columns: 48% 52%;
  border: 1px solid #e4e9f1;
  background: #ffffff;
  margin-bottom: 38px;
}

.fir-resource-card-image {
  display: block;
  min-height: 360px;
  overflow: hidden;
}

.fir-resource-card-image img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: cover;
  transition: transform .3s ease;
}

.fir-resource-card:hover .fir-resource-card-image img {
  transform: scale(1.04);
}

.fir-resource-card-content {
  padding: 52px 50px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.fir-resource-card-category {
  display: inline-block;
  align-self: flex-start;
  margin: 0 0 20px;
  background: #0b2545;
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  padding: 10px 16px;
}

.fir-resource-card-content h2 {
  margin: 0 0 18px;
  font-size: 34px;
  font-weight: 800;
  line-height: 1.15;
}

.fir-resource-card-content h2 a {
  color: #0b2545;
  text-decoration: none;
}

.fir-resource-card-content h2 a:hover {
  color: #d71920;
}

.fir-resource-card-excerpt {
  margin: 0 0 26px;
  color: #475569;
  font-size: 18px;
  line-height: 1.62;
}

.fir-resource-card-read {
  align-self: flex-start;
  color: #d71920;
  text-decoration: none;
  font-size: 16px;
  font-weight: 800;
}

.fir-resource-card-read:hover {
  color: #0b2545;
}

.fir-resources-pagination {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 52px;
  flex-wrap: wrap;
}

.fir-resources-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  height: 46px;
  padding: 0 16px;
  border: 1px solid #e4e9f1;
  color: #0b2545;
  background: #ffffff;
  text-decoration: none;
  font-size: 16px;
  font-weight: 800;
  transition: background .25s ease, color .25s ease, border-color .25s ease;
}

.fir-resources-pagination .page-numbers.current,
.fir-resources-pagination .page-numbers:hover {
  background: #0b2545;
  color: #ffffff;
  border-color: #0b2545;
}

.fir-resources-empty {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  padding: 60px 24px;
  border: 1px solid #e4e9f1;
}

.fir-resources-empty h2 {
  margin: 0 0 14px;
  color: #0b2545;
  font-size: 34px;
  font-weight: 700;
}

.fir-resources-empty p {
  margin: 0;
  color: #475569;
  font-size: 18px;
  line-height: 1.6;
}

@media (max-width: 950px) {
  .fir-resources-page-hero {
    padding: 68px 22px 48px;
  }

  .fir-resources-page-hero-inner {
    grid-template-columns: 1fr;
    gap: 38px;
  }

  .fir-resources-page-hero-content h1 {
    font-size: 42px;
  }

  .fir-resources-page-hero-content p {
    font-size: 18px;
  }

  .fir-resources-page-hero-image {
    height: 420px;
  }

  .fir-resource-card {
    grid-template-columns: 1fr;
  }

  .fir-resource-card-content {
    padding: 42px 34px;
  }

  .fir-resource-card-content h2 {
    font-size: 30px;
  }

  .fir-resource-card-image,
  .fir-resource-card-image img {
    min-height: 320px;
  }
}

@media (max-width: 600px) {
  .fir-resources-page-hero {
    padding: 56px 18px 40px;
  }

  .fir-resources-page-hero-content h1 {
    font-size: 34px;
  }

  .fir-resources-page-hero-content p {
    font-size: 16px;
  }

  .fir-resources-page-button {
    width: 100%;
    box-sizing: border-box;
    text-align: center;
  }

  .fir-resources-page-hero-image {
    height: 300px;
  }

  .fir-resources-page-hero-image-wrap::after {
    display: none;
  }

  .fir-resources-list-section {
    padding: 34px 18px 64px;
  }

  .fir-resource-card {
    margin-bottom: 28px;
  }

  .fir-resource-card-image,
  .fir-resource-card-image img {
    min-height: 250px;
  }

  .fir-resource-card-content {
    padding: 34px 24px;
  }

  .fir-resource-card-content h2 {
    font-size: 26px;
  }

  .fir-resource-card-excerpt {
    font-size: 16px;
  }

  .fir-resources-pagination .page-numbers {
    min-width: 42px;
    height: 42px;
    padding: 0 13px;
    font-size: 15px;
  }
}

.get-quote-page {
  background: #ffffff;
}

.get-quote-page .quote-hero {
  padding: 36px 20px 18px;
  text-align: center;
  background: #ffffff;
}

.get-quote-page .quote-hero-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.get-quote-page .quote-hero h1 {
  margin: 0;
  color: #0b2545;
  font-size: clamp(38px, 4.4vw, 58px);
  line-height: 1.04;
  font-weight: 300;
  letter-spacing: -1px;
}

.get-quote-page .quote-form-section {
  padding: 0 20px 80px;
  background: #ffffff;
}

.get-quote-page .quote-form-inner {
  max-width: 980px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .get-quote-page .quote-hero {
    padding: 30px 20px 16px;
  }

  .get-quote-page .quote-hero-inner {
    max-width: 100%;
  }

  .get-quote-page .quote-hero h1 {
    font-size: 34px;
    line-height: 1.08;
    font-weight: 300;
    letter-spacing: -0.5px;
  }

  .get-quote-page .quote-form-section {
    padding: 0 20px 70px;
  }
}

.fir-main-nav a[href*="get-a-quote"],
.fir-main-nav a[href*="get-a-quote"]:link,
.fir-main-nav a[href*="get-a-quote"]:visited {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #d71920 !important;
  color: #ffffff !important;
  padding: 14px 24px !important;
  font-size: 17px !important;
  font-weight: 300 !important;
  line-height: 1 !important;
  text-transform: none !important;
  letter-spacing: 0.2px !important;
  text-decoration: none !important;
  border-radius: 0 !important;
}

.fir-main-nav a[href*="get-a-quote"]:hover,
.fir-main-nav .current-menu-item a[href*="get-a-quote"] {
  background: #0b2545 !important;
  color: #ffffff !important;
  border-radius: 0 !important;
}

.fir-mobile-nav a[href*="get-a-quote"],
.fir-mobile-nav a[href*="get-a-quote"]:link,
.fir-mobile-nav a[href*="get-a-quote"]:visited {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #ffffff !important;
  color: #d71920 !important;
  padding: 18px 26px !important;
  margin-top: 26px !important;
  font-size: 24px !important;
  font-weight: 300 !important;
  line-height: 1 !important;
  text-transform: none !important;
  letter-spacing: 0.2px !important;
  text-decoration: none !important;
  border-radius: 0 !important;
}

.fir-mobile-nav a[href*="get-a-quote"]:hover,
.fir-mobile-nav .current-menu-item a[href*="get-a-quote"] {
  background: #0b2545 !important;
  color: #ffffff !important;
  border-radius: 0 !important;
}

@media (max-width: 640px) {
  .fir-mobile-nav a[href*="get-a-quote"],
  .fir-mobile-nav a[href*="get-a-quote"]:link,
  .fir-mobile-nav a[href*="get-a-quote"]:visited {
    font-size: 20px !important;
    padding: 16px 24px !important;
  }
}

.fir-single-post-nav {
  border-top: 1px solid #e4e9f1;
  margin-top: 60px;
  padding-top: 34px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

.fir-single-post-nav-item {
  min-width: 0;
}

.fir-single-post-nav-next {
  text-align: right;
}

.fir-single-post-nav a {
  display: block;
  color: #0b2545;
  text-decoration: none;
}

.fir-single-post-nav a:hover {
  color: #d71920;
}

.fir-single-post-nav span {
  display: block;
  color: #d71920;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.fir-single-post-nav strong {
  display: block;
  color: #0b2545;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
}

.fir-single-post-nav a:hover strong {
  color: #d71920;
}

@media (max-width: 700px) {
  .fir-single-post-nav {
    grid-template-columns: 1fr;
  }

  .fir-single-post-nav-next {
    text-align: left;
  }
}

/* FINAL OVERRIDE: make bottom emergency bar full-width on iPad/tablet */
@media (max-width: 1420px) {
  .fir-emergency-call-bar {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    transform: none !important;
    width: 100vw !important;
    max-width: none !important;
    margin: 0 !important;
    border-radius: 0 !important;
  }
}

/* FINAL OVERRIDE: make bottom emergency bar full-width on iPad/tablet */
@media (max-width: 1420px) {
  .fir-emergency-call-bar {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    transform: none !important;
    width: 100vw !important;
    max-width: none !important;
    margin: 0 !important;
    border-radius: 0 !important;
  }
}

/* iPad portrait only: show controlled service line breaks */
.fir-ipad-service-break {
  display: none !important;
}

@media (min-width: 641px) and (max-width: 1200px) and (orientation: portrait) {
  .fir-site-footer .fir-footer-services a {
    white-space: normal !important;
    line-height: 1.25 !important;
  }

  .fir-site-footer .fir-footer-services li {
    margin-bottom: 14px !important;
  }

  .fir-site-footer .fir-footer-services .fir-ipad-service-break {
    display: inline !important;
  }
}

/* Mobile fix: keep service body CTA buttons on one line */
@media (max-width: 640px) {
  a[class*="-types-button"] {
    font-size: 13px !important;
    letter-spacing: 0.8px !important;
    padding: 14px 16px !important;
    white-space: nowrap !important;
    line-height: 1 !important;
    width: auto !important;
    max-width: 100% !important;
  }
}