/*
 * BOREC HOMES — editorial layout & typography overlay
 * Loads after GeneratePress child theme.
 */
:root {
  --borec-ink: #1a1a1a;
  --borec-muted: #5c5c5c;
  --borec-line: rgba(0, 0, 0, 0.08);
  --borec-accent: #6b5344;
  --borec-paper: #faf8f5;
}

.site-main .inside-article {
  padding-top: 0.5rem;
  padding-bottom: 3rem;
}

.site-main .entry-content > p,
.site-main .entry-content > ul,
.site-main .entry-content > ol,
.site-main .entry-content > h2,
.site-main .entry-content > h3,
.site-main .entry-content > h4 {
  max-width: 52rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
  box-sizing: border-box;
}

.site-main .entry-content > p {
  font-size: 1.05rem;
  line-height: 1.72;
  color: var(--borec-ink);
  letter-spacing: 0.01em;
}

.site-main .entry-content > p + p {
  margin-top: 0.85em;
}

.site-main .entry-content p.project-description,
.site-main .entry-content p.has-medium-font-size {
  font-size: 1.125rem;
  line-height: 1.68;
  color: var(--borec-muted);
  border-left: 3px solid var(--borec-accent);
  padding-left: 1.25rem;
  margin-top: 1.5rem;
  margin-bottom: 2rem;
  max-width: 48rem;
}

.site-main .entry-content iframe {
  display: block;
  max-width: min(1020px, 100%);
  margin: 2rem auto;
  border-radius: 6px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.12);
}

/* Contact page — embedded map (replaces grey placeholder) */
.site-main .entry-content .borec-contact-map {
  width: 100%;
  margin: 0 0 2rem;
  padding: 0;
  box-sizing: border-box;
}

.site-main .entry-content .borec-contact-map__inner {
  max-width: min(1140px, 100%);
  margin: 0 auto;
  padding: 0 1rem;
  box-sizing: border-box;
}

.site-main .entry-content .borec-contact-map__frame {
  position: relative;
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--borec-line);
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.1), 0 2px 8px rgba(0, 0, 0, 0.06);
  background: #e8e6e1;
}

.site-main .entry-content .borec-contact-map__frame iframe {
  display: block;
  width: 100%;
  max-width: none;
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  height: clamp(260px, 48vw, 420px);
}

.site-main .entry-content .borec-contact-map__caption {
  margin: 0.85rem 0 0;
  padding: 0 0.25rem;
  text-align: center;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--borec-muted);
  max-width: none;
}

.site-main .entry-content .borec-contact-map__caption a {
  color: var(--borec-accent);
  font-weight: 600;
  text-decoration: none;
}

.site-main .entry-content .borec-contact-map__caption a:hover {
  text-decoration: underline;
}

.site-main .entry-content .wp-block-qubely-gallery {
  margin-top: 2rem;
}

/* Homepage & long-form strips */
.borec-section {
  width: 100%;
  margin: 3rem 0 3.5rem;
  padding: 2.5rem 0 2rem;
  background: var(--borec-paper);
  border-top: 1px solid var(--borec-line);
  border-bottom: 1px solid var(--borec-line);
}

.borec-section__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem 1.5rem;
}

.borec-section__kicker {
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--borec-accent);
  margin: 0 0 0.35rem;
  font-weight: 600;
}

.borec-section__title {
  font-family: futura-pt, "Josefin Sans", sans-serif;
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 0.75rem;
  color: var(--borec-ink);
}

.borec-section__lead {
  max-width: 40rem;
  margin: 0 0 2rem;
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--borec-muted);
}

.borec-media-strip__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

@media (max-width: 900px) {
  .borec-media-strip__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .borec-media-strip__grid {
    grid-template-columns: 1fr;
  }
}

.borec-media-strip__grid figure {
  margin: 0;
  background: #fff;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--borec-line);
}

.borec-media-strip__grid img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.borec-media-strip__grid figcaption {
  padding: 0.65rem 0.75rem 0.85rem;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--borec-muted);
  letter-spacing: 0.02em;
}

/* Pull-style intro on homepage columns */
.site-main .ugb-column__content-wrapper > p[style*="font-size:30px"] {
  line-height: 1.45 !important;
  font-size: clamp(1.15rem, 2.4vw, 1.55rem) !important;
  font-weight: 400;
  letter-spacing: 0.01em;
}

/* Footer readability */
.site-footer .textwidget,
.site-footer .footer-links {
  line-height: 1.65;
  font-size: 0.95rem;
}

/* Static contact page — replaces non-functional Ninja Forms export */
.site-main .entry-content .borec-contact-form-intro {
  max-width: 40rem;
  margin: 0.75rem auto 1.5rem;
  text-align: center;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--borec-muted);
  padding: 0 1.25rem;
}

.borec-contact-form {
  max-width: 36rem;
  margin: 0 auto 2.5rem;
  padding: 0 1.25rem 2rem;
  box-sizing: border-box;
}

.borec-contact-form__row {
  margin-bottom: 1.1rem;
}

.borec-contact-form label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--borec-ink);
  margin-bottom: 0.35rem;
}

.borec-contact-form input[type="text"],
.borec-contact-form input[type="email"],
.borec-contact-form input[type="tel"],
.borec-contact-form select,
.borec-contact-form textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0.65rem 0.75rem;
  border: 1px solid #222;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
  color: #222;
}

.borec-contact-form textarea {
  min-height: 9rem;
  resize: vertical;
}

.borec-contact-form__hint {
  font-size: 0.88rem;
  color: var(--borec-muted);
  margin: 0 0 1rem;
  line-height: 1.5;
}

.borec-contact-form__actions {
  margin-top: 1.25rem;
}

.borec-contact-form button[type="submit"] {
  background: #fff;
  color: #000;
  border: 2px solid #000;
  padding: 0.65rem 1.75rem;
  font-size: 1rem;
  cursor: pointer;
  font-family: inherit;
}

.borec-contact-form button[type="submit"]:hover {
  background: #000;
  color: #fff;
}

/*
 * Home hero + header: Smart Slider 3 CSS keeps fullpage wrappers at opacity:0 and
 * translateX(-100vw) until its JS runs. Static export / file:// often has no SS3 init,
 * so the hero is an empty white band while nav links stay #fff — effectively invisible.
 * Reset wrappers for layout paint and give .page-hero a dark fallback (slides stay in
 * <template> until JS; background still matches the intended hero look).
 */
.home .page-hero {
  background-color: #222;
  background-image: url("../img/section-bg-2.jpg");
  background-size: cover;
  background-position: center 21%;
}

.home ss3-fullpage[data-based-on="real"],
.home ss3-force-full-width {
  opacity: 1;
  transform: none;
  width: 100%;
}

/*
 * Interior pages (WP `body.page` / `body.blog`): GeneratePress uses `padding-top: 15%`
 * on the dark `.page-hero` while the header is `position:absolute` and centred. On many
 * viewports 15% is shorter than the header + logo block, so the hero H1 sits on top of
 * the logo wordmark (e.g. Display Homes vs “HOMES” in the mark).
 */
body.page:not(.home) .header-wrap,
body.blog .header-wrap {
  z-index: 100;
}

body.page:not(.home) .page-hero,
body.blog .page-hero {
  padding-top: clamp(12rem, 28vh, 20rem) !important;
}

@media (max-width: 768px) {
  body.page:not(.home) .page-hero,
  body.blog .page-hero {
    padding-top: max(14rem, 42vw) !important;
  }
}
