/*
Theme Name: Kadence Child
Template: kadence
Version: 1.0.2
*/

/* Post title height stick */
.sticky-row {
  position: sticky;
  top: clamp(105px, 6.25vh, 104px); /* Default */
  z-index: 999;
  background: #FDFDFB;
}
.sticky-subheader {
  background: #FDFDFB !important;
}

.site-top-header-wrap .site-header-row-container-inner>.site-container{
	max-width: 1600px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 0 0 0 32px;
}

.content-wrap .entry{
	box-shadow: unset;
}


html, body {
  background-color: #FDFDFB !important; /* force white */
}



@media (max-width: 1024px) and (min-width: 769px) {
  .sticky-row {
    top: clamp(100px, 7vh, 120px); /* Tablet */
  }
}

@media (max-width: 768px) {
  .sticky-row {
    top: clamp(110px, 8vh, 150px); /* Mobile */
  }
}

/* NAV bar row height stick */
.sticky-header {
  position: sticky;
  top: clamp(75px, 5vh, 90px); /* Default */
  z-index: 999;
  background: #FDFDFB;
}

@media (max-width: 1024px) and (min-width: 769px) {
  .sticky-header {
    top: clamp(75px, 5.5vh, 90px); /* Tablet */
  }
}

@media (max-width: 768px) {
  .sticky-header {
    top: clamp(90px, 6.5vh, 110px); /* Mobile */
  }
}

/* NAV bar row 2 height stick */
.sticky-subheader {
  position: sticky;
  top: clamp(50px, 17.5vh, 120px); /* Default */
  z-index: 999;
  background: #FDFDFB;
}

@media (min-width: 1600px) {
  .sticky-subheader {
    top: clamp(80px, 11.55vh, 140px); !important
  }
}

@media (max-width: 1024px) and (min-width: 769px) {
  .sticky-subheader {
    top: clamp(105px, 5.5vh, 110px); /* Tablet */
  }
}

@media (max-width: 768px) {
  .sticky-subheader {
    top: clamp(115px, 6.5vh, 115px); /* Mobile */
  }
}

/* Desktop-only visibility */
.desktop-only {
  display: inline-block;
}
.site-header-row-container {
  margin: 0 auto;
  padding: 0px; /* adjust if needed */
}

.wp-block-kadence-posts article {
  width: 100%;       /* or a fixed larger width */
  max-width: none;   /* remove any limiting max-width */
  position: relative; /* keep positioning context */
}



/* Ensure image wrapper is relative */
.wp-block-kadence-posts .post-thumbnail {
  position: relative;
  overflow: hidden;
}

/* Overlay only the image area */
.wp-block-kadence-posts .post-thumbnail::before {
  content: '';
  position: absolute;
  inset: 0;
  background-color: rgba(251, 251, 251, 0.85); /* light grey */
  opacity: 0;
  transition: opacity .5s ease;
  z-index: 1;
}

/* Show title and overlay on hover */
.wp-block-kadence-posts .post-thumbnail:hover .entry-title {
  opacity: 0;
}

.wp-block-kadence-posts .post-thumbnail:hover::before {
  opacity: 1;
}

/* Position article relative */
.wp-block-kadence-posts article {
  position: relative;
}

.wp-block-kadence-posts article .entry-title {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  color: black;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.3s ease;
  text-align: center;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 22px !important;
	font-weight:700!important;
  background: none;
  pointer-events: none;
  display: block;
	line-height:1em!important;
  max-width: 1000%;
	max-height:500%;
	overflow:visible;
  padding: 1em,1em,1em,1em;
  word-wrap: break-word;
  white-space: normal;
  overflow-wrap: break-word;
}




/* Show title on article hover */
.wp-block-kadence-posts article:hover .entry-title {
  opacity: 1;
}

/* Hide category or post meta section */
.wp-block-kadence-posts .entry-taxonomies {
  display: none;
}

/* Style the custom "Sort by" menu */
.custom-sort-menu {
  font-family: '', sans-serif;
  font-size: 20px;
  font-weight: 700;
	text-align:left;
  max-width:1600px;
  text-transform: uppercase;
  padding-top: calc(3rem + 20px);
	padding-left:rem;
	display:grid;
	grid-template-columns: repeat(3,1fr);
	column-gap:16px;
}

.custom-sort-menu strong {
  margin-right: 0em;
  font-weight: 700;
}

.custom-sort-menu a {
  color: #222;
  text-decoration: none;
  padding: 0em;
  transition: opacity 0.3s ease, color 0.3s ease;
  opacity: 1;
}

