/* CLEAN LAYOUT OVERRIDE (single source of truth) */

/* Desktop: Left cards | Center content (hero first) | Right cards */
html body .app .main{
  display:grid !important;
  grid-template-columns: 260px minmax(0, 1fr) 260px !important;
  grid-template-areas: "left center right" !important;
  gap: 14px !important;
  max-width: 1560px !important;
  margin: 0 auto !important;
  align-items: start !important;
  padding: 18px !important;
}

html body .app .main > .sidebar{
  grid-area: left !important;
  position: sticky !important;
  top: 18px !important;
  align-self: start !important;
  margin: 0 !important;
}

html body .app .main > .content{
  grid-area: center !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  align-self: start !important;
}

/* Hero muss oben bleiben */
html body .app .main > .content > .hero{
  margin: 0 0 12px 0 !important;
  padding: 0 !important;
  position: relative !important;
}

html body .app .main > .content > .hero .heroPanel{
  margin: 0 !important;
  position: relative !important;
  top: 0 !important;
  transform: none !important;
}

html body .app .main > .rightbar{
  grid-area: right !important;
  position: static !important;   /* scrollt mit */
  top: auto !important;
  align-self: start !important;
  margin: 0 !important;
  display: block !important;
}

.rightbar .kv a{color:#c9e7ff;text-decoration:none}
.rightbar .kv a:hover{text-decoration:underline}

/* Tablet */
@media (max-width: 1180px){
  html body .app .main{
    grid-template-columns: 240px minmax(0,1fr) 220px !important;
    grid-template-areas: "left center right" !important;
  }
}

/* Small: rightbar aus */
@media (max-width: 1040px){
  html body .app .main{
    grid-template-columns: 240px minmax(0,1fr) !important;
    grid-template-areas: "left center" !important;
  }
  html body .app .main > .rightbar{display:none !important;}
}

/* Mobile stack */
@media (max-width: 960px){
  html body .app .main{
    grid-template-columns: 1fr !important;
    grid-template-areas:
      "left"
      "center" !important;
  }
  html body .app .main > .sidebar,
  html body .app .main > .content,
  html body .app .main > .rightbar{
    position: static !important;
    top: auto !important;
    margin: 0 !important;
  }
}

/* SIDEBARS_LOWER_TO_MATCH_CENTER_CARD */
html body .app .main > .sidebar,
html body .app .main > .rightbar{
  margin-top: 240px !important;
}

@media (max-width: 1180px){
  html body .app .main > .sidebar,
  html body .app .main > .rightbar{margin-top: 150px !important;}
}
@media (max-width: 1040px){
  html body .app .main > .sidebar{margin-top: 110px !important;}
}
@media (max-width: 960px){
  html body .app .main > .sidebar,
  html body .app .main > .rightbar{margin-top: 0 !important;}
}

/* FORCE_SIDES_LOWER_AND_NOT_STICKY */
html body .app .main > .sidebar,
html body .app .main > .rightbar{
  position: relative !important;
  top: auto !important;
  margin-top: 240px !important;
}

@media (max-width: 1180px){
  html body .app .main > .sidebar,
  html body .app .main > .rightbar{margin-top:190px !important;}
}
@media (max-width: 1040px){
  html body .app .main > .sidebar{margin-top:150px !important;}
}
@media (max-width: 960px){
  html body .app .main > .sidebar,
  html body .app .main > .rightbar{margin-top:0 !important;}
}

/* DONUT_OVER_HEROPANEL */
html body .bg3d{
  z-index: 650 !important;
  pointer-events: none !important;
}
html body .app,
html body .app .main,
html body .app .main > .content{
  position: relative;
}
