/* ===================================================
   ICPalestina – "Conscious choice" pages (overview and one page per category)
   Sides are logical (inline-start/end), so the Arabic pages mirror without extra rules.
   =================================================== */

.cc-hero { padding-bottom: 4.5rem; }
.cc-hero-actions { position: relative; margin-top: 2rem; display: flex; justify-content: center; }

.cc-section { background: linear-gradient(180deg, var(--white), var(--cream)); }
.cc-section .section-header { max-width: 760px; margin-left: auto; margin-right: auto; }
.cc-label-green { color: var(--green-mid); }

/* Arrows and the "external" icon point the other way in Arabic */
html[dir="rtl"] .cc-flip { transform: scaleX(-1); }

/* Text for screen readers only (e.g. "opens in a new window") */
.cc-sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

.cc-section a:focus-visible, .cc-hero a:focus-visible {
  outline: 3px solid var(--gold); outline-offset: 3px;
}

/* ── Overview: one card per category ── */
.cc-topic-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.25rem;
  max-width: 900px; margin: 0 auto;
}
.cc-topic-card {
  display: flex; flex-direction: column; height: 100%; padding: 1.75rem;
  background: var(--white); border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 4px 18px var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.cc-topic-card:hover { transform: translateY(-3px); border-color: rgba(45,110,62,.35); box-shadow: 0 9px 28px var(--shadow); }
.cc-topic-icon {
  width: 48px; height: 48px; margin-bottom: 1rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--green-pale); color: var(--green); font-size: 1.1rem;
}
.cc-topic-card h3 { font-size: 1.35rem; margin-bottom: 0.5rem; }
.cc-topic-card p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.7; margin-bottom: 1.25rem; }
.cc-empty { text-align: center; color: var(--text-muted); }
.cc-topic-more {
  margin-top: auto; display: inline-flex; align-items: center; gap: 0.5rem;
  color: var(--green-mid); font-size: 0.85rem; font-weight: 600;
}

/* ── Category page: switch between the categories ── */
.cc-topics { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.55rem; margin: -1rem auto 3rem; }
.cc-topic-pill {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.55rem 1rem; border-radius: 999px;
  border: 1px solid var(--border); background: var(--white); color: var(--text-muted);
  font-size: 0.8rem; font-weight: 700;
  transition: border-color 0.2s, color 0.2s;
}
.cc-topic-pill:hover { border-color: var(--green); color: var(--green); }
.cc-topic-pill[aria-current="page"] { background: var(--green); border-color: var(--green); color: #fff; }

.cc-block { margin-bottom: 4.5rem; }
.cc-subheading { font-size: 1.2rem; margin: 2.5rem 0 1rem; text-align: center; }

/* ── Organization cards ── */
/* Rows of equally wide cards (--cc-columns per row); a row that is not full is centred, not left at one side */
.cc-grid, .cc-notes {
  --cc-gap: 1.25rem;
  display: flex; flex-wrap: wrap; justify-content: center; gap: var(--cc-gap);
}
.cc-grid { --cc-columns: 4; align-items: flex-start; }
.cc-notes { --cc-columns: 2; }
.cc-grid > *, .cc-notes > * {
  flex: 0 0 calc((100% - (var(--cc-columns) - 1) * var(--cc-gap)) / var(--cc-columns));
  min-width: 0;
}
.cc-card {
  --cc-accent: var(--red-mid);
  --cc-status-bg: var(--red-pale);
  --cc-status-fg: var(--red);
  display: flex; flex-direction: column; gap: 1rem;
  padding: 1.4rem 1.4rem 1.5rem;
  background: var(--white); border: 1px solid var(--border); border-top: 4px solid var(--cc-accent);
  border-radius: 8px; box-shadow: 0 4px 18px var(--shadow);
}
.cc-card--alternative { --cc-accent: var(--green-mid); --cc-status-bg: var(--green-pale); --cc-status-fg: var(--green); }
.cc-card--comparison  { --cc-accent: var(--gold); --cc-status-bg: #f6ecd8; --cc-status-fg: #6f5215; }

.cc-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem; }
.cc-card-head h3 { font-size: 1.3rem; overflow-wrap: anywhere; }
.cc-status {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.25rem 0.65rem; border-radius: 999px;
  background: var(--cc-status-bg); color: var(--cc-status-fg);
  font-size: 0.72rem; font-weight: 700; white-space: nowrap;
}

.cc-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.cc-tags li {
  padding: 0.18rem 0.6rem; border-radius: 999px;
  font-size: 0.7rem; font-weight: 700;
  color: var(--text-body); background: var(--cream); border: 1px solid var(--border);
}

.cc-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 0.6rem; }
.cc-stat { padding: 0.65rem 0.8rem; background: var(--cream); border-radius: 6px; }
.cc-stat dt {
  font-size: 0.66rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-muted);
}
body.lang-ar .cc-stat dt { letter-spacing: 0; }
.cc-stat dd { color: var(--text-dark); font-weight: 600; font-size: 0.95rem; line-height: 1.45; }
.cc-stat-value { font-family: 'Playfair Display', Georgia, serif; font-size: 1.35rem; font-weight: 700; }
.cc-card--concern .cc-stat-value { color: var(--red); }
.cc-stat-hint { display: block; font-size: 0.72rem; font-weight: 400; color: var(--text-muted); }