.custom-sort-menu a:hover {
  color: #666;
  text-decoration: underline;
}

.custom-sort-menu a.selected {
  opacity: 1;
  font-weight: 700;
  text-decoration: underline;
}

.custom-sort-menu a.dimmed {
  opacity: 0.5;
}

/* Hide Kadence's built-in filter menu */
.kt-blocks-post-grid .kt-blocks-post-grid-category-filter {
  display: none !important;
}

.custom-sort-menu a[data-category="construction"] {
  color: #272624;
  position: relative;
}

.custom-sort-menu a[data-category="design"] {
  color: #272624;
  position: relative;
}

.custom-sort-menu a[data-category="millwork"] {
  color: #272624;
  position: relative;
}

@media screen and (max-width: 1024px) {
	
  .custom-sort-menu {
		display:grid;
	grid-template-columns: repeat(3, minmax(100px,2fr));
    font-size: 1.15rem !important;
    padding-top: calc(3.5rem + 20px);
  }

}

@media screen and (max-width: 640px) {
  .custom-sort-menu {
    display: flex !important;
		gap:0.6em;
    justify-content:right; 
    padding-top:calc(4rem + 20px) !important;
    padding-bottom: 0rem !important;
    text-align: left;
		padding-right:.5rem!important
		padding-left:.1rem!important
  }

  .custom-sort-menu strong {
    flex-basis: 100%; /* Full width to push it on its own line */
    display: block;
    margin-bottom: 0em; /* space below "Sort by:" */
    margin-left: 0;
    margin-right: 0;
    text-align: left;
    font-weight: 700;
  }

  .custom-sort-menu a {
    display: inline-block;
    padding: 0;
    font-size: .9rem;
    white-space: nowrap;
    color: inherit;
    margin-right: 0em; /* small space between links */
  }
}

@media screen and (min-width: 900px) {
  .kb-row-layout-wrap.sticky-header .wp-block-kadence-column:last-child {
    position: relative;
    overflow: visible !important;
  }
  .kb-row-layout-wrap.sticky-header .wp-block-kadence-column:last-child::before {
    content: "413-527-9000";
    position: absolute;
    top: calc(69px - clamp(105px, 8vh, 130px));
    left: 0;
    font-size: 16pt;
    font-weight: 700;
    font-family: Arial, Helvetica, sans-serif;
    text-transform: uppercase;
    color: #222;
    z-index: 9999;
    pointer-events: none;
    white-space: nowrap;
  }
  body:not(.home) .kb-row-layout-wrap.sticky-header .wp-block-kadence-column:last-child::before {
    color: rgb(165, 165, 163);
  }
}



.wp-block-kadence-posts article {
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Fade out */
.wp-block-kadence-posts article.fading-out {
  opacity: 0;
  transform: scale(0.97);
	display:none!important;
}

/* Fully collapse space */
.wp-block-kadence-posts article.hidden {
  display: none !important;
}


/*
.custom-sort-menu a {
  padding: 0px 1em;            /* space inside border */
/*  margin:  0px;                /* space between items */
/*          /* subtle rounding */
/*  text-decoration: none;        /* remove underline */
/*  color: inherit;               /* keep text color */
/*  display: inline-block;        /* keep inline but allow padding */
/*  transition: background-color 0.2s ease;  /* smooth hover effect */
/*}
*/


/* Remove rounding on featured images in post grid */

/* Remove all rounding and padding on Kadence post grid images */

.entry.loop-entry {
  border-radius: 0 !important;
  box-shadow: none !important;/* no rounding on top corners */
  overflow: hidden;
}
.entry.single-entry { box-shadow: none !important; }

.h1-date {
  font-size: 16pt;
  font-weight: 700;
  color: #000;
  margin: 0;
	padding-right:1.325em;
  text-align: right;

}

 Set max-width and center main container 
.wrap, .site-header, .site-footer, .content-area, .site-main {
  max-width: 1600px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  width: 100%;
}




/* Optional: reduce overall grid gap (if Kadence uses CSS Grid) */
.custom-tight-grid {
  column-gap: 15px; /* Adjust as needed */
	row-gap:0px;
	margin-bottom:5px;
}


@media screen and (min-width: 900px) {
  .sort-label-absolute {
    position: relative;
    top: 70px;   /* Adjust Y position as needed */
    left: 0px;   /* Adjust X position as needed */
    font-size: 16pt;
    font-weight: 700;
    font-family: Arial, Helvetica, sans-serif;
    text-transform: uppercase;
    color: #222;
    z-index: 9999;
    pointer-events: none;
    background: #FDFDFB; /* Optional: improves contrast if it overlaps content */
  }
  .custom-sort-menu {
    padding-top: 72px !important;
  }
}

@media screen and (max-width: 900px) {
  .sort-label-absolute {
    position: absolute;
    top: 82px;   /* Adjust Y position as needed */
    left: 0px;   /* Adjust X position as needed */
    font-size: 12pt;
    font-family: Arial, Helvetica, sans-serif;
    text-transform: uppercase;
    color: #222;
    z-index: 9999;
    pointer-events: none;
    background: none;
/*adjusting post grid margins
 */
	}}	

.wp-block-kadence-posts article.hidden {
  display: none !important; /* Force remove from layout */
}


/* Force hidden posts to completely collapse */
.custom-tight-grid article[style*="display: none"] {
  display: none !important;
}


/*dashed line*/
.sticky-subheader::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 1300px;             /* 800px each side total */
  height: 0;                 /* height handled by border */
  border-bottom: 1px solid #a5a5a3;
  pointer-events: none;
}
@media (min-width: 1600px){
	/*dashed line*/
.sticky-subheader::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 1540px;             /* 800px each side total */

	}}

