/* Client Stories Grid Styles */

.c-client-stories-grid {
  width: 100%;
  padding: 56px 0;
  background: #ffffff;
  box-sizing: border-box;
  font-family: var(--font-family, sans-serif);
}

.c-client-stories-grid__container {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  gap: 48px;
  padding: 0 20px;
  box-sizing: border-box;
}

/* ---- Left Sidebar (Filters) ---- */
.c-client-stories-grid__sidebar {
  flex: 0 0 280px;
  width: 280px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.c-client-stories-grid__filter-section:last-child {
  border-bottom: none;
}

.c-client-stories-grid__filter-title {
  font-size: 15px;
  font-family: var(--font-family);
  line-height: 20px;
  color: #7a838a;
  font-weight: 400;
  margin: 15px 0;
}

.c-client-stories-grid__filter-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.c-client-stories-grid__filter-item {
  display: flex;
  align-items: flex-start;
  gap: 0;
  font-size: 15px;
  color: #012c52;
  line-height: 18px;
  border-bottom: 1px solid #b9bfc7;
  margin: 0;
  padding-bottom: 15px;
  font-family: var(--font-family);
  box-sizing: border-box;
  margin-top: 16px;
}

.c-client-stories-grid__plus {
  color: #a0aec0;
  font-weight: 300;
  font-size: 20px;
  flex-shrink: 0;
  display: none;
  user-select: none;
  margin-top: 1px;
}

.c-client-stories-grid__filter-item:has(ul) .c-client-stories-grid__plus,
.c-client-stories-grid__filter-item:has(ol) .c-client-stories-grid__plus {
  display: inline-block;
}

.c-client-stories-grid__label {
  display: inline-flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-weight: 600;
  color: #012c52;
  font-size: 15px;
  line-height: 18px;
  font-family: var(--font-family);
  transition: color 0.15s ease;
}

.c-client-stories-grid__label:hover {
  color: #7645b2;
}

.c-client-stories-grid__checkbox {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid #b9bfc7 !important;
  background-color: transparent;
  border-radius: 3px;
  flex-shrink: 0;
  position: relative;
  transition:
    border-color 0.15s ease,
    background-color 0.15s ease;
  box-sizing: border-box;
  margin-left: 8px;
}

.c-client-stories-grid__checkbox:checked {
  background-color: #7645b2;
  border-color: #7645b2 !important;
}

.c-client-stories-grid__checkbox:checked::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 42%;
  width: 5px;
  height: 9px;
  border: 2px solid #ffffff;
  border-top: none;
  border-left: none;
  transform: translate(-50%, -50%) rotate(45deg);
}

/* ---- Right Content Area (Grid) ---- */
.c-client-stories-grid__content {
  flex: 1;
  min-width: 0;
}

.c-client-stories-grid__cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

/* ---- Card Styles ---- */
.c-client-stories-grid__card {
  background: #ffffff;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
  height: 100%;
  box-sizing: border-box;
  position: relative;
}

