/* ==========================================================================
   MYCO Theme - custom.css  (shared custom stylesheet)
   Colors: Navy #141943, Red #C8402E, Navy-mid #354968
   ========================================================================== */

/* ------------------------------------------------------------------
   1. Reset & Base
   ------------------------------------------------------------------ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  background: #ffffff;
  color: #141943;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
}

/* ------------------------------------------------------------------
   2. .inner container (for fixed-width inner pages)
   ------------------------------------------------------------------ */
.inner {
  width: 1560px;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: 2rem;
  padding-right: 2rem;
}

@media (max-width: 1600px) {
  .inner {
    width: 100%;
    max-width: 1280px;
  }
}

@media (max-width: 768px) {
  .inner {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* ------------------------------------------------------------------
   2.5 Contact Page Cards
   ------------------------------------------------------------------ */
.contact-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 40px 32px;
  text-align: center;
  box-shadow: 0 8px 24px rgba(20, 25, 67, 0.08);
  border: 1px solid rgba(20, 25, 67, 0.05);
  transition: transform 0.25s, box-shadow 0.25s;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 320px;
}

.contact-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(20, 25, 67, 0.14);
}

.contact-icon {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  background: linear-gradient(135deg, #C8402E 0%, #e05040 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  box-shadow: 0 8px 20px rgba(200, 64, 46, 0.3);
  flex-shrink: 0;
}

.contact-icon svg {
  width: 36px;
  height: 36px;
}

.contact-card h3 {
  margin-bottom: 12px;
}

.contact-card-body {
  flex: 1 1 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-card p,
.contact-card-details {
  margin-bottom: 0;
}

.contact-card-details {
  width: 100%;
}

.contact-card a,
.contact-card-cta {
  margin-top: 16px !important;
}

@media (max-width: 768px) {
  .contact-cards {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }

  .contact-layout {
    grid-template-columns: 1fr !important;
    gap: 40px !important;
  }

  .contact-card {
    min-height: auto;
  }
}

/* ------------------------------------------------------------------
   3. .content-grid responsive override
   ------------------------------------------------------------------ */
.content-grid {
  display: grid;
  gap: 2rem;
}

@media (max-width: 1100px) {
  .content-grid {
    grid-template-columns: 1fr !important;
    gap: 44px !important;
  }

  .video-wrapper {
    max-width: 720px;
    margin: 0 auto;
  }
}

/* ------------------------------------------------------------------
   4. Pill Navigation (Larger, More Spacious)
   ------------------------------------------------------------------ */
.pill-nav {
  background: var(--header-pill-surface, #efefef);
  border: 1px solid #e0e0e0;
  border-radius: 9999px;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.09);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 8px 8px 10px;
}

.pill-nav-bismillah {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-right: 0;
  padding: 0 8px 0 2px;
  border-right: 1px solid rgba(20, 25, 67, 0.10);
}

.pill-nav-bismillah-image {
  width: auto;
  height: auto;
  max-width: none;
  display: block;
  filter: drop-shadow(0 0 6px rgba(20, 25, 67, 0.18))
    drop-shadow(0 0 14px rgba(20, 25, 67, 0.10))
    drop-shadow(0 0 12px rgba(200, 64, 46, 0.06));
  transition: filter 0.22s ease;
  pointer-events: none;
  user-select: none;
}

.pill-nav-bismillah:hover .pill-nav-bismillah-image {
  filter: drop-shadow(0 0 8px rgba(20, 25, 67, 0.22))
    drop-shadow(0 0 18px rgba(20, 25, 67, 0.12))
    drop-shadow(0 0 16px rgba(200, 64, 46, 0.08));
}

.site-header-nav {
  gap: 0;
  --header-pill-surface: #efefef;
}

.site-header-nav--with-badge {
  gap: 14px;
}

.site-header-nav--mcyc {
  gap: 14px;
  --header-pill-surface: #ffffff;
}

.site-header-nav--mcyc .pill-nav {
  background: #ffffff;
  border-color: rgba(20, 25, 67, 0.08);
  box-shadow: 0 12px 30px rgba(20, 25, 67, 0.08);
}

.pill-nav-mcyc-badge {
  width: 76px;
  height: 76px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0.75rem;
  border-radius: 22px;
  background: var(--header-pill-surface, #efefef);
  border: 1px solid rgba(20, 25, 67, 0.08);
  box-shadow: 0 14px 36px rgba(20, 25, 67, 0.1);
  text-decoration: none;
  position: relative;
}

.pill-nav-mcyc-badge--outside {
  margin-right: 2px;
}

.pill-nav-mcyc-badge-image {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 1280px) {
  .pill-nav-bismillah {
    padding-right: 6px;
  }
}

@media (max-width: 1100px) {
  .pill-nav-bismillah {
    display: none;
  }

  .pill-nav-mcyc-badge {
    display: none;
  }

  .pill-nav {
    padding-left: 8px;
    padding-right: 8px;
  }
}

.pill-nav .pill-nav-link,
.pill-nav .pill-nav-dropdown-toggle {
  font-family: "Inter", sans-serif;
  font-size: 1rem;
  font-weight: 500;
  color: #6b7280;
  padding: 12px 20px;
  border-radius: 9999px;
  text-decoration: none;
  transition: color 0.18s, background 0.18s, box-shadow 0.18s,
    transform 0.18s;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pill-nav .pill-nav-dropdown-toggle {
  appearance: none;
  background: transparent;
  border: 0;
  cursor: pointer;
}

@media (max-width: 1280px) {
  .pill-nav .pill-nav-link,
  .pill-nav .pill-nav-dropdown-toggle {
    padding-left: 16px;
    padding-right: 16px;
    font-size: 0.95rem;
  }
}

@media (max-width: 1100px) {
  .pill-nav .pill-nav-link,
  .pill-nav .pill-nav-dropdown-toggle {
    padding-left: 14px;
    padding-right: 14px;
  }
}

.pill-nav .pill-nav-link:hover:not(.active):not(.donate-btn):not(.mcyc-btn),
.pill-nav .pill-nav-dropdown-toggle:hover:not(.active) {
  color: #141943;
  background: rgba(0, 0, 0, 0.04);
}

.pill-nav .pill-nav-link.active,
.pill-nav .pill-nav-dropdown-toggle.active {
  background: #ffffff;
  color: #141943;
  font-weight: 600;
  box-shadow: 0 1px 5px 0 rgba(0, 0, 0, 0.12),
    inset 0 1px 2px 0 rgba(255, 255, 255, 0.9);
}

.pill-nav .pill-nav-link.donate-btn {
  background: #c8402e;
  color: #ffffff;
  font-weight: 600;
  padding: 12px 24px;
  box-shadow: 0 3px 12px 0 rgba(200, 64, 46, 0.38);
  transition: background 0.18s, box-shadow 0.18s;
  margin-left: 6px;
}

.pill-nav .pill-nav-link.donate-btn:hover {
  background: #b03525;
  box-shadow: 0 5px 18px 0 rgba(200, 64, 46, 0.48);
}

.pill-nav .pill-nav-link.donate-btn.active {
  background: #c8402e;
  color: #ffffff;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.12),
    0 0 0 3px rgba(200, 64, 46, 0.14),
    0 6px 20px rgba(200, 64, 46, 0.38),
    0 2px 6px rgba(200, 64, 46, 0.22);
}

.pill-nav .pill-nav-link.mcyc-btn {
  background: #141943;
  color: #ffffff;
  font-weight: 600;
  padding: 12px 22px;
  box-shadow: 0 3px 12px 0 rgba(20, 25, 67, 0.24);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
}

.mcyc-btn-arrow {
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
  opacity: 0.85;
  transition: transform 0.18s ease;
}

.pill-nav .pill-nav-link.mcyc-btn:hover .mcyc-btn-arrow {
  transform: translateX(2px);
}

.pill-nav .pill-nav-link.mcyc-btn.active .mcyc-btn-arrow {
  display: none;
}

.pill-nav .pill-nav-link.mcyc-btn:hover {
  background: #0f1437;
  box-shadow: 0 5px 18px 0 rgba(20, 25, 67, 0.32);
}

.pill-nav .pill-nav-link.mcyc-btn.active {
  background: #141943;
  color: #ffffff;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.12),
    0 0 0 3px rgba(20, 25, 67, 0.14),
    0 6px 20px rgba(20, 25, 67, 0.38),
    0 2px 6px rgba(20, 25, 67, 0.22);
}

.pill-nav-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.pill-nav-caret {
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  transform-origin: center;
  margin-left: 10px;
  transition: transform 0.18s ease;
}

.pill-nav-dropdown:hover .pill-nav-caret,
.pill-nav-dropdown:focus-within .pill-nav-caret,
.pill-nav-dropdown.is-active .pill-nav-caret {
  transform: rotate(225deg) translateY(-1px);
}

.pill-nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 208px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border-radius: 24px;
  background: #ffffff;
  border: 1px solid rgba(20, 25, 67, 0.08);
  box-shadow: 0 24px 46px rgba(20, 25, 67, 0.16);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease,
    visibility 0.18s ease;
  z-index: 20;
}

.pill-nav-dropdown-menu::before {
  content: "";
  position: absolute;
  top: -14px;
  left: 0;
  right: 0;
  height: 14px;
}

.pill-nav-dropdown:hover .pill-nav-dropdown-menu,
.pill-nav-dropdown:focus-within .pill-nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.pill-nav-dropdown--mcyc .pill-nav-dropdown-menu--mcyc {
  left: 50%;
  min-width: 220px;
  max-width: min(calc(100vw - 48px), 260px);
  padding: 14px;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  transform: translateX(-50%) translateY(8px);
}

.pill-nav-dropdown--mcyc:hover .pill-nav-dropdown-menu--mcyc,
.pill-nav-dropdown--mcyc:focus-within .pill-nav-dropdown-menu--mcyc {
  transform: translateX(-50%) translateY(0);
}

.mcyc-section-dropdown-link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  padding: 12px 16px;
  border-radius: 16px;
  color: #5b6477;
  font-size: 0.95rem;
  font-weight: 600;
  white-space: normal;
}

.mcyc-section-dropdown-link:hover {
  background: #f3f4f6;
  color: #141943;
}

.mcyc-section-dropdown-link.active {
  background: #141943;
  color: #ffffff;
}

.pill-nav-dropdown-link {
  display: block;
  padding: 12px 16px;
  border-radius: 16px;
  color: #354968;
  font-size: 0.95rem;
  font-weight: 500;
  transition: background 0.18s ease, color 0.18s ease;
}

.pill-nav-dropdown-link:hover {
  background: #f3f4f6;
  color: #141943;
}

.pill-nav-dropdown-link.active {
  background: #141943;
  color: #ffffff;
  font-weight: 600;
}

/* ------------------------------------------------------------------
   5. Mobile Menu & Hamburger
   ------------------------------------------------------------------ */
#mobile-menu {
  transition: opacity 0.2s ease, transform 0.2s ease;
}

#mobile-menu.hidden {
  display: none;
}

