/* ==========================================================================
   HOMENDO INNER PAGES
   Small add-on to main.css for service, brand, combo, blog and core pages.
   Uses the same tokens, so the design language stays identical.
   ========================================================================== */

/* Keep faces in the upper part of the frame when hero and intro photos crop */
.hero-technician-img,
.intro-photo-img { object-position: center 25%; }

/* Header call button: number shows only when there is room */
@media (max-width: 1240px) { .hdr-call-num { display: none; } }

/* Breadcrumb */
.pg-breadcrumb {
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 600;
  color: var(--navy-700);
  margin-bottom: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.pg-breadcrumb a { color: var(--orange-500); }
.pg-breadcrumb a:hover { text-decoration: underline; }
.pg-breadcrumb .pg-sep { color: var(--gray-300); }

/* Generic section heading spacing */
.pg-section .section-title-uppercase + .section-subtitle { margin-bottom: 26px; }
.pg-section .section-title-uppercase { margin-bottom: 0; }

/* Card grids reuse .why-pillar-card; these set the column count */
.pg-grid-2, .pg-grid-3, .pg-grid-4 {
  display: grid;
  gap: 20px;
  max-width: 1180px;
  margin: 0 auto;
}
.pg-grid-2 { grid-template-columns: repeat(2, 1fr); }
.pg-grid-3 { grid-template-columns: repeat(3, 1fr); }
.pg-grid-4 { grid-template-columns: repeat(4, 1fr); }
.pg-grid-2 .why-pillar-card,
.pg-grid-3 .why-pillar-card,
.pg-grid-4 .why-pillar-card { padding: 22px 20px 18px; }
.pg-card-desc { font-size: 14px; line-height: 1.6; color: var(--gray-700); }

/* Two column text block (Repair or Replace, Cost Factors, Gas Safety) */
.pg-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 1180px;
  margin: 0 auto;
}
.pg-panel {
  background: var(--white);
  border: 1px solid rgba(19, 48, 90, 0.09);
  border-radius: 18px;
  padding: 24px 24px 20px;
  box-shadow: 0 4px 20px rgba(14, 38, 71, 0.04);
}
.pg-panel h3 {
  font-size: 18px;
  margin-bottom: 10px;
}
.pg-panel p { font-size: 14.5px; margin-bottom: 10px; }
.pg-panel p:last-child { margin-bottom: 0; }

/* Check list */
.pg-checks { list-style: none; display: flex; flex-direction: column; gap: 9px; margin-top: 6px; }
.pg-checks li {
  position: relative;
  padding-left: 26px;
  font-size: 14.5px;
  line-height: 1.55;
}
.pg-checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--green-500) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 10px no-repeat;
}
.pg-checks li strong { color: var(--navy-800); }

/* Error code table */
.pg-table-wrap {
  max-width: 980px;
  margin: 0 auto;
  overflow-x: auto;
  border-radius: 14px;
  border: 1px solid rgba(19, 48, 90, 0.12);
  box-shadow: 0 4px 20px rgba(14, 38, 71, 0.04);
  background: var(--white);
}
.pg-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.pg-table th {
  background: var(--navy-900);
  color: var(--white);
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  padding: 12px 16px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.pg-table td { padding: 12px 16px; border-top: 1px solid var(--gray-100); vertical-align: top; }
.pg-table tr:nth-child(even) td { background: var(--gray-50); }
.pg-table td:first-child { font-family: var(--font-heading); font-weight: 700; color: var(--orange-500); white-space: nowrap; }
.pg-note { max-width: 980px; margin: 12px auto 0; font-size: 13px; text-align: center; }

/* Link cards (related services, brands, combos) */
.pg-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 1180px;
  margin: 0 auto;
}
.pg-link-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 20px;
  border-radius: 14px;
  background: var(--white);
  border: 1px solid rgba(19, 48, 90, 0.1);
  box-shadow: 0 4px 16px rgba(14, 38, 71, 0.04);
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.pg-link-card:hover {
  transform: translateY(-3px);
  border-color: rgba(242, 106, 33, 0.4);
  box-shadow: var(--shadow-hover);
}
.pg-link-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 15px;
  color: var(--navy-800);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.pg-link-title svg { color: var(--orange-500); flex-shrink: 0; }
.pg-link-desc { font-size: 13.5px; line-height: 1.55; }

/* Brand grid items that are links */
a.brand-card-item { text-decoration: none; }

