/* ============================================
   EWMWIKI CUSTOM STYLES
   Organized: Header > Layout > Quick Links >
              EasyDiscuss > Contact > Mobile
   ============================================ */


/* ===== 1. HIDE CASSIOPEIA EMPTY HEADER ===== */
header.container-header.full-width,
body header.container-header,
.brand,
.site-title,
.site-description,
.container-header .brand,
.container-header h1,
.container-header h2,
.container-header h3,
a.brand-logo,
.brand-text,
.logo-text {
  display: none !important;
}


/* ===== 2. KILL WASTED VERTICAL SPACE ===== */
.site-grid {
  padding-top: 0 !important;
  margin-top: 0 !important;
  gap: 0 !important;
}
.container-banner {
  margin: 0 !important;
  padding: 0 !important;
}
.container-component,
main.container-component {
  padding-top: 8px !important;
  margin-top: 0 !important;
}
.container-sidebar-right {
  padding-top: 0 !important;
  margin-top: 0 !important;
}
.container-sidebar-right > *:first-child {
  margin-top: 0 !important;
}


/* ===== 3. ENABLE STICKY (kill overflow blockers) ===== */
.site-grid,
.container-component,
.container-banner,
.grid-child,
main,
body {
  overflow: visible !important;
}


/* ===== 4. STICKY QUICK LINKS BAR ===== */
.moduletable-quicklinks,
.moduletable.ewm-quicklinks-wrap,
div.moduletable:has(.ewm-quicklinks) {
  position: sticky !important;
  top: 0 !important;
  z-index: 9999 !important;
  margin: 0 !important;
}

.ewm-quicklinks {
  position: sticky !important;
  top: 0 !important;
  z-index: 9999 !important;
  background: linear-gradient(90deg, #003d7a 0%, #0070f2 100%) !important;
  padding: 12px 20px !important;
  display: flex !important;
  justify-content: center !important;
  gap: 24px !important;
  margin: 0 !important;
  width: 100% !important;
  box-shadow: 0 4px 12px rgba(0, 61, 122, 0.25) !important;
  border-radius: 0 !important;
}
.ewm-quicklinks a {
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 14px !important;
  text-decoration: none !important;
  padding: 4px 10px !important;
  border-radius: 6px !important;
}
.ewm-quicklinks a:first-child {
  background: #f0ab00 !important;
  color: #003d7a !important;
}
.ewm-quicklinks a:hover {
  background: rgba(255,255,255,0.2) !important;
}
.ewm-quicklinks span.sep {
  color: rgba(255,255,255,0.4) !important;
}

/* Ancestors must allow sticky */
.container-component,
.grid-child,
.site-grid,
main,
body,
html {
  overflow: visible !important;
}


/* ===== 5. EASYDISCUSS DRILLDOWN BACK STICKY ===== */
body.com_easydiscuss .ed-filter-menu__back,
body.com_easydiscuss .o-dropdown-nav__back {
  display: flex !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 99999 !important;
  background: #fff !important;
  padding: 14px 16px !important;
  min-height: 52px !important;
  border-bottom: 1px solid rgba(0,0,0,.10) !important;
}
body.com_easydiscuss .ed-filter-menu__back a,
body.com_easydiscuss .o-dropdown-nav__back a {
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
}


/* ===== 6. CONTACT PAGE CLEANUP ===== */
body.com_contact .com-contact__container,
body.com_contact .com-contact__container *,
body.com_contact h2.com-contact__title,
body.com_contact .com-contact__miscinfo > svg,
body.com_contact .com-contact__miscinfo > .icon-info-circle,
body.com_contact .page-header,
body.com_contact .fields-container,
body.com_contact .com-contact__form > h2,
body.com_contact .com-contact__form > p:first-of-type {
  display: none !important;
}


/* ===== 7. MOBILE: iOS SAFARI TEXT FIX ===== */
@supports (-webkit-touch-callout: none) {
  .t-text--truncate {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: unset !important;
    display: block !important;
    -webkit-line-clamp: unset !important;
    max-height: none !important;
  }
}


/* ===== 8. MOBILE: EASYDISCUSS HIDE ICONS/BUTTONS ===== */
@media (max-width: 991px) {
  body.com_easydiscuss li:has(> a i.fa-bell),
  body.com_easydiscuss li:has(> a i.fa-envelope),
  body.com_easydiscuss li:has(> a i.fa-bars),
  body.com_easydiscuss li:has(> a i.fa-navicon),
  body.com_easydiscuss a:has(> i.fa-bell),
  body.com_easydiscuss a:has(> i.fa-envelope),
  body.com_easydiscuss a:has(> i.fa-bars),
  body.com_easydiscuss a:has(> i.fa-navicon),
  body.com_easydiscuss button:has(> i.fa-bell),
  body.com_easydiscuss button:has(> i.fa-envelope),
  body.com_easydiscuss button:has(> i.fa-bars),
  body.com_easydiscuss button:has(> i.fa-navicon),
  body.com_easydiscuss .ed-entry-actions,
  body.com_easydiscuss .ed-post-actions,
  body.com_easydiscuss .o-action-bar,
  body.com_easydiscuss .ed-subscribe,
  body.com_easydiscuss .si-theme--button {
    display: none !important;
  }
}


/* ===== 9. MOBILE: HEADER STACK ===== */
@media (max-width: 768px) {
  .ewm-header-flex {
    flex-direction: column !important;
    text-align: center !important;
    gap: 14px !important;
  }
  .ewm-header-flex > div {
    text-align: center !important;
    flex: 1 1 100% !important;
  }
  .ewm-header img {
    height: 80px !important;
    margin: 0 auto !important;
  }
}


/* ===== 10. MOBILE: HERO PHOTO TOP (already centered in HTML) ===== */
@media (max-width: 768px) {
  .ewm-hero-pad {
    padding: 24px 18px !important;
  }
  .ewm-hero-photo {
    width: 170px !important;
    height: 170px !important;
  }
}


/* ===== 11. MOBILE: STICKY QUICK LINKS RESIZE ===== */
@media (max-width: 680px) {
  .ewm-quicklinks {
    gap: 8px !important;
    padding: 10px 10px !important;
  }
  .ewm-quicklinks a {
    font-size: 11px !important;
    padding: 4px 8px !important;
  }
}

/* ===== 12. CENTER HERO PHOTO ON MOBILE ===== */
@media (max-width: 768px) {
  img.ewm-hero-photo {
    display: block !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}