/* ==========================================================================
   Custom Theme — Page template styles
   Hero header, breadcrumb, estimates strip and full-width body wrapper.
   Added in v2.2.0.
   ========================================================================== */

.custom-page-hero {
    background-color: var(--secondary);
    border-bottom: 3px solid var(--accent);
    padding-top: 2rem;
    padding-bottom: 2rem;
    max-height: 700px;
}

.custom-page-hero-inner {
    width: 1600px;
    max-width: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 0 1rem;
}

.custom-page-hero-left {
    position: relative;
    padding: 1rem;
    color: var(--light);
}

.custom-page-hero-left a {
    color: var(--light);
}

.custom-page-hero-right {
    display: flex;
    align-items: center;
}

/* Hero heading */
.custom-hero-heading {
    font-size: clamp(3rem, 1.9437rem + 3.3803vw, 4rem);
    font-weight: 800;
    color: var(--light);
    margin: 2rem 0;
    line-height: 1.1;
}

.custom-hero-heading::after {
    content: "";
    display: block;
    width: 50%;
    border-bottom: 5px solid var(--accent);
    margin-top: 5px;
    margin-bottom: 5px;
}

.custom-hero-intro {
    display: block;
}

.custom-hero-inline-img {
    /* hidden on desktop; right-column featured image takes precedence */
    display: none;
}

.custom-hero-box p {
    margin: 0 0 1rem 0;
}

/* Featured image (right column) */
.custom-featured-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border: 3px solid var(--accent);
    display: block;
}

/* Breadcrumbs */
.custom-breadcrumb {
    margin-bottom: 1rem;
}

.custom-breadcrumb .breadcrumbs {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    font-weight: 300;
    line-height: 1.2;
}

.custom-breadcrumb .breadcrumbs li {
    display: inline;
}

.custom-breadcrumb .breadcrumbs li:not(:last-child)::after {
    content: " | ";
    padding: 0 5px;
}

/* Estimates strip */
.custom-estimates-strip {
    background-color: var(--accent);
    color: var(--light);
    text-align: center;
}

.custom-estimates-strip-inner {
    padding: 1rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* Body content wrapper */
.custom-page-content-wrapper {
    width: 100%;
    margin: 4rem auto;
}

.custom-page-content {
    width: 1400px;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Responsive */
@media (max-width: 991px) {
    .custom-page-hero {
        max-height: none;
    }

    .custom-page-hero-inner {
        grid-template-columns: 1fr;
    }

    .custom-page-hero-right {
        display: none;
    }

    .custom-hero-inline-img {
        display: block;
        float: right;
        width: 50%;
        max-height: 150px;
        object-fit: cover;
        margin: 0 0 0.5em 1em;
        border: 2px solid var(--light);
    }
}

@media (max-width: 479px) {
    .custom-hero-heading {
        font-size: 2.5rem;
    }
}

/* ─── Reviews badge in hero ─── */
.custom-review-container {
  margin-top: 2rem;
  margin-bottom: 1rem;
}
.custom-review-container .reviews-title {
  font-weight: 700;
  color: var(--light);
  margin-bottom: 0.5rem;
}
.custom-review-badge {
  display: block;
  width: 200px;
  max-width: 100%;
  height: auto;
  margin: 1rem 0;
}
.custom-review-button a {
  color: var(--light);
  font-weight: 700;
  text-decoration: underline;
}
.custom-review-button a:hover {
  text-decoration: none;
}

/* ─── Body content typography ─── */
.custom-page-content {
  line-height: 1.6;
}
.custom-page-content h1,
.custom-page-content h2,
.custom-page-content h3,
.custom-page-content h4,
.custom-page-content h5,
.custom-page-content h6 {
  line-height: 1.2;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}
.custom-page-content > :first-child,
.custom-page-content h1:first-child,
.custom-page-content h2:first-child,
.custom-page-content h3:first-child {
  margin-top: 0;
}
.custom-page-content p,
.custom-page-content ul,
.custom-page-content ol,
.custom-page-content blockquote,
.custom-page-content figure,
.custom-page-content table,
.custom-page-content pre {
  margin-bottom: 1.25rem;
}
.custom-page-content ul,
.custom-page-content ol {
  padding-left: 2rem;
}
.custom-page-content li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}
.custom-page-content li > ul,
.custom-page-content li > ol {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}
.custom-page-content img {
  margin: 1rem 0;
}
.custom-page-content blockquote {
  padding-left: 1.5rem;
  border-left: 4px solid var(--accent);
  font-style: italic;
}
.custom-page-content a {
  color: var(--accent);
  border-bottom: 2px solid var(--primary);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.custom-page-content a:hover,
.custom-page-content a:focus {
  color: var(--primary);
  border-bottom-color: var(--accent);
}

/* ─── Bottom-of-page sections ─── */
.custom-page-contact-section {
  margin: 4rem auto 0;
  padding: 0 1rem;
}
.custom-page-contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: stretch;
}
.custom-page-map {
  min-height: 450px;
  border: 3px solid var(--accent);
  border-radius: 4px;
  overflow: hidden;
}
.custom-page-map > .ksm-map,
.custom-page-map > * {
  height: 100% !important;
  width: 100% !important;
}
.custom-page-contact-inner {
  background-color: var(--secondary);
  color: var(--light);
  padding: 2rem;
  border-radius: 4px;
}
.custom-page-contact-inner a { color: var(--light); }

@media (max-width: 991px) {
  .custom-page-contact-grid {
    grid-template-columns: 1fr;
  }
}

.custom-page-reviews {
  width: 1400px;
  max-width: 100%;
  margin: 4rem auto;
  padding: 0 1rem;
  scroll-margin-top: 80px; /* offset for sticky nav when anchor-jumping */
}

/* ─── Page Layout variants (v2.3.0) ─────────────────────────────────── */

/* Contact-hero variant: right column hosts the enquiry form. */
.custom-page-hero-right--contact {
  display: block;
  align-items: stretch;
}
.custom-hero-contact-wrapper {
  color: var(--dark);
  padding: 2rem;
  border-radius: 4px;
  width: 100%;
}
.custom-hero-contact-wrapper a { color: var(--primary); }
@media (max-width: 991px) {
  .custom-page-hero-right--contact { display: block; }
}

/* Simple hero variant: slim breadcrumb + title strip, no media. */
.custom-page-hero--simple {
  padding-top: 1rem;
  padding-bottom: 1rem;
  max-height: none;
}
.custom-page-hero--simple .custom-page-hero-inner {
  display: block; /* override the 2-col grid */
}
.custom-hero-heading--simple {
  font-size: clamp(2rem, 1.4rem + 1.6vw, 2.5rem);
  margin: 0.5rem 0;
}
.custom-hero-heading--simple::after { display: none; }

/* Lower section: render full-width when only one of map/contact is shown. */
.custom-page-contact-grid--single {
  display: block;
}
.custom-page-contact-grid--single .custom-page-map,
.custom-page-contact-grid--single .custom-page-contact-inner {
  width: 100%;
}
