/*
 * Britam Special Funds campaign pages (mod_special_funds)
 * Global Equity / Multi-Asset landing layouts.
 * Loaded by the module; do not duplicate these rules in style.css.
 */


/* Special fund campaign: highlight stat cards */
/* Mobile: 2 metrics per row */
.specialfund-highlights-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  margin-top: 2rem;
}
.specialfund-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;
}
.specialfund-metric:nth-child(odd) {
  border-right: 1px solid rgba(226, 232, 240, 0.9);
}
.specialfund-metric:nth-child(n+3) {
  border-bottom: none;
}
.specialfund-metric .specialfund-stat-value {
  font-size: clamp(1.7rem, 6vw, 2.2rem);
}
@media (min-width: 768px) {
  .specialfund-metric {
    padding: 1.5rem 1rem;
  }
  .specialfund-metric .specialfund-stat-value {
    font-size: clamp(2.5rem, 4vw, 3.4rem);
  }
}
@media (min-width: 992px) {
  .specialfund-highlights-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .specialfund-metric {
    border-bottom: none;
    border-right: none;
    border-left: 1px solid rgba(226, 232, 240, 0.9);
    padding: 1rem 2rem;
  }
  .specialfund-metric:first-child {
    border-left: none;
  }
}
.specialfund-metric-value {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 1rem;
  position: relative;
  width: 100%;
  justify-content: center;
}
.specialfund-stat-value {
  font-size: clamp(2.5rem, 4vw, 3.4rem);
  font-weight: 800;
  color: #0062b8;
  letter-spacing: -0.02em;
  line-height: 1;
}
.specialfund-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;
}
.specialfund-metric:hover .specialfund-metric-info,
.specialfund-metric:focus .specialfund-metric-info,
.specialfund-metric:focus-within .specialfund-metric-info {
  opacity: 1;
  color: #2563eb;
}
.specialfund-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;
}
.specialfund-metric:hover .specialfund-metric-tooltip,
.specialfund-metric:focus .specialfund-metric-tooltip,
.specialfund-metric:focus-within .specialfund-metric-tooltip {
  opacity: 1;
  visibility: visible;
}
.specialfund-metric-tooltip strong {
  color: #fff;
  font-weight: 600;
  display: block;
  margin-bottom: 2px;
}
.specialfund-metric-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 4px;
  line-height: 1.3;
  width: 100%;
}
.specialfund-metric-caption {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #64748b;
  margin: 0;
}
.specialfund-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) {
  .specialfund-highlights-footer {
    flex-direction: row;
  }
}

/* Special fund: "what sets apart" cards */
.specialfund-apart .process-item-card {
  border-left: none;
  border: 2px solid rgba(112, 181, 255, 0.2);
  padding: 1.75rem 1.5rem;
  display: block;
  text-align: left;
  background: rgba(112, 181, 255, 0.2);
}
.specialfund-apart .specialfund-dash {
  display: block;
  width: 44px;
  height: 4px;
  border-radius: 2px;
  background: #0077be;
  margin-bottom: 1.25rem;
}
.specialfund-apart .process-content { text-align: left; }
.specialfund-apart .process-item-title { font-weight: 700; }

/* Special fund: benefit cards */
.specialfund-benefit-card {
  border-left: none !important;
  border: 1px solid #e8e8e8 !important;
  padding: 1.75rem 1.5rem;
  display: block !important;
  text-align: left;
  background-size: auto;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  overflow: hidden;
}
.specialfund-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%);
}
.specialfund-benefit-card > * {
  position: relative;
  z-index: 1;
}
.specialfund-benefit-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.25rem;
}
.specialfund-benefit-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #eef4fb;
  color: #0077be;
  font-size: 0.85rem;
}
.specialfund-benefits .process-content { text-align: left; }
.specialfund-benefits .process-item-title { font-weight: 700; }
.specialfund-benefits .process-item-card { display: block; background-position-x: left; }

