/*!
 * Desktop landing restore (cache-bust filename).
 *
 * Later sheets and inline #erpLandingForcedVisible restacked the hero, hid
 * the KPI mosaic, left module cards uncategorised, and let erp-shell.css
 * collapse the footer to one column at ≤1280px. Nginx also caches /css/
 * as immutable for 7 days and ignores ?v=, so this new filename is what
 * actually surfaces the earlier fixes on staging.
 */

/* Phone featured badges stay top-right like the unit posters. */
@media (max-width: 900px) {
  html[data-active-module="landing"] body.erp-body #landing #erpLandingCarousels .erp-fcard-badge,
  #erpLandingCarousels .erp-fcard-badge {
    position: absolute !important;
    top: 14px !important;
    right: 14px !important;
    left: auto !important;
    bottom: auto !important;
  }
}

/* Phone KPI tiles share one poster size in the stacked hero. */
@media (max-width: 900px) {
  html[data-active-module="landing"] body.erp-body #landing .erp-hero.erp-hero--command-center .erp-cc-kpi-row > .kpi-card,
  html body.erp-body #landing .erp-hero.erp-hero--command-center .erp-cc-kpi-row > .kpi-card {
    height: 10.75rem !important;
    min-height: 10.75rem !important;
    max-height: 10.75rem !important;
    box-sizing: border-box !important;
  }
}

/* ── Login padlock: white lock inside the teal Login button ─────────── */
html[data-active-module="landing"] body.erp-body #navbar #util-bar #loginBtn .erp-login-lock,
html[data-active-module="landing"] body.erp-body #navbar #util-bar #loginBtn .fa-right-to-bracket,
html[data-active-module="landing"] body.erp-body #navbar #util-bar #loginBtn .fa-lock,
html body.erp-body #navbar #util-bar #loginBtn .fa-right-to-bracket,
html body.erp-body #navbar #util-bar #loginBtn .fa-lock {
  color: #dc2626 !important;
  -webkit-text-fill-color: #dc2626 !important;
}

/* Footer SOC 2 padlock: brand lavender, not the leftover cyan. */
html[data-active-module="landing"] body.erp-body footer.elinom-footer .footer-cert--column i.fa-lock,
html[data-active-module="landing"] body.erp-body footer.elinom-footer .footer-cert i.fa-lock,
html[data-active-module="landing"] body.erp-body footer.elinom-footer .footer-cert i {
  color: #c0c1ff !important;
  filter: drop-shadow(0 0 6px rgba(192, 193, 255, 0.35));
}

/* ── Desktop: labelled category grids, equal 380px posters ──────────── */
@media (min-width: 901px) {
  html[data-active-module="landing"] body.erp-body #landing #erpLandingCarousels,
  html body.erp-body #landing #erpLandingCarousels,
  #erpLandingCarousels {
    display: flex !important;
    flex-direction: column !important;
    gap: 2.35rem !important;
    width: 100% !important;
    max-width: 1280px !important;
    margin: 0 auto 2.5rem !important;
    padding: 0.25rem 0 0.5rem !important;
    visibility: visible !important;
  }

  html.erp-landing-carousels-on[data-active-module="landing"] body.erp-body #landing #modules-grid,
  html.erp-landing-carousels-on[data-active-module="landing"] body.erp-body #landing .unit-gateway-grid,
  html.erp-landing-carousels-on[data-active-module="landing"] body.erp-body #landing .erp-module-card-grid,
  html.erp-landing-carousels-on[data-active-module="landing"] body.erp-body #landing #financial-services,
  html.erp-landing-carousels-on[data-active-module="landing"] body.erp-body #landing #zuto-ecosystem,
  html.erp-landing-carousels-on .zuto-ecosystem-band {
    display: none !important;
  }

  #erpLandingCarousels .erp-modcat {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.85rem !important;
  }

  #erpLandingCarousels .erp-modcat__head {
    display: flex !important;
    align-items: baseline !important;
    justify-content: space-between !important;
    gap: 0.75rem !important;
    padding: 0 0.1rem 0.35rem !important;
    border-bottom: 1px solid rgba(15, 23, 42, 0.12) !important;
  }

  #erpLandingCarousels .erp-modcat__title {
    display: block !important;
    margin: 0 !important;
    color: #0f172a !important;
    font-size: 1.05rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
    line-height: 1.25 !important;
  }

  #erpLandingCarousels .erp-modcat__count {
    display: inline-flex !important;
    color: #475569 !important;
    font-size: 0.78rem !important;
    font-weight: 700 !important;
  }

  #erpLandingCarousels .erp-modcat__dots {
    display: none !important;
  }

  html[data-active-module="landing"] body.erp-body #landing #erpLandingCarousels .erp-modcat__track,
  #erpLandingCarousels .erp-modcat__track {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 1rem !important;
    overflow: visible !important;
    scroll-snap-type: none !important;
    flex-wrap: unset !important;
    flex-direction: unset !important;
  }

  html[data-active-module="landing"] body.erp-body #landing #erpLandingCarousels .erp-fcard,
  html[data-active-module="landing"] body.erp-body #landing #erpLandingCarousels .unit-card,
  #erpLandingCarousels .erp-fcard,
  #erpLandingCarousels .unit-card {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    flex: none !important;
    height: 380px !important;
    min-height: 380px !important;
    max-height: 380px !important;
    scroll-snap-align: unset !important;
    align-self: stretch !important;
  }
}

