.funds-hero {
  position: relative;
  background: var(--color-off-gold);
  overflow: hidden;
  padding-block: clamp(var(--space-12), 6vw, var(--space-20));
}

.funds-hero__inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(var(--space-8), 5vw, var(--space-16));
  align-items: center;
}

.funds-hero__heading {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.8vw, 3.2rem);
  font-weight: var(--fw-semibold);
  line-height: 1.12;
  letter-spacing: var(--tracking-tight);
  color: var(--color-cypress-darker);
  margin-bottom: var(--space-5);
}

.funds-hero__heading em {
  display: block;
  font-weight: var(--fw-light);
  font-style: italic;
  color: var(--color-gold-brown);
}

.funds-hero__body {
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--color-charcoal-mid);
  max-width: 52ch;
  margin-bottom: var(--space-8);
}

.funds-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  align-items: center;
}

/* ── 2. HERO STATS GRID ─────────────────────────────────────── */
.funds-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  min-width: 300px;
}

.fund-stat-pill {
  background: var(--color-white);
  border: 1px solid var(--color-off-gold-dark);
  border-radius: var(--radius-xl);
  padding: var(--space-5) var(--space-6);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-1);
  transition: var(--transition-base);
  position: relative;
  overflow: hidden;
}

.fund-stat-pill:hover {
  transform: translateY(-3px);
  border-color: var(--border-color-gold);
  box-shadow: var(--shadow-gold);
}

.fund-stat-pill__value {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2vw, 1.563rem);
  font-weight: var(--fw-semibold);
  color: var(--color-cypress);
  line-height: 1.1;
}

.fund-stat-pill__label {
  font-size: 0.75rem;
  font-weight: var(--fw-medium);
  letter-spacing: var(--tracking-normal);
  color: var(--color-charcoal-mid);
  text-transform: none;
  line-height: 1.4;
}

/* ── 3. INVESTMENT GOALS ────────────────────────────────────── */
.section-goals {
  background: var(--color-white);
  padding-block: clamp(var(--space-12), 5vw, var(--space-20));
  border-bottom: 1px solid var(--border-color);
}

.section-goals__heading {
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(var(--text-xl), 2.8vw, var(--text-2xl));
  font-weight: var(--fw-regular);
  color: var(--color-cypress);
  line-height: 1.2;
}

.section-goals__heading em {
  color: var(--color-gcib-gold);
  font-style: italic;
  font-weight: var(--fw-light);
}

.goals-grid {
  display: flex;
  justify-content: center;
  gap: clamp(var(--space-4), 3vw, var(--space-6));
  flex-wrap: wrap;
  margin-top: var(--space-10);
}

.goal-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-5);
  background: var(--color-off-gold);
  border: 1px solid var(--color-off-gold-dark);
  border-radius: var(--radius-xl);
  width: 140px;
  aspect-ratio: 1 / 1;
  cursor: default;
  transition:
    transform 0.3s ease-out,
    box-shadow 0.3s ease-out,
    border-color 0.3s ease-out;
}

.goal-item:hover {
  background: var(--color-grey-subtle);
  border-color: var(--color-grey-light);
}

.goal-item__icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.goal-item__icon img,
.goal-item__icon svg {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.goal-item__label {
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
  color: var(--color-cypress-darker);
  text-align: center;
  line-height: 1.3;
}

/* ── 4. FUND TABS ───────────────────────────────────────────── */
.section-fund-detail {
  background: var(--color-white);
}

.fund-tabs-nav {
  display: flex;
  border-bottom: 1px solid var(--color-grey-light);
  background: var(--color-white);
  position: sticky;
  top: var(--header-height);
  z-index: var(--z-raised);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.fund-tab-btn {
  flex: 1;
  padding: var(--space-5) var(--space-6);
  font-family: var(--font-display);
  font-size: clamp(0.78rem, 1.6vw, var(--text-base));
  font-weight: var(--fw-semibold);
  color: var(--color-cypress);
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: var(--transition-base);
  letter-spacing: var(--tracking-tight);
  text-align: center;
  position: relative;
}

.fund-tab-btn:hover {
  color: var(--color-white);
  background: var(--color-gcib-gold-light);
}

.fund-tab-btn.is-active {
  color: var(--color-gcib-gold-dark);
  font-weight: var(--fw-black);
  border-bottom-color: transparent;
  background: rgba(0, 70, 67, 0.03);
}

.fund-tab-btn.is-active::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-gold);
  border-radius: var(--radius-pill) var(--radius-pill) 0 0;
}

