/* cc-style.css — updated: container-aware carousel + natural masonry tiles + stable grid */

/* block wrapper (keep it in normal flow) */
.cc-block-wrap{
  position: relative;
  z-index: 0;
  margin: 18px 0 36px;
  box-sizing: border-box;
}

/* -------------------
   CAROUSEL (container-aware horizontal scroller)
   ------------------- */
.cc-carousel-wrap{
  position: relative;
  z-index: 1;
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 22px;
  overflow: visible;
}

.cc-carousel{
  display: flex;
  flex-wrap: nowrap;
  gap: 24px;
  padding: 12px 6px;
  overflow-x: auto;
  overflow-y: hidden;
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

/* carousel slide tile - center image, preserve full image (no cropping) */
.cc-slide{
  display: inline-flex;
  flex: 0 0 610px !important;           /* base width of slide; responsive rules adjust */
  align-items: center;       /* vertically center contained image */
  justify-content: center;   /* horizontally center contained image */
  box-sizing: border-box;
  position: relative;
  margin: 0;
  background: transparent;
  border-radius: 12px;
  overflow: visible;
  min-height: 520px;         /* ensures a consistent tile band height */
}

/* image styling — contain rather than cover (no cropping) */
.cc-slide img{
  display:block;
  width: auto;               /* allow width to scale but not force stretch */
  max-width: 100%;
  height: 520px;             /* tile band height */
  max-height: 520px;
  object-fit: contain;       /* IMPORTANT: do NOT crop — fit whole image */
  object-position: center center;
  
  border-radius: 10px;
  
}

/* placeholder for no-image slides 
.cc-slide--noimage .cc-slide-noimage{
  min-height:420px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#e67a2f;
  color:#fff;
  border-radius:10px;
  font-weight:700;
}*/

/* caption overlay — stacked (category then title) */
.cc-slide-caption{
  position:absolute;
  left: 0px;
  bottom: 12px;
  display:inline-flex;
  gap:8px;
  align-items:center;
  padding:10px 12px;
  background: rgba(106,138,43,0.98);
  color: #fff;
  border-radius:10px;
  box-shadow: 0 8px 18px rgba(0,0,0,0.18);
  flex-direction: column;
  width: calc(100% - 25px);
  z-index: 6;
}
.cc-slide-cat{
  font-size:11px;
  text-transform:uppercase;
  padding:6px 8px;
  border-radius:6px;
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-weight:800;
}
.cc-slide-title{
  font-size:0.98rem;
  font-weight:800;
  line-height:1.05;
  color:#fff;
  margin-top:4px;
  white-space:normal;
}

/* carousel prev/next stylings (if generated) */
.cc-carousel-prev, .cc-carousel-next{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 8;
  background: rgba(255,255,255,0.9);
  border: 0;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  box-shadow: 0 6px 14px rgba(0,0,0,0.12);
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
}
.cc-carousel-prev{ left: 8px; }
.cc-carousel-next{ right: 8px; }

/* ---------- Filter toolbar (grid-only) ---------- */
.cc-filter{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
  margin: 8px 0 18px;
}
.cc-filter-btn{
  background:#ffffff;
  color:#6a8a2b;
  border:1px solid rgba(106,138,43,0.12);
  padding:8px 14px;
  border-radius:999px;
  cursor:pointer;
  font-weight:700;
  font-size:.95rem;
}
.cc-filter-btn[aria-pressed="true"]{
  background:#6a8a2b;
  color:#fff;
  box-shadow: inset 0 0 0 3px rgba(255,255,255,0.06);
}

/* ---------- Cards grid ---------- */
.cc-groups .cc-cards-grid{
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 20px !important;
  margin-top: 8px;
  width: 100%;
  box-sizing: border-box;
}

/* card look */
.cc-card{
  display:flex;
  gap:16px;
  align-items:flex-start;
  background:#fff;
  border-radius:10px;
  padding:14px;
  box-shadow:0 6px 18px rgba(0,0,0,0.04);
  border:1px solid rgba(0,0,0,0.03);
  transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease;
  position: relative;
}
.cc-card:hover{ transform: translateY(-4px); }

/* Active (selected) card: left accent + subtle bg */
.cc-card--active{
  background:#f6fbf1;
  border-color:rgba(106,138,43,0.18);
  box-shadow:0 10px 28px rgba(33,33,33,0.06);
  transform: translateY(-6px);
  outline: 0;
}
/* left border accent */
.cc-card--active::before{
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 8px;
  background: #6a8a2b;
  border-radius: 6px 0 0 6px;
  box-shadow: 0 2px 6px rgba(106,138,43,0.12);
}

/* if card has no featured image, collapse media column */
.cc-card--noimage .cc-card-media{ display:none; }
.cc-card-media{ flex:0 0 26%; max-width:26%; }
.cc-card-img{
  width:100%;
  height:auto;
  display:block;
  object-fit:cover;
  border-radius:6px;
  background: transparent;
}

/* content */
.cc-card-content{ flex:1 1 74%; min-width:0; }
.cc-card-title{ margin:0 0 8px; font-weight:700; color:#6a280f; font-size:1.05rem; }
.cc-card-meta{ color:#6d6d6d; font-weight:600; margin-bottom:8px; font-size:.95rem; }
.cc-card-body{ max-height:0; overflow:hidden; opacity:0; transition:max-height .36s ease, opacity .24s ease; margin-top:8px; }
.cc-card--expanded .cc-card-body{ max-height:1400px; opacity:1; }

/* toggle button */
.cc-card-actions{ margin-top:10px; }
.cc-card-toggle{
  display:inline-block;
  background:#6a8a2b;
  color:#fff;
  border:0;
  padding:8px 10px;
  border-radius:6px;
  cursor:pointer;
  font-weight:700;
}

/* hide filtered cards (grid-only) */
.cc-card--hidden{ display:none !important; }

/* ---------- lightbox styles ---------- */
.nlps-cc-lightbox{
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(12,12,12,0.65);
  z-index: 99999;
  padding: 24px;
}
.nlps-cc-lightbox[aria-hidden="true"]{ display:none; }
.nlps-cc-lb-inner{
  max-width: 98vw;
  max-height: 96vh;
  background: transparent;
  border-radius: 8px;
  position: relative;
  padding: 12px;
}
.nlps-cc-lb-media{ display:flex; align-items:center; justify-content:center; }
.nlps-cc-lb-close{
  position: absolute;
  right: 4px;
  top: 4px;
  background: rgba(255,255,255,0.95);
  border: 0;
  width:34px;
  height:34px;
  border-radius:6px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}

/* ---------- responsive breakpoints ---------- */
@media (max-width:1400px){
  .cc-groups .cc-cards-grid{ grid-template-columns: repeat(3, 1fr) !important; }
  .cc-card-media{ max-width:30%; flex:0 0 30%; }
  .cc-slide{ flex: 0 0 340px; }
  .cc-slide img{ height:400px; }
}
@media (max-width:1000px){
  .cc-groups .cc-cards-grid{ grid-template-columns: repeat(2, 1fr) !important; }
  .cc-card{ gap:12px; padding:12px; }
  .cc-card-media{ max-width:36%; flex:0 0 36%; }
  .cc-slide{ flex:0 0 300px; }
  .cc-slide img{ height:360px; }
}
@media (max-width:700px){
  .cc-groups .cc-cards-grid{ grid-template-columns: 1fr !important; }
  .cc-card{ flex-direction:column; }
  .cc-card-media{ max-width:100%; flex:0 0 100%; }
  .cc-slide{ flex:0 0 92%; }
  .cc-slide img{ height:260px; }
  .cc-slide-caption{ left:10px; right:10px; bottom:10px; }
}
