/*
Theme Name: Commencement Bay Corrugated
Theme URI: https://cbcbox.jfdesigns.net/
Description: Divi Child Theme
Author: JF Designs
Author URI: https://jfdesigns.com
Template:    Divi
Version:     1.2
*/

/* ==========================================================================
   Base Styles
   ========================================================================== */
html {
  font-size: 62.5%; /* 1rem = 10px */
}

body {
  font-size:  clamp(1.6rem, 0.2vw + 1.5rem, 1.8rem);
  line-height:     1.7;
  font-weight:     400;
  font-family:     Roboto, Helvetica, Arial, sans-serif;
  transition:      all 0.5s ease;
}

/* Reset paragraph spacing */
p {
  margin-top: 0;
}

/* ==========================================================================
   Typography
   ========================================================================== */

/* Space before a heading following text or lists */
p + h1, p + h2, p + h3, p + h4, p + h5, p + h6,
ul + h1, ul + h2, ul + h3, ul + h4, ul + h5, ul + h6,
ol + h1, ol + h2, ol + h3, ol + h4, ol + h5, ol + h6 {
  margin-top: 0.75em !important;
}


blockquote > p:not(.has-background):last-of-type {
  padding-bottom: 0 !important;
}

sup {
  bottom:     0.5em;
  font-size:  0.7em;
}

/* ==========================================================================
   Layout & Grid Helpers
   ========================================================================== */

/* Multi-column List layout */
ul.service-list {
    columns: 2 24rem;
    column-gap: 6rem;
}
ul.service-list li{
    break-inside: avoid-column;
}
ul.service-list li.filler {
  visibility: hidden;
  height: 4rem; /* Adjust this to control how short the second column appears */
}
@media (max-width: 1079px) {
 ul.service-list li.filler {
 	display:none /* Hide on mobile */
	}
}

/* ==========================================================================
   Components
   ========================================================================== */


/* Animated underline on hover */
.jfd-link-underline a {
    position: relative;
    text-decoration: none;
}

.jfd-link-underline a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    height: 1px;
    width: 0;
    background-color:currentColor;
    transition: width 0.3s ease;
}

.jfd-link-underline a:hover::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    height: 1px;
    width: 100%;
    background-color:currentColor;
}

/* ==========================================================================
   Utilities
   ========================================================================== */
.padding-0,
.no-padding {
  padding: 0 !important;
}

.padding-bottom-0 {
  padding-bottom: 0 !important;
}

/* add space above header * if following list */
 ul + h1, ul + h2, ul + h3, ul + h4, ul + h5, ul + h6, ol + h1, ol + h2, ol + h3, ol + h4, ol + h5, ol + h6 {
     padding-top: .375em !important;
}
/* add space below list items */
 .et_pb_text ul, .et_pb_text ol,
 .et_pb_post_content ul, .et_pb_post_content ol{
     margin-left: 1.5em;
	 list-style-position: outside;
}
 .et_pb_text li,
 .et_pb_post_content li{
     margin-bottom: .75em 
}
 .et_pb_row.col-bot-margin-none .et_pb_column {
     margin-bottom: 0px !important 
}

/* create inline display */
.display-inline-block{
	display:inline-block !important
}


/* =====================================================
   DIVI MODULE HOVER STATE — VISUAL AID
   Only when Hover editing state is selected
   ===================================================== */

.et-vb-modal-wrapper:has(
	.et-vb-modal-responsive-state-picker-value >
	.et-vb-modal-responsive-state-picker-value-icon >
	.et-vb-icon--divi-hover-enhancement
) {
	border: 2px solid orange;
	background: hsla(39, 100%, 51%, .2) !important;
}

/* Divi modal sticky menu fix */
.mce-panel .mce-stack-layout-item.mce-first {
  position: sticky !important;
  top:      -6rem;
}
/* ==========================================================================
   Navigation Breakpoints
   ========================================================================== */

@media (max-width: 1099px) {
   .desktop-nav {
    display:none
  }
}
@media (min-width: 1100px) {
   .mobile-nav {
    display:none
  }
}

/* ==========================================================================
   Forms & Contact Form 7 Overrides
   ========================================================================== */
/* Remove stubborn Divi pseudo-border */
#main-content .container:before {
  content: none;
}

/* Smart Grid container override */
.cf7sg-container .cf7-smart-grid.has-grid .container {
  display:      block;
  width:        100% !important;
  max-width:    100% !important;
  margin:       0 auto !important;
  padding:      0 !important;
  flex-wrap:    wrap;
}