.fund-tab-panel {
  display: none;
  padding-block: clamp(var(--space-10), 5vw, var(--space-16));
}

.fund-tab-panel.is-active {
  display: block;
  animation: tabFadeIn 0.35s var(--ease-out) both;
}

@keyframes tabFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── 5. FUND CONTENT GRID ───────────────────────────────────── */
.fund-content-grid {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: clamp(var(--space-8), 4vw, var(--space-12));
  align-items: start;
}

/* ── 6. FUND LEFT PANEL TEXT ────────────────────────────────── */
.fund-section-label {
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: var(--fw-semibold);
  color: var(--color-gold-brown);
  margin-bottom: var(--space-2);
  margin-top: var(--space-2);
}

.fund-section-label:first-child {
  margin-top: 0;
}

.fund-body-text {
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--color-charcoal-mid);
  max-width: 80ch;
}

/* ── 7. FUND DETAILS TABLE ──────────────────────────────────── */
.fund-details-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: var(--space-4);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.fund-details-table thead tr {
  background: var(--color-cypress);
}

.fund-details-table thead th {
  padding: var(--space-3) var(--space-5);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--fw-bold);
  letter-spacing: var(--tracking-wider);
  color: var(--color-white);
  text-align: left;
  text-transform: uppercase;
}

.fund-details-table tbody tr {
  border-bottom: 1px solid var(--color-off-gold-dark);
  transition: background var(--duration-fast) var(--ease-in-out);
}

.fund-details-table tbody tr:nth-child(even) {
  background: var(--color-off-gold);
}

.fund-details-table tbody tr:last-child {
  border-bottom: none;
}

.fund-details-table tbody tr:hover {
  background: var(--color-cypress-subtle);
}

.fund-details-table td {
  padding: var(--space-3) var(--space-5);
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  vertical-align: middle;
}

.fund-details-table td:first-child {
  color: var(--color-charcoal-mid);
  font-weight: var(--fw-regular);
  width: 46%;
}

.fund-details-table td:last-child {
  color: var(--color-charcoal);
  font-weight: var(--fw-medium);
}

/* ── 8. INVESTMENT DETAILS TABLE ────────────────────────────── */
.investment-details-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: var(--space-4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  background: var(--color-white);
}

.investment-details-table thead tr {
  background: var(--color-cypress);
}

.investment-details-table thead th {
  padding: var(--space-4) var(--space-6);
  font-family: var(--font-display);
  font-size: clamp(var(--text-sm), 1.8vw, var(--text-base));
  font-weight: var(--fw-semibold);
  color: var(--color-white);
  text-align: left;
  width: 50%;
  border: none;
}

.investment-details-table td {
  padding: var(--space-6);
  vertical-align: top;
  border: none;
  width: 50%;
}

.investment-details-table td ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.investment-details-table td ul li {
  position: relative;
  padding-left: var(--space-5);
  font-family: var(--font-display);
  font-size: clamp(var(--text-sm), 1.6vw, var(--text-sm));
  color: var(--color-cypress);
  line-height: var(--leading-relaxed);
}

.investment-details-table td ul li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--color-cypress);
  font-size: 1.25em;
  line-height: 1;
  top: -0.1em;
}