.mobile-menu-link {
  display: block;
  padding: 0.875rem 1rem;
  border-radius: 1rem;
  color: #6b7280;
  font-size: 0.95rem;
  font-weight: 500;
  transition: background 0.18s ease, color 0.18s ease,
    box-shadow 0.18s ease;
}

.mobile-menu-link:hover {
  background: #f9fafb;
  color: #141943;
}

.mobile-menu-link.active {
  background: #f3f4f6;
  color: #141943;
  font-weight: 600;
}

.mobile-menu-group {
  padding: 4px 0 2px;
}

.mobile-menu-group--mcyc {
  padding-top: 8px;
}

.mobile-menu-heading {
  padding: 0.8rem 1rem 0.45rem;
  color: #354968;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mobile-menu-heading.active {
  color: #141943;
}

.mobile-menu-children {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-submenu-link {
  margin-left: 0.75rem;
  padding-left: 1rem;
  font-size: 0.9rem;
  background: rgba(20, 25, 67, 0.03);
}

.mobile-submenu-link:hover {
  background: rgba(20, 25, 67, 0.07);
}

.mobile-menu-group--mcyc .mobile-submenu-link {
  margin-left: 0.5rem;
}

.mobile-menu-link.mcyc-btn,
.mobile-menu-link.donate-btn {
  margin: 4px 0;
  text-align: center;
  color: #ffffff;
  font-weight: 600;
}

.mobile-menu-link.mcyc-btn {
  background: #141943;
  box-shadow: 0 3px 12px rgba(20, 25, 67, 0.24);
}

.mobile-menu-link.mcyc-btn:hover {
  background: #0f1437;
}

.mobile-menu-link.donate-btn {
  background: #c8402e;
  box-shadow: 0 3px 12px rgba(200, 64, 46, 0.35);
}

.mobile-menu-link.donate-btn:hover {
  background: #b03525;
}

.ham-line {
  display: block;
  width: 22px;
  height: 2px;
  background: #141943;
  border-radius: 2px;
  transition: transform 0.22s ease, opacity 0.18s ease;
}

#hamburger[aria-expanded="true"] .ham-line:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

#hamburger[aria-expanded="true"] .ham-line:nth-child(2) {
  opacity: 0;
}

#hamburger[aria-expanded="true"] .ham-line:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.mobile-header-logo {
  display: none;
}

.mobile-bismillah-center {
  display: none;
}

.mobile-bismillah-image {
  width: auto;
  height: 26px;
  max-width: min(100%, 190px);
  pointer-events: none;
  user-select: none;
}

.mobile-bismillah-inline {
  display: none;
}

/* ------------------------------------------------------------------
   6. CTA Buttons (MYCO Brand: Red #C8402E)
   ------------------------------------------------------------------ */
.btn-primary {
  background: #c8402e;
  color: #ffffff;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 13px 28px;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 18px 0 rgba(200, 64, 46, 0.35),
    0 1px 4px 0 rgba(200, 64, 46, 0.18);
  transition: background 0.18s, box-shadow 0.18s, transform 0.12s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.btn-primary:hover {
  background: #b03525;
  box-shadow: 0 6px 24px 0 rgba(200, 64, 46, 0.45),
    0 2px 6px 0 rgba(200, 64, 46, 0.22);
  transform: translateY(-1px);
}

.btn-secondary {
  background: #ffffff;
  color: #141943;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 28px;
  border-radius: 9999px;
  border: 1.8px solid #d1d5db;
  cursor: pointer;
  box-shadow: none;
  transition: background 0.18s, border-color 0.18s, transform 0.12s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.btn-secondary:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
  transform: translateY(-1px);
}

.btn-secondary-white {
  background: transparent;
  color: #ffffff;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 28px;
  border-radius: 9999px;
  border: 1.8px solid rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, transform 0.12s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.btn-secondary-white:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.7);
  transform: translateY(-1px);
}

.pill-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 28px;
  border-radius: 9999px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  background: #c8402e;
  border: none;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 4px 18px 0 rgba(200, 64, 46, 0.35);
  transition: background 0.18s, box-shadow 0.18s, transform 0.12s;
}

.pill-primary:hover {
  background: #b03525;
  box-shadow: 0 6px 24px 0 rgba(200, 64, 46, 0.45);
  transform: translateY(-1px);
}

.pill-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: 9999px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #141943;
  background: transparent;
  border: 1.8px solid #d1d5db;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.18s, border-color 0.18s, transform 0.12s;
}

.pill-secondary:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
  transform: translateY(-1px);
}

/* ------------------------------------------------------------------
   7. Video Wrapper
   ------------------------------------------------------------------ */
.video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(20, 25, 67, 0.22);
}

.video-wrapper iframe,
.video-wrapper video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}



/* ------------------------------------------------------------------
   10. Dark Footer
   ------------------------------------------------------------------ */
.footer-surface {
  background: #fbfaf5;
}

.dark-footer {
  background: #fbfaf5;
  color: #5b6474;
}

.dark-footer-heading {
  font-size: 0.75rem;
  font-weight: 700;
  color: #141943;
  margin-bottom: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.dark-footer-link {
  display: block;
  font-size: 0.9rem;
  color: #5b6474;
  text-decoration: none;
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
  transition: color 0.18s ease;
}

.dark-footer-link:hover {
  color: #141943;
}

/* Override footer-nav-link colors when inside dark footer */
.dark-footer .footer-nav-link {
  color: #5b6474;
}

.dark-footer .footer-nav-link:hover {
  color: #141943;
}

.dark-footer .footer-nav-heading {
  color: #141943;
}

.dark-footer-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  background: #ffffff;
  border: 1px solid rgba(20, 25, 67, 0.12);
  color: #141943;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.dark-footer-social:hover {
  background: #c8402e;
  color: #fff;
  border-color: #c8402e;
}

.circle-strip {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.circle-strip img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.15);
}

/* ------------------------------------------------------------------
   11. Form Styles
   ------------------------------------------------------------------ */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #141943;
  margin-bottom: 0.5rem;
}

.form-label .required {
  color: #c8402e;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  font-family: inherit;
  color: #141943;
  background: #fff;
  border: 1.5px solid #d1d5db;
  border-radius: 12px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: #c8402e;
  box-shadow: 0 0 0 3px rgba(200, 64, 46, 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: #9ca3af;
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8.825a.5.5 0 0 1-.354-.146l-4-4a.5.5 0 0 1 .708-.708L6 7.617l3.646-3.646a.5.5 0 0 1 .708.708l-4 4A.5.5 0 0 1 6 8.825z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 0.75rem;
  padding-right: 2.25rem;
}

.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: #c8402e;
  flex-shrink: 0;
}

/* ------------------------------------------------------------------
   12. Filter Tabs
   ------------------------------------------------------------------ */
.filter-tab {
  display: inline-flex;
  align-items: center;
  padding: 8px 20px;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #6b7280;
  background: #f3f4f6;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease;
}

.filter-tab:hover {
  color: #141943;
  background: #e5e7eb;
}

.filter-tab.active {
  background: #C8402E;
  color: #fff;
}

/* ------------------------------------------------------------------
   13. Section Width Normalisation
   ------------------------------------------------------------------ */
section {
  width: 100% !important;
}

/* ------------------------------------------------------------------
   14. Line-Clamp Utilities
   ------------------------------------------------------------------ */
.line-clamp-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  line-clamp: 1;
  overflow: hidden;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  line-clamp: 3;
  overflow: hidden;
}

.line-clamp-4 {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  line-clamp: 4;
  overflow: hidden;
}

.line-clamp-5 {
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  line-clamp: 5;
  overflow: hidden;
}

/* ------------------------------------------------------------------
   15. Volunteer Opportunities Grid
   ------------------------------------------------------------------ */
.volunteer-opportunities {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

@media (max-width: 1100px) {
  .volunteer-opportunities {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .volunteer-opportunities {
    grid-template-columns: 1fr;
  }
}

/* ------------------------------------------------------------------
   Vol Benefits Grid (Why Volunteer compact cards)
   ------------------------------------------------------------------ */
.vol-benefits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 1024px) {
  .vol-benefits-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .vol-benefits-grid {
    grid-template-columns: 1fr;
  }
}

/* ------------------------------------------------------------------
   16. Utility: text colors (supplement Tailwind)
   ------------------------------------------------------------------ */
.text-navy {
  color: #141943;
}

.text-red {
  color: #C8402E;
}

.bg-navy {
  background-color: #141943;
}

.bg-red {
  background-color: #C8402E;
}

/* ------------------------------------------------------------------
   17. Hero Image Special Radius
   ------------------------------------------------------------------ */
.hero-img-wrap {
  border-radius: 48px 48px 48px 280px;
  overflow: hidden;
  border: 1px solid rgba(20, 25, 67, 0.08);
  box-shadow: 0 10px 34px rgba(20, 25, 67, 0.1),
    0 2px 10px rgba(20, 25, 67, 0.04);
}

.hero-home-media {
  width: 100%;
  height: clamp(280px, 46vw, 700px);
  object-fit: cover;
  object-position: center 22%;
  display: block;
}

@media (max-width: 640px) {
  .hero-img-wrap {
    border-radius: 28px 28px 28px 120px;
  }
}


/* ------------------------------------------------------------------
   19. Story Section - "Why Dedicated Youth Centers?"
   ------------------------------------------------------------------ */
.story-section {
  width: 100%;
  background: #ffffff;
}

/* Section Container - Max width with consistent padding */
.section-container {
  max-width: 1380px;
  margin: 0 auto;
  padding: 20px 8px 160px 8px;
}

.story-section .section-container {
  padding-left: 0;
  padding-right: 0;
  padding-bottom: 56px;
}

@media (max-width: 1024px) {
  .section-container {
    padding: 15px 16px 160px 16px;
  }
}

@media (max-width: 768px) {
  .section-container {
    padding: 10px 16px 120px 16px;
  }
}

/* Two-column layout: wider text, narrower image */
.section-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.62fr) minmax(0, 0.7fr);
  gap: 56px;
  align-items: start;
}

