/* =========================================================
   Maxim Charitable Foundation - Custom Bootstrap 5.3 Theme
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* =========================================================
   1. Design tokens
   ========================================================= */
:root {
  --bs-font-sans-serif: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --brand-blue: #0a4c8b;
  --brand-blue-600: #08406f;
  --brand-teal: #0b7f7f;
  --brand-teal-soft: #e2f4f3;
  --brand-blue-soft: #e6eef8;
  --ink: #10202f;
  --ink-muted: #4b5b6b;
  --surface-gray: #f8f9fa;
  --dark-bg: #0c1b2a;
  --radius-card: 24px;
  --radius-img: 28px;
  --section-space: 80px;
  --ease: 300ms ease;
}

/* =========================================================
   2. Base / typography
   ========================================================= */
html {
  scroll-behavior: smooth;
}
body {
  font-family: var(--bs-font-sans-serif);
  font-weight: 400;
  color: var(--ink);
  background-color: #ffffff;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6, .display-1, .display-2, .display-3, .display-4, .display-5 {
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}
h1, .display-3, .display-4 { font-weight: 700; }
p { color: var(--ink-muted); }
.lead { font-weight: 300; color: var(--ink-muted); }
.text-ink { color: var(--ink) !important; }
.text-muted-ink { color: var(--ink-muted) !important; }
.fw-medium { font-weight: 500 !important; }
a { text-decoration: none; }