@media (min-width: 901px) and (max-width: 1099px) {
  html[data-active-module="landing"] body.erp-body #landing #erpLandingCarousels .erp-modcat__track,
  #erpLandingCarousels .erp-modcat__track {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

/* ── Desktop split hero: copy left, 2×2 KPI mosaic right ─────────────── */
@media (min-width: 1100px) {
  html[data-active-module="landing"] #landing .erp-hero.erp-hero--command-center .erp-hero-inner,
  html[data-active-module="landing"] body.erp-body #landing .erp-hero.erp-hero--command-center .erp-hero-inner,
  html[data-active-module="landing"] body.erp-body #landing.module-section .erp-hero.erp-hero--command-center .erp-hero-inner,
  html body.erp-body #landing.module-section .erp-hero.erp-hero--command-center .erp-hero-inner,
  html body.erp-body #landing .erp-hero.erp-hero--command-center .erp-hero-inner {
    display: grid !important;
    flex-direction: unset !important;
    grid-template-columns: minmax(0, 1.05fr) minmax(24.5rem, 30rem) !important;
    grid-template-areas:
      "copy dash"
      "trust trust"
      "steps steps" !important;
    align-items: center !important;
    justify-items: stretch !important;
    column-gap: 2.4rem !important;
    row-gap: 1.35rem !important;
    max-width: 1240px !important;
    width: 100% !important;
    text-align: left !important;
  }

  html[data-active-module="landing"] #landing .erp-hero.erp-hero--command-center .erp-hero-content,
  html[data-active-module="landing"] body.erp-body #landing .erp-hero.erp-hero--command-center .erp-hero-content,
  html body.erp-body #landing .erp-hero.erp-hero--command-center .erp-hero-content {
    grid-area: copy !important;
    align-items: flex-start !important;
    text-align: left !important;
    max-width: none !important;
    margin: 0 !important;
  }

  html[data-active-module="landing"] #landing .erp-hero.erp-hero--command-center .erp-hero-title,
  html[data-active-module="landing"] #landing .erp-hero .erp-hero-title,
  html[data-active-module="landing"] #landing .erp-hero.erp-hero--command-center .erp-hero-subtitle,
  html[data-active-module="landing"] body.erp-body #landing .erp-hero.erp-hero--command-center .erp-hero-title,
  html[data-active-module="landing"] body.erp-body #landing .erp-hero.erp-hero--command-center .erp-hero-subtitle,
  html body.erp-body #landing .erp-hero.erp-hero--command-center .erp-hero-title,
  html body.erp-body #landing .erp-hero.erp-hero--command-center .erp-hero-subtitle {
    text-align: left !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  html[data-active-module="landing"] body.erp-body #landing .erp-hero.erp-hero--command-center .erp-hero-cta,
  html body.erp-body #landing .erp-hero.erp-hero--command-center .erp-hero-cta {
    justify-content: flex-start !important;
  }

  html[data-active-module="landing"] #landing .erp-hero.erp-hero--command-center .erp-cc-kpi-row,
  html[data-active-module="landing"] body.erp-body #landing.module-section .erp-hero.erp-hero--command-center .erp-cc-kpi-row,
  html[data-active-module="landing"] body.erp-body #landing .erp-hero.erp-hero--command-center .erp-hero-visual,
  html body.erp-body #landing .erp-hero.erp-hero--command-center .erp-cc-kpi-row,
  html body.erp-body #landing .erp-hero.erp-hero--command-center .erp-hero-visual,
  html body.erp-body #landing.module-section .erp-hero.erp-hero--command-center .erp-hero-inner > .erp-hero-visual {
    display: grid !important;
    visibility: visible !important;
    position: relative !important;
    height: auto !important;
    width: 100% !important;
    max-height: none !important;
    max-width: none !important;
    overflow: visible !important;
    pointer-events: auto !important;
    grid-area: dash !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.75rem !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Dashboard is a column: KPI mosaic on top, AI Command Center full-width
     underneath. Sharing the 2-col mosaic grid squeezed the command center
     into a leftover vertical pill beside the cards. */
  html[data-active-module="landing"] #landing .erp-hero.erp-hero--command-center .erp-cc-dashboard,
  html[data-active-module="landing"] body.erp-body #landing .erp-hero.erp-hero--command-center .erp-cc-dashboard,
  html body.erp-body #landing .erp-hero.erp-hero--command-center .erp-cc-dashboard {
    display: flex !important;
    flex-direction: column !important;
    visibility: visible !important;
    position: relative !important;
    height: auto !important;
    width: 100% !important;
    max-height: none !important;
    max-width: none !important;
    overflow: visible !important;
    pointer-events: auto !important;
    grid-area: dash !important;
    grid-template-columns: none !important;
    gap: 0.75rem !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  html[data-active-module="landing"] #landing .erp-hero.erp-hero--command-center .erp-hero-stats.erp-hero-trust-strip,
  html body.erp-body #landing .erp-hero.erp-hero--command-center .erp-hero-stats.erp-hero-trust-strip {
    grid-area: trust !important;
  }

  html[data-active-module="landing"] #landing .erp-hero.erp-hero--command-center .next-steps-strip,
  html body.erp-body #landing .erp-hero.erp-hero--command-center .next-steps-strip {
    grid-area: steps !important;
  }
}

