.home .nb-sidecar-area.nb-sidecar-area--content.nb-content-layout-grid {
    padding-top: 0px !important;
}
.home .nb-sidecar-area.nb-sidecar-area--sidebar {
    padding-top: 0px !important;
}
:root {
  --separator-line-thickness: 1px;
  --separator-line-opacity: 0.1;
}

/* Generic images: allow natural sizing */
img,
figure {
  max-width: 100% !important;
  width: auto;
}

/* Override for logo images (adjust selector as needed) */
header .site-logo img,
.nb-header .site-logo img {
  width: auto !important;
  max-width: none !important;
}

/* Fix header custom property error */
.nb-header {
  opacity: 1 !important;
  /* Removed invalid "--header-background-opacity" declaration */
}

/* Main container */
body > #page > .wp-site-blocks > div {
  max-width: 1280px;
  margin: 0 auto;
}

/* Mobile-specific footer adjustments */
@media screen and (max-width: 600px) {
  #page > div.wp-site-blocks > footer > div.wp-block-group.alignfull.sm-color-signal-3.is-layout-flow.wp-block-group-is-layout-flow.sm-palette-1.sm-variation-12.sm-dark.break-align-left.break-align-right > div.wp-block-columns.alignwide.has-largest-block-gap.is-layout-flex.wp-container-core-columns-is-layout-2.wp-block-columns-is-layout-flex > div:nth-child(2) > div > div:nth-child(2),
  footer > div > div > div:nth-child(2) > div > div:nth-child(2) {
    display: none !important;
  }
}

/* Footer headings and nav */
footer > div.wp-block-group.alignfull.sm-color-signal-3.is-layout-flow.wp-block-group-is-layout-flow.sm-palette-1.sm-variation-12.sm-dark.break-align-left.break-align-right > div.wp-block-columns.alignwide.has-largest-block-gap.is-layout-flex.wp-container-core-columns-is-layout-2.wp-block-columns-is-layout-flex > div:nth-child(2) > div > div > h3,
footer > div > div > div:nth-child(2) > div > div > h3 {
  text-align: center;
}

footer > div.wp-block-group.alignfull.sm-color-signal-3.is-layout-flow.wp-block-group-is-layout-flow.sm-palette-1.sm-variation-12.sm-dark.break-align-left.break-align-right > div.wp-block-columns.alignwide.has-largest-block-gap.is-layout-flex.wp-container-core-columns-is-layout-2.wp-block-columns-is-layout-flex > div:nth-child(2) > div > div > nav > ul,
footer > div > div > div:nth-child(2) > div > div > nav > ul,
#modal-5-content > ul {
  width: 100%;
  display: flex;
  align-items: center;
}

/* Headings and separators */
.wp-block-heading,
.wp-block-heading + .wp-block-separator {
  max-width: calc(100% - 60px) !important;
  margin: 0 auto;
}

/* Mobile header margin fix */
.mobile-header {
  margin-top: 0 !important;
}

/* Spell meets blocks container */
.spell-meets-blocks {
  max-width: calc(100% - 60px) !important;
  margin: 0 auto;
}

/* Article cards: truncate description and hide buttons */
.bottom-article-cards .nb-card__description,
.the-latest-content .nb-card__description {
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.the-latest-content .nb-card__description {
  margin-top: 16px;
}
.the-latest-content .nb-card__buttons,
.bottom-article-cards .nb-card__buttons {
  display: none;
}

/* Footer social icons */
footer .wp-block-social-links svg {
  width: 64px !important;
  height: 64px !important;
}

/* Hide spacer on smaller screens */
@media (max-width: 1024px) {
  .top-spacer {
    display: none;
  }
}

/* Line-height fix for h3 elements */
h3,
h3 * {
  line-height: 1 !important;
}

/* Collection title & inner container */
.nb-collection .nb-collection__title {
  padding: 10px 0 0 0;
  margin-bottom: -14px;
  text-align: center;
}
.nb-supernova-item__inner-container {
  padding: 0 16px;
}
.wp-block-post-content figure {
  max-width: 100% !important;
}

/* Hide extra header element */
.nb-header:nth-child(4) {
  display: none !important;
}

/* Sidecar adjustments */
.nb-sidecar-area > .wp-block-spacer:first-child {
  display: none;
}
.nb-sidecar {
  padding: 20px 0 32px !important;
}

/* Navigation spacing in header drop-down */
header + div > :first-child > :first-child > :nth-child(5) {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Desktop header spacing */
@media (min-width: 1025px) {
  header + * {
    margin-top: 308px !important;
  }
}

/* Hide empty elements */
div:empty {
  display: none !important;
}

/* Top padding for first child element */
header + div > :first-child > :first-child > :first-child {
  padding-top: 32px !important;
}

/* Mobile header row pseudo-element: remove negative margin to fix cut-off */
@media (max-width: 1024px) {
  .nb-header-row::before {
    height: 100px;
    opacity: 1;
    position: initial;
    background-image: url('https://i0.wp.com/spellmagazine.co.uk/wp-content/uploads/2023/01/Spell-Magazine-white.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-color: transparent;
    background-position: 50% 50%;
    margin-top: 0;
  }
  
  .nb-sidecar {
    padding: 10px 0 0 !important;
  }
}

/* Footer adjustments for very small devices */
@media (max-width: 781px) {
  footer .wp-block-social-links {
    justify-content: center;
  }
  
  footer > :nth-child(2) > :nth-child(1) {
    margin: 0 0 32px !important;
  }
  
  footer div.wp-block-columns:nth-child(2) {
    margin-top: 0 !important;
  }
  
  footer div.wp-block-columns:nth-child(2) > div:nth-child(2) {
    margin-top: -64px;
  }
}
body:not(.home):not(.single-post) .nb-sidecar-area.nb-sidecar-area--content {
    padding-top: 0px !important; /* Adjust this value to your desired padding */
    --nb-header-neighbour-padding-top: 0px !important; /* Override the CSS variable */