.cf7sg-container {
  line-height: 1.7 !important;
}

/* CF7 grid columns breakpoints */
@media (max-width: 980px) {
  .cf7sg-container .cf7-smart-grid.has-grid form .container .row .columns {
    float:  none !important;
    width:  100%   !important;
    margin: 0      !important;
  }
  .cf7sg-container .cf7-smart-grid.has-grid form .container .row .columns.one-half {
    float:       left !important;
    width:       48.93617% !important;
    margin-left: 2.12766%  !important;
  }
  .cf7sg-container .cf7-smart-grid.has-grid form .container .row .columns.one-half:first-child {
    margin-left: 0 !important;
  }
  .cf7sg-container .cf7-smart-grid.has-grid form .container .row .columns.one-third {
    float:       left !important;
    width:       31.91489% !important;
    margin-left: 2.12766%  !important;
  }
  .cf7sg-container .cf7-smart-grid.has-grid form .container .row .columns.one-third:first-child {
    margin-left: 0 !important;
  }
}

@media (max-width: 768px) {
  .cf7sg-container .cf7-smart-grid.has-grid form .container .row .columns,
  .cf7sg-container .cf7-smart-grid.has-grid form .container .row .columns.one-half,
  .cf7sg-container .cf7-smart-grid.has-grid form .container .row .columns.one-third {
    float:  none !important;
    width:  100%   !important;
    margin: 0      !important;
  }
  .cf7sg-container .cf7-smart-grid.has-grid .container.spacer-margin-top {
    margin-top: 1.5rem !important;
  }
}

/* Signature field styling */
.wpcf7-form-control-signature-body canvas {
  width:         100%;
  height:        15rem;
  border:        0.1rem solid #e0e0e0;
  border-radius: 0.5rem;
  background:    #eee;
}

.wpcf7-form-control-signature-wrap {
  width:  70%     !important;
  height: 16.5rem !important;
}

@media (max-width: 768px) {
  .wpcf7-form-control-signature-wrap {
    width: 100% !important;
  }
}

/* Other CF7 tweaks */
input[type="button" i] {
  color:          #800 !important;
  border:         0.2rem solid #800;
  font-size:      1.4rem;
  font-weight:    500;
  padding:        0.3em 1em;
  line-height:    1.7em !important;
  background:     transparent;
  border-radius:  0.3rem;
}

input[type="button" i]:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.wpcf7-form-control::placeholder {
  color: #333 !important;
}

.wpcf7-response-output {
  display: block;
}

.wpcf7 form.sent .cf7sg-response-output {
  display: none !important;
}

.wpcf7-not-valid-tip {
  font-size:      1rem    !important;
  letter-spacing: 0.5px   !important;
  font-weight:    700     !important;
  display:        block   !important;
  position:       relative!important;
  top:            100%    !important;
  padding-top:    0.3rem  !important;
  line-height:    1.2em   !important;
  z-index:        7777    !important;
  background:     none    !important;
}

.wpcf7-not-valid {
  border: 0.1rem solid red !important;
}

.wpcf7-form.sent div.container {
  display:    none !important;
  transition: all 0.5s ease;
}

.wpcf7 div.wpcf7-response-output {
  font-size:   2.2rem;
  text-align:  center;
}






/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

@media (max-width: 767px) {
  .et_pb_blog_grid .et_pb_post {
    margin:     3.6rem 0 !important;
    box-shadow: 0 0.9rem 2.8rem -1.5rem rgba(0, 0, 0, 0.5);
  }
}

@media (max-width: 768px) {
  .cf7sg-container .cf7-smart-grid.has-grid .container.spacer-margin-top {
    margin-top: 1.5rem !important;
  }
  .wpcf7-form-control-signature-wrap {
    width: 100% !important;
  }
}


/* =========================================================
   DIVI SPLIT ROW SYSTEM (STANDARD + FLIPPED)
   ---------------------------------------------------------
   STANDARD VERSION (LEFT FIXED / RIGHT FLUID)
     Section: split-rows-section
     Rows:    split-row-left, split-row-right

   FLIPPED VERSION (RIGHT FIXED / LEFT FLUID)
     Section: split-rows-section-flip
     Rows:    split-row-left-flip, split-row-right-flip

   CORE FEATURES:
   - Fixed side caps at 300px
   - Fluid side extends full browser edge
   - Alignment matches Divi 90% / 1140px layout
   - Vertical centering of fixed column
   - Responsive clamp height (600px → 150px)
   - Mobile stacking with controlled order
   ========================================================= */