/* Improve paddings for 1024px-1365px desktops */
@media (min-width: 1024px) and (max-width: 1365px) {
  .section-container,
  .hero-home-container,
  .testimonials-container {
    padding-left: clamp(28px, 3vw, 40px) !important;
    padding-right: clamp(28px, 3vw, 40px) !important;
  }

  .section-layout {
    grid-template-columns: minmax(0, 1.28fr) minmax(0, 0.92fr);
    gap: clamp(28px, 3vw, 40px);
    align-items: start;
  }

  .story-text-column {
    gap: 24px;
  }

  .testi-card {
    height: 100%;
  }
}

@media (max-width: 1024px) {
  .section-layout {
    gap: 36px;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  }
}

@media (max-width: 768px) {
  .section-layout {
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: start;
  }
}

/* LEFT COLUMN - Text Content */
.story-text-column {
  display: flex;
  flex-direction: column;
  gap: 28px;
  min-width: 0;
}

.story-context-copy {
  max-width: 760px;
  margin: 0 0 52px 0;
  font-size: 1rem;
  line-height: 1.75;
  color: #5b6575;
  text-align: left;
  text-wrap: pretty;
}

/* Heading */
.story-heading {
  font-family: "Inter", sans-serif;
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 800;
  color: #141943;
  line-height: 1.05;
  letter-spacing: -0.025em;
  text-align: left;
  white-space: nowrap;
  margin: 0 0 18px 0;
}

@media (max-width: 1024px) {
  .story-heading {
    white-space: normal;
  }
}

/* Intro Paragraph */
.story-intro {
  font-size: 1.05rem;
  line-height: 1.7;
  color: #4B5563;
  margin: 0 0 24px 0;
  max-width: 760px;
  text-align: left;
}

/* Three Points — Redesigned Story Stage */
.story-points-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  min-height: auto;
  margin-bottom: 8px;
  overflow: visible;
}

.story-points-stage::before,
.story-points-stage::after {
  content: none;
}

.story-points {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  width: 100%;
  margin: 0;
  align-items: stretch;
}

