/* =========================================================
   BC FOOTER — global footer, footer bottom and legal nav
   ========================================================= */

#brx-footer { margin-top: auto; }

/* ===================== FOOTER — less padding ===================== */
.bc-footer-wrap { background: transparent !important; padding: 0 !important; margin: 0 !important; width: 100% !important; max-width: 100% !important; }
.bc-footer { background: transparent !important; padding: 0 !important; margin: 0 !important; width: 100% !important; max-width: 100% !important; }
.bc-footer > .bc-footer-main.brxe-container,
.bc-footer-wrap > .bc-footer-main.brxe-container {
  max-width: 100% !important; width: 100% !important; box-sizing: border-box;
  padding: 64px 0 58px !important;
  background: #393029 !important;
}
.bc-footer-cols, .bc-footer-grid {
  width: min(1186px, calc(100% - 240px));
  margin: 0 auto;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 0;
  row-gap: 28px;
  align-items: start;
  justify-content: center;
}
.bc-footer-col {
  width: fit-content;
  max-width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bc-footer-col:nth-child(1) { justify-self: start; text-align: left; }
.bc-footer-col:nth-child(2) { justify-self: center; text-align: left; }
.bc-footer-col:nth-child(3) { justify-self: end; text-align: left; }
.bc-footer-col h4 {
  font-family: var(--font-h); font-size: clamp(18px, 1.8vw, 26px); font-weight: 400;
  line-height: 1.6; letter-spacing: 0.05em; color: #F7F4EF; margin: 0;
}
.bc-footer-col .brxe-text-basic {
  font-family: var(--font-b); font-size: clamp(14px, 1.3vw, 20px); font-weight: 400;
  line-height: 1.6; letter-spacing: 0.05em; color: #F7F4EF;
}

.bc-footer .bc-clinic-address,
.bc-footer .bc-clinic-contact {
  color: #F7F4EF;
  font-size: 16px;
  line-height: 1.7;
  font-weight: 400;
}

.bc-footer .bc-clinic-address {
  display: block;
}
.bc-footer-col a { color: #F7F4EF; text-decoration: none; transition: opacity 0.3s; }
.bc-footer .bc-clinic-contact a,
.bc-footer .bc-contact-link,
.bc-footer .bc-opening-hours-link {
  color: #F7F4EF;
  text-decoration: none;
}
.bc-footer-col a:hover { opacity: 0.7; }
.bc-footer-col .bc-email-link { text-decoration: underline; }

.bc-footer-social { display: flex; justify-content: flex-start; gap: 24px; }
.bc-footer-social a {
  width: clamp(36px, 3.5vw, 50px); height: clamp(36px, 3.5vw, 50px);
  display: flex; align-items: center; justify-content: center;
  text-decoration: none; transition: opacity 0.3s; background: #F7F4EF; border-radius: 11px;
}
.bc-footer-social a img { width: 100%; height: 100%; }
.bc-footer-social a svg { width: clamp(14px, 1.4vw, 20px); height: clamp(14px, 1.4vw, 20px); fill: #F7F4EF; }
.bc-footer-social a:hover { opacity: 0.7; }

/* Spacer before footer — reduced from 120px */
.bc-footer-section { padding-top: clamp(30px, 3.5vw, 50px) !important; }

/* ===================== FOOTER BOTTOM / LEGAL NAV ===================== */
#brx-footer .bc-footer-bottom {
  background: #B0947E;
  padding: clamp(10px, 1.2vw, 18px) clamp(16px, 4vw, 60px);
  border-top: none; margin-top: 0;
  width: 100% !important; box-sizing: border-box;
}
#brx-footer .bc-footer-bottom .bricks-nav-menu {
  display: flex; gap: clamp(8px, 1.2vw, 18px); list-style: none;
  padding: 0; margin: 0; flex-wrap: nowrap;
  justify-content: center;
}
#brx-footer .bc-footer-bottom .menu-item a {
  font-family: var(--font-b); font-size: clamp(12px, 1.1vw, 16px); font-weight: 400;
  line-height: 1.6; color: #F7F4EF; text-decoration: none;
  white-space: nowrap; transition: opacity 0.3s;
}
#brx-footer .bc-footer-bottom .menu-item a:hover { opacity: 0.7; }
/* Footer nav — always visible, never hamburger */
#brx-footer .bc-footer-bottom #brxe-mnekpf .bricks-nav-menu-wrapper,
#brx-footer .bc-footer-bottom #brxe-mnekpf .bricks-nav-menu-wrapper.mobile_landscape,
#brx-footer .bc-footer-bottom #brxe-mnekpf .bricks-nav-menu-wrapper.mobile_portrait { display: flex !important; flex-wrap: wrap !important; }
#brx-footer .bc-footer-bottom #brxe-mnekpf .bricks-mobile-menu-toggle { display: none !important; }
@media (max-width: 478px) {
  #brx-footer .bc-footer-bottom .bricks-nav-menu { flex-wrap: wrap !important; justify-content: center; gap: 4px 12px !important; }
}

