/* V39 — premium homepage section separation with admin-controlled style and device switches. */

/* Shared style tokens. Values are injected from Admin in index.php. */
body.home-section-separated{
  --home-section-gutter:24px;
  --home-section-gap:24px;
  --home-section-radius-custom:28px;
  --home-section-border-width-custom:1px;
  --home-section-border-color-custom:#dce7e0;
  --home-section-shadow-alpha-custom:.09;
  --home-section-shadow-blur-custom:42px;
  --home-section-bg-opacity-custom:.10;
  --home-section-bg-color-custom:#fff;
  --home-section-bg-image-custom:none;
}

/* Common enabled-device decoration. */
@media (min-width:1101px){
  body.home-section-separated.home-section-sep-desktop [data-home-section]:not([data-home-section="hero"]):not([data-home-section="app_downloads"]){
    width:min(calc(100% - (var(--home-section-gutter) * 2)),1500px)!important;
    margin:var(--home-section-gap) auto!important;
    border-radius:var(--home-section-radius-custom)!important;
    overflow:hidden;
    border:var(--home-section-border-width-custom) solid var(--home-section-border-color-custom)!important;
    box-shadow:0 16px var(--home-section-shadow-blur-custom) rgba(10,45,32,var(--home-section-shadow-alpha-custom))!important;
    isolation:isolate;
    scroll-margin-top:118px;
  }
  body.home-section-separated.home-section-sep-desktop [data-home-section]:not([data-home-section="hero"]):not([data-home-section="app_downloads"]):first-of-type{margin-top:28px!important}
  body.home-section-separated.home-section-sep-desktop.home-section-custom-bg [data-home-section]:not([data-home-section="hero"]):not([data-home-section="app_downloads"]){background-color:var(--home-section-bg-color-custom)!important}
  body.home-section-separated.home-section-sep-desktop.home-section-custom-image [data-home-section]:not([data-home-section="hero"]):not([data-home-section="app_downloads"]){position:relative}
  body.home-section-separated.home-section-sep-desktop.home-section-custom-image [data-home-section]:not([data-home-section="hero"]):not([data-home-section="app_downloads"])::before{
    content:"";position:absolute;inset:0;z-index:0;pointer-events:none;
    background-image:var(--home-section-bg-image-custom);background-size:cover;background-position:center;background-repeat:no-repeat;
    opacity:var(--home-section-bg-opacity-custom);
  }
  body.home-section-separated.home-section-sep-desktop.home-section-custom-image [data-home-section]:not([data-home-section="hero"]):not([data-home-section="app_downloads"])>*{position:relative;z-index:1}
}

@media (min-width:761px) and (max-width:1100px){
  body.home-section-separated.home-section-sep-tablet{--home-section-gutter:18px;--home-section-gap:18px}
  body.home-section-separated.home-section-sep-tablet [data-home-section]:not([data-home-section="hero"]):not([data-home-section="app_downloads"]){
    width:calc(100% - (var(--home-section-gutter) * 2))!important;
    margin:var(--home-section-gap) auto!important;
    border-radius:var(--home-section-radius-custom)!important;
    overflow:hidden;
    border:var(--home-section-border-width-custom) solid var(--home-section-border-color-custom)!important;
    box-shadow:0 14px var(--home-section-shadow-blur-custom) rgba(10,45,32,var(--home-section-shadow-alpha-custom))!important;
    isolation:isolate;
    scroll-margin-top:108px;
  }
  body.home-section-separated.home-section-sep-tablet [data-home-section]:not([data-home-section="hero"]):not([data-home-section="app_downloads"]):first-of-type{margin-top:22px!important}
  body.home-section-separated.home-section-sep-tablet.home-section-custom-bg [data-home-section]:not([data-home-section="hero"]):not([data-home-section="app_downloads"]){background-color:var(--home-section-bg-color-custom)!important}
  body.home-section-separated.home-section-sep-tablet.home-section-custom-image [data-home-section]:not([data-home-section="hero"]):not([data-home-section="app_downloads"]){position:relative}
  body.home-section-separated.home-section-sep-tablet.home-section-custom-image [data-home-section]:not([data-home-section="hero"]):not([data-home-section="app_downloads"])::before{
    content:"";position:absolute;inset:0;z-index:0;pointer-events:none;
    background-image:var(--home-section-bg-image-custom);background-size:cover;background-position:center;background-repeat:no-repeat;
    opacity:var(--home-section-bg-opacity-custom);
  }
  body.home-section-separated.home-section-sep-tablet.home-section-custom-image [data-home-section]:not([data-home-section="hero"]):not([data-home-section="app_downloads"])>*{position:relative;z-index:1}
}