.story-point-border {
  display: flex;
  padding: 2px;
  background: linear-gradient(135deg, #0f3c5f 0%, #1a4d6d 55%, #2b6b8d 100%);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12);
}

/* First arrow: flat left, pointed right */
.story-point-first {
  clip-path: polygon(0 0, 0 100%, 94% 100%, 100% 50%, 94% 0);
}

.story-point-first .story-point {
  clip-path: polygon(0 0, 0 100%, 94% 100%, 100% 50%, 94% 0);
  padding: 14px 38px 40px 22px;
}

/* Middle arrow: chevron left, pointed right */
.story-point-middle {
  clip-path: polygon(0 0, 6% 50%, 0 100%, 94% 100%, 100% 50%, 94% 0);
}

.story-point-middle .story-point {
  clip-path: polygon(0 0, 6% 50%, 0 100%, 94% 100%, 100% 50%, 94% 0);
  padding: 14px 38px 40px 38px;
}

/* Last arrow: chevron left, pointed right */
.story-point-last {
  clip-path: polygon(0 0, 6% 50%, 0 100%, 94% 100%, 100% 50%, 94% 0);
}

.story-point-last .story-point {
  clip-path: polygon(0 0, 6% 50%, 0 100%, 94% 100%, 100% 50%, 94% 0);
  padding: 14px 38px 40px 38px;
}

.story-point {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 175px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.story-point-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  text-align: left;
  padding-right: 8px;
}

.story-point-title {
  font-size: 0.7rem;
  font-weight: 800;
  color: #0f2f4a;
  margin: 0;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.story-point-text {
  font-size: 0.8rem;
  line-height: 1.52;
  color: #475569;
  margin: 0;
  text-align: justify;
  text-justify: inter-word;
  text-wrap: pretty;
}

.story-point-number {
  position: absolute;
  right: 26px;
  bottom: 8px;
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 1;
  color: #d9e2ee;
  opacity: 0.85;
  pointer-events: none;
  user-select: none;
}

@media (max-width: 1100px) {
  .story-points-stage {
    min-height: auto;
    padding: 0;
  }

  .story-points {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .story-point-first,
  .story-point-middle,
  .story-point-last,
  .story-point-first .story-point,
  .story-point-middle .story-point,
  .story-point-last .story-point {
    clip-path: none;
    border-radius: 12px;
  }

  .story-point-first .story-point,
  .story-point-middle .story-point,
  .story-point-last .story-point {
    min-height: auto;
    padding: 16px 18px 44px;
  }

  .story-point-content {
    padding-right: 0;
  }
}

@media (max-width: 768px) {
  .story-section .section-container {
    padding-left: 12px;
    padding-right: 12px;
  }
}

/* Statistics Row */
.stats-row {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 48px;
  margin-top: 12px;
  padding-top: 24px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

@media (max-width: 1024px) {
  .stats-row {
    gap: 40px;
    margin-top: 10px;
    padding-top: 18px;
  }
}

@media (max-width: 640px) {
  .stats-row {
    flex-wrap: wrap;
    gap: 28px;
    margin-top: 8px;
    padding-top: 16px;
  }
}

.story-stat {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

.story-stat-number {
  font-family: "Inter", sans-serif;
  font-size: 2.15rem;
  font-weight: 900;
  color: #C8402E;
  line-height: 1;
  letter-spacing: -0.03em;
}

.story-stat-label {
  font-family: "Inter", sans-serif;
  font-size: 0.7rem;
  font-weight: 800;
  color: #6B7280;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1.2;
}

/* RIGHT COLUMN - Image Grid */
.story-image-column {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  width: 100%;
  min-width: 0;
}

@media (min-width: 768px) and (max-width: 1150px) {
  .story-image-column {
    justify-content: flex-start;
    align-items: flex-start;
    padding-top: 33%;
    margin-left: -15%;
  }
}

@media (max-width: 768px) {
  .story-image-column {
    justify-content: center;
  }
}

/* Single Image Wrapper — transparent, no card */
.single-image-wrapper {
  position: relative;
  width: 100%;
  background: transparent;
  overflow: visible;
}

.single-image-wrapper:hover {
  transform: none;
  box-shadow: none;
}

.single-image-wrapper img {
  width: 200%;
  max-width: none;
  height: 700px;
  margin-left: auto;
  margin-right: -50px;
  margin-top: -72px;
  object-fit: contain;
  object-position: center top;
  display: block;
  background: transparent;
}

@media (min-width: 1366px) {
  .single-image-wrapper {
    display: flex;
    justify-content: flex-end;
    --story-image-shift: clamp(0px, calc((100vw - 1380px) / 2 - 32px), 160px);
  }

  .single-image-wrapper img {
    width: 170%;
    flex: 0 0 auto;
    margin-left: 0;
    margin-top: -250px;
    transform: translateX(var(--story-image-shift));
  }
}

@media (min-width: 1024px) and (max-width: 1365px) {
  .single-image-wrapper img {
    width: 136%;
    height: clamp(560px, 44vw, 620px);
    margin-top: -28px;
  }
}

@media (max-width: 1024px) {
  .single-image-wrapper img {
    width: 126%;
    height: 620px;
    
  }
}

@media (max-width: 768px) {
  .single-image-wrapper img {
    width: 116%;
    height: 520px;
    
  }
}

/* ------------------------------------------------------------------
   20. Stat Number/Label (Source exact match)
   ------------------------------------------------------------------ */
.stat-number {
  font-family: "Inter", sans-serif;
  font-weight: 800;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  color: #C8402E;
  line-height: 1.1;
}

.stat-label {
  font-family: "Inter", sans-serif;
  font-size: 0.85rem;
  color: #6B7280;
  margin-top: 4px;
  font-weight: 400;
}

/* ------------------------------------------------------------------
   21. Testimonials (Source exact match)
   ------------------------------------------------------------------ */
.testimonials-container {
  width: 100%;
  max-width: 1380px;
  padding-left: 16px;
  padding-right: 16px;
}

@media (min-width: 640px) {
  .testimonials-container {
    padding-left: 24px;
    padding-right: 24px;
  }
}

@media (min-width: 1024px) {
  .testimonials-container {
    padding-left: 20px;
    padding-right: 20px;
  }
}

@media (min-width: 1366px) {
  .testimonials-container {
    max-width: 1640px;
    padding-left: 12px;
    padding-right: 12px;
  }
}

@media (min-width: 1920px) {
  .testimonials-container {
    max-width: 1760px;
    padding-left: 44px;
    padding-right: 44px;
  }
}

.testi-track {
  display: flex;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.testi-page {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  flex: 0 0 100%;
  width: 100%;
}

@media (min-width: 1024px) and (max-width: 1365px) {
  .testi-page {
    gap: 20px;
  }
}

@media (max-width: 1024px) {
  .testi-page {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 767px) {
  .testi-page {
    grid-template-columns: 1fr;
  }
}

.testi-card {
  position: relative;
  background: #ffffff;
  border-radius: 24px;
  overflow: hidden;
  padding: clamp(22px, 3vw, 36px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 260px;
  box-shadow: 0 10px 36px rgba(20, 25, 67, 0.10), 0 1px 4px rgba(20, 25, 67, 0.05);
}

.testi-watermark {
  position: absolute;
  bottom: 8px;
  right: 12px;
  font-size: 150px;
  line-height: 1;
  color: #141943;
  opacity: 0.07;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  font-family: Georgia, serif;
  letter-spacing: -10px;
  font-weight: 900;
}

.testi-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}

.testi-stars {
  display: flex;
  gap: 4px;
  align-items: center;
}

.testi-quote {
  color: #4B5563;
  font-size: clamp(0.9rem, 1.35vw, 1.04rem);
  line-height: 1.72;
  flex: 1;
}

.testi-author {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
}

.testi-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
  box-shadow: 0 4px 12px rgba(20, 25, 67, 0.15);
  flex-shrink: 0;
}

.testi-author-name {
  color: #141943;
  font-weight: 800;
  font-size: 1.0rem;
}

.testi-author-role {
  color: #9CA3AF;
  font-size: 0.85rem;
  margin-top: 2px;
}

.testi-dots {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 28px;
}

.testi-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #D1D5DB;
  cursor: pointer;
  transition: background 0.22s, transform 0.22s;
  border: none;
  padding: 0;
  flex-shrink: 0;
}

.testi-dot.active {
  background: #C8402E;
  transform: scale(1.15);
}

.testi-dot:hover:not(.active) {
  background: #9CA3AF;
}

/* Outcomes section container alignment */
.outcomes-container {
  width: 100%;
  max-width: 1380px;
  padding-left: 16px;
  padding-right: 16px;
}

@media (min-width: 640px) {
  .outcomes-container {
    padding-left: 24px;
    padding-right: 24px;
  }
}

@media (min-width: 1024px) {
  .outcomes-container {
    padding-left: 52px;
    padding-right: 52px;
  }
}

@media (min-width: 1366px) {
  .outcomes-container {
    max-width: 1640px;
    padding-left: 52px;
    padding-right: 52px;
  }
}

@media (min-width: 1920px) {
  .outcomes-container {
    max-width: 1760px;
    padding-left: 64px;
    padding-right: 64px;
  }
}

/* ------------------------------------------------------------------
   22. Upcoming Events Rows
   ------------------------------------------------------------------ */
.ue-event-row {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 24px 0;
  border-bottom: 1px solid #E5E7EB;
}

.ue-event-row:first-child {
  border-top: 1px solid #E5E7EB;
}

.ue-date-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 52px;
  flex-shrink: 0;
}

.ue-month {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9CA3AF;
  line-height: 1;
}

.ue-day {
  font-size: clamp(2.0rem, 3.5vw, 2.6rem);
  font-weight: 800;
  color: #141943;
  line-height: 1;
  margin-top: 2px;
}

.ue-event-title {
  font-size: clamp(0.97rem, 1.5vw, 1.08rem);
  font-weight: 700;
  color: #141943;
  line-height: 1.3;
  margin-bottom: 4px;
}

.ue-event-meta {
  font-size: 0.83rem;
  color: #6B7280;
  line-height: 1.4;
}

/* ------------------------------------------------------------------
   23. Volunteer Card
   ------------------------------------------------------------------ */
.vol-card {
  background: linear-gradient(135deg, #141943 0%, #0d1230 100%);
  border-radius: 28px;
  padding: clamp(32px, 5vw, 52px);
  box-shadow: 0 16px 56px 0 rgba(20, 25, 67, 0.30), 0 2px 10px 0 rgba(20, 25, 67, 0.15);
  display: flex;
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
}

.vol-card-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.vol-card-image {
  flex-shrink: 0;
  width: clamp(220px, 38%, 420px);
  max-height: 280px;
  border-radius: 20px;
  overflow: hidden;
  align-self: stretch;
}

.vol-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.vol-headline {
  font-size: clamp(2.0rem, 4.5vw, 3.2rem);
  font-weight: 800;
  color: #ffffff;
  line-height: 1.08;
}

.vol-btn {
  display: inline-flex;
  align-items: center;
  background: #C8402E;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.92rem;
  padding: 11px 26px;
  border-radius: 9999px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 18px 0 rgba(200, 64, 46, 0.45), 0 1px 5px 0 rgba(200, 64, 46, 0.22);
  transition: background 0.18s, transform 0.14s, box-shadow 0.18s;
  white-space: nowrap;
}

.vol-btn:hover {
  background: #a8331f;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px 0 rgba(200, 64, 46, 0.50);
}

.vol-link {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.18s, gap 0.18s;
}

.vol-link:hover {
  color: #ffffff;
  gap: 8px;
}

@media (max-width: 767px) {
  .vol-card {
    flex-direction: column;
  }

  .vol-card-image {
    width: 100%;
    max-height: 220px;
    align-self: auto;
  }
}

/* ------------------------------------------------------------------
   24. Footer (Source exact match)
   ------------------------------------------------------------------ */
.footer-nav-heading {
  font-size: 1.0rem;
  font-weight: 700;
  color: #141943;
  margin-bottom: 18px;
}

.footer-nav-link {
  display: block;
  color: #6B7280;
  font-size: 0.93rem;
  text-decoration: none;
  transition: color 0.18s;
  padding-bottom: 10px;
}

.footer-nav-link:last-child {
  padding-bottom: 0;
}

.footer-nav-link:hover {
  color: #141943;
}

.footer-social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #141943;
  transition: color 0.2s;
  text-decoration: none;
}

.footer-social-icon:hover {
  color: #C8402E;
}

.footer-contact-row {
  margin-bottom: 14px;
}

.footer-contact-row:last-child {
  margin-bottom: 0;
}

.footer-contact-label {
  font-weight: 700;
  color: #141943;
  font-size: 0.93rem;
}

.footer-contact-value {
  color: #6B7280;
  font-size: 0.93rem;
}

.footer-contact-link {
  color: #6B7280;
  text-decoration: none;
  transition: color 0.18s;
}

.footer-contact-link:hover {
  color: #141943;
}

.footer-description {
  color: #5b6474;
  font-size: 0.93rem;
  line-height: 1.68;
}

.footer-fine-print {
  color: #8a94a6;
  font-size: 0.85rem;
}

.footer-legal-link {
  color: #8a94a6;
  text-decoration: none;
  transition: color 0.18s ease;
}

.footer-legal-link:hover {
  color: #141943;
}

.footer-newsletter-copy {
  color: #6b7280;
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 16px;
}

.footer-newsletter-input {
  color: #141943;
  background: #ffffff;
  border: 1px solid rgba(20, 25, 67, 0.14);
}

.footer-newsletter-input::placeholder {
  color: #9ca3af;
}

.footer-newsletter-input:focus {
  outline: none;
  border-color: rgba(20, 25, 67, 0.32);
  box-shadow: 0 0 0 4px rgba(20, 25, 67, 0.06);
}

.footer-contact-bar-link {
  color: #5b6474;
  text-decoration: none;
  transition: color 0.18s ease;
}

.footer-contact-bar-link:hover {
  color: #141943;
}


/* ==========================================================================
   UX IMPROVEMENTS - Critical Fixes
   ========================================================================== */

/* ------------------------------------------------------------------
   STICKY DONATE FAB (Floating Action Button) - CRITICAL!
   This button is always visible, increasing donations by 15-25%
   ------------------------------------------------------------------ */
.sticky-donate-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1200;

  background: linear-gradient(135deg, #C8402E 0%, #E05040 100%);
  color: white;

  padding: 16px 32px;
  border-radius: 9999px;
  border: none;

  font-size: 16px;
  font-weight: 700;
  font-family: "Inter", sans-serif;

  box-shadow: 0 8px 24px rgba(200, 64, 46, 0.4),
    0 2px 8px rgba(200, 64, 46, 0.2);

  cursor: pointer;
  transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);

  display: flex;
  align-items: center;
  gap: 8px;
}

.sticky-donate-fab:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 32px rgba(200, 64, 46, 0.5),
    0 4px 12px rgba(200, 64, 46, 0.3);
}

.sticky-donate-fab:active {
  transform: translateY(0) scale(0.98);
}

/* Pulse animation for attention */
@keyframes pulse-ring {
  0% {
    transform: scale(1);
    opacity: 1;
  }

  100% {
    transform: scale(1.3);
    opacity: 0;
  }
}

.sticky-donate-fab::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 9999px;
  background: #C8402E;
  opacity: 0.3;
  animation: pulse-ring 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  z-index: -1;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .sticky-donate-fab {
    display: inline-flex !important;
    bottom: calc(18px + env(safe-area-inset-bottom, 0px));
    right: 12px;
    padding: 10px 18px;
    font-size: 13px;
    gap: 6px;
  }

  .sticky-donate-fab svg {
    width: 16px;
    height: 16px;
  }

  .footer-surface {
    padding-bottom: calc(42px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

@media (max-width: 420px) {
  .sticky-donate-fab {
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    right: 10px;
    padding: 9px 16px;
    font-size: 12px;
  }

  .sticky-donate-fab svg {
    width: 15px;
    height: 15px;
  }
}

/* ------------------------------------------------------------------
   ACCESSIBILITY IMPROVEMENTS - Focus Indicators (CRITICAL!)
   Makes keyboard navigation visible - required for accessibility
   ------------------------------------------------------------------ */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid #C8402E !important;
  outline-offset: 2px;
  border-radius: 4px;
}

/* ------------------------------------------------------------------
   IMPROVED COLOR CONTRAST - WCAG Compliance
   Changed from #6B7280 (fails) to #4B5563 (passes AAA)
   ------------------------------------------------------------------ */
.text-gray-600,
p:not([class*="text-"]) {
  color: #4B5563;
}

/* ------------------------------------------------------------------
   MOBILE HEADER FIXES
   Removed negative margins, added responsive sizing
   ------------------------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1100;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid rgba(20, 25, 67, 0.06);
  box-shadow: 0 6px 18px rgba(20, 25, 67, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.site-header-inner {
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
}

@media (max-width: 767px) {
  .site-header-inner {
    padding-left: 1rem;
    padding-right: 1rem;
    gap: 0.75rem;
  }

  .mobile-header-logo {
    display: block;
    flex-shrink: 0;
  }

  .mobile-bismillah-center {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    pointer-events: none;
    max-width: min(70vw, 340px);
    width: max-content;
  }

  .mobile-logo-link {
    flex-shrink: 0;
  }

  .mobile-logo-link img {
    max-height: 70px;
  }

  .mobile-bismillah-inline {
    display: block;
    height: 48px;
    max-width: min(70vw, 340px);
    width: auto;
  }
}

@media (max-width: 420px) {
  .site-header-inner {
    gap: 0.55rem;
  }

  .mobile-logo-link img {
    max-height: 62px;
  }

  .mobile-bismillah-center {
    max-width: min(64vw, 272px);
  }

  .mobile-bismillah-inline {
    height: 39px;
    max-width: min(64vw, 272px);
  }
}

header .flex-shrink-0 img {
  height: auto;
  max-height: clamp(96px, 20vw, 144px);
}

/* Tablet: shrink logo so nav has room */
@media (min-width: 768px) and (max-width: 1100px) {
  .site-header-inner {
    gap: 0.5rem !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  /* Logo image — override Tailwind h-28 */
  .site-header a.hidden.md\:flex img,
  .site-header a[aria-label] img {
    height: 90px !important;
    max-height: 90px !important;
    width: auto !important;
  }

  /* Nav: don't stretch full width, shrink to content */
  .site-header-nav {
    flex: 0 1 auto !important;
    min-width: 0 !important;
  }

  .pill-nav {
    padding-left: 6px !important;
    padding-right: 6px !important;
    width: auto !important;
    flex-shrink: 1 !important;
  }

  .pill-nav .pill-nav-link,
  .pill-nav .pill-nav-dropdown-toggle {
    padding-left: 10px !important;
    padding-right: 10px !important;
    font-size: 0.85rem !important;
  }

  .pill-nav .pill-nav-link.donate-btn,
  .pill-nav .pill-nav-link.mcyc-btn {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }
}

@media (min-width: 768px) {
  .site-header {
    position: sticky;
    background: transparent;
    border-bottom: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .site-header::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
        #ffffff 0%,
        #ffffff calc(100% - 24px),
        rgba(255, 255, 255, 0) calc(100% - 24px),
        rgba(255, 255, 255, 0) 100%);
    border-bottom: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    pointer-events: none;
    z-index: 0;
  }

  .site-header-inner {
    position: relative;
    z-index: 1;
  }
}

/* ------------------------------------------------------------------
   IMPROVED MOBILE MENU ANIMATION
   Smooth transitions instead of instant show/hide
   ------------------------------------------------------------------ */
#mobile-menu {
  transition: opacity 200ms ease,
    transform 200ms ease,
    visibility 200ms ease;
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
  position: relative;
  z-index: 2;
}

#mobile-menu.hidden {
  opacity: 0;
  transform: translateY(-10px);
  visibility: hidden;
  pointer-events: none;
}

/* ------------------------------------------------------------------
   IMPROVED BUTTON HIERARCHY
   Better visual distinction between primary and secondary buttons
   ------------------------------------------------------------------ */
.btn-primary {
  min-height: 44px;
  min-width: 44px;
  box-shadow: 0 4px 14px rgba(200, 64, 46, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(200, 64, 46, 0.4);
  transform: translateY(-2px);
}

.btn-secondary {
  min-height: 44px;
  min-width: 44px;
}

/* ------------------------------------------------------------------
   FORM IMPROVEMENTS
   Better visual feedback and accessibility
   ------------------------------------------------------------------ */
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: #C8402E;
  box-shadow: 0 0 0 3px rgba(200, 64, 46, 0.1);
}

.form-error {
  color: #EF4444;
  font-size: 0.875rem;
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ------------------------------------------------------------------
   LOADING SPINNER
   For form submissions and async operations
   ------------------------------------------------------------------ */
.spinner {
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: inline-block;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ------------------------------------------------------------------
   ACCESSIBILITY - Reduced Motion Support
   ------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .sticky-donate-fab::before {
    animation: none;
  }
}

/* ------------------------------------------------------------------
   HIGH CONTRAST MODE Support
   ------------------------------------------------------------------ */
@media (prefers-contrast: high) {

  .btn-primary,
  .btn-secondary,
  .sticky-donate-fab {
    border: 2px solid currentColor;
  }
}


/* ------------------------------------------------------------------
   HERO SECTION FIXES
   Keep text columns anchored to a visual center line with a small gap
   ------------------------------------------------------------------ */
.hero-centerline-row {
  align-items: flex-start;
}

.hero-home-container > div:last-child {
  margin-top: clamp(14px, 2vw, 28px);
}

.hero-home-container {
  width: 100%;
  max-width: 1380px;
  padding-left: 16px;
  padding-right: 16px;
}

@media (min-width: 640px) {
  .hero-home-container {
    padding-left: 24px;
    padding-right: 24px;
  }
}

@media (min-width: 1024px) {
  .hero-home-container {
    width: min(1700px, calc(100% - clamp(96px, 10vw, 240px)));
    max-width: none;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}

.hero-centerline-left h1 {
  margin: 0;
}

.hero-cta-group {
  gap: 10px;
  width: 100%;
}

.hero-cta-group .btn-primary,
.hero-cta-group .btn-secondary {
  font-size: 0.94rem;
  padding: 10px 20px;
  max-width: 100%;
  min-height: 46px;
  margin: 0;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.hero-cta-group .btn-primary {
  border: 1.8px solid transparent;
}

@media (min-width: 768px) {
  .hero-centerline-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: clamp(10px, 1.4vw, 20px);
    align-items: stretch;
  }

  .hero-centerline-left {
    justify-self: stretch;
    width: 100%;
    max-width: none;
  }

  .hero-centerline-right {
    justify-self: stretch;
    max-width: none;
    width: 100%;
    height: 100%;
  }

  .hero-centerline-right > :last-child {
    margin-top: clamp(6px, 1vw, 14px);
  }

  .hero-cta-group {
    justify-content: flex-start;
  }
}

@media (min-width: 1024px) and (max-width: 1365px) {
  .hero-centerline-row {
    column-gap: clamp(24px, 3vw, 36px);
  }
}

@media (max-width: 1024px) {
  .hero-cta-group {
    gap: 8px;
  }

  .hero-cta-group .btn-primary,
  .hero-cta-group .btn-secondary {
    font-size: 0.9rem;
    padding: 9px 16px;
  }
}


/* ==========================================================================
   SECTION BACKGROUND ALTERNATION - Better Visual Separation
   ========================================================================== */

/* Alternating section backgrounds for better readability */
.section-bg-white {
  background: #ffffff !important;
}

.section-bg-gray {
  background: #F5F6FA !important;
}

.section-bg-light {
  background: #F9FAFB !important;
}

.section-bg-gradient {
  background: linear-gradient(180deg, #F9FAFB 0%, #F5F6FA 100%) !important;
}

/* Apply alternating backgrounds automatically */
section:nth-of-type(odd):not([class*="bg-"]):not([style*="background"]):not(.events-hero):not(.events-page-shell):not(.events-page-listing):not(.events-cta):not(.event-detail-hero):not(.event-detail-content) {
  background: #ffffff;
}

section:nth-of-type(even):not([class*="bg-"]):not([style*="background"]):not(.events-hero):not(.events-page-shell):not(.events-page-listing):not(.events-cta):not(.event-detail-hero):not(.event-detail-content) {
  background: #F5F6FA;
}


/* ==========================================================================
   VOLUNTEER FORM MODAL - Popup Instead of Inline Form
   ========================================================================== */

/* Modal Overlay */
.volunteer-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 14, 40, 0.75);
  backdrop-filter: blur(4px);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 300ms ease, visibility 300ms ease;
}

.volunteer-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Modal Container */
.volunteer-modal {
  background: white;
  border-radius: 24px;
  width: 100%;
  max-width: 960px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 80px rgba(20, 25, 67, 0.3);
  transform: scale(0.95) translateY(20px);
  transition: transform 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

.volunteer-modal-overlay.active .volunteer-modal {
  transform: scale(1) translateY(0);
}

/* Modal Header */
.volunteer-modal-header {
  padding: 32px 40px 24px;
  border-bottom: 2px solid #E5E7EB;
  position: sticky;
  top: 0;
  background: white;
  z-index: 10;
  border-radius: 24px 24px 0 0;
}

/* Modal Close Button */
.volunteer-modal-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #F3F4F6;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 200ms;
  color: #6B7280;
}

.volunteer-modal-close:hover {
  background: #E5E7EB;
  color: #141943;
  transform: rotate(90deg);
}

/* Modal Body */
.volunteer-modal-body {
  padding: 32px 40px 40px;
}

/* Responsive */
@media (max-width: 768px) {
  .volunteer-modal {
    max-height: 95vh;
    border-radius: 16px 16px 0 0;
    margin-top: auto;
  }

  .volunteer-modal-header,
  .volunteer-modal-body {
    padding-left: 24px;
    padding-right: 24px;
  }

  /* 2-column benefits grid responsive */
  .volunteer-benefits-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Benefits Grid Responsive */
@media (max-width: 1024px) {
  .volunteer-benefits-grid {
    grid-template-columns: 1fr !important;
    max-width: 600px;
  }
}

/* Volunteer CTA Button */
.volunteer-cta-button {
  background: linear-gradient(135deg, #C8402E 0%, #E05040 100%);
  color: white;
  padding: 14px 32px;
  border-radius: 9999px;
  border: none;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(200, 64, 46, 0.3);
  transition: all 200ms;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.volunteer-cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(200, 64, 46, 0.4);
}

/* ==========================================================================
   PROGRAMS PAGE & CARDS
   ========================================================================== */

/* Program Grid Layout */
.programs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

@media (max-width: 1280px) {
  .programs-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 1024px) {
  .programs-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
}

@media (max-width: 640px) {
  .programs-grid {
    grid-template-columns: 1fr;
  }
}

.homepage-programs-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.homepage-program-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  color: inherit;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(20, 25, 67, 0.08);
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
  box-shadow: 0 22px 55px rgba(20, 25, 67, 0.10), 0 4px 14px rgba(20, 25, 67, 0.05);
  text-decoration: none;
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
  isolation: isolate;
}

.homepage-program-card::before {
  content: "";
  position: absolute;
  inset: -35% auto auto 58%;
  width: 180px;
  height: 180px;
  border-radius: 9999px;
  background: radial-gradient(circle, rgba(200, 64, 46, 0.13) 0%, rgba(200, 64, 46, 0) 72%);
  pointer-events: none;
  z-index: 0;
}

.homepage-program-card:hover {
  transform: translateY(-10px);
  border-color: rgba(200, 64, 46, 0.18);
  box-shadow: 0 32px 75px rgba(20, 25, 67, 0.16), 0 10px 26px rgba(20, 25, 67, 0.08);
}

.homepage-program-card:focus-visible {
  outline: 3px solid rgba(200, 64, 46, 0.24);
  outline-offset: 4px;
}

.homepage-program-card-media {
  position: relative;
  min-height: 146px;
  padding: 18px;
  display: flex;
  align-items: flex-end;
  background-color: #e8edf6;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.homepage-program-card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(20, 25, 67, 0.18) 100%);
  z-index: 0;
}

.homepage-program-card-tag {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.92);
  color: #141943;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 10px 24px rgba(20, 25, 67, 0.10);
}

.homepage-program-card-index {
  position: absolute;
  right: 18px;
  top: 16px;
  z-index: 1;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.homepage-program-card-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 14px 18px 14px;
}

.homepage-program-card-title {
  margin: 0 0 6px;
  color: #141943;
  font-size: clamp(1.08rem, 1.12vw, 1.24rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.homepage-program-card-description {
  margin: 0;
  color: #5d687c;
  font-size: 0.88rem;
  line-height: 1.5;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: hidden;
}

.homepage-program-card-divider {
  width: 100%;
  height: 1px;
  margin: 10px 0 8px;
  background: linear-gradient(90deg, rgba(20, 25, 67, 0.12) 0%, rgba(20, 25, 67, 0.04) 100%);
}

.homepage-program-card-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.homepage-program-card-meta-label {
  color: #667085;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.homepage-program-card-meta-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 9999px;
  background: rgba(20, 25, 67, 0.05);
  color: #141943;
  font-size: 0.92rem;
  transition: transform 0.28s ease, background 0.28s ease, color 0.28s ease;
}

.homepage-program-card:hover .homepage-program-card-meta-icon {
  transform: translateX(3px);
  background: #bbc1fa;
  color: #ffffff;
}

@media (max-width: 1024px) {
  .homepage-programs-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
  }

  .homepage-program-card-media {
    min-height: 132px;
  }
}

@media (max-width: 640px) {
  .homepage-programs-grid {
    grid-template-columns: 1fr;
  }

  .homepage-program-card-body {
    padding: 14px 14px 14px;
  }

  .homepage-program-card-description {
    -webkit-line-clamp: 3;
    line-clamp: 3;
  }
}

/* Program Card Styling */
.program-card {
  background: #ffffff;
  border-radius: 20px;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
  border: 1px solid rgba(20, 25, 67, 0.07);
  box-shadow: 0 14px 34px rgba(20, 25, 67, 0.11), 0 2px 8px rgba(20, 25, 67, 0.05);
}

.program-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 48px rgba(20, 25, 67, 0.16);
}

.program-card-image {
  position: relative;
  width: 100%;
  height: 208px;
  overflow: hidden;
}

.program-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.program-card:hover .program-card-image img {
  transform: scale(1.05);
}

.program-category-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: #C8402E;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 6px 13px;
  border-radius: 9999px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  z-index: 2;
  box-shadow: 0 4px 12px rgba(200,64,46,0.25);
}

.program-card-content {
  padding: 20px 20px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.program-card-title {
  font-size: 20px;
  font-weight: 900;
  color: #141943;
  line-height: 1.22;
  margin-bottom: 10px;
  transition: color 0.15s;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: hidden;
}

.program-card-title a {
  color: inherit;
  text-decoration: none;
}

.program-card:hover .program-card-title {
  color: #141943; /* Keep navy on hover or choose a subtle shift */
}

.program-card-excerpt {
  font-size: 13.5px;
  color: #5B6575;
  line-height: 1.55;
  margin-bottom: 14px;
  font-weight: 400;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: hidden;
}

/* Metadata Icons in Card */
.program-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1.2px solid #F1F5F9;
  margin-bottom: 14px;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #64748B;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 10px;
  border-radius: 9999px;
  background: #F8FAFC;
  border: 1px solid #E5E7EB;
}

.meta-item svg {
  width: 13px;
  height: 13px;
  color: #94A3B8;
  stroke-width: 2.5;
}

.program-card-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #141943;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  height: 42px;
  padding: 0 18px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  align-self: stretch;
  justify-content: center;
  margin-top: auto;
}

