/* WHAT'S NEW pages and posts - all iterations*/

/* Enforce content width on certain blocks */
.set-width {
    max-width: 1302px;
    margin-left: auto;
    margin-right: auto;
}

/*  POSSIBLE PROBLEM */
@media (max-width: 1279px) {
	.set-width {
		margin-left: 5% !important;
		margin-right: 5% !important;
	}
}


/* Remove li bullet from What's New page */
.no-list {
    list-style: none !important;
	padding-left: 0 !important;
}

/* Alternate right/left image alignment of Whats New post listings on desktop */
.wp-block-post:nth-child(even) .post-inner {
    flex-direction: row-reverse;
}

/* Margins of Whats New post listing */
.entry-content .wp-block-column.whats-new-margins {
    margin-left: 20px !important;
    margin-right: 20px !important;
}

.entry-content .wp-block-column.whats-new-margins:not(:first-child) {
    margin-left:15px;
}

/* Image appearance in Whats New post listings for small screens */
@media screen and (max-width:1279px) {
	.wp-block-post-featured-image :where(img) {
    	height: 350px;
    	object-position: top;
}}

/* Formatting options that are for the ALTERNATIVE 1 What's New screen */
/* Remove these if the ALTERNATIVE 1 option is not selected for Production */

.alt-whats-new img { height: 305px; object-position: top center; }

.wp-block-post-template.columns-2 .wp-block-post {
  margin-top: 0;
}

/* Force Query Loop 2-column grids to stack on smaller screens */
@media (max-width: 1100px) {
  .wp-block-post-template.columns-2 {
    grid-template-columns: 1fr !important; /* 1 column */
  }
}

/* Formatting options that are for the ALTERNATIVE 2 What's New screen */
/* Remove these if the ALTERNATIVE 2 option is not selected for Production */
/* =========================
   HERO POST
========================= */
.magazine-loop .wp-block-post {
    position: relative; /* container for overlay */
}

.magazine-loop .hero-post {
    position: absolute;      /* overlay on the image */
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: rgba(0,0,0,0.5); /* semi-transparent panel */
    padding: 2rem;
    border-radius: 8px;
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 2;
}

.hero-post {
  padding: 15px 20px !important; /* or whatever you want */
}

.magazine-loop .wp-block-post img {
    width: 100%;
    display: block;
    object-fit: cover;
    object-position: 50% 35%;
}

/* Typography inside hero overlay */
.magazine-loop .hero-post .wp-block-post-title,
.magazine-loop .hero-post .wp-block-post-excerpt,
.magazine-loop .hero-post .wp-block-post-date {
    margin: 0.5rem 0;
}

/* =========================
   SECOND-TIER POSTS GRID
========================= */
.magazine-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* two columns */
    gap: 2rem;                             /* space between cards */
    margin-top: 3rem;                       /* gap above top row */
    margin-bottom: 3rem;                    /* gap below bottom row */
    max-width: 1302px;                      /* container width */
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    box-sizing: border-box;
}

/* Make Post Templates behave as direct grid items */
.magazine-cards .wp-block-post-template {
    display: contents;  /* removes extra wrapper, allows grid to work correctly */
}