@media (max-width:760px){
  body.home-section-separated.home-section-sep-mobile{--home-section-gutter:10px;--home-section-gap:14px}
  body.home-section-separated.home-section-sep-mobile [data-home-section]:not([data-home-section="hero"]):not([data-home-section="app_downloads"]){
    width:calc(100% - (var(--home-section-gutter) * 2))!important;
    margin:var(--home-section-gap) auto!important;
    border-radius:var(--home-section-radius-custom)!important;
    overflow:hidden;
    border:var(--home-section-border-width-custom) solid var(--home-section-border-color-custom)!important;
    box-shadow:0 10px var(--home-section-shadow-blur-custom) rgba(10,45,32,var(--home-section-shadow-alpha-custom))!important;
    isolation:isolate;
    scroll-margin-top:98px;
  }
  body.home-section-separated.home-section-sep-mobile [data-home-section]:not([data-home-section="hero"]):not([data-home-section="app_downloads"]):first-of-type{margin-top:16px!important}
  body.home-section-separated.home-section-sep-mobile.home-section-custom-bg [data-home-section]:not([data-home-section="hero"]):not([data-home-section="app_downloads"]){background-color:var(--home-section-bg-color-custom)!important}
  body.home-section-separated.home-section-sep-mobile.home-section-custom-image [data-home-section]:not([data-home-section="hero"]):not([data-home-section="app_downloads"]){position:relative}
  body.home-section-separated.home-section-sep-mobile.home-section-custom-image [data-home-section]:not([data-home-section="hero"]):not([data-home-section="app_downloads"])::before{
    content:"";position:absolute;inset:0;z-index:0;pointer-events:none;
    background-image:var(--home-section-bg-image-custom);background-size:cover;background-position:center;background-repeat:no-repeat;
    opacity:var(--home-section-bg-opacity-custom);
  }
  body.home-section-separated.home-section-sep-mobile.home-section-custom-image [data-home-section]:not([data-home-section="hero"]):not([data-home-section="app_downloads"])>*{position:relative;z-index:1}
}

/* Dark mode keeps the same Admin border choice but uses a neutral dark shadow. */
@media (min-width:1101px){html.theme-dark body.home-section-separated.home-section-sep-desktop [data-home-section]:not([data-home-section="hero"]):not([data-home-section="app_downloads"]){box-shadow:0 16px var(--home-section-shadow-blur-custom) rgba(0,0,0,var(--home-section-shadow-alpha-custom))!important}}
@media (min-width:761px) and (max-width:1100px){html.theme-dark body.home-section-separated.home-section-sep-tablet [data-home-section]:not([data-home-section="hero"]):not([data-home-section="app_downloads"]){box-shadow:0 14px var(--home-section-shadow-blur-custom) rgba(0,0,0,var(--home-section-shadow-alpha-custom))!important}}
@media (max-width:760px){html.theme-dark body.home-section-separated.home-section-sep-mobile [data-home-section]:not([data-home-section="hero"]):not([data-home-section="app_downloads"]){box-shadow:0 10px var(--home-section-shadow-blur-custom) rgba(0,0,0,var(--home-section-shadow-alpha-custom))!important}}
