/*
 Theme Name:   Blocksy Child
 Theme URI:    https://example.com/blocksy-child
 Description:  Child theme for 2025 block theme
 Author:       MRB
 Template:     blocksy
 Version:      1.0.0
 Text Domain:  blocksy-child
*/

/*=========================================
  File: style.css (child theme or Customize ¨ Additional CSS)
==========================================*/

/* 1) Force a true horizontal row */
.wp-block-group.diag-stack > .wp-block-group__inner-container {
  display: flex !important;
  flex-wrap: nowrap !important;
  flex-direction: row !important;
  justify-content: flex-start !important;
  align-items: stretch !important;
}

.diag-stack h2 {
  color: white;
}

.diag-stack {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  justify-content: flex-start !important;
  align-items: stretch !important;
  overflow: hidden;
}

/* 2) Base state: each panel is 25% of container width */
.diag-item {
  position: relative;
  width: 25%;
  height: 300px;
  margin-left: -20px;        /* overlap for seamless slants */
  transition: width 0.5s ease;
}
.diag-item:first-child {
  margin-left: 0;
}

/* 3) Clip each into a parallelogram */
.diag-item .diag-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  clip-path: polygon(20px 0%, 100% 0%, calc(100% - 20px) 100%, 0% 100%);
  transition: transform 0.5s ease;
}

/* 4) Grey overlay pseudo-element (hidden by default) */
.diag-item .diag-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(128,128,200,0.6); 
  /* background: rgba(50, 50, 128, 0.5); */
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease-in;
  z-index: 2;
}

/* 4b) Content styling */
.diag-item .diag-content {
  position: relative;
  z-index: 2;
  padding: 1.5em;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}
.diag-item .info-text {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.5s ease, opacity 0.3s ease;
}

/* Hide the heading by default */
.diag-item .diag-content h2 {
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.5s ease, max-height 0.5s ease;
}

/* ??????????????????????????????????????????
   JS]driven gactiveh state (replaces hover/.hover)
???????????????????????????????????????????*/

/* collapse all non]active panels */
.diag-item:not(.active) {
  width: 10% !important;
  margin-left: -20px !important; /* keep your slanted overlap */
}

/* expand the active one */
.diag-item.active {
  width: 90% !important;
  margin-left: 0 !important;      /* remove overlap on the big one */
}

/* scale up the background on the active panel */
.diag-item.active .diag-bg {
  transform: scale(1.1);
}

/* show grey overlay on the active panel */
.diag-item.active .diag-bg::after {
  opacity: 1;
  transition: opacity 0.5s ease-out;
}

/* staggered reveal: heading then text 
.diag-item.active .diag-content h2 {
  opacity: 1;
  max-height: 3em;
  transition-delay: 0.1s;
}
.diag-item.active .info-text {
  opacity: 1;
  max-height: 5em;
  transition-delay: 0.2s;
}
*/


/* 6) Model-viewer styling (unchanged) */
.model-container {
  width: 100%;
  max-width: 800px;
  margin: 2em auto;
  background: #f5f5f5;
  border-radius: 8px;
  overflow: hidden;
}
model-viewer {
  width: 100%;
  height: 800px;
  --progress-bar-color: #ff2e63;
}

/* keep heading & info hidden by default */
.diag-item .diag-content h2,
.diag-item .info-text {
  opacity: 0;
  max-height: 0;
  transition:
    opacity 0.5s ease,
    max-height 0.5s ease;
}

/* only when .text-visible is present do we show them */
.diag-item.text-visible .diag-content h2 {
  opacity: 1;
  max-height: 3em;    /* or whatever you already had */
  transition-delay: 0.1s;
}
.diag-item.text-visible .info-text {
  opacity: 1;
  max-height: 5em;
  transition-delay: 0.2s;
}