/* Individual post cards */
.magazine-cards .wp-block-post {
    width: 100%;       /* fill grid column */
    box-sizing: border-box;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Hover effect for cards */
.magazine-cards .wp-block-post:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

/* Images inside cards */
.magazine-cards .wp-block-post img {
    width: 100%;
    border-radius: 6px;
    object-fit: cover;
}

.alt-whats-new-2 img { height: 350px; object-position: top center; }

/* =========================
   RESPONSIVE STACKING
========================= */

@media (max-width: 1279px) {
	.magazine-cards {
		width: 90%;
	}
}

@media (max-width: 768px) {
    .magazine-cards {
        grid-template-columns: 1fr; /* stack on small screens */
    }

    .magazine-loop .hero-post {
        padding: 1rem;
        bottom: 10px;
        left: 10px;
        right: 10px;
    }
}

/* Formatting options that are for the ALTERNATIVE 3 What's New screen */
/* Remove these if the ALTERNATIVE 3 option is not selected for Production */

/* ========================================
   HERO CARD (left column)
======================================== */
.post-card-hero {
  position: relative;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-card-hero:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.post-card-hero .wp-block-post-featured-image img {
  width: 100%;
  aspect-ratio: 1 / 1;   /* force square */
  object-fit: cover;
  object-position: center;
  display: block;
}

.post-card-hero .hero-overlay {
  position: absolute;
  bottom: 20px;
  left: 20px;
  right: 20px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  padding: 1.25rem;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 2;
  margin-top: 0;
}

.post-card-hero .hero-overlay .wp-block-post-title,
.post-card-hero .hero-overlay .wp-block-post-excerpt,
.post-card-hero .hero-overlay .wp-block-post-date {
  margin: 0;
}

/* ========================================
   HORIZONTAL POST CARDS (right column)
======================================== */
.entry-content .wp-block-column:not(:first-child) {  /* reduce gap between column */
    margin-left: 5px;
}

.post-card-horizontal {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  padding: 1rem;
  overflow: hidden; /* contains floats */
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-card-horizontal:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

/* Thumbnail floated left */
.post-card-horizontal .post-thumb,
.post-card-horizontal .post-thumb figure {
  float: left;
  width: 120px;
  height: 100px;
  margin-right: 20px;
  display: block;
}

.post-card-horizontal .post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

/* Content on the right */
.post-card-horizontal .post-content {
  overflow: hidden; /* ensures text wraps beside floated image */
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0px !important;
}

.post-card-horizontal .post-content .wp-block-post-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
}

.post-card-horizontal .post-content .wp-block-post-date {
  font-size: 0.85rem;
  color: #666;
  margin: 0;
}

.post-card-horizontal .post-content .wp-block-post-excerpt {
  font-size: 0.95rem;
  line-height: 1.4;
  margin: 0;
}

/* ========================================
   TWO-COLUMN GRID BELOW HERO
======================================== */
.post-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 2rem;
  margin-bottom: 2rem;
  max-width: 1302px;
  margin-left: auto;
  margin-right: auto;
}

.post-grid .wp-block-post {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  padding: 1rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-grid .wp-block-post:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.post-grid .post-thumb img {
  width: 100%;
  border-radius: 6px;
  object-fit: cover;
}

/* ========================================
   RESPONSIVE BEHAVIOR
======================================== */
@media (max-width: 768px) {
  .post-card-horizontal .post-thumb,
  .post-card-horizontal .post-thumb figure {
    float: none;
    width: 100%;
    height: auto;
    margin-right: 0;
    margin-bottom: 0.75rem;
  }
  .post-card-horizontal .post-content {
    flex-direction: column;
  }
  .post-grid {
    grid-template-columns: 1fr;
  }
}

/* ========================================
   TOP SECTION WRAPPER (hero + right column)
======================================== */
.wp-block-columns.hero-section {
  display: flex;
  gap: 1.5rem; /* space between left and right columns */
}

.wp-block-column.left-column {
  flex: 1;
  display: flex;
}

.wp-block-column.right-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* =========================
   BOTTOM SECTION: two equal columns
   (each post is its own horizontal card)
   ========================= */

/* outer wrapper that keeps bottom section within the site content width */
.post-card-bottom-wrapper {
  max-width: 1302px;
  margin-left: auto;
  margin-right: auto;
  margin-top: 2rem; /* add spacing from top section */
  margin-bottom: 2rem;
  width: 100%;
  box-sizing: border-box;
}

/* Query Loop container for bottom section — 2 equal columns on desktop */
.post-card-bottom {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* two equal halves */
  gap: 1.5rem;
  align-items: start;
  box-sizing: border-box;
}

/* IMPORTANT: make the Post Template act as direct grid children 
   so each post becomes its own grid item (prevents multiple posts
   nesting inside one card). */
.post-card-bottom .wp-block-post-template {
  display: contents;
}

/* Ensure each rendered post element fills its grid cell */
.post-card-bottom .wp-block-post {
  width: 100%;
  box-sizing: border-box;
}

/* Use the same horizontal card styling inside the bottom grid.
   Targets either the Post Template class (post-card-horizontal) or
   the rendered post element itself for safety. */
.post-card-bottom .post-card-horizontal,
.post-card-bottom .wp-block-post {
  background: #fff;
/*  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1); */
  display: flex;
  flex-direction: row;
  gap: 1rem;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-card-bottom .post-card-horizontal:hover,
.post-card-bottom .wp-block-post:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

/* thumbnail on the left (handles WP figure wrapper too) */
.post-card-bottom .post-thumb,
.post-card-bottom .post-thumb figure {
  float: left;
  width: 120px;
  height: 100px;
  margin-right: 20px;
  display: block;
}

.post-card-bottom .post-thumb img,
.post-card-bottom .post-thumb figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

/* content area to the right */
.post-card-bottom .post-content {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.post-card-bottom .post-content .wp-block-post-title,
.post-card-bottom .post-content .wp-block-post-date,
.post-card-bottom .post-content .wp-block-post-excerpt {
  margin: 0;
}

.post-card-bottom .post-content .wp-block-post-title {
  font-size: 1.1rem;
  font-weight: 600;
}

.post-card-bottom .post-content .wp-block-post-date {
  font-size: 0.85rem;
  color: #666;
}

.post-card-bottom .post-content .wp-block-post-excerpt {
  font-size: 0.95rem;
  line-height: 1.4;
}

/* =========================
   Responsive: stack on small screens
   ========================= */
@media (max-width: 768px) {
  .post-card-bottom {
    grid-template-columns: 1fr; /* single column on mobile */
  }

  .post-card-bottom .post-card-horizontal,
  .post-card-bottom .wp-block-post {
    flex-direction: column;
  }

  .post-card-bottom .post-thumb,
  .post-card-bottom .post-thumb figure {
    float: none;
    width: 100%;
    height: auto;
    margin-right: 0;
    margin-bottom: 0.75rem;
  }

  .post-card-bottom .post-content {
    flex-direction: column;
  }
}

ul.no-list li + li {
  margin-top: 0;
}

.hero-section .right-column ul.no-list > li + li {
  margin-top: 1rem;
}

/* =========================
   MOBILE STYLING < 1280px
========================= */
@media (max-width: 1279px) {

  /* -------------------------
     Hero card (Section 1)
  ------------------------- */
  .post-card-hero {
      display: block !important; /* allow float-based layout */
      padding: 1rem !important;
      overflow: hidden; /* contain floats */
  }

  .post-card-hero .wp-block-post-featured-image {
      float: left;
      width: 120px;
      height: 100px;
      margin-right: 1rem;
  }

  .post-card-hero .wp-block-post-featured-image img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      border-radius: 6px;
      display: block;
  }

  .post-card-hero .hero-overlay {
      float: left;
      width: calc(100% - 140px); /* subtract image + gap */
      position: static !important;
      background: #fff !important;
      color: #000 !important;
      padding: 0.5rem 1rem;
      border-radius: 8px;
      box-sizing: border-box;
  }

  /* -------------------------
     Right column posts (Section 2)
  ------------------------- */
  .right-column .post-card-horizontal {
      display: block !important;
      overflow: hidden; /* contain floated thumbnail */
      padding: 1rem;
      background: #fff;
      border: 1px solid #e0e0e0;
      border-radius: 8px;
      margin-bottom: 1rem;
  }

  .right-column .post-card-horizontal .post-thumb {
      float: left;
      width: 120px;
      height: 100px;
      margin-right: 1rem;
  }

  .right-column .post-card-horizontal .post-thumb img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      border-radius: 6px;
      display: block;
  }

  .right-column .post-card-horizontal .post-content {
      overflow: hidden; /* ensure content sits beside thumbnail */
  }

  /* -------------------------
     Bottom section posts (Section 3)
  ------------------------- */
  .post-card-bottom .post-card-horizontal {
      display: block !important;
      overflow: hidden; /* contain floated thumbnail */
      padding: 1rem;
      background: #fff;
      border: 1px solid #e0e0e0;
      border-radius: 8px;
      margin-bottom: 1rem;
  }

  .post-card-bottom .post-card-horizontal .post-thumb {
      float: left;
      width: 120px;
      height: 100px;
      margin-right: 1rem;
  }

  .post-card-bottom .post-card-horizontal .post-thumb img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      border-radius: 6px;
      display: block;
  }

  .post-card-bottom .post-card-horizontal .post-content {
      overflow: hidden;
  }

  /* -------------------------
     General spacing adjustments for mobile
  ------------------------- */
  .post-card-bottom-wrapper,
  .wp-block-columns.hero-section {
      padding-left: 1rem;
      padding-right: 1rem;
  }

  .post-card-bottom {
      grid-template-columns: 1fr !important; /* stack grid rows */
  }
	
	.post-card-bottom .post-card-horizontal, .post-card-bottom .wp-block-post {
		display: block;
	}
	
	.post-card-bottom-wrapper, .wp-block-columns.hero-section {
		padding-left: 0;
		padding-right: 0;
	}
	
	.post-card-bottom-wrapper {
		margin-top: 0;
		width: 90%;
	}
}

/* Formatting options that are for the ALTERNATIVE 4 What's New screen */
/* Remove these if the ALTERNATIVE 4 option is not selected for Production */

@media (max-width: 1279px) {
.post-grid-image-top img {
	object-position: top;
	}
}