/* Article (blogs, privacy) */
.pg-article {
  max-width: 820px;
  margin: 0 auto;
}
.pg-article h2 {
  font-size: 24px;
  line-height: 1.3;
  margin: 30px 0 10px;
}
.pg-article h3 { font-size: 18px; margin: 20px 0 8px; }
.pg-article p { font-size: 15.5px; line-height: 1.75; margin-bottom: 14px; }
.pg-article ul { margin: 0 0 16px; }
.pg-article a { color: var(--orange-500); font-weight: 600; }
.pg-article a:hover { text-decoration: underline; }
.pg-answer {
  background: var(--orange-50);
  border-left: 4px solid var(--orange-500);
  border-radius: 12px;
  padding: 18px 20px;
  margin: 6px 0 10px;
}
.pg-answer-title {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--navy-800);
  font-size: 15px;
  margin-bottom: 6px;
}
.pg-answer p { margin-bottom: 0; font-size: 15px; }
.pg-figure { margin: 18px 0 22px; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-card); }
.pg-figure img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; object-position: center 30%; display: block; }

/* Blog hub cards */
.pg-post-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  max-width: 1180px;
  margin: 0 auto;
}
.pg-post-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(19, 48, 90, 0.1);
  box-shadow: 0 3px 12px rgba(14, 38, 71, 0.05);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.pg-post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.pg-post-card img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.pg-post-body { padding: 10px 12px 12px; }
.pg-post-title { font-family: var(--font-heading); font-weight: 700; font-size: 13.5px; color: var(--navy-800); line-height: 1.35; margin-bottom: 4px; }
.pg-post-desc {
  font-size: 12.5px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pg-cat-title { font-size: 19px; margin: 28px auto 12px; max-width: 1180px; }
.pg-cat-title:first-of-type { margin-top: 0; }

/* Contact info cards */
.pg-contact-big {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 800;
  color: var(--orange-500);
}

/* ==========================================================================
   HEADER SERVICE SUB MENUS
   PC: hovering a service opens a brand flyout over the other column.
   Mobile: a + button expands the brand list under the service.
   ========================================================================== */
.nav-sub-wrap { position: relative; display: flex; }
.nav-dropdown.nav-dropdown-grid .nav-sub-wrap > .nav-sub-parent {
  flex: 1;
  justify-content: space-between;
  gap: 8px;
}
.nav-sub-arrow { color: var(--orange-500); flex-shrink: 0; transition: transform var(--transition-fast); }
.nav-sub-toggle { display: none; }

.nav-subflyout {
  position: absolute;
  top: -6px;
  left: calc(100% + 8px);
  width: 100%;
  min-width: 210px;
  display: grid;
  gap: 6px;
  padding: 10px;
  background: #FFFFFF;
  border: 1px solid rgba(242, 106, 33, 0.35);
  border-radius: 12px;
  box-shadow: 0 16px 36px rgba(14, 38, 71, 0.16);
  opacity: 0;
  visibility: hidden;
  transform: translateX(-6px);
  transition: opacity var(--transition-fast), transform var(--transition-fast), visibility var(--transition-fast);
  z-index: 5;
}
/* Hover bridge across the gap */
.nav-subflyout::before { content: ''; position: absolute; top: 0; bottom: 0; width: 14px; left: -14px; }

.nav-subflyout-title {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--navy-700);
  padding: 2px 4px 4px;
}
.nav-dropdown.nav-dropdown-grid .nav-subflyout a {
  padding: 8px 12px;
  font-size: 12.5px;
  background: #F8FAFC;
}

.nav-svc-list { display: grid; gap: 6px; }
.nav-svc-panels { display: none; }