/* Section rhythm — 80px vertical */
.section {
  padding-top: var(--section-space);
  padding-bottom: var(--section-space);
  position: relative;
  overflow: hidden;
}
@media (min-width: 992px) {
  .section { padding-top: 96px; padding-bottom: 96px; }
}
.section-gray { background-color: var(--surface-gray); }
.section-dark { background-color: var(--dark-bg); }
.section-eyebrow {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-teal);
  margin-bottom: 0.75rem;
}
.section-dark .section-eyebrow { color: #6fd7d2; }
.measure { max-width: 640px; }

/* =========================================================
   3. Accessibility helpers
   ========================================================= */
:focus-visible {
  outline: 3px solid #0b7f7f;
  outline-offset: 3px;
  border-radius: 6px;
}
.section-dark :focus-visible,
.site-footer :focus-visible {
  outline-color: #7fe3dd;
}
.skip-link {
  position: absolute;
  left: 1rem;
  top: -60px;
  z-index: 2000;
  background: var(--brand-blue);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 12px 12px;
  transition: top var(--ease);
}
.skip-link:focus { top: 0; color: #fff; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* =========================================================
   4. Buttons
   ========================================================= */
.btn {
  border-radius: 50rem;
  font-weight: 500;
  padding: 0.75rem 1.6rem;
  transition: transform var(--ease), box-shadow var(--ease),
              background-color var(--ease), color var(--ease), border-color var(--ease);
}
.btn-lg { padding: 0.95rem 2.1rem; font-size: 1.0625rem; }
.btn-brand {
  background-color: var(--brand-blue);
  border: 1px solid var(--brand-blue);
  color: #fff;
}
.btn-brand:hover, .btn-brand:focus {
  background-color: var(--brand-blue-600);
  border-color: var(--brand-blue-600);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(10, 76, 139, 0.25);
}
.btn-teal {
  background-color: var(--brand-teal);
  border: 1px solid var(--brand-teal);
  color: #fff;
}
.btn-teal:hover, .btn-teal:focus {
  background-color: #096a6a;
  border-color: #096a6a;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(11, 127, 127, 0.28);
}
.btn-outline-brand {
  border: 1px solid var(--brand-blue);
  color: var(--brand-blue);
  background-color: transparent;
}
.btn-outline-brand:hover, .btn-outline-brand:focus {
  background-color: var(--brand-blue);
  color: #fff;
  transform: translateY(-2px);
}
.btn-outline-light-brand {
  border: 1px solid rgba(255, 255, 255, 0.65);
  color: #fff;
  background-color: transparent;
}
.btn-outline-light-brand:hover, .btn-outline-light-brand:focus {
  background-color: #fff;
  color: var(--dark-bg);
  transform: translateY(-2px);
}
.link-arrow {
  color: var(--brand-blue);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.link-arrow i { transition: transform var(--ease); }
.link-arrow:hover { color: var(--brand-teal); }
.link-arrow:hover i { transform: translateX(5px); }

/* =========================================================
   5. Cards, images, shapes
   ========================================================= */
.card-soft {
  border: 1px solid rgba(16, 32, 47, 0.06);
  border-radius: var(--radius-card);
  background: #fff;
  box-shadow: 0 2px 10px rgba(16, 32, 47, 0.05);
  transition: transform var(--ease), box-shadow var(--ease);
  height: 100%;
}
.card-soft:hover,
.card-soft:focus-within {
  transform: translateY(-6px);
  box-shadow: 0 22px 44px rgba(16, 32, 47, 0.12);
}
.icon-badge {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: var(--brand-blue-soft);
  color: var(--brand-blue);
}
.icon-badge-teal { background: var(--brand-teal-soft); color: var(--brand-teal); }
.img-rounded {
  border-radius: var(--radius-img);
  object-fit: cover;
  width: 100%;
  display: block;
}
.img-shadow { box-shadow: 0 26px 60px rgba(16, 32, 47, 0.16); }
.ratio-photo { aspect-ratio: 4 / 3; }
.ratio-wide { aspect-ratio: 3 / 2; }

/* Organic abstract blobs */
.blob {
  position: absolute;
  border-radius: 45% 55% 62% 38% / 48% 42% 58% 52%;
  filter: blur(0.5px);
  pointer-events: none;
  z-index: 0;
}
.blob-blue { background: rgba(10, 76, 139, 0.10); }
.blob-teal { background: rgba(11, 127, 127, 0.12); }
.blob-light { background: rgba(255, 255, 255, 0.07); }
.blob-float { animation: blobFloat 12s ease-in-out infinite; }
.blob-float-slow { animation: blobFloat 18s ease-in-out infinite reverse; }
@keyframes blobFloat {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
  50% { transform: translate3d(0, -22px, 0) rotate(8deg); }
}
.z-1 { position: relative; z-index: 1; }

/* =========================================================
   6. Header / navigation
   ========================================================= */
.site-header {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid rgba(16, 32, 47, 0.07);
  transition: box-shadow var(--ease);
}
.site-header.is-stuck { box-shadow: 0 8px 26px rgba(16, 32, 47, 0.08); }
.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--brand-blue);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}
.brand-name { font-weight: 700; color: var(--ink); line-height: 1.1; font-size: 1rem; }
.brand-tag { font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--brand-teal); font-weight: 600; }
.site-nav .nav-link {
  color: var(--ink);
  font-weight: 500;
  padding: 0.5rem 0.9rem;
  border-radius: 50rem;
  transition: color var(--ease), background-color var(--ease);
}
@media (min-width: 1200px) {
  .site-nav .nav-link { padding: 0.5rem 0.7rem; font-size: 0.95rem; }
}
.site-nav .nav-link:hover,
.site-nav .nav-link:focus,
.site-nav .show > .nav-link { color: var(--brand-blue); background-color: var(--brand-blue-soft); }
.dropdown-menu {
  border: 1px solid rgba(16, 32, 47, 0.08);
  border-radius: 18px;
  box-shadow: 0 22px 48px rgba(16, 32, 47, 0.14);
  padding: 0.5rem;
  margin-top: 0.6rem !important;
}
.dropdown-item {
  border-radius: 12px;
  padding: 0.6rem 0.85rem;
  color: var(--ink);
  font-weight: 500;
}
.dropdown-item:hover, .dropdown-item:focus {
  background-color: var(--brand-blue-soft);
  color: var(--brand-blue);
}
.dropdown-item small { display: block; font-weight: 400; color: var(--ink-muted); }
.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(16, 32, 47, 0.12);
  background: #fff;
  color: var(--ink);
  transition: background-color var(--ease), color var(--ease), transform var(--ease);
}
.icon-btn:hover, .icon-btn:focus { background: var(--brand-blue-soft); color: var(--brand-blue); transform: translateY(-2px); }

/* =========================================================
   7. Hero
   ========================================================= */
