/* Layout Styles */
/* ============================
   GLOBAL LAYOUT & SPACING
   ============================ */

/* Hide page titles */
.entry-header,
.page-header,
.entry-title {
  display: none !important;
}

/* Constrain site width */
body.separate-containers .site-content,
body.one-container .site-content,
.site-main,
.container,
.grid-container {
  max-width: 1200px; /* adjust to your global width */
  margin-left: auto;
  margin-right: auto;
  padding-left: 30px;
  padding-right: 30px;
  box-sizing: border-box;
}

/* Article / page content spacing */
.inside-article,
.page-header,
.comments-area,
.inside-page-header {
  padding: 40px;
}

/* Default spacing between blocks */
.entry-content > * {
  margin-top: 1.5em;
  margin-bottom: 1.5em;
}

/* Prevent overlap on full-width sections */
.entry-content .alignwide,
.entry-content .alignfull {
  margin-left: -30px;
  margin-right: -30px;
  width: calc(100% + 60px);
  max-width: calc(100% + 60px);
}

/* Sidebar padding */
.sidebar .widget,
.footer-widgets .widget {
  padding: 30px;
}

/* Sidebar layout for blog posts and pages */
/* Ensure content area and sidebar float properly when right-sidebar is active */
body.right-sidebar .content-area {
  float: left;
  width: 70%;
  padding-right: 2rem;
  box-sizing: border-box;
}

body.right-sidebar .widget-area.sidebar {
  float: right;
  width: 30%;
  box-sizing: border-box;
}

/* Clear floats container */
body.right-sidebar .site-content {
  overflow: hidden; /* Clear floats */
}

/* Left sidebar layout */
body.left-sidebar .content-area {
  float: right;
  width: 70%;
  padding-left: 2rem;
  box-sizing: border-box;
}

body.left-sidebar .widget-area.sidebar {
  float: left;
  width: 30%;
  box-sizing: border-box;
}

/* Single post layout - 1200px wide, centered */
body.single-post .site-content,
body.single-post .content-area,
body.single-post .site-main {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

body.single-post .inside-article {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  body.separate-containers .site-content,
  body.one-container .site-content,
  .site-main,
  .container,
  .grid-container {
    padding-left: 20px;
    padding-right: 20px;
  }

  .inside-article,
  .page-header,
  .comments-area,
  .inside-page-header {
    padding: 20px;
  }

  .entry-content .alignwide,
  .entry-content .alignfull {
    margin-left: -20px;
    margin-right: -20px;
    width: calc(100% + 40px);
    max-width: calc(100% + 40px);
  }

  /* Stack sidebar below content on mobile */
  body.right-sidebar .content-area,
  body.left-sidebar .content-area {
    float: none;
    width: 100%;
    padding-left: 0;
    padding-right: 0;
  }

  body.right-sidebar .widget-area.sidebar,
  body.left-sidebar .widget-area.sidebar {
    float: none;
    width: 100%;
    margin-top: 2rem;
  }
}
