/* =========================================================
   BRIAL Base overrides (layout + header + call button)
   Przeniesione z inline <style> w base.html
   ========================================================= */

/* Persistent call button styles */
.call-button-wrapper{display:flex;align-items:center;height:100%}
.persistent-call-button{
  display:inline-block;
  padding:10px 14px;
  background:linear-gradient(180deg,#34d399 0%,#10b981 100%);
  color:#fff;
  border-radius:8px;
  font-weight:800;
  text-align:center;
  box-shadow:0 6px 18px rgba(16,185,129,0.18);
  text-decoration:none;
  transition:transform .18s ease,box-shadow .18s ease,padding .18s ease;
}
.persistent-call-button .call-number{display:block;font-weight:600;font-size:13px}

@keyframes pulse-call{
  0%{transform:scale(1);box-shadow:0 0 0 0 rgba(16,185,129,0.5)}
  70%{transform:scale(1.04);box-shadow:0 0 0 14px rgba(16,185,129,0)}
  100%{transform:scale(1);box-shadow:0 0 0 0 rgba(16,185,129,0)}
}
.persistent-call-button{animation:pulse-call 2s infinite}
.persistent-call-button:hover{animation-play-state:paused;transform:scale(1.03)}

/* Ensure logo wrapper matches image width exactly */
#thelogo{display:inline-block;line-height:0}
#thelogo img.kad-standard-logo{display:block}

/* --- Consolidated header layout rules --- */
@media (min-width:768px){
  header.banner.headerclass .container > .row{
    display:flex !important;
    align-items:center;
    flex-wrap:nowrap;
  }

  .kad-header-left{
    flex:0 0 auto;
    width:auto !important;
    max-width:none !important;
    flex-basis:auto !important;
    padding:0 !important;
    margin:0 !important;
  }
  .kad-header-left .logocase,
  .kad-header-left #logo,
  .kad-header-left .brand,
  #thelogo{
    display:block !important;
    padding:5px 0 5px 0 !important;
    margin:0 !important;
    width:auto !important;
  }

  .kad-call-col,
  .kad-hamburger-col{
    display:none !important;
    flex:0 0 auto !important;
    width:auto !important;
  }

  .kad-header-right{flex:1 1 auto !important;min-width:0}
  .kad-header-right nav{min-width:0}
}

@media (max-width:767px){
  .kad-header-left{
    order:0;
    width:100%;
    display:flex;
    justify-content:center;
    padding-left:0;
  }
  .kad-hamburger-col{display:block !important}
  .kad-call-col{
    display:flex !important;
    order:2;
    width:100%;
    padding:12px 0 18px;
    justify-content:center;
  }
  .call-button-wrapper{width:100%;display:flex;justify-content:center}
  .persistent-call-button{font-size:16px;padding:10px 16px;margin-bottom:12px}
  .kad-header-left img.kad-standard-logo{width:120px}
}

@media (max-width:991px){
  header.banner.headerclass .container > .row{position:relative}
  .kad-hamburger-col{
    position:absolute;
    top:50%;
    transform:translateY(-50%);
    display:flex !important;
    align-items:center;
    justify-content:flex-end;
    z-index:100030;
  }
  .kad-hamburger-col .mobile-menu-toggle{display:inline-flex !important}
}

/* Sticky / shrinking header (JS toggles .sticky) */
header.banner.headerclass{
  position:relative;
  transition:box-shadow .22s ease,background .22s ease;
  padding-top:0;
  padding-bottom:0;
}
header.banner.headerclass .kad-header-left img.kad-standard-logo{
  transition:width .22s ease,transform .22s ease,height .22s ease;
  display:block;
  height:auto;
  width:140px;
  max-width:none;
}
header.banner.headerclass .persistent-call-button{
  transition:transform .22s ease,padding .22s ease,font-size .22s ease;
}

header.banner.headerclass.sticky{
  position:fixed;
  left:0;right:0;top:0;
  z-index:9999;
  background:rgba(255,255,255,0.98);
  box-shadow:0 2px 12px rgba(0,0,0,0.08);
}
header.banner.headerclass.sticky .kad-header-left img.kad-standard-logo{
  width:98px;
  transform:none;
  transform-origin:left center;
  max-width:none;
  height:auto;
}
header.banner.headerclass.sticky .persistent-call-button{padding:6px 8px}

@media (max-width:767px){
  header.banner.headerclass.sticky .kad-header-left img.kad-standard-logo{width:90px}
}

header.banner.headerclass .kad-header-left,
header.banner.headerclass .kad-call-col{transition:padding .22s ease}

header.banner.headerclass.sticky .kad-header-left{padding-top:4px;padding-bottom:4px}
header.banner.headerclass.sticky .kad-call-col{padding-top:4px;padding-bottom:4px}

/* Footer push-down helpers (keep as-is, from inline) */
html, body{height:100%}
body{
  display:flex;
  flex-direction:column;
  min-height:100vh;
  margin:0;
}
#wrapper{
  flex:1 0 auto;
  display:flex;
  flex-direction:column;
}
.wrap.contentclass{flex:1 0 auto}

footer#containerfooter, footer.footerclass, #containerfooter{
  margin-top:auto !important;
  align-self:stretch !important;
  position:relative !important;
}
footer#containerfooter .footercredits,
footer.footerclass .footercredits{flex-shrink:0}

@supports (height: calc(100vh - 200px)){
  .wrap.contentclass{min-height:calc(100vh - 220px)}
}

@media (min-width:768px){
  .kad-header-left{padding-left:15px !important}
}