.hero {
  position: relative;
  overflow: hidden;
  padding-top: 64px;
  padding-bottom: 64px;
  background: #fff;
}
@media (min-width: 992px) {
  .hero {
    min-height: calc(100vh - 84px);
    display: flex;
    align-items: center;
    padding-top: 40px;
    padding-bottom: 40px;
  }
}
.hero-title { font-size: clamp(2.25rem, 5vw, 3.75rem); line-height: 1.06; }
.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--brand-teal-soft);
  color: #06605f;
  font-weight: 500;
  font-size: 0.875rem;
  padding: 0.45rem 1rem;
  border-radius: 50rem;
}
.hero-stat-value { font-weight: 700; font-size: 1.6rem; color: var(--brand-blue); line-height: 1; }
.hero-stat-label { font-size: 0.85rem; color: var(--ink-muted); }

/* =========================================================
   8. Events / news / list group
   ========================================================= */
.event-item {
  border: 1px solid rgba(16, 32, 47, 0.08);
  border-radius: 20px;
  margin-bottom: 0.85rem;
  padding: 1.15rem 1.25rem;
  background: #fff;
  transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease);
}
.event-item:hover, .event-item:focus-within {
  transform: translateY(-4px);
  border-color: rgba(10, 76, 139, 0.25);
  box-shadow: 0 18px 36px rgba(16, 32, 47, 0.10);
}
.date-badge {
  width: 66px;
  min-width: 66px;
  border-radius: 16px;
  background: var(--brand-blue);
  color: #fff;
  text-align: center;
  padding: 0.55rem 0.25rem;
  line-height: 1.1;
}
.date-badge .day { display: block; font-size: 1.4rem; font-weight: 700; }
.date-badge .mon { display: block; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600; }
.badge-category {
  background: var(--brand-teal-soft);
  color: #06605f;
  font-weight: 600;
  border-radius: 50rem;
  padding: 0.4rem 0.85rem;
  font-size: 0.75rem;
}
.news-media { overflow: hidden; border-radius: var(--radius-card) var(--radius-card) 0 0; }
.news-media img { transition: transform 600ms ease; }
.card-soft:hover .news-media img { transform: scale(1.06); }

/* =========================================================
   9. Testimonials
   ========================================================= */