/* ===================== FOOTER FIXES — HIGH SPECIFICITY ===================== */
footer .bc-footer-main.brxe-container,
#brx-footer .bc-footer-main.brxe-container {
  padding: 64px 0 58px !important;
}
footer .bc-footer-cols,
footer .bc-footer-grid,
#brx-footer .bc-footer-cols,
#brx-footer .bc-footer-grid {
  width: min(1186px, calc(100% - 240px)) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  column-gap: 0 !important;
  row-gap: 28px !important;
  align-items: start !important;
  justify-content: center !important;
}
footer .bc-footer-col,
#brx-footer .bc-footer-col {
  width: fit-content !important;
  max-width: 100% !important;
  min-width: 0 !important;
  gap: 10px !important;
}
footer .bc-footer-col:nth-child(1),
#brx-footer .bc-footer-col:nth-child(1) {
  justify-self: start !important;
  text-align: left !important;
}
footer .bc-footer-col:nth-child(2),
#brx-footer .bc-footer-col:nth-child(2) {
  justify-self: center !important;
  text-align: left !important;
}
footer .bc-footer-col:nth-child(3),
#brx-footer .bc-footer-col:nth-child(3) {
  justify-self: end !important;
  text-align: left !important;
}
footer .bc-footer-social,
#brx-footer .bc-footer-social {
  display: flex !important;
  justify-content: flex-start !important;
  gap: 24px !important;
}
footer .bc-footer-col h4,
#brx-footer .bc-footer-col h4 {
  font-size: clamp(18px, 1.8vw, 26px) !important;
  line-height: 1.6 !important;
}
footer .bc-footer-col .brxe-text-basic,
#brx-footer .bc-footer-col .brxe-text-basic {
  font-size: clamp(14px, 1.3vw, 20px) !important;
  line-height: 1.6 !important;
}
footer .bc-footer-social a,
#brx-footer .bc-footer-social a {
  width: clamp(36px, 3.5vw, 50px) !important;
  height: clamp(36px, 3.5vw, 50px) !important;
  background: #F7F4EF !important;
  border-radius: 11px !important;
}
footer .bc-footer-bottom,
#brx-footer .bc-footer-bottom {
  display: flex !important;
  justify-content: center !important;
  padding: clamp(16px, 2vw, 30px) clamp(20px, 8vw, 120px) !important;
}
footer .bc-footer-bottom .menu-item a,
#brx-footer .bc-footer-bottom .menu-item a {
  font-size: clamp(12px, 1.1vw, 16px) !important;
}

/* ===================== RESPONSIVE FOOTER ===================== */
@media (max-width: 991px) {
  .bc-footer-cols, .bc-footer-grid { grid-template-columns: 1fr; row-gap: 28px; width: min(520px, calc(100% - 48px)); }
  .bc-footer-col { width: 100%; justify-self: start; }
}

/* ===================== FOOTER REGULAMINY — 2 COL MOBILE ===================== */
@media (max-width: 767px) {
  #brx-footer .brxe-text-basic:has(a[href*="regulamin"]),
  #brx-footer .bc-footer-links {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    text-align: center;
  }
}

/* ===================== FOOTER REGULAMINY — mobile 2 columns ===================== */
@media (max-width: 767px) {
  #brx-footer .bc-footer-bottom #brxe-mnekpf ul {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 4px 0;
    text-align: center;
    justify-items: center;
    padding: 0 !important;
    margin: 0 auto !important;
    list-style: none;
    max-width: 100%;
  }
  #brx-footer .bc-footer-bottom #brxe-mnekpf ul li a {
    font-size: 12px !important;
    padding: 4px 0 !important;
  }
  #brx-footer .bc-footer-bottom {
    padding: 15px 16px !important;
    display: flex !important;
    justify-content: center !important;
  }
  #brx-footer .bc-footer-bottom #brxe-mnekpf {
    width: 100% !important;
    max-width: 300px;
    margin: 0 auto !important;
  }
}