/* ── 9. FUND DISCLAIMER ─────────────────────────────────────── */
.fund-disclaimer {
  margin-top: var(--space-6);
  padding: var(--space-4) var(--space-5);
  background: var(--color-cypress-subtle);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.fund-disclaimer p {
  font-size: var(--text-xs);
  color: var(--color-grey-dark);
  line-height: var(--leading-relaxed);
  max-width: none;
  font-style: italic;
}

/* ── 10. RIGHT PANEL CARDS ──────────────────────────────────── */
.allocation-card {
  background: var(--color-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  box-shadow: var(--shadow-md);
}

.allocation-card__title {
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: var(--fw-semibold);
  color: var(--color-cypress-darker);
  text-align: center;
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border-color);
}

/* Chart wrapper — fixed height for canvas */
.allocation-chart-wrap {
  position: relative;
  height: 220px;
  margin-bottom: var(--space-5);
}

.allocation-legend {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  background: var(--color-off-gold);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-5);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-charcoal-mid);
}

.legend-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.08);
}

.legend-pct {
  margin-left: auto;
  font-weight: var(--fw-bold);
  color: var(--color-charcoal);
  font-size: var(--text-sm);
}

/* ── 11. PERFORMANCE SECTION ────────────────────────────────── */
.fund-yields-title {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: var(--fw-semibold);
  color: var(--color-cypress-darker);
  text-align: center;
  margin-bottom: var(--space-3);
}

.performance-banner {
  background: var(--color-cypress);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  padding: var(--space-3) var(--space-5);
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
  color: var(--color-white);
  letter-spacing: var(--tracking-wide);
  text-align: center;
}

.performance-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-4) var(--space-5);
  font-size: var(--text-sm);
  color: var(--color-charcoal-mid);
  border: 1px solid var(--border-color);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  background: var(--color-white);
}

.performance-row__value {
  font-weight: var(--fw-bold);
  color: var(--color-cypress);
  font-size: var(--text-md);
  font-family: var(--font-display);
}

/* ── 12. FUNDING OPTIONS CARD ───────────────────────────────── */
.funding-card {
  background: var(--color-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  box-shadow: var(--shadow-md);
  margin-top: var(--space-5);
}

.funding-card__title {
  font-family: var(--font-display);
  text-align: center;
  font-size: var(--text-base);
  font-weight: var(--fw-semibold);
  color: var(--color-cypress);
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border-color);
}

.funding-section-label {
  font-size: var(--text-md);
  font-weight: var(--fw-bold);
  color: var(--color-gold-brown);
  text-transform: uppercase;
}

.funding-section-label:first-of-type {
  margin-top: 0;
}

.funding-row {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--border-color);
  font-size: var(--text-sm);
}

.funding-row:last-of-type {
  border-bottom: none;
}

.funding-row__key {
  color: var(--color-charcoal-mid);
  min-width: 88px;
  flex-shrink: 0;
  font-weight: var(--fw-regular);
}

.funding-row__val {
  font-weight: var(--fw-bold);
  color: var(--color-charcoal);
  word-break: break-all;
}

/* Additional funding info box */
.funding-info {
  margin-top: var(--space-5);
  padding: var(--space-4) var(--space-5);
  background: var(--color-off-gold);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-off-gold-dark);
}

.funding-info__label {
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-gold-brown);
  margin-bottom: var(--space-3);
}

.funding-info ol {
  padding-left: var(--space-5);
  list-style: decimal;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.funding-info ol li {
  font-size: var(--text-xs);
  color: var(--color-charcoal-mid);
  line-height: var(--leading-relaxed);
}

.funding-info ol li strong {
  color: var(--color-charcoal);
  font-weight: var(--fw-semibold);
}

/* CTA buttons inside funding card */
.funding-actions {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.funding-actions .btn {
  flex: 1;
  justify-content: center;
  font-size: var(--text-xs);
}

/* ── 13. PROHIBITED ITEMS / HALAL SECTION ───────────────────── */
.section-halal {
  background: var(--color-off-gold);
  padding-block: clamp(var(--space-12), 5vw, var(--space-20));
}

.section-halal__header {
  text-align: center;
  margin-bottom: var(--space-12);
}

.section-label a.overline {
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-in-out);
}

.section-label a.overline:hover {
  color: var(--color-cypress);
}

.section-halal__heading {
  font-family: var(--font-display);
  font-size: clamp(var(--text-xl), 2.6vw, var(--text-2xl));
  font-weight: var(--fw-regular);
  color: var(--color-cypress);
  line-height: 1.25;
}

.section-halal__heading em {
  font-style: italic;
  font-weight: var(--fw-light);
  color: var(--color-gcib-gold);
}

.prohibited-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--space-5);
}

