/* Shared mobile footer: explicit alignment overrides Blocksy's centered widgets. */
@media (max-width: 767px) {
  #footer.ct-footer {
    --horizontal-alignment: flex-start;
    --text-horizontal-alignment: left;
    color: #283029;
    text-align: left;
  }
  #footer.ct-footer [data-row] > .ct-container {
    width: calc(100% - 40px);
    max-width: 100%;
    margin-inline: auto;
    min-width: 0;
  }
  #footer.ct-footer [data-column],
  #footer.ct-footer .ct-widget,
  #footer.ct-footer .wp-block-group {
    min-width: 0;
    text-align: left !important;
    align-items: flex-start !important;
    --horizontal-alignment: flex-start;
    --text-horizontal-alignment: left;
  }
  #footer.ct-footer [data-row="top"] > .ct-container {
    display: flex !important;
    flex-direction: column;
    align-items: stretch !important;
    gap: 16px;
    padding-block: 20px;
  }
  #footer.ct-footer [data-row="top"] [data-column] { width: 100%; padding: 0; }
  #footer.ct-footer .footer-menu-inline .menu {
    display: flex;
    justify-content: flex-start !important;
    flex-wrap: wrap;
    column-gap: 18px;
    row-gap: 0;
    margin: 0;
    padding: 0;
  }
  #footer.ct-footer .footer-menu-inline .ct-menu-link {
    min-height: 44px;
    padding: 6px 0;
    font-size: 11px;
    letter-spacing: .025em;
  }
  #footer.ct-footer .ct-footer-socials,
  #footer.ct-footer .ct-social-box { justify-content: flex-start !important; }
  #footer.ct-footer .ct-social-box { display: flex; gap: 12px; }
  #footer.ct-footer .ct-social-box a { width: 44px; height: 44px; min-width: 44px; }
  #footer.ct-footer .ct-social-box .ct-icon-container { width: 36px; height: 36px; }
  #footer.ct-footer .ct-social-box a[href="#"] { display: none !important; }

  #footer.ct-footer [data-row="middle"] > .ct-container {
    display: grid !important;
    grid-template-columns: repeat(2,minmax(0,1fr)) !important;
    gap: 28px 24px !important;
    align-items: start !important;
    padding-block: 28px !important;
  }
  #footer.ct-footer [data-row="middle"] [data-column] {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
  }
  #footer.ct-footer [data-row="middle"] [data-column="widget-area-1"],
  #footer.ct-footer [data-row="middle"] [data-column="widget-area-4"],
  #footer.ct-footer [data-row="middle"] [data-column="widget-area-6"] {
    grid-column: 1 / -1 !important;
    width: 100%;
  }
  #footer.ct-footer [data-row="middle"] .ct-widget { width: 100%; margin: 0 !important; }
  #footer.ct-footer [data-row="middle"] :is(h2,h3,h4,h5) {
    margin: 0 0 10px !important;
    padding: 0 0 10px !important;
    border: 0;
    border-bottom: 1px solid #dedfd7;
    font-family: var(--theme-font-family,Arial,sans-serif) !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.5 !important;
    letter-spacing: 0 !important;
    text-align: left !important;
  }
  #footer.ct-footer [data-column="widget-area-1"] figure {
    margin: 0 0 16px !important;
    text-align: left !important;
  }
  #footer.ct-footer [data-column="widget-area-1"] figure img {
    display: block;
    width: 150px !important;
    max-width: 100%;
    height: auto !important;
    margin: 0;
  }
  #footer.ct-footer [data-column="widget-area-1"] p {
    max-width: 36ch;
    margin: 0 0 10px !important;
    font-size: 12px;
    line-height: 1.7;
    text-align: left !important;
  }
  #footer.ct-footer [data-column="widget-area-1"] p strong { font-weight: 500; }
  #footer.ct-footer [data-column="widget-area-1"] p:last-child {
    font-size: 11px;
    margin-bottom: 0 !important;
  }
  #footer.ct-footer [data-row="middle"] .wp-block-list {
    list-style: none;
    width: 100%;
    padding: 0 !important;
    margin: 0 !important;
    text-align: left !important;
  }
  #footer.ct-footer [data-row="middle"] .wp-block-list li { margin: 0 !important; padding: 0; }
  #footer.ct-footer [data-row="middle"] .wp-block-list a {
    display: flex !important;
    align-items: center;
    justify-content: flex-start !important;
    width: 100%;
    min-height: 44px;
    padding: 8px 0 !important;
    font-size: 12px;
    line-height: 1.6;
    text-align: left !important;
    overflow-wrap: anywhere;
    text-decoration: none;
  }
  #footer.ct-footer [data-column="widget-area-4"] .wp-block-list,
  #footer.ct-footer [data-column="widget-area-6"] .wp-block-list {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 0 24px;
    align-items: start;
  }
  #footer.ct-footer [data-row="bottom"] > .ct-container {
    display: flex !important;
    flex-direction: column;
    align-items: flex-start !important;
    gap: 16px;
    padding-block: 20px 28px !important;
  }
  #footer.ct-footer [data-row="bottom"] [data-column] { padding: 0; }
  #footer.ct-footer .ct-footer-copyright,
  #footer.ct-footer .ct-footer-copyright p {
    margin: 0 !important;
    font-size: 11px;
    line-height: 1.6;
    text-align: left !important;
  }
  #footer.ct-footer [data-row="bottom"] figure { margin: 0 !important; text-align: left; }
  #footer.ct-footer [data-row="bottom"] img { display: block; width: 200px; max-width: 100%; height: auto; }
  #footer.ct-footer a:focus-visible { outline: 2px solid #52634c; outline-offset: 3px; }
}
@media (max-width: 359px) {
  #footer.ct-footer [data-column="widget-area-2"] .wp-block-list a,
  #footer.ct-footer [data-column="widget-area-3"] .wp-block-list a {
    min-height: 56px;
  }
}
