/* Responsive overrides for The Christian Anthem */

/* Hamburger button — hidden on desktop, shown on mobile */
#mobile-menu-toggle {
  display: none;
  width: 100%;
  padding: 12px 16px;
  background: #0C5C88;
  border: none;
  border-top: 1px solid #3A84AE;
  color: #B9ECF0;
  font-size: 16px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  text-align: left;
  font-family: Arial, Helvetica, sans-serif;
}

/* Scalable images in content */
.custom img,
#logo img,
.item-page img,
.below-content img,
#container img {
  max-width: 100%;
  height: auto;
}

/* Footer: allow social buttons to wrap */
#footer #footer-inner p {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  margin: 0;
}
#footer #footer-inner p a {
  display: inline-block;
  line-height: 0;
}

/* ===============================
   Tablet (≤ 980px): fluid container
   =============================== */
@media (max-width: 980px) {
  .container_12 {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding-left: 12px;
    padding-right: 12px;
  }
  iframe {
    max-width: 100%;
  }
}

/* ===============================
   Mobile (≤ 768px)
   =============================== */
@media (max-width: 768px) {

  /* Show hamburger */
  #mobile-menu-toggle {
    display: block;
  }

  /* All grid columns go full-width */
  .grid_1, .grid_2, .grid_3, .grid_4, .grid_5,
  .grid_6, .grid_7, .grid_8, .grid_9, .grid_10,
  .grid_11, .grid_12 {
    width: 100% !important;
    float: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    display: block !important;
    box-sizing: border-box;
  }

  /* Remove push/pull/prefix/suffix offsets */
  [class*="prefix_"] { padding-left: 0 !important; }
  [class*="suffix_"] { padding-right: 0 !important; }
  [class*="push_"]   { left: 0 !important; }
  [class*="pull_"]   { left: 0 !important; }

  /* ---- Navigation ---- */

  /* Collapse main nav menu by default */
  #mainmenu ul.menu {
    display: none;
    float: none;
    position: static;
    width: 100%;
  }
  #mainmenu ul.menu.is-open {
    display: block;
  }

  /* Items stack vertically */
  #mainmenu ul li {
    float: none !important;
    display: block !important;
    width: 100% !important;
    position: static;
  }

  /* Larger tap targets */
  #mainmenu ul li a {
    padding: 12px 18px;
  }

  /* Submenus: static and hidden until parent toggled */
  #mainmenu ul ul {
    visibility: visible !important;
    display: none !important;
    position: static !important;
    width: 100% !important;
    min-width: 0 !important;
    background: #0a4f78 !important;
    padding: 0 !important;
    border-radius: 0 !important;
  }
  #mainmenu ul li.is-open > ul {
    display: block !important;
  }
  #mainmenu ul ul li a {
    padding-left: 32px;
    color: #B9ECF0 !important;
  }

  /* ---- Contact sidebar button ---- */
  #contact {
    top: auto;
    bottom: 0;
  }

  /* ---- Video iframes ---- */
  iframe {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 9;
  }

  /* Videos page: override inline width:940px wrapper div */
  .moduletable- > div,
  .below-content div[style*="width"] {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Tables */
  table {
    width: 100% !important;
    max-width: 100%;
  }

  /* ---- Footer ---- */
  #footer #footer-inner p {
    justify-content: center;
    text-align: center !important;
  }
  #footer img {
    width: 110px !important;
    height: auto !important;
  }
}

/* ===============================
   Small mobile (≤ 480px)
   =============================== */
@media (max-width: 480px) {
  .container_12 {
    padding-left: 8px;
    padding-right: 8px;
  }
  #footer img {
    width: 80px !important;
  }
}
