/* LVL29 theme 8 footer
   SECTION: FOOTER - START
   Behaviour ported from the plugin's own footer-3.css (collective),
   which is the stacked LAYOUT B this markup uses:
     swifty-frontend/components/footer/css/footer-3.css
   Every band is width:100% and centred with flex + gap, and the lower
   bar uses margin-left:auto rather than fixed widths, so switching any
   block off just closes the gap and the footer collapses to the live
   LVL29 look. Colours are re-themed here for the dark photo ground
   (footer-3 is built for a light footer).
   Structural rules already in component-common.css are not restated.
   ============================================================ */
.footer {
  position: relative;
  flex-flow: wrap;
  overflow: hidden;
}

/* --- Photo background + overlay (live LVL29 treatment) --- */
.footer .footer-bg-wrap {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 0;
}

.footer .footer-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.footer .footer-bg-overlay {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}

/* --- Bands --- */
.footer .footer-top-wraper,
.footer .footer-lower {
  position: relative;
  z-index: 1;
  width: 100%;
}

.footer .footer-top-wraper {
  display: flex;
  flex-flow: wrap;
  padding: 0 2.778rem;
}

/* --- Logo (not in footer-3; live LVL29 has one) --- */
.footer .footer-logo {
  order: 0;
  width: 100%;
  padding-top: 2.778rem;
  text-align: center;
}

/* component-main.css sets `img { display: block }`. A block image inside an
   inline <a> ignores text-align:center on the wrapper, so the anchor is made
   inline-flex to shrink-wrap the image — then the centring applies. */
.footer .footer-logo a {
  display: inline-flex;
}

.footer .footer-logo .logo-img {
  width: 205px;
  height: auto;
}

/* --- Social --- */
.footer .footer-social {
  order: 1;
  width: 100%;
  padding-top: 2.222rem;
  padding-bottom: 2.222rem;
}

.footer .social-links {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.footer ul.social-links li.social-icon a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 47px;
  height: 47px;
  border: 1px solid;
  border-radius: 50%; /* live LVL29 is round; footer-3 squares these off */
  font-size: 1.1rem;
  transition: all 0.3s ease;
}

/* --- Menu: centred row, hairline above and below (footer-3 behaviour) --- */
.footer .footer-menu-wraper {
  position: relative;
  order: 2;
  display: flex;
  justify-content: center;
  align-items: self-start;
  gap: 2.111rem;
  padding-top: 2.778rem;
  padding-bottom: 2.778rem;
}

.footer .footer-menu {
  justify-content: center;
  flex-flow: wrap;
  gap: 2rem;
}

.footer .footer-menu .footer-menu-item {
  text-align: center;
}

/* --- Two-list menu (footer-3 behaviour) ---
   The backend splits the footer menu into two <ul>s: .submenu-wrap holds
   items that have children, .no-submenu-wrap holds the flat ones. The
   submenu column is divided from the rest by a rule on its right, and the
   flat items lay out as a column-flow grid, 4 rows deep. If only one list
   is output, the other simply is not rendered and this still works. */
.footer .footer-menu.submenu-wrap {
  border-right: 1px solid rgba(255, 255, 255, 0.18);
  padding-right: 36px;
}

.footer .footer-menu.no-submenu-wrap {
  display: grid !important;
  grid-auto-flow: column;
  grid-template-rows: repeat(4, auto);
  gap: 1.111rem;
}

/* a lone .submenu-wrap has nothing to divide from */
.footer .footer-menu.submenu-wrap:not(:has(+ .footer-menu.no-submenu-wrap)) {
  border-right: 0;
  padding-right: 0;
}

.footer .footer-submenu {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 20px;
  max-width: 170px;
  text-align: left;
}

.footer .footer-menu .footer-menu-item .menu-item-link {
  padding: 0 10px;
}