/* Special fund: CTA band */
.specialfund-cta-band {
  background: #0077be;
  border-radius: 16px;
  padding: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.specialfund-cta-band-text h3 {
  color: #fff;
  font-size: 1.9rem;
  font-weight: 700;
  margin: 0.75rem 0 0.5rem;
}
.specialfund-cta-band-text p {
  color: rgba(255,255,255,0.85);
  margin: 0;
  max-width: 560px;
}
.specialfund-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;
}
.specialfund-cta-band-button {
  background: #fff;
  color: #333;
  border-radius: 10px;
  padding: 0.9rem 1.75rem;
  font-weight: 600;
  white-space: nowrap;
}
.specialfund-cta-band-button:hover {
  background: #f2f6fa;
  color: #0077be;
}
@media (max-width: 767px) {
  .specialfund-cta-band { padding: 1.75rem 1.5rem; }
  .specialfund-cta-band-text h3 { font-size: 1.5rem; }
}

/* Special fund: FAQ section (media card + scrollable accordion with pill scrollbar) */
.specialfund-faq-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 2.5rem;
  align-items: start;
  text-align: left;
}
@media (min-width: 992px) {
  .specialfund-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) */
  .specialfund-faq-media {
    grid-column: 1;
    grid-row: 1;
  }
  /* Image defines the row height; FAQ wrap matches it and scrolls inside */
  .specialfund-faq-media .specialfund-faq-media-card {
    height: 640px;
    width: 100%;
  }
  .specialfund-faq-wrap {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    height: 640px;
  }
  .specialfund-faq-wrap .specialfund-faq-scroll {
    flex: 1;
    max-height: none;
  }
}
.specialfund-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) {
  .specialfund-faq-media-card {
    position: sticky;
    top: 2rem;
    aspect-ratio: 4 / 5;
  }
}
.specialfund-faq-media-card img {
  width: 100%;
  height: auto;
  max-height: 320px;
  object-fit: cover;
  display: block;
}
@media (min-width: 992px) {
  .specialfund-faq-media-card img { height: 100%; max-height: none; }
}
.specialfund-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;
}
.specialfund-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);
}
.specialfund-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;
}
.specialfund-faq-badge-text h4 {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 700;
  color: #0f2942;
}
.specialfund-faq-badge-text p {
  margin: 0;
  font-size: 0.75rem;
  color: #64748b;
}
.specialfund-faq-wrap {
  position: relative;
  padding-right: 1.5rem;
}
.specialfund-faq-scroll {
  max-height: 560px;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-behavior: smooth;
}
.specialfund-faq-scroll::-webkit-scrollbar { display: none; }
.specialfund-faq-stack {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.sf-faq-item {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 24px;
  transition: all 0.3s ease;
}
.sf-faq-item:hover { border-color: #cbd5e1; }
.sf-faq-item.active {
  background: #0077be;
  border-color: #0077be;
  box-shadow: 0 10px 28px rgba(0,119,190,0.25);
}
.sf-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;
}
.sf-faq-title {
  font-size: 1rem;
  font-weight: 600;
  color: #0f2942;
  transition: color 0.3s ease;
}
.sf-faq-item.active .sf-faq-title { color: #fff; }
.sf-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;
}
.sf-faq-item.active .sf-faq-chevron {
  background: rgba(255,255,255,0.2);
  color: #fff;
  transform: rotate(180deg);
}
.sf-faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.sf-faq-item.active .sf-faq-answer { grid-template-rows: 1fr; }
.sf-faq-answer-inner {
  overflow: hidden;
  padding: 0 1.5rem;
  font-size: 0.92rem;
  line-height: 1.65;
  color: #64748b;
}
.sf-faq-item.active .sf-faq-answer-inner {
  color: rgba(255,255,255,0.92);
  padding-bottom: 1.25rem;
}
.specialfund-faq-track {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 8px;
  background: #eef2f6;
  border-radius: 999px;
  cursor: pointer;
}
.specialfund-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;
}
.specialfund-faq-pill.dragging {
  cursor: grabbing;
  transition: none;
}
@media (max-width: 991px) {
  .specialfund-faq-scroll { max-height: 480px; }
  .specialfund-faq-wrap { padding-right: 1.25rem; }
}

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

