/*
Theme Name: Cederlof Designs
Theme URI:
Author: Ben Johnstone
Author URI:
Description: A block-based child theme of Blockbase for Cederlof Designs.
Requires at least: 6.1
Tested up to: 6.5
Requires PHP: 7.4
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Template: blockbase
Text Domain: cederlofdesigns
Tags: full-site-editing, block-patterns, wide-blocks
*/

html {
  overflow-anchor: none;
}

/* ── Site footer ────────────────────────────────────────────── */

:where(.wp-site-blocks) > footer.wp-block-template-part {
    margin-block-start: 0 !important;
    margin-top: 0 !important;
}
/* Copper gradient rule at top of footer */
.site-footer .footer-rule {
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--wp--preset--color--copper) 0%,
    var(--wp--preset--color--cypress) 60%,
    transparent 100%
  );
  min-height: 3px !important;
}

/* Location pin marker */
.site-footer .footer-location::before {
  content: '◎  ';
  font-size: 0.7rem;
}

/* General list block — keep bullets inside the block */
.wp-block-list {
  padding-inline-start: 1.5em !important;
}

/* Strip list bullets and default padding from footer nav lists */
.site-footer .footer-nav-list {
  list-style: none !important;
  padding-inline-start: 0 !important;
  padding-left: 0 !important;
}
.site-footer .footer-nav-list > li {
  display: block !important;
}
.site-footer .footer-nav-list li {
  margin-bottom: 0.65rem;
  padding-left: 0;
}
.site-footer .footer-nav-list li a {
  color: rgba(218, 215, 205, 0.75);
  text-decoration: none;
  position: relative;
  transition: color 0.2s ease;
}
.site-footer .footer-nav-list li a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1px;
  background: var(--wp--preset--color--fern);
  transition: width 0.25s ease;
}
.site-footer .footer-nav-list li a:hover {
  color: var(--wp--preset--color--linen);
}
.site-footer .footer-nav-list li a:hover::after {
  width: 100%;
}

/* Contact link hover */
.site-footer .wp-block-column a[href^="tel:"],
.site-footer .wp-block-column a[href^="mailto:"] {
  transition: color 0.2s ease;
}
.site-footer .wp-block-column a[href^="tel:"]:hover,
.site-footer .wp-block-column a[href^="mailto:"]:hover {
  color: var(--wp--preset--color--copper) !important;
}

/* CTA button hover */
.site-footer .wp-block-button__link:hover {
  background-color: #e8a060 !important;
  transform: translateY(-1px);
  transition: background-color 0.2s ease, transform 0.15s ease;
}

/* Moa Media credit link */
.site-footer .wp-block-columns a[href*="moamedia"] {
  color: var(--wp--preset--color--fern);
  text-decoration: none;
  transition: color 0.2s ease;
}
.site-footer .wp-block-columns a[href*="moamedia"]:hover {
  color: var(--wp--preset--color--copper);
}

/* Footer divider — override WP separator default styles */
.site-footer .footer-divider {
  border: none;
  height: 1px;
  margin-left: auto;
  margin-right: auto;
  max-width: 1280px;
  width: calc(100% - 10vw);
}

.header-top-bar {
    a {
        text-decoration: none;
    }
}

.row-reverse {
    flex-direction: row-reverse;
}
.wp-block-accordion-panel {
  margin-top: 0;
}
.wp-block-accordion {
    .wp-block-accordion-item {
        border: 1px solid var(--wp--preset--color--linen);
        border-radius: 15px;
        padding-bottom: 1rem;
        padding: var(--wp--preset--spacing--40) var(--wp--preset--spacing--50);
        background: rgba(255,255,255,0.5);
        &.is-open {
            background: #fff;
            border-radius: 20px;
            border-top: 5px solid var(--wp--preset--color--copper);
        }
    }
    .wp-block-accordion-heading__toggle-icon {
      font-size: 36px;
      font-weight: 300;
    }
}

