:root {
    --primary-color: #2B0065;
    --accent-color: #FED72D;
    --secondary-color: #BED5EF;
    --text-dark: #2B0065;
    --text-muted: #5A5A5A;
    --border-color: #B8BDC2;
    --card-bg: #ffffff;
    --card-height: 280px;
  }

  p.subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 12px;
    font-size: 1rem;
  }

  .explore-funds-steps {
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 18px;
  }

  .explore-funds-steps li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    font-size: 1rem;
    font-weight: 600;
  }

  .explore-funds-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
  }

  .explore-funds-jump {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 0 0 18px;
    position: sticky;
    top: 12px;
    z-index: 20;
    padding: 8px 0;
    background: linear-gradient(180deg, rgba(244, 246, 249, 0.96) 70%, rgba(244, 246, 249, 0));
  }

  .explore-funds-jump a {
    display: inline-flex;
    align-items: center;
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid transparent;
    background: #ffffff;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 700;
  }

  .explore-funds-jump a.jump-univ {
    background-color: #f0e6ff;
    color: #5a189a;
    border-color: rgba(90, 24, 154, 0.22);
  }

  .explore-funds-jump a.jump-campus {
    background-color: #e8f5e9;
    color: #1b5e20;
    border-color: rgba(27, 94, 32, 0.22);
  }

  .explore-funds-jump a.jump-trust {
    background-color: #e3f2fd;
    color: #0d47a1;
    border-color: rgba(13, 71, 161, 0.22);
  }

  .explore-funds-jump a:hover,
  .explore-funds-jump a:focus-visible {
    outline: none;
    filter: brightness(0.96);
    box-shadow: 0 0 0 2px rgba(43, 0, 101, 0.12);
  }

  .explore-funds-jump a.jump-univ:hover,
  .explore-funds-jump a.jump-univ:focus-visible {
    background-color: #e4d4f7;
  }

  .explore-funds-jump a.jump-campus:hover,
  .explore-funds-jump a.jump-campus:focus-visible {
    background-color: #d7edd9;
  }

  .explore-funds-jump a.jump-trust:hover,
  .explore-funds-jump a.jump-trust:focus-visible {
    background-color: #cfe6f9;
  }

  .explore-funds-mobile-hint {
    display: none;
    margin: 0 0 16px;
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(254, 215, 45, 0.2);
    border: 1px solid rgba(254, 215, 45, 0.55);
    color: var(--primary-color);
    font-size: 0.88rem;
    text-align: center;
    cursor: pointer;
  }

  .section-title-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
  }

  .fund-icon-img {
    width: 28px;
    height: 28px;
    display: block;
  }

  .fund-fa-icon {
    font-size: 1.35rem;
    color: var(--primary-color);
    line-height: 1;
  }

  .explore-funds-cart-bar {
    position: fixed;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    z-index: 1055;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
    max-width: calc(100% - 32px);
    padding: 12px 16px;
    border-radius: 12px;
    background: rgba(43, 0, 101, 0.96);
    color: #fff;
    box-shadow: 0 10px 28px rgba(43, 0, 101, 0.28);
  }

  .explore-funds-cart-bar[hidden] {
    display: none !important;
  }

  .explore-funds-cart-bar-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border-radius: 8px;
    background: var(--accent-color);
    color: var(--primary-color);
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
  }

  .explore-funds-cart-bar-cta:hover,
  .explore-funds-cart-bar-cta:focus-visible {
    background: #e6c429;
    color: var(--primary-color);
    outline: none;
  }

  body.explore-funds-cart-active {
    padding-bottom: 84px;
  }

  .flip-card:focus-visible {
    outline: 3px solid var(--accent-color);
    outline-offset: 3px;
  }

  .flip-card-back .give-btn:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 2px;
  }

  @media (max-width: 768px) {
    .explore-funds-mobile-hint:not([hidden]) {
      display: block;
    }

    .explore-funds-cart-bar {
      left: 16px;
      right: 16px;
      bottom: 16px;
      transform: none;
      max-width: none;
    }

    .explore-funds-cart-fab {
      bottom: 78px;
    }

    body.explore-funds-cart-active .explore-funds-cart-fab {
      bottom: 86px;
    }
  }

  .explore-funds-mission {
    background: linear-gradient(135deg, rgba(190, 213, 239, 0.45) 0%, rgba(254, 215, 45, 0.2) 100%);
    border: 1px solid var(--secondary-color);
    border-left: 4px solid var(--primary-color);
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 28px;
    text-align: center;
  }

  .explore-funds-mission p {
    margin: 0;
    font-size: 0.96rem;
    line-height: 1.65;
    color: #333333;
  }

  .explore-funds-mission strong {
    color: var(--primary-color);
  }

  .section-title {
    font-size: 1.35rem;
    color: var(--primary-color);
    border-bottom: 2px solid #e0e7ee;
    padding-bottom: 10px;
    margin: 28px 0 16px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Roboto Slab', serif;
    font-weight: 700;
  }

  .section-header {
    margin-bottom: 4px;
    scroll-margin-top: 96px;
  }

  .section-subtitle {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: normal;
    margin-top: 4px;
    display: block;
  }

  /* Grid Layout */
  .fund-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    align-items: stretch;
  }

  @media (max-width: 1199px) {
    .fund-grid {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }
  }

  @media (max-width: 991px) {
    .fund-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }

  @media (max-width: 576px) {
    .fund-grid {
      grid-template-columns: repeat(1, minmax(0, 1fr));
    }
  }

  /* FLIP CARD CONTAINER - STRICT CLIPPING FIX */
  .flip-card {
    background-color: transparent;
    height: var(--card-height);
    perspective: 1000px;
    cursor: pointer;
    position: relative;
    border-radius: 12px;
  }

  .flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s ease;
    transform-style: preserve-3d;
    box-shadow: 0 4px 16px rgba(43, 0, 101, 0.1);
    border-radius: 12px;
  }

  .flip-card:hover .flip-card-inner,
  .flip-card:focus-within .flip-card-inner {
    box-shadow: 0 10px 28px rgba(43, 0, 101, 0.16);
  }

  /* Hover & Active Tap Trigger */
  .flip-card:hover .flip-card-inner,
  .flip-card:focus-within .flip-card-inner,
  .flip-card.flipped .flip-card-inner {
    transform: rotateY(180deg);
  }

  .flip-card-front, .flip-card-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 12px;
    box-sizing: border-box;
    padding: 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
  }

  .flip-card-front {
    background: linear-gradient(180deg, #f8f9fe 0%, var(--card-bg) 100%);
    border: 1px solid rgba(190, 213, 239, 0.85);
    border-top: 3px solid var(--accent-color);
    color: var(--primary-color);
    align-items: center;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  }

  /* Category Badge */
  .fund-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    z-index: 2;
  }

  .badge-univ { background-color: #f0e6ff; color: #5a189a; }
  .badge-campus { background-color: #e8f5e9; color: #1b5e20; }
  .badge-trust { background-color: #e3f2fd; color: #0d47a1; }

  .flip-card-front .icon {
    font-size: 1.9rem;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(43, 0, 101, 0.07);
    border-radius: 50%;
    margin-bottom: 6px;
    margin-top: 6px;
    flex-shrink: 0;
  }

  .flip-card.flipped .flip-card-back .give-btn,
  .flip-card:focus-within .flip-card-back .give-btn {
    pointer-events: auto;
  }

  .flip-card-front h3 {
    font-size: 1.12rem;
    margin: 0 0 6px 0;
    line-height: 1.28;
    font-weight: 700;
    font-family: 'Roboto Slab', serif;
    color: var(--primary-color);
    text-align: center;
  }

  .flip-card-front .hint {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: auto;
    padding-top: 4px;
  }

  /* Campus Cards Front Styling */
  .campus-fund-front {
    justify-content: flex-start;
    align-items: stretch;
    padding-top: 14px;
  }

  .campus-fund-front .card-image-header {
    width: 100%;
    height: 72px;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 8px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(43, 0, 101, 0.08);
  }

  .campus-fund-front .card-image-header img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  .campus-fund-front .card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    text-align: center;
    flex: 1;
  }

  .campus-fund-front h3 {
    margin: 0;
    font-size: 0.92rem;
  }

  /* FLIP CARD BACK - PERFECT FIT & NO OVERLAP */
  .flip-card-back {
    background: linear-gradient(135deg, var(--primary-color) 0%, #4a148c 100%);
    color: #ffffff;
    transform: rotateY(180deg);
    text-align: left;
    z-index: 2;
  }

  .flip-card-back p {
    font-size: 0.8rem;
    line-height: 1.38;
    margin: 0;
    color: #E7F4FE;
    font-family: 'Roboto', sans-serif;
    flex: 1;
    overflow-y: auto;
    padding-right: 2px;
  }

  .flip-card-back .give-btn {
    display: block;
    width: 100%;
    text-align: center;
    background-color: var(--accent-color);
    color: var(--primary-color);
    text-decoration: none;
    padding: 8px 0;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.85rem;
    transition: background-color 0.2s;
    font-family: 'Roboto Slab', serif;
    margin-top: 8px;
    flex-shrink: 0;
  }

  .flip-card-back .give-btn:hover {
    background-color: #e6c429;
  }

  .flip-card-back .give-btn.give-btn-added {
    background-color: #2e7d32;
    color: #fff;
  }

  .explore-funds-cart-fab {
    position: fixed;
    top: 118px;
    right: 20px;
    z-index: 1050;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(43, 0, 101, 0.25);
    transition: transform 0.2s, background-color 0.2s;
  }

  .explore-funds-cart-fab:hover,
  .explore-funds-cart-fab:focus {
    background: #3d008a;
    color: #fff;
    transform: scale(1.05);
  }

  .explore-funds-cart-fab.has-items {
    background: var(--accent-color);
    color: var(--primary-color);
  }

  .explore-funds-cart-fab.has-items:hover {
    background: #e6c429;
    color: var(--primary-color);
  }

  .explore-funds-cart-count {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: #c62828;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 22px;
    text-align: center;
    border: 2px solid #fff;
  }

  @media (max-width: 768px) {
    .explore-funds-cart-fab {
      top: auto;
      bottom: 20px;
      right: 16px;
    }
  }
