/* Bercary cover refinement — 20 Nov 2026. Only five Bercary covers (not demonstration microsites). */
:root{--bercary-global-header-height:68px;--bercary-home-footer-height:47px}
/* ONE shared header row for the four main services on desktop. */
@media(min-width:1050px){
 .bercary-global-header.bercary-header-single-row .bercary-global-top{max-width:none;padding:9px clamp(12px,1.8vw,29px);display:flex;flex-wrap:nowrap;min-height:65px;gap:clamp(8px,1.3vw,19px)}
 .bercary-global-header.bercary-header-single-row .bercary-global-brand{font-size:clamp(13px,1.3vw,17px)!important;gap:6px;flex-shrink:0}
 .bercary-global-header.bercary-header-single-row .bercary-global-brand img{height:34px;width:34px}
 .bercary-global-header.bercary-header-single-row .bercary-global-services{display:flex!important;flex:1 1 auto;align-items:center;justify-content:center;min-width:0;overflow:visible;border:0;margin:0;max-width:none;padding:0;gap:clamp(8px,1.35vw,22px)}
 .bercary-global-header.bercary-header-single-row .bercary-global-services a{font-size:clamp(10px,.9vw,12px)!important;flex-shrink:0;padding:7px 0}
 .bercary-global-header.bercary-header-single-row .bercary-global-controls{flex:0 0 auto;gap:clamp(6px,.9vw,13px)}
 .bercary-global-header.bercary-header-single-row .bercary-global-social .bercary-social-group{gap:4px}
}
/* On smaller tablets, keep two compact rows rather than cutting icons or service links. */
@media(max-width:1049px){
 .bercary-global-header.bercary-header-single-row .bercary-global-top{flex-wrap:wrap;gap:6px;padding-bottom:6px}
 .bercary-global-header.bercary-header-single-row .bercary-global-services{order:3;flex:1 0 100%;width:100%;max-width:none;border-top:1px solid #ffffff20;margin:0;padding:6px 0 2px;justify-content:flex-start;overflow-x:auto;gap:20px}
 .bercary-global-header.bercary-header-single-row .bercary-global-services a{flex-shrink:0}
 .bercary-global-header.bercary-header-single-row .bercary-global-controls{margin-left:auto}
}
/* The homepage fits together with its footer on a landscape laptop display. */
@media(min-width:700px){
 body.bercary-global-main[data-page="home"]{min-height:100svh;display:flex;flex-direction:column}
 body.bercary-global-main[data-page="home"]>main{display:flex;flex:1 0 auto;min-height:0;flex-direction:column}
 body.bercary-global-main[data-page="home"] .bercary-one{height:auto!important;min-height:0!important;flex:1 0 auto;display:flex!important;align-items:stretch!important}
 body.bercary-global-main[data-page="home"] .bercary-one-inner{flex:1 1 auto;min-height:0;justify-content:flex-end!important;gap:clamp(14px,2svh,25px)!important;padding-top:clamp(55px,10svh,110px)!important;padding-bottom:clamp(16px,2.7svh,25px)!important}
 body.bercary-global-main[data-page="home"] .bercary-hero-heading{margin-top:auto}
 body.bercary-global-main[data-page="home"] .bercary-footer{flex-shrink:0}
 /* Service covers: lower the title block with enough breathing room. */
 body.bercary-global-main[data-bercary-cover="service"] section.hero:first-of-type{min-height:max(390px,calc(100svh - var(--bercary-global-header-height)))!important;display:flex!important;flex-direction:column!important;align-items:stretch!important;justify-content:flex-end!important;padding-top:clamp(48px,8svh,95px)!important;padding-bottom:clamp(24px,5svh,55px)!important}
 body.bercary-global-main[data-bercary-cover="service"] section.hero:first-of-type>.wrap,
 body.bercary-global-main[data-bercary-cover="service"] section.hero:first-of-type>.container{margin-top:auto!important;margin-bottom:0!important;flex:0 0 auto!important;width:100%}
 body.bercary-global-main[data-bercary-cover="service"] section.hero:first-of-type .hero-grid{align-items:end!important;align-content:end!important;min-height:0!important}
 body.bercary-global-main[data-bercary-cover="service"] section.hero:first-of-type .hero-copy{align-self:flex-end!important}
}
/* On phone portrait, never force a fixed-height cover or crop a call-to-action. */
@media(max-width:699px){
 body.bercary-global-main[data-page="home"] .bercary-one{height:auto!important;min-height:calc(100svh - var(--bercary-global-header-height))!important}
 body.bercary-global-main[data-page="home"] .bercary-one-inner{justify-content:flex-end!important;gap:16px!important;padding-top:clamp(60px,13svh,125px)!important;padding-bottom:23px!important}
 body.bercary-global-main[data-page="home"] .bercary-hero-heading{margin-top:auto}
 body.bercary-global-main[data-bercary-cover="service"] section.hero:first-of-type{min-height:clamp(480px,76svh,730px)!important;display:flex!important;flex-direction:column;justify-content:flex-end!important;padding-top:45px!important;padding-bottom:28px!important;height:auto!important}
 body.bercary-global-main[data-bercary-cover="service"] section.hero:first-of-type>.wrap,
 body.bercary-global-main[data-bercary-cover="service"] section.hero:first-of-type>.container{margin-top:auto!important;margin-bottom:0!important}
 body.bercary-global-main[data-bercary-cover="service"] section.hero:first-of-type .hero-grid{min-height:0!important;align-content:end!important}
}
@media(max-height:630px) and (min-width:700px){
 body.bercary-global-main[data-page="home"] .bercary-one-inner{padding-top:30px!important;padding-bottom:13px!important}
 body.bercary-global-main[data-bercary-cover="service"] section.hero:first-of-type{padding-top:30px!important;padding-bottom:20px!important}
}

/* 2026-11-20: Estate CRM must remain scrollable after responsive tab layout rules. */
body[data-bercary-crm="estate"] #demo .re-crm{
  overflow-y:auto!important;overflow-x:hidden!important;
  overscroll-behavior-y:contain;touch-action:pan-y;
  scrollbar-width:thin;-webkit-overflow-scrolling:touch;
}
body[data-bercary-crm="estate"] #demo .re-prospects,
body[data-bercary-crm="estate"] #demo .re-appointments{
  overflow:visible!important;flex:none!important;max-height:none!important;
  min-height:0!important;
}