/* ===================== FOOTER REGULAMINY — mobile 2 columns ===================== */
@media (max-width: 767px) {
  #brx-footer .bc-footer-bottom #brxe-mnekpf .bricks-nav-menu {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 2px 8px !important;
    justify-items: center !important;
    max-width: 320px !important;
    margin: 0 auto !important;
    padding: 0 !important;
  }
  #brx-footer .bc-footer-bottom #brxe-mnekpf .menu-item a {
    font-size: 12px !important;
    white-space: normal !important;
    text-align: center;
  }
  #brx-footer .bc-footer-bottom {
    padding: 12px 16px !important;
    justify-content: center !important;
  }
}

@media (max-width: 767px) {
  footer .bc-footer-cols,
  footer .bc-footer-grid,
  #brx-footer .bc-footer-cols,
  #brx-footer .bc-footer-grid {
    width: min(520px, calc(100% - 48px)) !important;
    grid-template-columns: 1fr !important;
    row-gap: 28px !important;
  }
  footer .bc-footer-col,
  #brx-footer .bc-footer-col {
    width: 100% !important;
    justify-self: start !important;
  }
}

/* Mobile footer bottom space above sticky CTA */
@media (max-width: 767px) {
  #brx-footer .bc-footer-bottom,
  footer .bc-footer-bottom {
    padding-bottom: calc(76px + env(safe-area-inset-bottom)) !important;
  }
}

/* Footer bottom: wrap tablet navigation and reserve mobile CTA space */
@media (min-width: 768px) and (max-width: 1024px) {
  #brx-footer .bc-footer-bottom,
  footer .bc-footer-bottom {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    padding-left: 24px !important;
    padding-right: 24px !important;
    display: flex !important;
    justify-content: center !important;
  }

  #brx-footer .bc-footer-bottom .bricks-nav-menu,
  footer .bc-footer-bottom .bricks-nav-menu {
    width: 100% !important;
    max-width: calc(100vw - 48px) !important;
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 8px 22px !important;
    margin: 0 auto !important;
    padding: 0 !important;
  }

  #brx-footer .bc-footer-bottom .menu-item a,
  footer .bc-footer-bottom .menu-item a {
    white-space: normal !important;
    text-align: center !important;
  }
}

@media (max-width: 767px) {
  #brx-footer .bc-footer-bottom,
  footer .bc-footer-bottom {
    min-height: 0 !important;
    padding-top: 22px !important;
    padding-bottom: calc(78px + env(safe-area-inset-bottom)) !important;
    align-items: flex-start !important;
    justify-content: center !important;
    box-sizing: border-box !important;
  }

  #brx-footer .bc-footer-bottom .bricks-nav-menu,
  footer .bc-footer-bottom .bricks-nav-menu {
    margin-top: 0 !important;
    align-self: flex-start !important;
  }
}

/* Mobile polish: compact footer legal area above sticky CTA */
@media (max-width: 767px) {
  #brx-footer .bc-footer-bottom,
  footer .bc-footer-bottom {
    padding-top: 14px !important;
    padding-bottom: calc(62px + env(safe-area-inset-bottom)) !important;
    min-height: 0 !important;
  }

  #brx-footer .bc-footer-bottom .bricks-nav-menu,
  footer .bc-footer-bottom .bricks-nav-menu {
    gap: 6px 12px !important;
  }

  #brx-footer .bc-footer-bottom .menu-item a,
  footer .bc-footer-bottom .menu-item a {
    line-height: 1.22 !important;
  }
}

/* Footer legal navigation: mobile spacing without touching the header menu */
@media (max-width: 767px) {
  #brx-footer #brxe-mnekpf nav.bricks-nav-menu-wrapper {
    padding: 10px 50px 0 0 !important;
    box-sizing: border-box !important;
  }
}

@media (max-width: 767px) {
  body.home #brx-footer .bc-footer-bottom,
  body.home footer .bc-footer-bottom {
    padding-bottom: calc(14px + env(safe-area-inset-bottom)) !important;
  }
}
