/* =============================================================
   mc-cycle — reusable accent cycle
   ============================================================= */
.mc-cycle>*:nth-child(5n+1) {
  --mc-accent: var(--mc-1);
  --mc-accent-bg: var(--mc-1-bg);
}

.mc-cycle>*:nth-child(5n+2) {
  --mc-accent: var(--mc-2);
  --mc-accent-bg: var(--mc-2-bg);
}

.mc-cycle>*:nth-child(5n+3) {
  --mc-accent: var(--mc-3);
  --mc-accent-bg: var(--mc-3-bg);
}

.mc-cycle>*:nth-child(5n+4) {
  --mc-accent: var(--mc-4);
  --mc-accent-bg: var(--mc-4-bg);
}

.mc-cycle>*:nth-child(5n+5) {
  --mc-accent: var(--mc-5);
  --mc-accent-bg: var(--mc-5-bg);
}


/* =============================================================
   Shared — icon box
   ============================================================= */
.icon-box {
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon-box img {
  object-fit: contain;
  display: block;
}

/* Large — used in wwd-card */
.icon-box--lg {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  margin-bottom: 1.25rem;
}

.icon-box--lg img {
  width: 28px;
  height: 28px;
}

/* Medium — used in icon-list-item rows */
.icon-box--md {
  width: 42px;
  height: 42px;
  min-width: 42px;
}

.icon-box--md img {
  width: 24px;
  height: 24px;
}

/* Auto color via mc-cycle parent */
.mc-cycle .icon-box--md {
  background: var(--mc-accent-bg);
}

/* Manual wwd-card nth-child colors (no mc-cycle parent available) */
.wwd-card:nth-child(5n+1) .icon-box--lg {
  background: var(--mc-1-bg);
}

.wwd-card:nth-child(5n+2) .icon-box--lg {
  background: var(--mc-2-bg);
}

.wwd-card:nth-child(5n+3) .icon-box--lg {
  background: var(--mc-3-bg);
}

.wwd-card:nth-child(5n+4) .icon-box--lg {
  background: var(--mc-4-bg);
}

.wwd-card:nth-child(5n+5) .icon-box--lg {
  background: var(--mc-5-bg);
}


/* =============================================================
   Shared — icon list item row
   ============================================================= */
.icon-list-item {
  display: flex;
  align-items: center;
  gap: 14px;
  border-radius: 10px;
  padding: 0.9rem 1.25rem;
  margin-bottom: 0.75rem;
}

.icon-list-item:last-child {
  margin-bottom: 0;
}

/* Filled grey bg — used in Who Can Join */
.icon-list-item--filled {
  background: #F9FAFB;
}

/* Outlined white — used in Children at the Centre */
.icon-list-item--outlined {
  background: #fff;
  border: 1px solid #ebebeb;
}


/* =============================================================
   What We Do — section
   ============================================================= */

/* Subtitle above grid */
.views-field-field-what-we-do-subtitle .field-content,
.ecpn-section-subtitle {
  font-size: 18px;
  font-weight: 400;
  line-height: 1.6;
  color: #555;
  text-align: center;
  max-width: 750px;
  margin: 0 auto 2.5rem;
}

/* Grid */
.views-field-field-what-we-do .field-content {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  justify-content: center;
}

.views-field-field-what-we-do .field-content>.paragraph,
.views-field-field-what-we-do .field-content>.wwd-card {
  flex: 0 0 calc(33.333% - 0.84rem);
  max-width: calc(33.333% - 0.84rem);
  display: flex;
  box-sizing: border-box;
}


/* =============================================================
   What We Do — card
   ============================================================= */
.wwd-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 330px;
  background: linear-gradient(135deg, #FFFFFF 0%, #F9FAFB 100%);
  border: 0.5px solid rgba(0, 0, 0, 0.1);
  border-radius: 16px;
  padding: 1.5rem;
  box-sizing: border-box;
  text-align: left;
  box-shadow: 0px 2px 4px -2px #0000001A;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.wwd-card:hover {
  box-shadow: 0px 4px 6px -1px #0000001A;
  transform: translateY(-2px);
}

.wwd-card-title {
  font-weight: 700;
  font-size: 18px;
  line-height: 1.3;
  margin: 0 0 0.5rem 0;
}

.wwd-card-title div {
  display: inline;
}

.wwd-card-desc {
  font-weight: 400;
  font-size: 16px;
  color: #364153;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.wwd-card-desc div {
  display: inline;
}


/* =============================================================
   Who Can Join
   ============================================================= */
#block-icpn-drupal-theme-whocanjoin {
  background: #F7F7F7;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  padding-left: calc(50vw - 50%);
  padding-right: calc(50vw - 50%);
  padding: 60px 0;
}

.wcj-section {
  max-width: 850px;
  margin: 0 auto;
  text-align: center;
}

.wcj-card {
  background: #FFFFFF;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.07);
  text-align: left;
}


.wcj-text,
.board-commit-text {
  font-size: 18px;
  color: #333;
  line-height: 1.5;
}


/* =============================================================
   Children at the Centre
   ============================================================= */
.childrens-board-section .text-center {
  margin-bottom: 2.5rem;
}


.board-image-box {
  border-radius: 16px;
  overflow: hidden;
  height: 100%;
}

.board-image-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
  display: block;
}

.board-content .board-title,
.wcj-label {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

.board-commit-text {
  font-weight: 700;
}

.board-footer-text {
  font-size: 18px;
  color: #555;
  line-height: 1.7;
  margin-top: 1.25rem;
  margin-bottom: 0;
}


/* =============================================================
   Shared icon list (hero bullets)
   ============================================================= */
ul.icon-list,
.hero-body ul {
  list-style: none;
  padding-left: 0;
  margin-top: 0.5rem;
}

ul.icon-list li,
.hero-body ul li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 0.75rem;
  font-size: 15px;
  line-height: 1.75;
  color: #222;
}

.hero-body ul li::before {
  content: '';
  display: inline-block;
  width: 22px;
  height: 22px;
  min-width: 22px;
  margin-top: 3px;
  flex-shrink: 0;
  background-image: url('/themes/custom/icpn_drupal_theme/assets/img/ecpn-icon.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

#block-icpn-drupal-theme-views-block-children-at-the-centre-block-1 {
  margin-bottom: 0;
  padding-bottom: 0;
}


/* =============================================================
   Responsive
   ============================================================= */
@media (max-width: 992px) {

  .views-field-field-what-we-do .field-content>.paragraph,
  .views-field-field-what-we-do .field-content>.wwd-card {
    flex: 0 0 calc(50% - 0.625rem);
    max-width: calc(50% - 0.625rem);
  }
}

@media (max-width: 576px) {

  .views-field-field-what-we-do .field-content>.paragraph,
  .views-field-field-what-we-do .field-content>.wwd-card {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .who-join-card {
    padding: 1.5rem 1.25rem;
  }

  .board-image-box {
    margin-bottom: 1.5rem;
  }
}