.c-client-stories-grid__card:hover {
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

.c-client-stories-grid__card:hover .c-client-stories-grid__card-media {
  max-height: 0 !important;
  opacity: 0 !important;
  padding: 0 !important;
  border: none !important;
}

/* ---- Hover Overlay Panel ---- */
.c-client-stories-grid__card-hover {
  position: absolute;
  top: 48%;
  bottom: 0;
  left: 0;
  right: 0;
  background: #008cd0;
  padding: 16px 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 0;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10;
  box-sizing: border-box;
}

/* Arrow notch at top of hover panel — slides up together with the panel */
.c-client-stories-grid__card-hover::before {
  content: '';
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-bottom: 14px solid #008cd0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.c-client-stories-grid__card:hover .c-client-stories-grid__card-hover::before {
  opacity: 1;
  visibility: visible;
}

.c-client-stories-grid__card:hover .c-client-stories-grid__card-hover {
  transform: translateY(0);
}

.c-client-stories-grid__hover-desc {
  color: #ffffff;
  font-size: 13px;
  line-height: 1.5;
  margin: 0 0 14px;
  font-weight: 400;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.c-client-stories-grid__hover-logo-pill {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 50px;
  padding: 6px 16px;
  display: inline-flex;
  align-items: center;
  min-width: 60px;
  height: 36px;
  margin-bottom: 12px;
  box-sizing: border-box;
  align-self: flex-start;
}

.c-client-stories-grid__hover-divider {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.35);
  margin: 0 0 10px;
}

.c-client-stories-grid__hover-author {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
}

.c-client-stories-grid__hover-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Person silhouette icon */
.c-client-stories-grid__hover-avatar::before {
  content: '';
  position: absolute;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: rgba(255,255,255,0.75);
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
}

.c-client-stories-grid__hover-avatar::after {
  content: '';
  position: absolute;
  width: 22px;
  height: 14px;
  border-radius: 11px 11px 0 0;
  background: rgba(255,255,255,0.75);
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
}

.c-client-stories-grid__hover-author-name {
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
}

/* Media/Image Area */
.c-client-stories-grid__card-media {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid #edf2f7;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s ease, padding 0.35s ease, border-color 0.35s ease;
  max-height: 200px;
}

.c-client-stories-grid__card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.c-client-stories-grid__card-media--logo {
  padding: 32px;
  box-sizing: border-box;
  background: #f8fafc;
}

.c-client-stories-grid__card-logo-svg {
  max-height: 52px;
  width: auto;
  max-width: 100%;
}

/* Body & Description */
.c-client-stories-grid__card-body {
  padding: 24px;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  flex: 1;
  text-align: left;
}

.c-client-stories-grid__card-title {
  font-size: 18px;
  font-weight: 700;
  color: #1a2744;
  margin: 0 0 6px;
  line-height: 1.35;
}

.c-client-stories-grid__card-subtitle {
  font-size: 13px;
  color: #718096;
  margin: 0 0 20px;
  font-weight: 500;
  line-height: 1.4;
  align-self: start;
}

.c-client-stories-grid__card-link {
  font-size: 14px;
  font-family: var(--font-family-mmc-bold);
  color: #008cd0;
  text-decoration: none;
  align-self: start;
  margin-bottom: 12px;
  line-height: 22px;
}

/* Metadata Footers */
.c-client-stories-grid__card-meta {
  margin-top: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-top: 1.5px solid #edf2f7;
  padding-top: 8px;
  min-height: 60px;
  box-sizing: border-box;
}

.c-client-stories-grid__meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #718096;
  font-weight: 500;
}

.c-client-stories-grid__meta-icon {
  font-size: 14px;
  flex-shrink: 0;
  color: #a0aec0;
}

.c-client-stories-grid__meta-text {
  line-height: 1.25;
}

/* ---- Trending Card Specific ---- */
.c-client-stories-grid__card--trending {
  background: transparent linear-gradient(146deg, #008cd0 0%, #00ac41 100%) 0%
    0% no-repeat padding-box;
  border: none;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 4px;
}

.c-client-stories-grid__trending-content {
  padding: 25px 20px;
  text-align: left;
}

.c-client-stories-grid__trending-title {
  font-size: 26px;
  color: #ffffff;
  margin: 0 0 12px;
  line-height: 28px;
  font-family: var(--font-family-mmc-bold);
}

.c-client-stories-grid__trending-subtitle {
  font-size: 14px;
  opacity: 0.92;
  color: #ffffff;
  line-height: 1.45;
}

.c-client-stories-grid__trending-visual {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  padding-top: 10px;
}

.c-client-stories-grid__trending-img {
  width: 85%;
  height: auto;
  display: block;
}

/* ---- Responsive Breakpoints ---- */
@media (max-width: 1024px) {
  .c-client-stories-grid__cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
}

@media (max-width: 768px) {
  .c-client-stories-grid__container {
    flex-direction: column;
    gap: 40px;
  }
  .c-client-stories-grid__sidebar {
    width: 100%;
    flex: none;
    gap: 28px;
  }
  .c-client-stories-grid__filter-section {
    padding-bottom: 20px;
  }
  .c-client-stories-grid__cards {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}