.prohibited-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-6) var(--space-4);
  background: var(--color-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  text-align: center;
  transition: var(--transition-base);
}

.prohibited-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
  border-color: var(--color-gold-brown-light);
}

.prohibited-item__icon {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.prohibited-item__icon img {
  width: 60px;
  height: 60px;
  object-fit: contain;
}

.prohibited-item__label {
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
  color: var(--color-cypress-darker);
  line-height: 1.3;
}

.halal-disclaimer {
  text-align: center;
  margin-top: var(--space-8);
}

.halal-disclaimer p {
  font-size: var(--text-xs);
  color: var(--color-charcoal-mid);
  max-width: 80ch;
  margin-inline: auto;
  line-height: var(--leading-relaxed);
  white-space: nowrap;
}

/* ── 14. FUNDS FAQ BANNER ───────────────────────────────────── */
.funds-faq-banner {
  position: relative;
  background: var(--color-cypress-dark);
  padding-block: var(--space-6);
  width: min(1200px, calc(100% - var(--space-8)));
  margin: var(--space-12) auto 0 auto;
  border-radius: 24px;
  overflow: hidden;
}

.funds-faq-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("/src/Branding/Green Pattern.png");
  background-size: 320px;
  background-repeat: repeat;
  opacity: 1;
  z-index: 0;
}

.funds-faq-banner__inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-8);
  padding-inline: var(--space-10);
  flex-wrap: wrap;
}

.funds-faq-banner__text {
  font-family: var(--font-display);
  font-size: clamp(var(--text-base), 2vw, var(--text-md));
  font-style: italic;
  font-weight: var(--fw-light);
  color: var(--color-white);
  line-height: var(--leading-relaxed);
  max-width: 60ch;
  text-align: left;
}

.funds-faq-banner__text strong {
  color: var(--color-gcib-gold);
  font-style: normal;
  font-weight: var(--fw-semibold);
}

@media (max-width: 900px) {
  .funds-faq-banner__inner {
    flex-direction: column;
    text-align: center;
    align-items: center;
    padding-inline: var(--space-6);
    gap: var(--space-6);
  }

  .funds-faq-banner__text {
    text-align: center;
  }
}

/* ── 15. RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 1100px) {
  .fund-content-grid {
    grid-template-columns: 1fr;
  }
  .prohibited-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 1024px) {
  .halal-disclaimer p {
    white-space: normal;
  }
}

@media (max-width: 900px) {
  .funds-hero__inner {
    grid-template-columns: 1fr;
  }
  .funds-stats-grid {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 768px) {
  .fund-tab-btn {
    font-size: var(--text-xs);
    padding: var(--space-4) var(--space-3);
    letter-spacing: 0;
  }
  .ssb-compliance__inner {
    flex-direction: column;
    text-align: center;
  }
  .prohibited-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-3);
  }
  .funding-actions {
    flex-direction: column;
  }
  .goals-grid {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    padding-inline: var(--space-4);
    padding-bottom: var(--space-4);
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }
  .goals-grid::-webkit-scrollbar {
    height: 5px;
  }
  .goals-grid::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.03);
    border-radius: var(--radius-pill);
  }
  .goals-grid::-webkit-scrollbar-thumb {
    background: var(--color-gold-brown-light);
    border-radius: var(--radius-pill);
  }
  .goal-item {
    flex: 0 0 120px;
    width: 120px;
    aspect-ratio: 1 / 1;
    scroll-snap-align: start;
  }
}

@media (max-width: 540px) {
  .prohibited-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .funds-stats-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ── 17. REDIRECT SPLASH SCREEN ────────────────────────────── */
body.redirect-body {
  margin: 0;
  padding: 0;
  font-family: "Chronicle Display", Georgia, "Times New Roman", serif;
  background-color: var(--color-cypress-muted);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  transition: opacity 0.25s ease-in-out;
}