/* Hide line on tablet/mobile */
@media (max-width: 850px) {
  .sticky-subheader::after {

  }
}
.kb-row-layout-wrap.sticky-header {
    position: sticky !important;
    top: clamp(105px, 8vh, 130px);
}
.kb-row-layout-wrap.sticky-row {
    position: sticky !important;
    top: clamp(105px, 8vh, 130px);
}
.kb-row-layout-wrap.sticky-subheader {
    position: sticky !important;
}
.kb-posts-id-164_e25126-70 {
    gap: 1em !important;
}
.kb-posts-id-164_e25126-70 .loop-entry .post-thumbnail {
    margin-bottom: 0 !important;
}
.kb-posts-id-164_e25126-70 .entry-header {
    margin-bottom: 0 !important;
}
@media screen and (min-width: 900px) {
    .kb-row-layout-id171_d24e3e-86 .kt-row-column-wrap {
        grid-template-columns: repeat(3, 1fr) !important;
        column-gap: 16px !important;
    }
    .kb-row-layout-id171_d24e3e-86 .wp-block-kadence-column:first-child {
        grid-column: 3 !important;
    }
    .kb-row-layout-id171_d24e3e-86 .wp-block-kadence-column:nth-child(2) {
        grid-column: 2 !important;
    }
}
body.single .entry-content-wrap {
    padding-top: 105px !important;
}
body.page:not(.home) .entry-content-wrap {
    padding-top: 105px !important;
}
body:not(.home) .sticky-subheader {
    top: 149px !important;
}
@media (max-width: 768px) {
    body:not(.home) .sticky-subheader {
        top: 139px !important;
    }
}
/* Sticky sort/filter bar - home page */
body.home .entry-content > .kb-row-layout-wrap:nth-child(2) {
  position: sticky;
  top: 125px;
  z-index: 998;
  background: #FDFDFB;
}
@media (max-width: 767px) {
  body.home .entry-content > .kb-row-layout-wrap:nth-child(2) {
    top: 133px;
  }
}
body.home .entry-content > .kb-row-layout-wrap:nth-child(2) .custom-sort-menu {
  padding-top: 4px !important;
}
body.home .entry-content > .kb-row-layout-wrap:nth-child(2) .sort-label-absolute {
  position: absolute !important;
  top: 4px !important;
}
/* Full-bleed background on sticky bars - prevents images bleeding through side margins */
body.home .entry-content > .kb-row-layout-wrap:nth-child(1)::before,
body.home .entry-content > .kb-row-layout-wrap:nth-child(2)::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: -100vw;
  right: -100vw;
  background: #FDFDFB;
  z-index: -1;
}

/* Push image grid to start below both sticky bars */
body.home .wp-block-kadence-posts.kb-posts {
  margin-top: 80px;
}
@media (min-width: 768px) {
  body.home .wp-block-kadence-posts.kb-posts {
    margin-top: 68px;
  }
}
/* Solid background on fixed site header - stops images showing through transparent masthead */
.site-top-header-wrap {
  background: #FDFDFB !important;
}

/* Full-bleed background on nav row + extend 200px upward to close the 9px gap
   between the fixed header bottom (96px) and the sticky nav top (105px) */