.testimonial-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-card);
  padding: 3rem 1.75rem;
}
@media (min-width: 768px) { .testimonial-card { padding: 3.5rem 4rem; } }
.testimonial-quote { font-size: clamp(1.15rem, 2.2vw, 1.6rem); font-weight: 300; color: #fff; line-height: 1.55; }
.stars { color: #ffc857; font-size: 1.05rem; letter-spacing: 0.15rem; }
.carousel-nav-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: transparent;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color var(--ease), transform var(--ease);
}
.carousel-nav-btn:hover, .carousel-nav-btn:focus { background: rgba(255, 255, 255, 0.16); transform: translateY(-2px); }

/* =========================================================
   10. Forms
   ========================================================= */
.form-control, .form-select {
  border-radius: 50rem;
  padding: 0.85rem 1.25rem;
  border: 1px solid rgba(16, 32, 47, 0.15);
}
.form-control:focus, .form-select:focus {
  border-color: var(--brand-teal);
  box-shadow: 0 0 0 0.2rem rgba(11, 127, 127, 0.18);
}
.form-label { font-weight: 500; font-size: 0.9rem; color: var(--ink); }

/* =========================================================
   11. Partners
   ========================================================= */
.partner-tile {
  border-radius: 20px;
  background: #fff;
  border: 1px solid rgba(16, 32, 47, 0.07);
  padding: 1.4rem 1rem;
  display: flex;
  flex-direction: column;
  text-align: center;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: var(--ink-muted);
  font-weight: 600;
  filter: grayscale(100%);
  opacity: 0.72;
  transition: filter var(--ease), opacity var(--ease), transform var(--ease), box-shadow var(--ease);
  height: 100%;
  min-height: 108px;
  line-height: 1.25;
}
.partner-tile:hover, .partner-tile:focus-within {
  filter: grayscale(0%);
  opacity: 1;
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(16, 32, 47, 0.10);
  color: var(--brand-blue);
}
.partner-tile i { font-size: 1.35rem; color: var(--brand-teal); }

/* =========================================================
   12. Footer
   ========================================================= */
.site-footer { background: var(--dark-bg); color: rgba(255, 255, 255, 0.75); }
.site-footer h2, .site-footer h3 { color: #fff; }
.site-footer p { color: rgba(255, 255, 255, 0.72); }
.footer-link {
  color: rgba(255, 255, 255, 0.75);
  display: inline-block;
  padding: 0.3rem 0;
  transition: color var(--ease), transform var(--ease);
}
.footer-link:hover, .footer-link:focus { color: #7fe3dd; transform: translateX(4px); }
.social-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color var(--ease), transform var(--ease);
}
.social-btn:hover, .social-btn:focus { background: rgba(255, 255, 255, 0.14); color: #fff; transform: translateY(-3px); }

/* Dark surfaces text */
.section-dark, .section-dark p { color: rgba(255, 255, 255, 0.78); }
.section-dark h2, .section-dark h3, .section-dark .display-4, .section-dark .display-5 { color: #fff; }

/* =========================================================
   13. Scroll reveal animations
   ========================================================= */
.reveal-enabled .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 700ms ease, transform 700ms ease;
  will-change: opacity, transform;
}
.reveal-enabled .reveal.is-visible { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: 90ms; }
.reveal-delay-2 { transition-delay: 180ms; }
.reveal-delay-3 { transition-delay: 270ms; }
@media (prefers-reduced-motion: reduce) {
  .reveal-enabled .reveal { opacity: 1; transform: none; }
}

/* =========================================================
   14. MCF brand helpers
   ========================================================= */
.text-brand-blue { color: var(--brand-blue) !important; }
.text-brand-teal { color: var(--brand-teal) !important; }

/* Logo lockups */
.site-logo-img {
  width: 96px;
  height: auto;
  display: block;
}
@media (min-width: 992px) { .site-logo-img { width: 112px; } }
.site-logo-footer {
  width: 88px;
  background: #fff;
  border-radius: 14px;
  padding: 6px 10px;
}

/* Hero + section accents */
.hero-note { max-width: 340px; }
.hero-note:hover { transform: none; box-shadow: 0 2px 10px rgba(16, 32, 47, 0.05); }
.badge-float { top: 20px; left: 20px; }

/* Keeps photography balanced */
.img-balanced { max-height: 380px; }
@media (min-width: 992px) { .img-balanced { max-height: 420px; } }
@media (min-width: 1400px) { .img-balanced { max-height: 460px; } }

/* Header utility bar */
.header-utility {
  background: var(--brand-blue);
  color: rgba(255, 255, 255, 0.9);
  padding: 0.4rem 0;
  font-size: 0.85rem;
}
.header-utility a { color: #fff; text-decoration: underline; }
.header-utility a:hover { color: #bfe6e4; }

/* Footer sub-menu & elements */
.footer-submenu {
  margin: 0 0 0.35rem 0.9rem;
  padding-left: 0.75rem;
  border-left: 1px solid rgba(255, 255, 255, 0.18);
}
.news-media {
  overflow: hidden;
  border-radius: var(--radius-card) var(--radius-card) 0 0;
  height: 220px;
  width: 100%;
}
.news-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Impact figures & accordions */
.impact-value {
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--brand-blue);
  line-height: 1;
}
.impact-accordion .accordion-item {
  border: 1px solid rgba(16, 32, 47, 0.08);
  border-radius: 18px;
  margin-bottom: 0.75rem;
  overflow: hidden;
  background: #fff;
}
.impact-accordion .accordion-button {
  border-radius: 18px;
  font-weight: 600;
  color: var(--ink);
  background: #fff;
}
.impact-accordion .accordion-button:not(.collapsed) {
  background: var(--brand-blue-soft);
  color: var(--brand-blue);
  box-shadow: none;
}
.impact-accordion .accordion-body { color: var(--ink-muted); }

/* Scholarship band */
.scholarship-band { background: var(--brand-teal-soft); border-color: transparent; }
.scholarship-band:hover { transform: none; box-shadow: 0 2px 10px rgba(16, 32, 47, 0.05); }

/* Footer details */
.footer-heading {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
  color: #fff;
}
.footer-measure { max-width: 340px; }
.footer-address { color: rgba(255, 255, 255, 0.72); font-style: normal; }
.footer-rule { border-color: rgba(255, 255, 255, 0.16); }