/* ── Footer: horizontal columns; Ireland + Connect share one pair ── */
@media (min-width: 901px) {
  html[data-active-module="landing"] body.erp-body footer.elinom-footer .footer-content,
  html[data-active-module="landing"] body.erp-body footer.elinom-footer .footer-content--design,
  html[data-active-module="landing"] body.erp-body .footer .footer-content {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 1.75rem 1.5rem !important;
    align-items: start !important;
    justify-items: start !important;
    text-align: left !important;
    place-items: start start !important;
  }

  html[data-active-module="landing"] body.erp-body footer.elinom-footer .footer-offices-certs {
    grid-column: 1 / -1 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 1.05fr) !important;
    grid-template-rows: auto !important;
    column-gap: 1.5rem !important;
    row-gap: 0 !important;
    align-items: stretch !important;
    width: 100% !important;
  }

  html[data-active-module="landing"] body.erp-body footer.elinom-footer .footer-col-offices,
  html[data-active-module="landing"] body.erp-body footer.elinom-footer .footer-col-certs-social {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    height: 100% !important;
    min-height: 0 !important;
    width: 100% !important;
  }

  html[data-active-module="landing"] body.erp-body footer.elinom-footer .footer-certs-top {
    flex: 1 1 auto !important;
  }

  html[data-active-module="landing"] body.erp-body footer.elinom-footer .footer-connect {
    margin-top: auto !important;
    width: 100% !important;
  }

  html[data-active-module="landing"] body.erp-body footer.elinom-footer .footer-office-card--ie {
    margin-top: 0 !important;
  }
}