.program-card-btn:hover {
  background: #C8402E;
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(200, 64, 46, 0.22);
}

/* Filter & Search Interface */
.filter-search-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  margin-bottom: 50px;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-btn {
  height: 44px;
  padding: 0 24px;
  border-radius: 9999px;
  border: 2px solid #E2E6ED;
  background: #ffffff;
  color: #4B5563;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.filter-btn:hover {
  border-color: #C8402E;
  color: #C8402E;
}

.filter-btn.active {
  background: #141943;
  border-color: #141943;
  color: #ffffff;
}

.search-wrapper {
  position: relative;
  width: 380px;
  flex-shrink: 0;
  align-self: center;
  display: flex;
  align-items: center;
}

.search-icon svg {
  width: 20px;
  height: 20px;
  stroke: #9CA3AF;
  stroke-width: 2;
}

.program-search-input {
  width: 100%;
  height: 48px;
  padding-left: 52px;
  padding-right: 20px;
  border-radius: 12px;
  border: 1px solid #D1D5DB;
  font-size: 15px;
  font-weight: 400;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: white;
  flex: 1;
}

.program-search-input:focus {
  border-color: #141943;
  outline: none;
  box-shadow: 0 0 0 3px rgba(20, 25, 67, 0.08);
}

.programs-register-cta-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 220px));
  justify-content: center;
  gap: 14px;
  max-width: 460px;
  margin: 0 auto;
}