body.home .entry-content > .kb-row-layout-wrap:nth-child(1)::before {
  content: '';
  position: absolute;
  top: -200px;
  bottom: 0;
  left: -100vw;
  right: -100vw;
  background: #FDFDFB;
  z-index: -1;
  box-shadow: 0 0 0 100vw #FDFDFB !important;
  clip-path: inset(-200px -100vw 0px -100vw) !important;
}

/* Full-bleed background on sort bar row */
body.home .entry-content > .kb-row-layout-wrap:nth-child(2)::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: -100vw;
  right: -100vw;
  background: #FDFDFB;
  z-index: -1;
  box-shadow: 0 0 0 100vw #FDFDFB !important;
  clip-path: inset(0px -100vw) !important;
}

/* Push image grid to start below sort bar, not behind it */
body.home .wp-block-kadence-posts.kb-posts {
  margin-top: 80px;
}
/* Mobile header scrolls away at small viewports — make it sticky with solid bg */
.site-mobile-header-wrap {
  position: sticky !important;
  top: 0 !important;
  background: #FDFDFB !important;
  z-index: 1200 !important;
  min-height: 105px !important;
}

/* Desktop header: extend to 105px to close 9px gap before sticky nav */
.site-top-header-wrap {
  min-height: 105px !important;
}
/* Close subpixel gap between sticky nav and sort bar on mobile */
@media (max-width: 767px) {
    body.home .entry-content > .kb-row-layout-wrap:nth-child(2) {
        top: 131px !important;
    }
}
/* Tablet (641–900px): put SORT: on its own line above DESIGN/CONSTRUCTION/MILLWORK */
@media screen and (min-width: 641px) and (max-width: 900px) {
  body.home .entry-content > .kb-row-layout-wrap:nth-child(2) .sort-label-absolute {
    top: 6px !important;
  }
  body.home .entry-content > .kb-row-layout-wrap:nth-child(2) .custom-sort-menu {
    padding-top: 30px !important;
    padding-left: 0 !important;
  }
}
/* Tablet (641–900px): align nav columns with sort menu and image grid columns */
@media screen and (min-width: 641px) and (max-width: 900px) {
  .kb-row-layout-wrap.sticky-header > .kt-row-column-wrap {
    grid-template-columns: repeat(3, 1fr) !important;
    column-gap: 16px !important;
  }
}
/* Desktop (901px+): put SORT: on its own line so it doesn't overlap DESIGN */
@media screen and (min-width: 901px) {
  body.home .entry-content > .kb-row-layout-wrap:nth-child(2) .sort-label-absolute {
    top: 4px !important;
  }
  body.home .entry-content > .kb-row-layout-wrap:nth-child(2) .custom-sort-menu {
    padding-top: 30px !important;
  }
}

/* Desktop sort bar: one line, aligned to the image columns (>1280) */
@media (min-width: 1280px) {

  /* The inner column becomes the same 3-col grid as the photo strip */
  body.home .entry-content > .kb-row-layout-wrap:nth-child(2) .kt-inside-inner-col {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    column-gap: 16px;          /* matches the post grid gap */
    align-items: baseline;
  }

  /* SORT: drops out of absolute flow, takes column 1 */
  body.home .entry-content > .kb-row-layout-wrap:nth-child(2) .sort-label-absolute {
    position: static !important;
    top: auto !important;
    grid-column: 1;
    background: none;
  }

  /* Menu box dissolves so its links join the parent grid; top padding gone */
  body.home .entry-content > .kb-row-layout-wrap:nth-child(2) .custom-sort-menu {
    display: contents !important;
    padding-top: 0 !important;
  }

  body.home .entry-content > .kb-row-layout-wrap:nth-child(2) .custom-sort-menu a[data-category="design"] {
    grid-column: 2; grid-row: 1; justify-self: start;
  }
  body.home .entry-content > .kb-row-layout-wrap:nth-child(2) .custom-sort-menu a[data-category="construction"] {
    grid-column: 3; grid-row: 1; justify-self: start;
  }
  body.home .entry-content > .kb-row-layout-wrap:nth-child(2) .custom-sort-menu a[data-category="millwork"] {
    grid-column: 3; grid-row: 1; justify-self: end;
  }
}


.kb-row-layout-wrap.sticky-header .wp-block-kadence-column:last-child::before{
    display: none;
}

.kb-row-layout-id171_d24e3e-86 .wp-block-kadence-column:nth-child(2){
    grid-row: 1 !important;
}

body {
    overflow-y: scroll;
}