.cc-card-text { color: var(--text-muted); font-size: 0.88rem; line-height: 1.7; }

.cc-facts { display: flex; flex-direction: column; }
.cc-facts li {
  padding: 0.8rem 0; border-top: 1px solid var(--border);
  font-size: 0.86rem; line-height: 1.7; color: var(--text-body);
}
.cc-facts li:first-child { border-top: none; padding-top: 0; }
.cc-figure {
  display: block; margin-bottom: 0.15rem;
  font-family: 'Playfair Display', Georgia, serif; font-size: 1.35rem; line-height: 1.3;
  color: var(--red);
}

.cc-brands { padding-top: 0.85rem; border-top: 1px dashed var(--border); }
.cc-brands-label {
  display: block; margin-bottom: 0.4rem;
  font-size: 0.66rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted);
}
body.lang-ar .cc-brands-label { letter-spacing: 0; }
.cc-brands ul { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.cc-brands li {
  padding: 0.15rem 0.55rem; border-radius: 4px;
  font-size: 0.74rem; color: var(--text-body); background: var(--white); border: 1px solid var(--border);
}

/* A remark of KiesZuiver about all alternatives (e.g. no insurer is completely "clean") */
.cc-callout {
  display: flex; align-items: flex-start; gap: 0.85rem;
  max-width: 860px; margin: 0 auto 2rem; padding: 1.1rem 1.3rem;
  background: #fbf3e2; border: 1px solid #e6d2a6; border-inline-start: 4px solid var(--gold);
  border-radius: 6px; color: var(--text-dark); font-size: 0.92rem; line-height: 1.7;
}
.cc-callout i { color: var(--gold); font-size: 1.1rem; margin-top: 0.25rem; }

/* ── Background and practical information ── */
.cc-note {
  display: flex; align-items: flex-start; gap: 1rem; padding: 1.5rem;
  background: var(--white); border: 1px solid var(--border); border-radius: 8px;
}
.cc-note-icon {
  flex-shrink: 0; width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--green-pale); color: var(--green);
}
.cc-note h3 { font-size: 1.1rem; margin-bottom: 0.4rem; }
.cc-note p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.75; }

/* ── Source: where the information comes from ── */
.cc-source {
  display: flex; align-items: flex-start; gap: 1.5rem;
  max-width: 960px; margin: 0 auto; padding: 2.25rem 2.5rem;
  background: var(--black); border-radius: 8px; border-bottom: 3px solid var(--red-mid);
  color: rgba(255,255,255,0.72);
}
.cc-source-mark {
  flex-shrink: 0; width: 54px; height: 54px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(212,168,75,0.45); border-radius: 50%;
  color: var(--gold-light); background: rgba(212,168,75,0.06);
}
.cc-source .section-label { color: var(--gold-light); }
.cc-source h2 { color: var(--white); font-size: clamp(1.35rem, 2.5vw, 1.75rem); margin-bottom: 0.75rem; }
.cc-source p { font-size: 0.93rem; line-height: 1.75; margin-bottom: 1.5rem; max-width: 640px; }

/* ── Fewer cards per row on smaller screens ── */
@media (max-width: 1299px) { .cc-grid { --cc-columns: 3; } }
@media (max-width: 959px)  { .cc-grid { --cc-columns: 2; } }
@media (max-width: 640px)  { .cc-grid { --cc-columns: 1; } }

/* ── Tablet and phone ── */
@media (max-width: 768px) {
  .cc-notes { --cc-columns: 1; }
  .cc-section { padding-left: 1rem; padding-right: 1rem; }
  .cc-block { margin-bottom: 3.5rem; }
  .cc-topics { margin-top: -0.5rem; }
  .cc-source { flex-direction: column; padding: 1.75rem 1.4rem; }
}
@media (max-width: 560px) {
  .cc-topic-grid { grid-template-columns: minmax(0, 1fr); }
  .cc-note { flex-direction: column; }
  .cc-card { padding: 1.2rem; }
  .cc-card-head { flex-direction: column; gap: 0.5rem; }
  .cc-hero-actions .btn-primary, .cc-source .btn-primary { width: 100%; justify-content: center; text-align: center; }
}
