/* ── Community Carousel Widget ───────────────────────────────────────────── */
.ccar-wrapper { width: 100%; }

/* Tab bar */
.ccar-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
}
.ccar-tab {
  display: inline-flex;
  align-items: center;
  padding: 8px 22px;
  background: transparent;
  color: #374151;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  white-space: nowrap;
  line-height: 1;
}
.ccar-tab:hover { border-color: #6c5ce7; color: #6c5ce7; }
.ccar-tab--active {
  background: #ffffff;
  color: #1a1a2e;
  border-color: #1a1a2e;
  font-weight: 600;
}

/* Panel / Slide visibility */
.ccar-panel  { display: none; }
.ccar-panel--active { display: block; }
.ccar-slide  { display: none; }
.ccar-slide--active { display: block; }

/* ── Masonry grid ─────────────────────────────────────────────────────────── */
.ccar-masonry {
  display: flex;
  gap: 10px;
  width: 100%;
  align-items: stretch;
}

/* Tall left column — takes more width */
.ccar-col--tall {
  flex: 1.1;
  display: flex;
  flex-direction: column;
}

/* Stacked columns — each slightly narrower */
.ccar-col--stacked {
  flex: 0.95;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ── Image wraps ──────────────────────────────────────────────────────────── */
.ccar-img-wrap {
  display: block;
  overflow: hidden;
  border-radius: 12px;
  position: relative;
  text-decoration: none !important;
  background: #f3f4f6;
  flex-shrink: 0;
}

/* Full height tall image — matches total height of 2 stacked + gap */
.ccar-img-wrap--tall {
  height: 530px;
}

/* Half height — two of these + 10px gap = tall image height */
.ccar-img-wrap--half {
  height: 260px;
}

/* Image fills wrap */
.ccar-img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
  position: absolute !important;
  inset: 0 !important;
  transition: transform 0.4s ease;
}
.ccar-img-wrap:hover .ccar-img { transform: scale(1.04); }

/* Overlay on hover */
.ccar-overlay {
  position: absolute;
  inset: 0;
  background: rgba(108,92,231,0.5);
  display: flex;
  align-items: flex-end;
  padding: 14px;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}
.ccar-img-wrap:hover .ccar-overlay { opacity: 1; }
.ccar-overlay__title {
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

/* ── Navigation ──────────────────────────────────────────────────────────── */
.ccar-nav {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
  padding: 0 4px;
}
.ccar-arrow {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  border-radius: 50% !important;
  background: #fff !important;
  border: 1px solid #e5e7eb !important;
  cursor: pointer !important;
  transition: background 0.2s, border-color 0.2s !important;
  flex-shrink: 0 !important;
  padding: 0 !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
}
.ccar-arrow svg {
  stroke: #374151 !important;
  display: block !important;
  width: 20px !important;
  height: 20px !important;
}
.ccar-arrow:hover { background: #6c5ce7 !important; border-color: #6c5ce7 !important; }
.ccar-arrow:hover svg { stroke: #fff !important; }

.ccar-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ccar-dot {
  width: 6px;
  height: 6px;
  border-radius: 100%;
  background: #8F8BF5;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s, width 0.25s, border-radius 0.25s;
  flex-shrink: 0;
}
.ccar-dot--active {
  background: #4C48C1;
  width: 18px;
	height: 4px;
  border-radius: 999px;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .ccar-col--stacked:last-child { display: none; } /* hide 3rd col on tablet */
  .ccar-img-wrap--tall { height: 380px; }
  .ccar-img-wrap--half { height: 185px; }
}
@media (max-width: 600px) {
  .ccar-masonry { flex-direction: column; }
  .ccar-col--tall,
  .ccar-col--stacked { flex: none; width: 100%; }
  .ccar-col--stacked:last-child { display: flex; }
  .ccar-img-wrap--tall,
  .ccar-img-wrap--half { height: 200px; position: relative; }
  .ccar-tabs { gap: 6px; }
  .ccar-tab { font-size: 12px; padding: 6px 14px; }
}