.footer .footer-menu-wraper::before,
.footer .footer-menu-wraper::after {
  content: "";
  position: absolute;
  width: 100%;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.footer .footer-menu-wraper::before {
  top: 0;
}

.footer .footer-menu-wraper::after {
  bottom: 0;
}

/* --- Contact row --- */
.footer .footer-address-wraper {
  order: 3;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: flex-start;
  gap: 40px;
  padding: 39px 0;
  text-align: center;
}

.footer .footer-email-wrap a,
.footer .footer-contact-wrap a,
.footer .footer-address-wrap a,
.footer .footer-time-wrap {
  gap: 5px;
}

.footer .footer-address-wraper span.ficon-wrap {
  line-height: 1;
  font-size: 1rem;
}

.footer .footer-time-wrap .footer-time {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* --- Lower bar --- */
.footer .footer-lower {
  display: flex;
  align-items: center;
  padding: 16px 48px;
  background: rgba(0, 0, 0, 0.35);
}

.footer .footer-copyright {
  padding-right: 20px;
}

.footer .footer-policy-nav {
  padding-left: 10px;
  padding-right: 10px;
  border-left: 1px solid rgba(255, 255, 255, 0.3);
  border-right: 1px solid rgba(255, 255, 255, 0.3);
}

.footer ul.policy-nav {
  display: flex;
}

.footer ul.policy-nav li a {
  position: relative;
  padding-left: 10px;
  border-bottom: none;
}

/* small round separator between policy links */
.footer ul.policy-nav li a::after {
  content: "";
  position: absolute;
  top: 50%;
  left: -10px;
  height: 0;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  transform: translateY(-50%);
}

.footer ul.policy-nav li:first-child a::after {
  display: none;
}

.footer .footer-property-icons {
  display: flex;
  align-items: center;
  flex-grow: 1;
  margin-right: auto;
  padding-left: 8px;
}

.footer .property-icons {
  border-right: 0;
}

.footer .cb-logo-wrap {
  margin-left: auto;
}
.bg-dark-transparent {
    background-color: rgba(56, 47, 45, 0.8);
}

/* ============================================================
   SECTION: FOOTER — RESPONSIVE
   Breakpoints mirror footer-1.css (992 / 767 / 480), which is the reference
   for this markup's stacking order.

   NOTE ON OVERLAP: hero-8.css's own responsive section already tightens the
   band paddings, stacks the policy nav and drops its separators at 767, and
   flattens the flat-menu grid at 575. footer-8.css loads after hero-8.css in
   get_header_css_by_theme()'s $files array, so anything restated here wins on
   a specificity tie. Only what that block does NOT cover is set below.
   ============================================================ */

/* --- Tablet: the two horizontal rows (contact, lower bar) become columns.
   This is the breakpoint theme 8 was missing entirely. --- */
@media screen and (max-width: 992px) {
  /* Four contact blocks in a 40px-gap row wrap raggedly well before 767, so
     stack them and their inner icon+text pairs, as footer-1 does. */
  .footer .footer-address-wraper,
  .footer .footer-email-wrap a,
  .footer .footer-contact-wrap a,
  .footer .footer-address-wrap a,
  .footer .footer-time-wrap,
  .footer .footer-time-wrap .footer-time {
    flex-direction: column;
    text-align: center;
  }

  .footer .footer-address-wraper {
    gap: 24px;
    padding: 28px 0;
  }

  /* The two lists stay side by side as an even 50/50 split rather than
     stacking — the desktop layout sizes them by content, which leaves them
     off-centre once the footer narrows. flex-basis:50% with flex-grow/shrink
     at 0 keeps the divider on the centre line whatever each list contains. */
  .footer .footer-menu-wraper {
    align-items: flex-start;
    gap: 0;
    padding-top: 2rem;
    padding-bottom: 2rem;
  }

  .footer .footer-menu-wraper .footer-menu {
    flex: 0 0 50%;
    max-width: 50%;
  }

  /* Divider stays: it now sits exactly on the 50% line. Padding moves to both
     halves so the two lists are inset evenly from it. */
  .footer .footer-menu.submenu-wrap {
    padding-right: 20px;
  }

  .footer .footer-menu.no-submenu-wrap {
    padding-left: 20px;
  }

  .footer .footer-top-wraper {
    padding: 0 20px;
  }

  /* Lower bar: one column, each block full width and centred. The desktop
     spreading (flex-grow on the icons, margin-left:auto on the CB logo) has to
     be undone here or those blocks stay pinned to the edges and the centring
     appears to do nothing. */
  .footer .footer-lower {
    flex-flow: wrap;
    padding: 16px 20px;
  }

  .footer .footer-policy-nav,
  .footer .footer-property-icons,
  .footer .footer-copyright,
  .footer .cb-logo-wrap {
    width: 100%;
    margin-left: 0;
    text-align: center;
  }

  .footer .footer-policy-nav {
    order: 0;
    padding: 0 0 20px;
    border-left: 0;
    border-right: 0;
  }

  .footer .footer-property-icons {
    order: 1;
    flex-grow: 0;
    justify-content: center;
    margin-right: 0;
    padding-left: 0;
    padding-bottom: 20px;
  }

  .footer .cb-logo-wrap {
    order: 2;
    padding-bottom: 20px;
  }

  .footer .footer-copyright {
    order: 3;
    padding-right: 0;
  }

  .footer .footer-social {
    padding-top: 25px;
    padding-bottom: 0;
  }
}

/* --- Mobile: shrink the fixed-size pieces the layout still carries. --- */
@media screen and (max-width: 767px) {
  .footer .footer-logo {
    padding-top: 2rem;
  }

  .footer .footer-logo .logo-img {
    width: 165px;
  }

  .footer ul.social-links li.social-icon a {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  /* The 170px cap keeps submenu columns narrow next to each other; stacked and
     centred it just makes a ragged left-aligned block. */
  .footer .footer-submenu {
    max-width: none;
    align-items: center;
    text-align: center;
  }

  /* One centred column for the whole menu.

     The flat list has to be reset HERE, not in hero-8.css: its @575
     `grid-auto-flow: row` is the same 0-3-0 specificity as the base rule above
     and hero-8.css loads first, so the base `column` flow won and the list kept
     splitting into two ragged columns. grid-template-rows must be cleared too —
     repeat(4, auto) pins it to four rows whatever the flow direction. */
  .footer .footer-menu.no-submenu-wrap {
    grid-auto-flow: row;
    grid-template-rows: none;
    justify-items: center;
  }

  /* Both halves need one shared rhythm — without this the flat list sits
     tighter than the list beside it and the two columns stop lining up. */
  .footer .footer-menu,
  .footer .footer-menu.no-submenu-wrap {
    gap: 1.25rem;
  }

  .footer .footer-menu .footer-menu-item {
    width: 100%;
    text-align: center;
  }

  /* Tighter inset from the divider at phone widths, where 20px each side eats
     into two already-narrow columns. */
  .footer .footer-menu.submenu-wrap {
    padding-right: 12px;
  }

  .footer .footer-menu.no-submenu-wrap {
    padding-left: 12px;
  }

  /* hero-8.css stacks the policy links and hides their round separator at this
     width; the 10px indent that made room for it has to go too. */
  .footer ul.policy-nav li a {
    padding-left: 0;
  }

  .footer .cb-logo-wrap img:first-child {
    margin-left: 0;
  }
}

@media only screen and (max-width: 480px) {
  .footer .footer-menu {
    gap: 1rem;
  }

  .footer .footer-address-wraper {
    padding: 24px 0;
  }

  .footer .footer-lower {
    padding: 16px 12px;
  }
}

/* ============================================================
   SECTION: FOOTER — END