@media (min-width: 1100px) {
  html[data-active-module="landing"] body.erp-body footer.elinom-footer .footer-content,
  html[data-active-module="landing"] body.erp-body footer.elinom-footer .footer-content--design,
  html[data-active-module="landing"] body.erp-body .footer .footer-content {
    display: grid !important;
    grid-template-columns:
      minmax(140px, 0.9fr)
      minmax(140px, 0.8fr)
      minmax(140px, 0.85fr)
      minmax(240px, 1.35fr)
      minmax(260px, 1.2fr) !important;
    gap: 2rem 1.5rem !important;
    align-items: start !important;
    justify-items: stretch !important;
    text-align: left !important;
    place-items: start stretch !important;
    width: 100% !important;
    grid-template-rows: none !important;
  }

  html[data-active-module="landing"] body.erp-body footer.elinom-footer .footer-content--design > .footer-section,
  html[data-active-module="landing"] body.erp-body footer.elinom-footer .footer-content > .footer-section {
    grid-row: auto !important;
  }

  html[data-active-module="landing"] body.erp-body footer.elinom-footer .footer-section:not(.footer-col-offices):not(.footer-col-certs-social),
  html[data-active-module="landing"] body.erp-body .footer .footer-content .footer-section:not(.footer-col-offices):not(.footer-col-certs-social) {
    display: block !important;
    align-items: stretch !important;
    text-align: left !important;
    width: auto !important;
  }

  html[data-active-module="landing"] body.erp-body footer.elinom-footer .footer-offices-certs {
    grid-column: 4 / 6 !important;
    grid-template-columns: minmax(240px, 1.45fr) minmax(220px, 1.05fr) !important;
    column-gap: 1.5rem !important;
    row-gap: 0 !important;
  }

  html[data-active-module="landing"] body.erp-body footer.elinom-footer .footer-content .footer-col-offices,
  html[data-active-module="landing"] body.erp-body footer.elinom-footer .footer-content--design .footer-col-offices,
  html[data-active-module="landing"] body.erp-body footer.elinom-footer .footer-content .footer-col-certs-social,
  html[data-active-module="landing"] body.erp-body footer.elinom-footer .footer-content--design .footer-col-certs-social,
  html[data-active-module="landing"] body.erp-body .footer .footer-content .footer-col-offices,
  html[data-active-module="landing"] body.erp-body .footer .footer-content .footer-col-certs-social {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    grid-row: auto !important;
    height: 100% !important;
    min-height: 0 !important;
    width: 100% !important;
  }

  html[data-active-module="landing"] body.erp-body footer.elinom-footer .footer-content .footer-connect,
  html[data-active-module="landing"] body.erp-body footer.elinom-footer .footer-content--design .footer-connect {
    margin-top: auto !important;
    width: 100% !important;
  }

  html[data-active-module="landing"] body.erp-body footer.elinom-footer .footer-office-card--ie {
    margin-top: 0 !important;
  }

  html[data-active-module="landing"] body.erp-body footer.elinom-footer .footer-connect h4,
  html[data-active-module="landing"] body.erp-body footer.elinom-footer .footer-connect h4.footer-social-heading,
  html[data-active-module="landing"] body.erp-body footer.elinom-footer .footer-connect h4.lp-is-02a008fb {
    margin-top: 0 !important;
  }

  html[data-active-module="landing"] body.erp-body footer.elinom-footer .footer-offices,
  html[data-active-module="landing"] body.erp-body .footer .footer-offices {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.7rem !important;
    width: 100% !important;
    align-items: stretch !important;
  }

  html[data-active-module="landing"] body.erp-body footer.elinom-footer .footer-office-card,
  html[data-active-module="landing"] body.erp-body .footer .footer-office-card {
    width: 100% !important;
    max-width: 100% !important;
    align-items: flex-start !important;
    text-align: left !important;
  }

  html[data-active-module="landing"] body.erp-body footer.elinom-footer .footer-social-row,
  html[data-active-module="landing"] body.erp-body footer.elinom-footer .footer-social-row.social-links,
  html[data-active-module="landing"] body.erp-body footer.elinom-footer .footer-connect .footer-social-row,
  html[data-active-module="landing"] body.erp-body footer.elinom-footer .footer-social-lockup .footer-social-row {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1.85rem)) !important;
    grid-auto-flow: column !important;
    align-items: center !important;
    justify-content: start !important;
    gap: 0.32rem !important;
    width: max-content !important;
    max-width: 100% !important;
    flex-wrap: nowrap !important;
  }

  html[data-active-module="landing"] body.erp-body footer.elinom-footer .footer-social-row > a {
    width: 1.85rem !important;
    height: 1.85rem !important;
    min-width: 0 !important;
    max-width: 1.85rem !important;
    flex: 0 0 1.85rem !important;
  }
}