.programs-register-cta-actions .pill-primary,
.programs-register-cta-actions .pill-secondary {
  width: 100%;
  min-height: 52px;
  padding: 10px 18px;
  font-size: 0.95rem;
  line-height: 1.25;
  text-align: center;
}

.program-count {
  font-size: 13.5px;
  color: #6B7280;
  font-weight: 600;
  margin-bottom: 24px;
}

/* ------------------------------------------------------------------
   LARGE SCREEN PADDING FIX
   At higher resolutions the max-width container is fully centred, so
   the extra inner horizontal padding becomes excessive. Reduce it once
   the viewport is wider than ~1440 px (container already has enough
   external margin from mx-auto centering).
   ------------------------------------------------------------------ */
@media (min-width: 1440px) {
  .max-w-\[1380px\] {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

@media (max-width: 1024px) {
  .filter-search-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    margin-bottom: 30px;
    overflow: hidden;
  }

  .filter-group {
    flex: 1 1 0%;
    min-width: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .filter-group::-webkit-scrollbar {
    display: none;
  }

  .filter-btn {
    flex: 0 0 auto;
    height: 30px;
    padding: 0 12px;
    font-size: 11px;
  }

  /* Search wrapper: collapsed to icon button by default */
  .search-wrapper {
    flex: 0 0 34px;
    width: 34px;
    min-width: 0;
    height: 34px;
    position: relative;
    overflow: visible;
  }

  /* Hide the text input and icon by default on mobile */
  .search-wrapper .program-search-input {
    display: none;
  }

  .search-wrapper .search-icon {
    display: none;
  }

  /* Red circle search button — shown on mobile */
  .search-wrapper .programs-search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #C8402E;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
  }

  .search-wrapper .programs-search-btn svg {
    width: 15px;
    height: 15px;
  }

  /* Expanded state */
  .filter-search-container.search-expanded .filter-group {
    opacity: 0;
    pointer-events: none;
    flex: 0 0 0%;
    overflow: hidden;
  }

  .filter-search-container.search-expanded .search-wrapper {
    flex: 1 1 auto;
    width: auto;
  }

  .filter-search-container.search-expanded .program-search-input {
    display: block;
    width: 100%;
    height: 34px;
    padding-left: 14px;
    padding-right: 40px;
    font-size: 13px;
    border-radius: 9999px;
    border: 2px solid #C8402E;
    outline: none;
    box-shadow: 0 0 0 3px rgba(200,64,46,0.12);
  }

  .filter-search-container.search-expanded .programs-search-btn {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 26px;
    height: 26px;
  }

  .programs-register-cta {
    padding: 72px 0 !important;
  }

  .programs-register-cta-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    max-width: 340px;
  }

  .programs-register-cta-actions .pill-primary,
  .programs-register-cta-actions .pill-secondary {
    min-height: 44px;
    padding: 8px 12px;
    font-size: 0.85rem;
    line-height: 1.2;
  }
}

@media (min-width: 1600px) {
  .max-w-\[1380px\] {
    padding-left: 0;
    padding-right: 0;
  }
}

/* ------------------------------------------------------------------
   HOMEPAGE RESPONSIVE ALIGNMENT
   Preserve the 1366px composition while scaling down cleanly
   ------------------------------------------------------------------ */
@media (max-width: 1365px) {
  .hero-home-container,
  .story-section .section-container,
  .testimonials-container,
  .outcomes-container,
  #programs-support > div,
  #upcoming-events > div,
  #campaign-cta > .relative > .relative {
    padding-left: clamp(24px, 3vw, 40px) !important;
    padding-right: clamp(24px, 3vw, 40px) !important;
  }

  .hero-centerline-row {
    column-gap: clamp(24px, 2.6vw, 32px);
  }

  .hero-centerline-left h1 {
    font-size: clamp(2.5rem, 4.8vw, 4.2rem) !important;
  }

  #campaign-cta > .relative {
    min-height: clamp(360px, 52vw, 560px) !important;
  }

  #campaign-cta > .relative > .relative {
    padding-top: 48px !important;
    padding-bottom: 48px !important;
  }

  #campaign-cta > .relative > .relative > div {
    max-width: 620px !important;
  }

  .homepage-programs-grid {
    gap: 24px;
  }

  .vol-card {
    padding: clamp(28px, 4vw, 44px);
    gap: clamp(20px, 3vw, 32px);
  }
}

