/**
 * Footer — desktop unchanged; mobile compact app layout
 */

body .site-footer.footer-sirca-premium {
  background: linear-gradient(165deg, #0c2238 0%, var(--sirca-navy, #0F2740) 42%, #061525 100%) !important;
  border-radius: 0;
  margin-top: 1rem;
}

/* Desktop: 3 link columns inside wrap */
.footer-app-links-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

@media (min-width: 992px) {
  .footer-app-links-wrap {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
}

@media (max-width: 991.98px) {
  body .site-footer.footer-sirca-premium {
    overflow: visible;
    /* Clear floating bottom nav + chat FAB so top footer rows stay visible when scrolled */
    padding-bottom: calc(var(--bottom-nav-h, 74px) + 0.5rem) !important;
    margin-bottom: 0;
    scroll-margin-bottom: var(--bottom-nav-h, 74px);
  }

  .site-footer.footer-sirca-premium > .container,
  .site-footer.footer-sirca-premium .footer-copyright-bar .container {
    padding-left: max(0.75rem, env(safe-area-inset-left, 0px));
    padding-right: max(0.75rem, env(safe-area-inset-right, 0px));
  }

  .site-footer.footer-sirca-premium .footer-columns {
    padding: 0.65rem 0 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 0;
  }

  .site-footer.footer-sirca-premium .footer-columns > [class*="col-"] {
    width: 100%;
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
  }

  /* Brand — logo + social (first when scrolling into footer) */
  .footer-col-brand {
    order: 1;
    position: relative;
    z-index: 2;
    padding: 0;
    background: transparent;
    border: none;
    text-align: left;
  }

  .footer-brand-app {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.55rem 0.65rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(236, 188, 52, 0.22);
    border-radius: 14px;
  }

  .site-footer.footer-sirca-premium .footer-brand-logo {
    height: 32px;
    width: auto;
    margin: 0;
    flex-shrink: 0;
  }

  .site-footer.footer-sirca-premium .footer-about-text {
    display: none;
  }

  .site-footer.footer-sirca-premium .footer-social-row {
    justify-content: flex-end;
    gap: 0.35rem;
    margin: 0;
  }

  .site-footer.footer-sirca-premium .footer-social-row a {
    width: 32px;
    height: 32px;
    font-size: 0.85rem;
    border-width: 1px;
  }

  /* Quick Links + Products + Industries — single row, 3 app tiles */
  .footer-app-links-wrap {
    order: 2;
    padding: 0;
  }

  .footer-app-links-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.4rem;
  }

  .footer-app-links-col {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.45rem 0.35rem 0.5rem;
    min-height: 0;
    text-align: center;
  }

  .footer-app-links-col .footer-links-chevron {
    text-align: center;
  }

  .site-footer.footer-sirca-premium .footer-heading--app {
    font-size: 0.58rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 0.35rem;
    text-align: center;
    letter-spacing: 0.02em;
    text-transform: uppercase;
  }

  .site-footer.footer-sirca-premium .footer-heading--app span {
    display: block;
    font-size: 0.62rem;
    color: var(--sirca-gold);
  }

  .site-footer.footer-sirca-premium .footer-heading--app span::after {
    display: none;
  }

  .footer-app-links-col .footer-links-chevron li {
    margin-bottom: 0.2rem;
  }

  .footer-app-links-col .footer-links-chevron li:last-child {
    margin-bottom: 0;
  }

  .site-footer.footer-sirca-premium .footer-app-links-col .footer-links-chevron a {
    display: block;
    font-size: 0.58rem;
    line-height: 1.3;
    padding: 0.12rem 0.1rem;
    color: rgba(255, 255, 255, 0.82) !important;
    white-space: normal;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    justify-content: center;
    gap: 0;
  }

  .site-footer.footer-sirca-premium .footer-app-links-col .footer-links-chevron a i {
    display: none;
  }

  /* Show top 4 links per column on mobile to keep height low */
  .footer-app-links-col .footer-links-chevron li:nth-child(n + 5) {
    display: none;
  }

  /* Contact — icon chips one row */
  .footer-col-contact {
    order: 3;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
  }

  .footer-contact-app {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.35rem;
  }

  .footer-contact-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    padding: 0.4rem 0.2rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(236, 188, 52, 0.25);
    color: #fff;
    text-decoration: none;
    font-size: 0.55rem;
    font-weight: 600;
    transition: background 0.2s ease, transform 0.2s ease;
  }

  .footer-contact-chip i {
    font-size: 1rem;
    color: var(--sirca-gold);
  }

  .footer-contact-chip--wa i {
    color: #25d366;
  }

  .footer-contact-chip:active {
    transform: scale(0.96);
    background: rgba(236, 188, 52, 0.2);
  }

  /* Copyright — slim single line */
  .site-footer.footer-sirca-premium .footer-copyright-bar {
    padding: 0.45rem 0 calc(0.35rem + env(safe-area-inset-bottom, 0px));
    border-top-width: 2px;
  }

  .site-footer.footer-sirca-premium .footer-copyright-inner {
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 0.35rem !important;
    text-align: left;
  }

  .site-footer.footer-sirca-premium .footer-copyright-bar p,
  .site-footer.footer-sirca-premium .footer-copyright-bar a {
    font-size: 0.65rem;
    line-height: 1.2;
  }

  .footer-copy-text {
    opacity: 0.9;
  }

  .footer-legal-sep {
    margin: 0 0.25rem;
  }
}

@media (max-width: 380px) {
  .site-footer.footer-sirca-premium .footer-heading--app {
    font-size: 0.52rem;
  }

  .site-footer.footer-sirca-premium .footer-app-links-col .footer-links-chevron a {
    font-size: 0.54rem;
  }

  .footer-app-links-col .footer-links-chevron li:nth-child(n + 4) {
    display: none;
  }
}
