/*
 * Britam Multi-Asset Special Fund campaign page (mod_special_funds)
 * Namespaced under .mafund-* so it cannot collide with the
 * Global Equity page styles (specialfund.css / .specialfund-*).
 * Loaded by the multi-asset layout only.
 */


/* Fund highlights: metric cards */
/* Mobile: 2 metrics per row */
.mafund-highlights-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  margin-top: 2rem;
}
.mafund-metric {
  padding: 1.25rem 0.85rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  outline: none;
}
.mafund-metric:nth-child(odd) {
  border-right: 1px solid rgba(226, 232, 240, 0.9);
}
.mafund-metric:nth-child(n+3) {
  border-bottom: none;
}
.mafund-metric .mafund-stat-value {
  font-size: clamp(1.7rem, 6vw, 2.2rem);
}
.mafund-metric .mafund-stat-value--text {
  font-size: clamp(1.15rem, 4.5vw, 1.6rem);
}
@media (min-width: 768px) {
  .mafund-metric {
    padding: 1.5rem 1rem;
  }
  .mafund-metric .mafund-stat-value {
    font-size: clamp(2.5rem, 4vw, 3.4rem);
  }
  .mafund-metric .mafund-stat-value--text {
    font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  }
}
@media (min-width: 992px) {
  .mafund-highlights-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .mafund-metric {
    border-bottom: none;
    border-right: none;
    border-left: 1px solid rgba(226, 232, 240, 0.9);
    padding: 1rem 2rem;
  }
  .mafund-metric:first-child {
    border-left: none;
  }
}
.mafund-metric-value {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 1rem;
  position: relative;
  width: 100%;
  justify-content: center;
}
.mafund-stat-value {
  font-size: clamp(2.5rem, 4vw, 3.4rem);
  font-weight: 800;
  color: #0077be;
  letter-spacing: -0.02em;
  line-height: 1;
}
.mafund-stat-value--text {
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
}
.mafund-metric-info {
  display: inline-flex;
  color: #94a3b8;
  opacity: 0.7;
  align-self: flex-start;
  margin-top: 0.35rem;
  transition: opacity 0.2s, color 0.2s;
  cursor: help;
}
.mafund-metric:hover .mafund-metric-info,
.mafund-metric:focus .mafund-metric-info,
.mafund-metric:focus-within .mafund-metric-info {
  opacity: 1;
  color: #2563eb;
}
.mafund-metric-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: 240px;
  background: #0f172a;
  color: #e2e8f0;
  font-size: 0.72rem;
  line-height: 1.5;
  padding: 0.65rem 1rem;
  border-radius: 8px;
  box-shadow: 0 20px 25px -5px rgba(15, 23, 42, 0.2);
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  z-index: 30;
  pointer-events: none;
}
.mafund-metric:hover .mafund-metric-tooltip,
.mafund-metric:focus .mafund-metric-tooltip,
.mafund-metric:focus-within .mafund-metric-tooltip {
  opacity: 1;
  visibility: visible;
}
.mafund-metric-tooltip strong {
  color: #fff;
  font-weight: 600;
  display: block;
  margin-bottom: 2px;
}
.mafund-metric-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 4px;
  line-height: 1.3;
  width: 100%;
}
.mafund-metric-caption {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #64748b;
  margin: 0;
}
.mafund-highlights-footer {
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(226, 232, 240, 0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.72rem;
  color: #475569;
}
@media (min-width: 768px) {
  .mafund-highlights-footer {
    flex-direction: row;
  }
}

/* Card grids */
.mafund-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 2rem;
}
@media (min-width: 768px) {
  .mafund-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .mafund-grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 992px) {
  .mafund-grid-4 { grid-template-columns: repeat(4, 1fr); }
  .mafund-grid-3 { grid-template-columns: repeat(3, 1fr); }
}
.mafund-card {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  padding: 1.75rem 1.5rem;
  height: 100%;
  text-align: left;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.mafund-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}
.mafund-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: #222;
}
.mafund-card-text {
  font-size: 0.95rem;
  color: #555;
  line-height: 1.6;
  margin: 0;
}
.mafund-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #eef4fb;
  color: #0077be;
  font-size: 1.05rem;
  margin-bottom: 1.25rem;
}

/* "What sets the fund apart": tinted cards with accent dash */
.mafund-apart .mafund-card {
  border: 2px solid rgba(112, 181, 255, 0.2);
  background: rgba(112, 181, 255, 0.2);
}
.mafund-apart .mafund-dash {
  display: block;
  width: 44px;
  height: 4px;
  border-radius: 2px;
  background: #0077be;
  margin-bottom: 1.25rem;
}
.mafund-apart .mafund-card-icon {
  background: #fff;
}

/* "Why this fund": image-background cards with icon chip */
.mafund-benefit-card {
  background-size: auto;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  overflow: hidden;
}
.mafund-benefit-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.86) 100%);
}
.mafund-benefit-card > * {
  position: relative;
  z-index: 1;
}
.mafund-benefits .mafund-card-top {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.25rem;
}
.mafund-benefits .mafund-card-icon {
  width: 34px;
  height: 34px;
  font-size: 0.85rem;
  margin-bottom: 0;
}