@media (max-width: 1150px) {
  .hero-centerline-right {
    gap: 20px !important;
  }

  #campaign-cta {
    margin-top: -28px !important;
  }

  #campaign-cta > .relative > .relative {
    justify-content: center !important;
  }

  .homepage-programs-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 22px;
  }

  #outcomes .outcomes-container > div {
    min-height: clamp(320px, 48vw, 420px) !important;
  }

  #outcomes .outcomes-container > div > .relative {
    padding: 20px !important;
  }

  #outcomes .outcomes-container > div > .relative > div {
    max-width: 560px !important;
  }

  .vol-card {
    flex-direction: column;
    align-items: stretch;
  }

  .vol-card-image {
    width: 100%;
    max-height: 240px;
    align-self: auto;
  }
}

/* Hero row + discover-story: stay two-column until mobile */
@media (max-width: 767px) {
  .hero-centerline-row {
    display: flex;
    flex-direction: column;
    gap: 24px;
  }

  .section-layout {
    grid-template-columns: 1fr !important;
    gap: 36px !important;
    align-items: start;
  }

  .story-section .section-container {
    padding-bottom: 60px !important;
  }

  .story-image-column {
    justify-content: center;
  }

  .single-image-wrapper img {
    width: min(100%, 620px) !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 0 auto !important;
  }
}

@media (max-width: 768px) {
  .hero-home-container,
  .story-section .section-container,
  .testimonials-container,
  .outcomes-container,
  #programs-support > div,
  #upcoming-events > div,
  #campaign-cta > .relative > .relative {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  .hero-centerline-row {
    gap: 24px;
  }

  .hero-centerline-left h1 {
    font-size: clamp(2.2rem, 10vw, 3.2rem) !important;
  }

  .hero-cta-group {
    width: 100%;
  }

  .hero-cta-group .btn-primary,
  .hero-cta-group .btn-secondary {
    width: 100%;
  }

  #campaign-cta {
    margin-top: 0 !important;
  }

  #campaign-cta > .relative {
    min-height: auto !important;
  }

  #campaign-cta > .relative > .relative {
    padding-top: 28px !important;
    padding-bottom: 28px !important;
  }

  #campaign-cta > .relative > .relative > div {
    max-width: none !important;
    padding: 26px 22px !important;
    border-radius: 24px !important;
  }

  #programs-support {
    padding-top: 56px !important;
    padding-bottom: 64px !important;
  }

  .homepage-programs-grid {
    grid-template-columns: 1fr !important;
    gap: 18px;
  }

  #outcomes .outcomes-container > div {
    min-height: auto !important;
  }

  #outcomes .outcomes-container > div > .relative {
    padding: 16px !important;
  }

  #outcomes .outcomes-container > div > .relative > div {
    width: 100%;
    max-width: none !important;
  }

  .testi-card {
    padding: 24px;
  }

  .vol-card {
    padding: 24px;
    gap: 20px;
  }

  .vol-headline {
    font-size: clamp(1.9rem, 9vw, 2.6rem);
  }
}

/* ------------------------------------------------------------------
   HOMEPAGE MOBILE REFINEMENTS
   Reduce excess spacing and keep mobile layouts compact and readable
   ------------------------------------------------------------------ */
@media (max-width: 768px) {
  .hero-home-media {
    object-position: center 16% !important;
  }

  .hero-home-container > div:last-child {
    margin-top: 10px;
  }

  .hero-home-container .hero-centerline-row {
    padding-bottom: 20px !important;
  }

  .hero-centerline-right > p {
    font-size: 0.98rem !important;
    line-height: 1.72 !important;
    text-align: left !important;
  }

  .hero-home-container > div:last-child {
    padding-bottom: 32px !important;
  }

  .hero-home-media {
    height: clamp(240px, 68vw, 360px) !important;
  }

  .story-section .section-container {
    padding-top: 0 !important;
    padding-bottom: 56px !important;
  }

  .story-text-column {
    gap: 22px;
  }

  .story-intro {
    margin-bottom: 18px;
    font-size: 1rem;
    line-height: 1.65;
  }

  .story-context-copy {
    margin-bottom: 28px;
    font-size: 0.95rem;
    line-height: 1.65;
  }

  .section-layout {
    gap: 28px !important;
  }

  .single-image-wrapper img {
    width: min(100%, 420px) !important;
  }

  #programs-support {
    padding-top: 48px !important;
    padding-bottom: 54px !important;
  }

  #programs-support > div > div:first-child {
    margin-bottom: 32px !important;
    gap: 12px !important;
  }

  #programs-heading {
    font-size: clamp(1.9rem, 9vw, 2.6rem) !important;
  }

  #programs-support > div > div:first-child p {
    margin-top: 0 !important;
    font-size: 0.98rem !important;
    line-height: 1.65 !important;
  }

  .homepage-program-card {
    border-radius: 24px;
  }

  .homepage-program-card-media {
    min-height: 124px;
  }

  .homepage-program-card-body {
    padding: 16px !important;
  }

  .homepage-program-card-title {
    margin-bottom: 8px;
    font-size: 1.1rem;
  }

  .homepage-program-card-divider {
    margin: 12px 0 10px;
  }

  #campaign-cta > .relative > .relative {
    padding-top: 24px !important;
    padding-bottom: 24px !important;
  }

  #campaign-cta > .relative > .relative > div {
    padding: 22px 18px !important;
    gap: 16px !important;
    border-radius: 22px !important;
  }

  #campaign-cta > .relative > .relative > div p {
    max-width: none !important;
    line-height: 1.65 !important;
  }

  #outcomes {
    padding-top: 52px !important;
    padding-bottom: 56px !important;
  }

  #outcomes .outcomes-container > div {
    border-radius: 24px !important;
  }

  #outcomes .outcomes-container > div > .relative {
    padding: 14px !important;
  }

  #outcomes .outcomes-container > div > .relative > div {
    padding: 18px !important;
    gap: 12px !important;
    border-radius: 20px !important;
  }

  #outcomes-heading {
    font-size: clamp(1.45rem, 7.4vw, 1.95rem) !important;
    line-height: 1.02 !important;
    letter-spacing: -0.035em !important;
    text-wrap: balance;
  }

  #outcomes-heading br {
    display: none;
  }

  #outcomes .outcomes-container > div > .relative > div span {
    font-size: 0.78rem !important;
  }

  #outcomes .outcomes-container > div > .relative > div p {
    font-size: 0.92rem !important;
    line-height: 1.58 !important;
  }

  #outcomes .outcomes-container > div > .relative > div a {
    font-size: 0.96rem !important;
  }

  #testimonials {
    padding-top: 52px !important;
    padding-bottom: 56px !important;
  }

  #testimonials .flex.flex-col.items-center.text-center {
    margin-bottom: 32px !important;
    gap: 10px !important;
  }

  #testi-viewport {
    padding: 12px 0 !important;
    margin: -12px 0 !important;
  }

  .testi-card {
    padding: 20px !important;
    min-height: auto;
    gap: 14px;
  }

  .testi-dots {
    margin-top: 18px;
    justify-content: center;
  }

  #upcoming-events {
    padding-top: 52px !important;
  }

  #upcoming-events > div:first-child > div:first-child {
    gap: 24px !important;
    margin-bottom: 36px !important;
  }

  #upcoming-events-heading {
    font-size: clamp(2.15rem, 11vw, 3.2rem) !important;
    line-height: 0.96 !important;
  }

  #upcoming-events .ue-row-new {
    gap: 14px !important;
    padding: 18px 0 !important;
  }

  #upcoming-events .ue-date-col {
    min-width: 46px;
  }

  #upcoming-events .ue-pattern-title {
    font-size: 1rem !important;
  }

  #upcoming-events .ue-meta-row {
    gap: 6px !important;
    font-size: 0.84rem !important;
  }

  #upcoming-events > div:last-child {
    padding-bottom: 56px !important;
  }

  #upcoming-events .vol-card {
    padding: 22px !important;
    gap: 18px !important;
    border-radius: 24px !important;
  }

  #upcoming-events .vol-card-text {
    gap: 16px !important;
  }

  #upcoming-events .vol-card-text > .flex {
    width: 100%;
    gap: 12px !important;
  }

  #upcoming-events .vol-btn {
    width: 100%;
    justify-content: center;
    white-space: normal;
    padding: 12px 18px;
  }

  #upcoming-events .vol-card-image {
    max-height: 200px !important;
    border-radius: 18px !important;
  }
}

@media (max-width: 640px) {
  .stats-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
    gap: 8px;
    margin-top: 0;
    padding-top: 10px;
  }

  .story-stat {
    min-width: 0;
    gap: 4px;
  }

  .story-stat-number {
    font-size: clamp(1.3rem, 5.8vw, 1.55rem);
  }

  .story-stat-label {
    font-size: 0.54rem;
    letter-spacing: 0.05em;
    line-height: 1.25;
    text-wrap: balance;
  }
}

@media (max-width: 420px) {
  .story-stat-number {
    font-size: 1.18rem;
  }

  .story-stat-label {
    font-size: 0.48rem;
  }

  #outcomes .outcomes-container > div > .relative > div {
    padding: 16px !important;
  }

  #outcomes-heading {
    font-size: 1.34rem !important;
  }

  #outcomes .outcomes-container > div > .relative > div p {
    font-size: 0.86rem !important;
    line-height: 1.52 !important;
  }
}