/* =========================================================
   GLOBAL RESPONSIVE HEIGHT (APPLIES EVERYWHERE)
   ---------------------------------------------------------
   - 600px at ~1280px viewport
   - 150px at ~360px viewport
   ========================================================= */
.split-rows-section .split-row-right,
.split-rows-section-flip .split-row-left-flip {
  height: clamp(15rem, 48.91vi + -2.61rem, 60rem);
}


/* =========================================================
   DESKTOP LAYOUT (>= 981px)
   ========================================================= */
@media only screen and (min-width: 981px) {

  /* ---------------------------------
     FLEX CONTAINERS
     --------------------------------- */
  .split-rows-section,
  .split-rows-section-flip {
    display: flex;
    align-items: stretch;
    gap: 0;
  }

  /* Reset Divi row vertical spacing */
  .split-rows-section .et_pb_row,
  .split-rows-section-flip .et_pb_row {
    margin-top: 0;
    margin-bottom: 0;
  }


  /* =====================================================
     STANDARD LAYOUT (LEFT FIXED / RIGHT FLUID)
     ===================================================== */

  /* LEFT (FIXED COLUMN) */
  .split-rows-section .split-row-left {
    flex: 0 0 auto;
	width: auto;
	max-width: 475px;

    /* Align to standard Divi content left edge */
    margin-left: max(5%, calc((100% - 1140px) / 2));
    margin-right: 0;

    /* Vertical centering */
    margin-top: auto;
    margin-bottom: auto;
  }

  /* RIGHT (FLUID COLUMN) */
  .split-rows-section .split-row-right {
    flex: 1 1 auto;
    width: auto;
    max-width: none;

    margin-left: 0;
    margin-right: 0;

    /* Space between columns */
    padding-left: 40px;
    padding-right: 0;
  }


  /* =====================================================
     FLIPPED LAYOUT (RIGHT FIXED / LEFT FLUID)
     ===================================================== */

  /* LEFT (FLUID COLUMN) */
  .split-rows-section-flip .split-row-left-flip {
    flex: 1 1 auto;
    width: auto;
    max-width: none;

    margin-left: 0;
    margin-right: 0;

    /* Space between columns */
    padding-left: 0;
    padding-right: 40px;
	  
  }

  /* RIGHT (FIXED COLUMN) */
  .split-rows-section-flip .split-row-right-flip {
    flex: 0 0 auto;
	width: auto;
	max-width: 475px;

    /* Align to standard Divi content right edge */
    margin-right: max(5%, calc((100% - 1140px) / 2));
    margin-left: 0;

    /* Vertical centering */
    margin-top: auto;
    margin-bottom: auto;
  }

}


/* =========================================================
   TABLET + MOBILE (<= 980px)
   ========================================================= */
@media only screen and (max-width: 980px) {

  /* Use flex for ordering control */
  .split-rows-section,
  .split-rows-section-flip {
    display: flex;
    flex-direction: column;
  }
   /* Add extra padding to text row on mobile */
	.split-rows-section .split-row-left,
	.split-rows-section-flip .split-row-right-flip {
	padding-top: clamp(6rem, 7.8vi + 2.36rem, 10rem);
	padding-bottom: clamp(6rem, 7.8vi + 2.36rem, 10rem);
}


  /* =====================================================
     STANDARD MOBILE ORDER
     - Right row ABOVE left row
     ===================================================== */

  .split-rows-section .split-row-right {
    order: 1;

    /* Full-width bleed */
    width: 100%;
    max-width: none;
    margin-left: 0;
    margin-right: 0;

    padding-left: 0;
    padding-right: 0;
  }

  .split-rows-section .split-row-left {
    order: 2;

    /* Return to centered layout */
    width: 90%;
    max-width: 1140px;
    margin-left: auto;
    margin-right: auto;
  }


  /* =====================================================
     FLIPPED MOBILE ORDER
     - Left row ABOVE right row
     ===================================================== */

  .split-rows-section-flip .split-row-left-flip {
    order: 1;

    /* Full-width bleed */
    width: 100%;
    max-width: none;
    margin-left: 0;
    margin-right: 0;

    padding-left: 0;
    padding-right: 0;
  }

  .split-rows-section-flip .split-row-right-flip {
    order: 2;

    /* Return to centered layout */
    width: 90%;
    max-width: 1140px;
    margin-left: auto;
    margin-right: auto;
  }

}