/* CTA band */
.mafund-cta-band {
  background: #0077be;
  border-radius: 16px;
  padding: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.mafund-cta-band-text h3 {
  color: #fff;
  font-size: 1.9rem;
  font-weight: 700;
  margin: 0.75rem 0 0.5rem;
}
.mafund-cta-band-text p {
  color: rgba(255,255,255,0.85);
  margin: 0;
  max-width: 560px;
}
.mafund-cta-badge {
  display: inline-block;
  background: rgba(255,255,255,0.18);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
}
.mafund-cta-band-button {
  background: #fff;
  color: #333;
  border-radius: 10px;
  padding: 0.9rem 1.75rem;
  font-weight: 600;
  white-space: nowrap;
}
.mafund-cta-band-button:hover {
  background: #f2f6fa;
  color: #0077be;
}
@media (max-width: 767px) {
  .mafund-cta-band { padding: 1.75rem 1.5rem; }
  .mafund-cta-band-text h3 { font-size: 1.5rem; }
}

/* FAQ section (media card + scrollable accordion with pill scrollbar) */
.mafund-faq-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 2.5rem;
  align-items: start;
  text-align: left;
}
@media (min-width: 992px) {
  .mafund-faq-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    align-items: stretch;
  }
  /* Image on the left, FAQs on the right (DOM order kept for mobile stacking) */
  .mafund-faq-media {
    grid-column: 1;
    grid-row: 1;
  }
  /* Image defines the row height; FAQ wrap matches it and scrolls inside */
  .mafund-faq-media .mafund-faq-media-card {
    height: 640px;
    width: 100%;
  }
  .mafund-faq-wrap {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    height: 640px;
  }
  .mafund-faq-wrap .mafund-faq-scroll {
    flex: 1;
    max-height: none;
  }
}
.mafund-faq-media-card {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(15, 41, 66, 0.18);
  border: 1px solid rgba(0,0,0,0.06);
}
@media (min-width: 992px) {
  .mafund-faq-media-card {
    position: sticky;
    top: 2rem;
    aspect-ratio: 4 / 5;
  }
}
.mafund-faq-media-card img {
  width: 100%;
  height: auto;
  max-height: 320px;
  object-fit: cover;
  display: block;
}
@media (min-width: 992px) {
  .mafund-faq-media-card img { height: 100%; max-height: none; }
}
.mafund-faq-media-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15,41,66,0.75), transparent 55%);
  pointer-events: none;
}
.mafund-faq-badge {
  position: absolute;
  left: 1.25rem;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  border-radius: 16px;
  padding: 0.9rem 1.1rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.mafund-faq-badge-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #eef4fb;
  color: #0077be;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}
.mafund-faq-badge-text h4 {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 700;
  color: #0f2942;
}
.mafund-faq-badge-text p {
  margin: 0;
  font-size: 0.75rem;
  color: #64748b;
}
.mafund-faq-wrap {
  position: relative;
  padding-right: 1.5rem;
}
.mafund-faq-scroll {
  max-height: 560px;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-behavior: smooth;
}
.mafund-faq-scroll::-webkit-scrollbar { display: none; }
.mafund-faq-stack {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.ma-faq-item {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 24px;
  transition: all 0.3s ease;
}
.ma-faq-item:hover { border-color: #cbd5e1; }
.ma-faq-item.active {
  background: #0077be;
  border-color: #0077be;
  box-shadow: 0 10px 28px rgba(0,119,190,0.25);
}
.ma-faq-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}
.ma-faq-title {
  font-size: 1rem;
  font-weight: 600;
  color: #0f2942;
  transition: color 0.3s ease;
}
.ma-faq-item.active .ma-faq-title { color: #fff; }
.ma-faq-chevron {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #f1f5f9;
  color: #475569;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  transition: all 0.3s ease;
}
.ma-faq-item.active .ma-faq-chevron {
  background: rgba(255,255,255,0.2);
  color: #fff;
  transform: rotate(180deg);
}
.ma-faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.ma-faq-item.active .ma-faq-answer { grid-template-rows: 1fr; }
.ma-faq-answer-inner {
  overflow: hidden;
  padding: 0 1.5rem;
  font-size: 0.92rem;
  line-height: 1.65;
  color: #64748b;
}
.ma-faq-item.active .ma-faq-answer-inner {
  color: rgba(255,255,255,0.92);
  padding-bottom: 1.25rem;
}
.mafund-faq-track {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 8px;
  background: #eef2f6;
  border-radius: 999px;
  cursor: pointer;
}
.mafund-faq-pill {
  position: absolute;
  right: 0;
  width: 8px;
  background: #e42312;
  border-radius: 999px;
  cursor: grab;
  touch-action: none;
  transition: top 0.15s ease-out, height 0.15s ease-out;
}
.mafund-faq-pill.dragging {
  cursor: grabbing;
  transition: none;
}
@media (max-width: 991px) {
  .mafund-faq-scroll { max-height: 480px; }
  .mafund-faq-wrap { padding-right: 1.25rem; }
}

/* Align section content with header menu edges on desktop */
@media (min-width: 992px) {
  .mafund-page .milele-benefits-inner,
  .mafund-page .process-inner,
  .mafund-page .heading,
  .mafund-page .milele-benefits-cta-wrap {
    padding-left: 0;
    padding-right: 0;
  }
}