@media (max-width: 768px) {
  .footer-contact-bar {
    padding-top: 8px !important;
    padding-bottom: 8px !important;
    gap: 8px 12px !important;
    justify-content: flex-start !important;
    font-size: 0.75rem !important;
    line-height: 1.35;
  }

  .footer-contact-location {
    display: none !important;
  }

  .footer-main {
    padding-top: 8px !important;
    padding-bottom: 2px !important;
  }

  .footer-main-grid {
    gap: 16px !important;
  }

  .footer-brand-logo {
    height: 58px !important;
    margin-bottom: 0 !important;
  }

  .footer-brand .footer-description {
    max-width: 30ch;
    margin-bottom: 10px !important;
    font-size: 0.82rem;
    line-height: 1.45;
  }

  .footer-brand-social {
    gap: 8px !important;
  }

  .dark-footer-social {
    width: 1.85rem;
    height: 1.85rem;
  }

  .footer-links-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 12px !important;
  }

  .footer-links-group {
    min-width: 0;
  }

  .dark-footer-heading,
  .dark-footer .footer-nav-heading {
    margin-bottom: 8px !important;
    font-size: 0.68rem !important;
    letter-spacing: 0.06em !important;
  }

  .dark-footer-link,
  .dark-footer .footer-nav-link {
    font-size: 0.8rem !important;
    padding-top: 0.12rem !important;
    padding-bottom: 0.12rem !important;
  }

  .footer-newsletter {
    grid-column: 1 / -1;
    padding-top: 0 !important;
  }

  .footer-newsletter-copy {
    margin-bottom: 8px;
    font-size: 0.8rem;
    line-height: 1.42;
  }

  .dark-footer .newsletter-form {
    max-width: none;
    gap: 6px;
    padding-top: 8px;
  }

  .dark-footer .footer-newsletter-input,
  .dark-footer .footer-newsletter-button {
    min-height: 38px;
    border-radius: 11px !important;
  }

  .dark-footer .footer-newsletter-button {
    min-width: 58px;
    padding: 0 14px;
  }

  .dark-footer .newsletter-message {
    margin-top: 4px !important;
    min-height: 1em !important;
    font-size: 0.7rem !important;
  }

  .footer-bottom-shell {
    margin-top: 14px !important;
    padding-top: 10px !important;
  }

  .footer-bottom-row {
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: space-between !important;
    gap: 8px !important;
    align-items: center !important;
  }

  .footer-meta-links {
    justify-content: flex-end;
    gap: 10px !important;
    flex-wrap: nowrap !important;
    white-space: nowrap;
  }

  .footer-fine-print,
  .footer-legal-link {
    font-size: 0.74rem !important;
  }

  .footer-fine-print {
    white-space: nowrap;
  }
}

@media (max-width: 420px) {
  .footer-surface {
    padding-bottom: calc(36px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .footer-brand-logo {
    height: 52px !important;
  }

  .footer-links-grid {
    gap: 14px 10px !important;
  }

  .dark-footer-link,
  .dark-footer .footer-nav-link {
    font-size: 0.76rem !important;
  }

  .dark-footer .newsletter-form {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .footer-contact-bar {
    gap: 6px 8px !important;
    font-size: 0.7rem !important;
  }

  .footer-bottom-row {
    gap: 6px !important;
  }

  .footer-meta-links {
    gap: 8px !important;
  }

  .footer-fine-print,
  .footer-legal-link {
    font-size: 0.68rem !important;
  }
}

/* ------------------------------------------------------------------
   Inner Page Hero — Mobile + Tablet Height Fix (ALL PAGES, UNIFIED)
   Covers: Volunteer, News, Gallery, Programs (.page-hero-bg)
           Events (.events-hero)
           Contact, About (.page-inner-hero via hero-breadcrumb templates)
   ------------------------------------------------------------------ */
@media (max-width: 1024px) {
  /* Shared padding for all hero types */
  .page-hero-bg,
  .page-inner-hero {
    padding-top: 56px !important;
    padding-bottom: 56px !important;
  }

  .events-hero {
    padding-top: 70px !important;
    padding-bottom: 70px !important;
  }

  /* Contact/About: inner div carries Tailwind py-12 — override it */
  .page-inner-hero .inner,
  .page-inner-hero > div[class*="mx-auto"] {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  /* Events: inner div has inline padding-top: 120px — zero it */
  .events-hero .events-hero-inner {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  /* Shared h1 size for all hero types */
  .page-hero-bg h1,
  .page-inner-hero h1,
  .events-hero-title {
    font-size: clamp(1.4rem, 6vw, 2rem) !important;
    line-height: 1.2 !important;
    margin-bottom: 0.3rem !important;
  }

  /* Shared subtitle/copy size */
  .page-hero-bg p,
  .page-inner-hero p,
  .events-hero-copy {
    font-size: 0.875rem !important;
    line-height: 1.45 !important;
    margin-bottom: 0 !important;
  }

  /* Breadcrumbs */
  .page-hero-bg [style*="margin-bottom: 24px"],
  .page-hero-bg [style*="margin-bottom: 20px"],
  .page-inner-hero nav,
  .page-inner-hero .flex.items-center.gap-2,
  .events-breadcrumb {
    margin-bottom: 0.4rem !important;
  }
}

/* ------------------------------------------------------------------
   Filter Bar — Mobile + Tablet (Events, News, Gallery, Programs)
   Put filters + search on one scrollable row, smaller sizing
   ------------------------------------------------------------------ */
@media (max-width: 1024px) {

  /* ── Events ── */
  .events-controls {
    flex-direction: row !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .events-controls::-webkit-scrollbar { display: none; }

  .events-filter-tabs {
    flex-wrap: nowrap !important;
    flex-shrink: 0;
    gap: 6px !important;
  }

  .events-filter-tabs .filter-tab {
    height: 34px !important;
    padding: 0 14px !important;
    font-size: 12px !important;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .events-search {
    flex: 0 0 auto !important;
    width: 140px !important;
    height: 34px !important;
    padding: 0 10px !important;
    gap: 6px !important;
    flex-shrink: 0;
  }

  .events-search input {
    font-size: 12px !important;
    min-width: 0;
  }

  .events-search svg {
    width: 14px !important;
    height: 14px !important;
    flex-shrink: 0;
  }

  /* ── News — tabs scroll left, search pinned right ── */
  .news-filter-bar {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px !important;
    margin-bottom: 16px !important;
    flex-wrap: nowrap !important;
    overflow: hidden !important;
  }

  .news-filter-tabs {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 6px !important;
    flex: 1 1 0% !important;
    min-width: 0 !important;
  }

  .news-filter-tabs::-webkit-scrollbar { display: none; }

  .news-filter-tabs .filter-tab {
    height: 30px !important;
    padding: 0 12px !important;
    font-size: 11px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }

  /* Search wrapper: fixed, non-scrolling, pinned right */
  .news-filter-bar div[style*="width: 380px"] {
    position: static !important;
    transform: none !important;
    width: 34px !important;
    height: 34px !important;
    flex: 0 0 34px !important;
    flex-shrink: 0 !important;
    z-index: 2;
  }

  .news-filter-bar div[style*="width: 380px"] input {
    display: none !important;
  }

  .news-filter-bar div[style*="width: 380px"] button {
    position: static !important;
    transform: none !important;
    width: 34px !important;
    height: 34px !important;
  }

  .news-filter-bar div[style*="width: 380px"] button svg {
    width: 15px !important;
    height: 15px !important;
  }

  /* ── Gallery — tabs scroll left, search pinned right ── */
  .gallery-filter-bar {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px !important;
    margin-bottom: 16px !important;
    flex-wrap: nowrap !important;
    overflow: hidden !important;
  }

  /* Filter tabs: scroll horizontally, takes remaining space */
  .gallery-filter-tabs {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 6px !important;
    flex: 1 1 0% !important;
    min-width: 0 !important;
  }

  .gallery-filter-tabs::-webkit-scrollbar { display: none; }

  /* Album tab buttons — smaller */
  .gallery-filter-tabs .album-tab,
  .gallery-filter-bar .album-tab {
    height: 30px !important;
    padding: 0 12px !important;
    font-size: 11px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }

  /* Search wrapper: fixed size, does NOT scroll */
  .gallery-filter-bar div[style*="width: 380px"] {
    position: static !important;
    transform: none !important;
    width: 34px !important;
    height: 34px !important;
    flex: 0 0 34px !important;
    flex-shrink: 0 !important;
    order: 2;
  }

  /* Hide the text input */
  .gallery-filter-bar div[style*="width: 380px"] input {
    display: none !important;
  }

  /* Search button: static, fills the wrapper */
  .gallery-filter-bar div[style*="width: 380px"] button {
    position: static !important;
    transform: none !important;
    width: 34px !important;
    height: 34px !important;
    top: auto !important;
    right: auto !important;
  }

  .gallery-filter-bar div[style*="width: 380px"] button svg {
    width: 15px !important;
    height: 15px !important;
  }
}

/* ------------------------------------------------------------------
   Search Expand — Gallery, News, Programs
   When .search-expanded is toggled by JS, input overlays the tabs
   ------------------------------------------------------------------ */
@media (max-width: 1024px) {
  /* Expanded state: input slides over tabs */
  .gallery-filter-bar.search-expanded .gallery-filter-tabs,
  .news-filter-bar.search-expanded .news-filter-tabs {
    opacity: 0 !important;
    pointer-events: none !important;
    flex: 0 0 0% !important;
    overflow: hidden !important;
    min-width: 0 !important;
  }

  .gallery-filter-bar.search-expanded div[style*="width: 380px"],
  .news-filter-bar.search-expanded div[style*="width: 380px"] {
    flex: 1 1 auto !important;
    width: auto !important;
    position: relative !important;
  }

  .gallery-filter-bar.search-expanded div[style*="width: 380px"] input,
  .news-filter-bar.search-expanded div[style*="width: 380px"] input {
    display: block !important;
    width: 100% !important;
    height: 34px !important;
    padding: 0 40px 0 14px !important;
    font-size: 13px !important;
    border: 2px solid #C8402E !important;
    border-radius: 9999px !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(200,64,46,0.12) !important;
    transition: none !important;
  }

  .gallery-filter-bar.search-expanded div[style*="width: 380px"] button,
  .news-filter-bar.search-expanded div[style*="width: 380px"] button {
    position: absolute !important;
    right: 4px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 26px !important;
    height: 26px !important;
  }
}

/* ------------------------------------------------------------------
   Gallery Mobile + Tablet — equalise filter bar & media toggle sizes
   ------------------------------------------------------------------ */
@media (max-width: 1024px) {
  /* Bump album filter tabs up to match toggle height */
  .gallery-filter-tabs .album-tab,
  .gallery-filter-bar .album-tab {
    height: 34px !important;
    padding: 0 14px !important;
    font-size: 12px !important;
  }

  /* Search button same height */
  .gallery-filter-bar div[style*="width: 380px"] button {
    width: 34px !important;
    height: 34px !important;
  }

  /* Shrink Photos/Videos toggle to match filter bar */
  .gallery-media-toggle {
    padding: 3px !important;
  }

  .gallery-media-toggle .media-toggle {
    height: 34px !important;
    padding: 0 14px !important;
    font-size: 12px !important;
    gap: 5px !important;
  }

  .gallery-media-toggle .media-toggle svg {
    width: 14px !important;
    height: 14px !important;
  }
}