:root :where(.is-layout-flow.wp-block-accordion-is-layout-flow) > * {
    margin-block-start: 0.5rem;
    margin-block-end: 0.5rem;
}

/* ── Gallery: Masonry style ─────────────────────────────────── */
.wp-block-gallery.is-style-masonry {
  display: block !important;
  columns: 3;
  column-gap: var(--wp--preset--spacing--40);
}
.wp-block-gallery.is-style-masonry.columns-1 { columns: 1; }
.wp-block-gallery.is-style-masonry.columns-2 { columns: 2; }
.wp-block-gallery.is-style-masonry.columns-3 { columns: 3; }
.wp-block-gallery.is-style-masonry.columns-4 { columns: 4; }
.wp-block-gallery.is-style-masonry.columns-5 { columns: 5; }
.wp-block-gallery.is-style-masonry.columns-6 { columns: 6; }
.wp-block-gallery.is-style-masonry.columns-7 { columns: 7; }
.wp-block-gallery.is-style-masonry.columns-8 { columns: 8; }

.wp-block-gallery.is-style-masonry figure.wp-block-image {
  display: block;
  break-inside: avoid;
  margin-bottom: var(--wp--preset--spacing--40);
  width: 100% !important;
}
.wp-block-gallery.is-style-masonry figure.wp-block-image img {
  width: 100%;
  height: auto;
  display: block;
}
@media (max-width: 600px) {
  .wp-block-gallery.is-style-masonry { columns: 1 !important; }
}
@media (min-width: 601px) and (max-width: 900px) {
  .wp-block-gallery.is-style-masonry { columns: 2 !important; }
}

.wp-block-gallery {
    figure.wp-block-image {
        margin: 0 0 var(--wp--preset--spacing--40) 0;
    }
}
.wp-block-gallery.has-nested-images figure.wp-block-image:not(#individual-image) {
    margin: 0 0 var(--wp--preset--spacing--40) 0;
    width: auto;
}

.is-layout-flex.breakpoint-desktop {
  flex-wrap: wrap;
  flex-direction: column;
  @media (min-width: 1024px) {
    flex-wrap: nowrap;
    flex-direction: row;
  }
}

header.wp-block-template-part {
  position: sticky;
  top: 0;
  z-index: 100;
  transition: box-shadow 0.3s ease, background-color 0.3s ease;

  &.scrolled {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    
  }
  
}

/* ── Navigation: collapse to burger below 920px ─────────────── */
@media (max-width: 920px) {
  .wp-block-navigation .wp-block-navigation__responsive-container-open {
    display: flex !important;
  }
  .wp-block-navigation .wp-block-navigation__responsive-container:not(.is-menu-open) {
    display: none !important;
    visibility: hidden !important;
  }
}

@media (min-width: 921px) {
  ul.wp-block-navigation__container > li.wp-block-navigation-item > a {
    position: relative;
    &::after {
      content: '';
      position: absolute;
      left: 0;
      bottom: -4px;
      width: 0;
      height: 2px;
      background: var(--wp--preset--color--fern);
      transition: width 0.25s ease;
      display: block;
    }
    &:hover::after {
      width: 100%;
    }
    
  }
  .wp-block-navigation .wp-block-navigation__responsive-container-open {
    display: none !important;
  }
  .wp-block-navigation .wp-block-navigation__responsive-container {
    display: block !important;
    visibility: visible !important;
    position: static !important;
    background-color: transparent !important;
    padding: 0 !important;
    width: auto !important;
    height: auto !important;
    overflow: visible !important;
  }
  .wp-block-navigation .wp-block-navigation__responsive-container-content {
    display: flex !important;
    flex-direction: row !important;
  }
}
header.wp-block-template-part.scrolled {
  & > .wp-block-group:not(.header-top-bar) {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
  }

  .wp-block-site-logo img {
    max-width: 160px;
  }
}