@media (min-width: 769px) {
  /* One column of services that scrolls after seven items. The brand panel sits
     outside the scroll area, beside the hovered service, so it is never cut off. */
  .nav-dropdown.nav-dropdown-grid {
    display: block;
    min-width: 280px;
  }
  .nav-dropdown.nav-dropdown-grid a { padding: 9px 14px; }
  .nav-svc-list {
    max-height: 328px;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 6px;
    scrollbar-width: thin;
    scrollbar-color: var(--orange-500) var(--gray-100);
  }
  .nav-svc-list::-webkit-scrollbar { width: 6px; }
  .nav-svc-list::-webkit-scrollbar-track { background: var(--gray-100); border-radius: 6px; }
  .nav-svc-list::-webkit-scrollbar-thumb { background: var(--orange-500); border-radius: 6px; }

  .nav-subflyout { display: none; }
  .nav-sub-wrap.panel-open > .nav-sub-parent,
  .nav-sub-wrap:hover > .nav-sub-parent {
    background-color: #FFF7ED;
    color: var(--orange-500);
    border-color: rgba(242, 106, 33, 0.35);
  }
  .nav-sub-wrap.panel-open .nav-sub-arrow { transform: translateX(2px); }

  .nav-svc-panels { display: block; position: absolute; top: 0; left: 100%; width: 0; height: 0; }
  .nav-svc-panel {
    position: absolute;
    left: 10px;
    width: 240px;
    display: grid;
    gap: 6px;
    padding: 10px;
    background: #FFFFFF;
    border: 1px solid rgba(242, 106, 33, 0.35);
    border-radius: 12px;
    box-shadow: 0 16px 36px rgba(14, 38, 71, 0.16);
    opacity: 0;
    visibility: hidden;
    transform: translateX(-6px);
    transition: opacity var(--transition-fast), transform var(--transition-fast), visibility var(--transition-fast);
  }
  .nav-svc-panel::before { content: ''; position: absolute; top: 0; bottom: 0; left: -18px; width: 18px; }
  .nav-svc-panel.flip::before { left: auto; right: -18px; }
  .nav-svc-panel.active { opacity: 1; visibility: visible; transform: translateX(0); }
  .nav-dropdown.nav-dropdown-grid .nav-svc-panel a {
    padding: 8px 12px;
    font-size: 12.5px;
    background: #F8FAFC;
  }
}

@media (max-width: 768px) {
  /* Open menu takes half the screen and scrolls */
  .main-nav-list.mobile-open {
    max-height: 50vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--orange-500) var(--gray-100);
  }
  .main-nav-list.mobile-open::-webkit-scrollbar { width: 6px; }
  .main-nav-list.mobile-open::-webkit-scrollbar-track { background: var(--gray-100); border-radius: 6px; }
  .main-nav-list.mobile-open::-webkit-scrollbar-thumb { background: var(--orange-500); border-radius: 6px; }

  .nav-sub-wrap { flex-wrap: wrap; align-items: stretch; gap: 0; }
  .has-dropdown.dropdown-open > .nav-dropdown.nav-dropdown-grid .nav-sub-wrap > .nav-sub-parent {
    width: auto !important;
    flex: 1 !important;
    border-radius: 8px 0 0 8px !important;
  }
  .nav-sub-arrow { display: none; }
  .nav-sub-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    flex-shrink: 0;
    background: #FFF7ED;
    border: 1px solid rgba(242, 106, 33, 0.35);
    border-left: none;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
  }
  .nav-sub-toggle span { position: relative; width: 12px; height: 12px; }
  .nav-sub-toggle span::before,
  .nav-sub-toggle span::after {
    content: '';
    position: absolute;
    left: 0;
    top: 5px;
    width: 12px;
    height: 2px;
    border-radius: 2px;
    background: var(--orange-500);
    transition: transform var(--transition-fast);
  }
  .nav-sub-toggle span::after { transform: rotate(90deg); }
  .nav-sub-wrap.sub-open .nav-sub-toggle span::after { transform: rotate(0deg); }

  .nav-subflyout {
    position: static;
    display: none;
    width: 100%;
    min-width: 0;
    margin-top: 6px;
    padding: 8px;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background: #FFFFFF;
  }
  .nav-subflyout::before { display: none; }
  .nav-sub-wrap.sub-open > .nav-subflyout { display: grid; }
  .has-dropdown.dropdown-open > .nav-dropdown.nav-dropdown-grid .nav-subflyout a {
    padding: 8px 12px !important;
    font-size: 12px !important;
    background: #F8FAFC !important;
  }
}

/* ==========================================================================
   RESPONSIVE (matches main.css breakpoints)
   ========================================================================== */
@media (max-width: 1024px) {
  .pg-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .pg-grid-3, .pg-links { grid-template-columns: repeat(2, 1fr); }
  .pg-post-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .pg-split { grid-template-columns: 1fr; gap: 16px; }
  .pg-article h2 { font-size: 21px; margin-top: 24px; }
}

@media (max-width: 580px) {
  .pg-grid-2, .pg-grid-3, .pg-grid-4, .pg-links { grid-template-columns: 1fr; gap: 14px; }
  .pg-post-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .pg-post-title { font-size: 13px; }
  .pg-post-desc { display: none; }
  .pg-panel { padding: 18px 16px 16px; }
  .pg-table { font-size: 13.5px; }
  .pg-table th, .pg-table td { padding: 10px 12px; }
  .pg-article p { font-size: 15px; }
  .pg-contact-big { font-size: 22px; }
}
