/*
Theme Name: Kadence Child - Just Fences
Template: kadence
Version: 1.0.0
Description: Custom child theme for Just Fences and Decks landing pages.
*/

:root {
  --jfd-dark: #18231f;
  --jfd-green: #2f5f45;
  --jfd-tan: #f4efe6;
  --jfd-card: #ffffff;
  --jfd-border: #ddd4c5;
}

body {
  text-rendering: optimizeLegibility;
}

.jfd-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 22px;
}

.jfd-hero {
  background: linear-gradient(135deg, var(--jfd-dark), var(--jfd-green));
  color: #fff;
  border-radius: 24px;
  padding: clamp(34px, 6vw, 78px);
  margin: 30px auto;
  overflow: hidden;
}

.jfd-eyebrow {
  text-transform: uppercase;
  letter-spacing: .12em;
  font-weight: 800;
  opacity: .82;
  font-size: .82rem;
}

.jfd-hero h1 {
  color: #fff;
  font-size: clamp(2rem, 6vw, 4.7rem);
  line-height: 1;
  max-width: 900px;
  margin: 12px 0 18px;
}

.jfd-hero p {
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  max-width: 760px;
}

.jfd-cta-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.jfd-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 20px;
  border-radius: 999px;
  background: #fff;
  color: var(--jfd-dark);
  font-weight: 800;
  text-decoration: none;
}

.jfd-button.secondary {
  background: transparent;
  border: 2px solid rgba(255,255,255,.7);
  color: #fff;
}

.jfd-section {
  padding: clamp(32px, 5vw, 62px) 0;
}

.jfd-section h2 {
  font-size: clamp(1.7rem, 4vw, 3rem);
  line-height: 1.05;
  margin-bottom: 14px;
}

.jfd-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.jfd-card {
  background: var(--jfd-card);
  border: 1px solid var(--jfd-border);
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 8px 24px rgba(0,0,0,.06);
}

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

.jfd-band {
  background: var(--jfd-tan);
  border-radius: 24px;
  padding: clamp(26px, 4vw, 46px);
}

.jfd-list {
  columns: 2;
  column-gap: 35px;
}

.jfd-list li {
  break-inside: avoid;
  margin-bottom: 8px;
}

.jfd-form {
  display: grid;
  gap: 13px;
  max-width: 760px;
}

.jfd-form label {
  font-weight: 800;
}

.jfd-form input,
.jfd-form textarea,
.jfd-form select {
  width: 100%;
  border: 1px solid var(--jfd-border);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 16px;
}

.jfd-form textarea {
  min-height: 130px;
}

.jfd-form button {
  border: 0;
  border-radius: 999px;
  padding: 14px 22px;
  font-weight: 900;
  background: var(--jfd-green);
  color: #fff;
  cursor: pointer;
}

.jfd-notice {
  padding: 14px 18px;
  border-radius: 14px;
  background: #e7f7ea;
  border: 1px solid #bde5c5;
  margin-bottom: 18px;
}

.jfd-gallery-note {
  font-size: .95rem;
  opacity: .78;
}

@media (max-width: 900px) {
  .jfd-grid {
    grid-template-columns: 1fr;
  }

  .jfd-list {
    columns: 1;
  }

  .jfd-hero {
    border-radius: 18px;
    margin: 16px auto;
  }

  .jfd-cta-row {
    display: grid;
  }

  .jfd-button {
    width: 100%;
  }
}

/* JFD_REFINEMENT_START */

/* Hide Kadence/page title banner at top of normal pages */
body.page .entry-hero,
body.page .entry-hero-container-inner,
body.page .entry-header,
body.page .page-header,
body.page .post-thumbnail {
  display: none !important;
}

body.page .content-area,
body.page .site-main,
body.page .entry-content-wrap {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

.jfd-curated-media {
  padding-top: 20px;
}

.jfd-media-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 28px;
  align-items: start;
}

.jfd-media-copy {
  background: var(--jfd-tan);
  border-radius: 22px;
  padding: clamp(22px, 4vw, 38px);
  border: 1px solid var(--jfd-border);
}

.jfd-media-copy h2 {
  margin-top: 0;
}

.jfd-curated-gallery .gallery {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0 !important;
}

.jfd-curated-gallery .gallery-item {
  width: auto !important;
  max-width: none !important;
  float: none !important;
  margin: 0 !important;
}

.jfd-curated-gallery .gallery-icon {
  overflow: hidden;
  border-radius: 16px;
  background: #eee;
  aspect-ratio: 4 / 3;
}

.jfd-curated-gallery .gallery-icon a,
.jfd-curated-gallery .gallery-icon img {
  display: block;
  width: 100%;
  height: 100%;
}

.jfd-curated-gallery .gallery-icon img {
  object-fit: cover;
  border: 0 !important;
}

.jfd-gallery-groups {
  display: grid;
  gap: 36px;
}

.jfd-gallery-group {
  background: #fff;
  border: 1px solid var(--jfd-border);
  border-radius: 22px;
  padding: clamp(20px, 4vw, 34px);
}

.jfd-gallery-group h2 {
  margin-top: 0;
}

@media (max-width: 900px) {
  .jfd-media-layout {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 560px) {
  .jfd-curated-gallery .gallery {
    grid-template-columns: 1fr;
  }

  .jfd-media-copy {
    border-radius: 16px;
  }

  .jfd-curated-gallery .gallery-icon {
    border-radius: 14px;
  }
}

/* JFD_REFINEMENT_END */

/* JFD_HIDE_TITLES_START */

/*
Hide all large page title/banner areas.
This includes Kadence page headers AND the custom JFD hero banner sections.
*/
body.page .entry-hero,
body.page .entry-hero-container-inner,
body.page .entry-header,
body.page header.entry-header,
body.page .page-header,
body.page .page-title,
body.page .entry-title,
body.page .kadence-title,
body.page .kt-page-title,
body.page .wp-block-post-title,
body.page .post-thumbnail,
body.page .jfd-hero {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

/* Pull page content up after removing the hero/title area */
body.page .content-area,
body.page .site-main,
body.page .entry-content-wrap,
body.page .entry-content {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

body.page .jfd-wrap {
  padding-top: 18px;
}

/* JFD_HIDE_TITLES_END */