@media (max-width: 768px) {
  .wp-block-site-logo img {
     
      max-width: 120px !important;
  }
  header.wp-block-template-part .wp-block-button {
    a.wp-block-button__link {
      font-size: 15px !important;
      padding: 0.5rem 1rem !important;
    }
  }
  .mobile-text-center {
    text-align: center;
  }
}

@media (max-width: 920px) {
  .header-nav {
    flex-direction: row !important;

    button svg {
      width: 32px;
      height: 32px;
    }
  }

  
}

.text-balance {
  text-wrap: balance;
}

/* Cederlof Process block */
.wp-block-cederlofdesigns-cederlof-process {
  border: 1px solid rgba(13, 43, 42, 0.12);
  border-top: 5px solid var(--wp--preset--color--copper);
  border-radius: 24px;
  padding: clamp(1.5rem, 2.8vw, 3rem);
  transform: translateY(-80px);
  background: var(--wp--preset--color--pale-linen);
}

.cederlof-process__eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  color: var(--wp--preset--color--cypress);
  font-weight: 700;
}

.cederlof-process__heading {
  margin: 0.35rem 0 0;
  color: var(--wp--preset--color--deep-tide);
  max-width: 18ch;
}

.cederlof-process__intro {
  margin: 0.75rem 0 0;
  color: rgba(13, 43, 42, 0.82);
  max-width: 62ch;
}

.cederlof-process__grid {
  position: relative;
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
  grid-template-columns: 1fr;
}

.cederlof-process__grid::before {
  content: '';
  position: absolute;
  left: 1.6rem;
  top: 0.2rem;
  bottom: 0.2rem;
  width: 1px;
  background: linear-gradient(
    180deg,
    rgba(30, 94, 60, 0),
    rgba(30, 94, 60, 0.45) 10%,
    rgba(30, 94, 60, 0.45) 90%,
    rgba(30, 94, 60, 0)
  );
}

.cederlof-process__card {
  position: relative;
  border-radius: 18px;
  border: 1px solid rgba(30, 94, 60, 0.2);
  background-color: rgba(255, 255, 255, 0.84);
  padding: 1rem 1rem 1rem 3.75rem;
  box-shadow: 0 10px 20px rgba(13, 43, 42, 0.07);
}

.cederlof-process__number {
  position: absolute;
  left: 0.6rem;
  top: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  font-weight: 700;
  color: var(--wp--preset--color--copper);
  background-color: rgba(255, 248, 241, 1);
  border: 1px solid rgba(212, 130, 42, 0.35);
}

.cederlof-process__step-title {
  margin: 0;
  font-size: clamp(1.06rem, 1.3vw, 1.2rem);
  color: var(--wp--preset--color--deep-tide);
}

.cederlof-process__step-description {
  margin: 0.45rem 0 0;
  color: rgba(13, 43, 42, 0.82);
}

@media (min-width: 782px) {
  .cederlof-process__grid::before {
    left: 1.6rem;
  }
}

.cederlof-cta-banner {
  .wp-block-cover__image-background {
    mix-blend-mode: multiply;
    filter: brightness(0.9);
    opacity: 0.95;
  }
}

/* Parallax support for cover blocks */
.wp-block-cover[data-parallax-speed] {
  overflow: hidden;
  position: relative;
}

.wp-block-cover[data-parallax-speed] .wp-block-cover__image-background {
  /* Ensure image stays large enough when parallaxed at any speed */
  height: 200%;
  width: 100%;
  position: absolute;
  top: -50%;
  left: 0;
  object-fit: cover;
  object-position: center;
  will-change: transform;
  backface-visibility: hidden;
}

.wp-block-button .wp-block-button__link {
  transition: background-color 0.2s ease, transform 0.15s ease;
}
.wp-block-button .wp-block-button__link:hover {
  background-color: var(--wp--preset--color--copper) !important;
  transform: translateY(-1px);
  color: #fff !important;
  border-color: var(--wp--preset--color--copper) !important;
}