/*
Theme Name: eMTe Theme (RMT)
Author: Martin Tutko
Description: Martin's theme which includes support for UX resources, books, publications and apps. 
Version: 0.2 Beta
*/




.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.post-filter {
  margin: 2rem 0 1rem;
  padding: 1.5rem;
  background-color: #f3f4f6;
  border-radius: 16px;
}

.post-filter fieldset {
  border: 0;
  padding: 0;
  margin: 0;
}

.filter-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem 1.25rem;
  /*align-items: end;*/
}

.filter-control {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.filter-control label {
  font-weight: 600;
  color: var(--color-text-headings);
}

.filter-control select {
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  font-size: 1rem;
  background-color: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.filter-control select:disabled {
  background-color: #e5e7eb;
  cursor: not-allowed;
}

.filter-control select:focus-visible {
  outline: none;
  border-color: var(--color-link, #2563eb);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.filter-help {
  font-size: 0.85rem;
  color: #6b7280;
  margin: 0;
}

.filter-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  justify-content: flex-start;
}

.filter-reset,
.filter-submit {
  min-width: 120px;
  padding: 0.65rem 1.1rem;
  border-radius: 10px;
  border: 1px solid transparent;
  background-color: #e5e7eb;
  color: #1f2937;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.filter-reset:hover,
.filter-submit:hover {
  background-color: #d1d5db;
}

@media (max-width: 640px) {
  .filter-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
  }

  .filter-reset,
  .filter-submit {
    width: 100%;
  }

  .post-filter {
    padding: 1.25rem;
  }

  .filter-help {
    font-size: 0.8rem;
  }
}


/* === CSS Variables === */
:root {
  --font-base: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Colour scheme for Vanilla theme */
  --color-bg: #fff;
  --color-bg2: #F5F5F5; /* Light BG */
  --color-text: #343A40; /* #222; */
  --color-text-headings:  #222; 
  --color-muted: #888;
  --color-link: #2563eb; /* Tailwind blue-600 */ /* #0066cc; */
  --color-link-hover: #1d4ed8; /* Tailwind blue-700 */
	
  --color-meta: #555;

  /* Font sizes */
  --font-size-base: 1.1rem;
  --font-size-sm: 0.9rem;
  --font-size-date: 1.0rem;
  --font-size-meta: 1.0rem;
	
	  --font-size-h1: 2.4rem; /* H1 Generic */
	  --font-size-h1-single: 2.4rem; /* H1 - Title on Single Post */	
	  --font-size-h2: 1.8rem;
	  --font-size-h2-archive: 2.0rem;
	  --font-size-h3: 1.6rem;
	  --font-size-h4: 1.4rem;
	
	
  /* New font weight variables */
  --font-weight-bold: 600;
  --font-weight-bolder: 600;
	
	
  /* New font weight variables - Alternative - not used! */
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
/*   --font-weight-bold: 700; */
  --font-weight-extrabold: 800;
	
	
  /* Layout widths */
  --max-width-main: 700px;
  --max-width-header-footer: 700px;
  --max-width-shell: 1920px;
  --sticky-top-offset: 2rem;
  --left-column-stack-gap: 2rem;
  --header-sticky-height: 0px;
	
}

@media (max-width: 768px) {
  :root {
  /* Font sizes */
  --font-size-base: 1.1rem;
  --font-size-sm: 0.9rem;
  --font-size-date: 1.0rem;
  --font-size-meta: 1.0rem;
	
	  --font-size-h1: 2.0rem; /* H1 Generic */
	  --font-size-h1-single: 2.2rem; /* H1 - Title on Single Post */	
	  --font-size-h2: 1.6rem;
	  --font-size-h2-archive: 1.8rem;
	  --font-size-h3: 1.5rem;
	  --font-size-h4: 1.3rem;
  }
}



body {
  font-family: var(--font-base);
  background: var(--color-bg2);
  color: var(--color-text);
  line-height: 1.6;
  margin: 0;
  padding: 0rem;
  font-size: var(--font-size-base);
	
  background-color: var(--color-bg2);
 background-image: none !important;
}

.author-box p {font-size:var(--font-size-meta); }
.author-box h2 {font-size:1.4rem; }


.front-two-column .super-wrapper {
  width: 100%;
  max-width: var(--max-width-shell);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.front-two-column .site-body {
  display: flex;
  flex-direction: column;
}

.content-wrapper {
  width: 100%;
  max-width: var(--max-width-main);
  margin: 4rem auto;
  padding: 2rem;
  background-color: white;
  border-radius: 25px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
  position: relative;
  z-index: 1;
}

.content-wrapper.float-left {
  max-width: var(--max-width-main);
}

.content-wrapper.float-right,
.content-wrapper.header {
  max-width: var(--max-width-header-footer);
}

.content-wrapper.footer {
  max-width: var(--max-width-header-footer);
}

ol, ul {padding-inline-start: 35px;}

/* On smaller screens, reduce the padding */
@media (max-width: 768px) {

body::before {
 content: none !important;
}

	
ol, ul {padding-inline-start: 30px;}

	
.content-wrapper {
  margin: 0rem 0rem 0rem 0rem;
  padding: 1.5rem;
  border-radius: 25px 25px 0px 0px;
}
}

@media (min-width: 1600px) {
  .front-two-column .site-body {
    display: grid;
    grid-template-columns: minmax(0, var(--max-width-main)) minmax(0, var(--max-width-header-footer));
    justify-content: center;
    gap: 3rem 2.5rem;
    align-items: start;
  }

  .front-two-column .site-body > .content-wrapper {
    margin: 4rem 0;
    max-width: 100%;
  }

  .front-two-column .site-body > .content-wrapper:not(.float-left):not(.float-right) {
    grid-column: 1 / -1;
  }

  .front-two-column .site-body > .content-wrapper.float-left {
    grid-column: 1;
  }

  .front-two-column .site-body > .content-wrapper.float-right {
    grid-column: 2;
    grid-row: 1;
    align-self: start;
  }

  .front-two-column .site-body > .content-wrapper.header {
    grid-row: 1;
    position: sticky;
    top: var(--sticky-top-offset);
    align-self: start;
    z-index: 5;
  }

  .front-two-column .site-body > .content-wrapper.main-content-section {
    grid-row: 2;
    position: sticky;
    top: calc(var(--sticky-top-offset) + var(--header-sticky-height) + var(--left-column-stack-gap));
    align-self: start;
    z-index: 4;
  }

  .front-two-column .site-body > .content-wrapper.footer {
    grid-column: 1 / -1;
    max-width: min(var(--max-width-shell), 100%);
  }

  .front-two-column.left-column-free .site-body > .content-wrapper.header,
  .front-two-column.left-column-free .site-body > .content-wrapper.main-content-section {
    position: static;
    top: auto;
    z-index: auto;
  }
}

/* Typography - Desktop */
strong { font-weight: var(--font-weight-bold); }

h1 {
  font-size: var(--font-size-h1);
  margin-top: 1rem;
  line-height: 1.2;
  font-weight: var(--font-weight-bold); 
  color: var(--color-text-headings); 
}

h1.archive { margin-bottom: 4rem;   color: var(--color-text-headings); }
h1.h1-home { margin-bottom: 3rem;   color: var(--color-text-headings); }
 

h2 {
  line-height: 1.2;
  font-weight: var(--font-weight-bolder); 
	font-size: var(--font-size-h2);
	  color: var(--color-text-headings); 
}

h3 {
  line-height: 1.2;
  font-weight: var(--font-weight-bolder); 
	font-size: var(--font-size-h3);
	  color: var(--color-text-headings); 
}

h4 {
  line-height: 1.2;
  font-weight: var(--font-weight-bolder); 
	font-size: var(--font-size-h4);
	  color: var(--color-text-headings); 
    margin: 0px;
}

body.single-post h1 {
  color: var(--color-text);
  font-size: var(--font-size-h1-single);
  font-weight: var(--font-weight-bold);
	 color: var(--color-text-headings); 
}

body.archive h2 a,
body.home h2 a {
  color: var(--color-text);
  font-size: var(--font-size-h2-archive);
  font-weight: var(--font-weight-bold);
	 color: var(--color-text-headings); 
}



header {
  max-width: var(--max-width-header-footer);
  margin: 0rem auto;
  padding: 0rem 0;
  text-align: center;
}

footer {
  max-width: var(--max-width-header-footer);
  margin: 2rem auto 0rem;
  padding: 1rem 0;
  text-align: center;	
}

footer a, footer p { color: var(--color-text); font-size: var(--font-size-sm); }

.site-title { font-weight: bold; color: #000; font-size: 1.2rem;  }

main section.posts {
  margin: 0rem 0;
}

hr.divider, article hr {
  border: none;
  border-top: 1px solid #ddd;
  margin: 2.5rem 0;
  max-width: var(--max-width-main);
  margin-left: auto;
  margin-right: auto;
}

hr.divider-padding-sml, hr {
  border: none;
  border-top: 1px solid #ddd;
  margin: 2rem 0;
  max-width: var(--max-width-main);
  margin-left: auto;
  margin-right: auto;
}

/* Header navigation layout */
.header-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  max-width: var(--max-width-header-footer);
  margin: 1rem auto 6rem;
  padding: 1rem 0;
}

.logo-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-title a:hover { text-decoration: none; }

.logo-title img {
  border-radius: 10px;
}

.menu-links ul {
  display: flex;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.menu-links li {
  display: inline;
  position: relative;
}

.menu-links li:not(:last-child)::after {
 /* content: " \2014";  /* em dash */
  content: " \2192"; /* right arrow */
  margin-left: 0.5rem;
  color: var(--color-meta);
}

.menu-links a {
  color: var(--color-link);
  text-decoration: none;
}

.menu-links a:hover {
  text-decoration: underline;
}





@media (max-width: 768px) {
  .header-nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .menu-links ul {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

main {
  /*max-width: var(--max-width-main);*/
  margin: 0 auto;
  padding-bottom: 0rem;
}


article {
  margin-bottom: 5.5rem;
}

article img {
  border-radius: 20px;
}

article ul li:not(:last-child),
article ol li:not(:last-child) {
  margin-bottom: 0.75rem;
}

time {
  color: var(--color-muted);
  font-size: var(--font-size-date);
}

a {
  color: var(--color-link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.meta {
  font-size: var(--font-size-meta);
  color: var(--color-meta);
  margin-top: 0.5rem;
}

.intro {
  text-align: center;
  margin: 2rem 0;
}

.intro img {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  margin-bottom: 1rem;
}

/* Social Icons */
.social-icons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

.social-icons.home {
  justify-content: left;
}

.social-icons a {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #eee;
  color: #555;
  text-decoration: none;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.social-icons a:hover {
  transform: scale(1.1);
  background-color: #ccc;
}

.social-icons i {
  font-size: 1rem;
}

/* About The Author Component */
.author-box {
  display: flex;
  align-items: flex-start;
  gap: 2.0rem;
  border-top: 1px solid #ddd;
  margin-top: 4rem;
  padding-top: 1.5rem;
  flex-wrap: wrap;
}

.author-box img {
  width: 125px;
  height: 125px;
  border-radius: 15%;
  flex-shrink: 0;
}

.author-box h2 {
  margin: 0;
}

.author-box > div {
  flex: 1 1 300px;
  display: flex;
  flex-direction: column;
}

@media (max-width: 600px) {
  .author-box {
    flex-direction: column;
    align-items: left;
    text-align: left;
  }

  .author-box img {
    margin-bottom: 1rem;
  }
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: left;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 3rem;
  font-size: 0.95rem;
}

.pagination a,
.pagination span {
  padding: 0.4rem 0.8rem;
  text-decoration: none;
  border-radius: 15%;
  color: var(--color-link);
  background-color: transparent;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.pagination a:hover {
  background-color: #f0f0f0;
  transform: scale(1.05);
}

.pagination .current {
  background-color: #222;
  font-weight: bold;
  pointer-events: none;
  color: #fff;
}

/* Skip Link */
.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: 999;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  background: #000;
  color: #fff;
  padding: 0.5rem 1rem;
  text-decoration: none;
}

blockquote {
  position: relative;
  padding: 1.5rem 1rem 1rem 2rem;
  font-style: italic;
  font-size: 1.2rem;
  color: #333;
  background-color: #f9f9f9;
  border-radius: 8px;
  margin: 2rem 0;
}

blockquote::before {
  content: "\201C";
  font-size: 8rem;
  line-height: 1;
  position: absolute;
  left: 25px;
  top: -25px;
  color: #ccc;
  font-family: Georgia, serif;
}


.featured-image {
  margin-bottom: 1rem;
}

.featured-image img {
  max-width: 100%;
  border-radius: 20px;
  height: auto;
}

/* Books Category Two-Column Layout */
.books-post-content-wrapper {
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
  margin-bottom: 2rem;
}

.books-featured-image {
  flex: 0 0 300px;
  max-width: 300px;
}

.books-featured-image img {
  max-width: 100%;
  border-radius: 20px;
  height: auto;
  display: block;
}

.books-post-content {
  flex: 1 1 auto;
  min-width: 0;
}

@media (max-width: 768px) {
  .books-post-content-wrapper {
    flex-direction: column;
    gap: 1.5rem;
  }

  .books-featured-image {
    flex: 1 1 auto;
    max-width: 100%;
    width: 100%;
  }
}

.sticky-post {
  border-left: 4px solid var(--color-link);
  padding: 1rem 1.5rem 2rem;
  background: #EDF3FE;
  border-radius: 20px;
}

/* Make all YouTube embeds responsive */
iframe[src*="youtube.com"] {
  width: 100% !important;
  height: auto;
  aspect-ratio: 16 / 9;
  max-width: 100%;
  display: block;
}

.content-wrapper img,
main img,
article img,
.page img,
.post img {
  max-width: 100%;
  height: auto;
  display: block;
    border-radius: 15px;
}

/* Ensure image captions are responsive and fit container */
.wp-caption {
  max-width: 100% !important;
  height: auto;
  margin: 1rem 0;
  text-align: center;
}

.wp-caption img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 20px; /* Optional: matches your existing image style */
}

.wp-caption-text {
  font-size: 0.9rem;
  color: var(--color-meta);
  margin-top: 0.5rem;
}

/* === Modal Styling === */

body.no-scroll {
  overflow: hidden;
  height: 100vh;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  overflow-y: auto;
  padding: 0rem;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.modal-content {
  background: white;
  color: #222;
  max-width: 1200px;
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  max-height: 90%;
  overflow: hidden;
  position: relative;
  margin: auto 15px;
}

.modal-body {
  overflow-y: auto;
  padding: 2rem;
  flex: 1 1 auto;
}

@media (max-width: 768px) {
  .modal-body {
    padding: 1rem;
  }
}

.close-modal {
  border: none;
  background: #eee;
  color: #333;
  border-radius: 50%;
  font-size: 1.5rem;
  width: 48px;
  height: 48px;
  margin: 1rem auto;
  cursor: pointer;
  transition: background-color 0.2s ease;
  flex-shrink: 0;
}

.modal-content img {
  max-width: 100%;
  border-radius: 10px;
  margin-bottom: 1rem;
}

.close-modal:hover {
  background-color: #ccc;
}



/* === Accordion styles === */
.emte-accordion {
  display: grid;
  gap: 1rem;
  margin: 1rem 0 2rem;
}

.emte-acc-item {
  border: 1px solid #e6e6e6;
  background: #fff;
  border-radius: 12px;
  margin-bottom: 20px;
}

.emte-acc-toggle {
  appearance: none;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 1rem 1.25rem 1rem 3.95rem;

	  font-weight: var(--font-weight-bolder); 
	font-size: var(--font-size-h2);
	  color: var(--color-text-headings); 

  line-height: 1.3;
  cursor: pointer;
  position: relative;

}

.emte-acc-toggle::before {
  content: "+";
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 2.25rem;
  height: 2.25rem;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: #eaf7ee;
  color: #1f7a3d; /* subtle green */
  font-weight: 700;
}

.emte-acc-toggle[aria-expanded="true"]::before {
  content: "×";
  background: #fdecec;
  color: #b40000;
}

.emte-acc-toggle:focus-visible {
  outline: 2px solid #000;
  outline-offset: 2px;
  border-radius: 12px;
}

.emte-acc-panel {
  padding: 0 1.25rem 1.25rem 1.25rem;
}

.emte-acc-panel > :first-child { margin-top: 0.5rem; }
.emte-acc-panel ul { padding-left: 1.2rem; }



/* List Spacing */
.page-content ul li:not(:last-child),
.page-content ol li:not(:last-child) {
  margin-bottom: 0.75rem;
}

article ul li:not(:last-child),
article ol li:not(:last-child) {
  margin-bottom: 0.75rem;
}







/* === Tailwind-like Equal-Height Card Grid for [pboxes] === */

/* Grid container */
.pboxes {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem; /* Tailwind gap-6 */
  margin: 2rem 0;
  align-items: stretch; /* ensures equal height cards */
}

/* Two-column layout on medium+ screens (≥768px) */
@media (min-width: 768px) {
  .pboxes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


/* Card (pbox) */
.pbox {
justify-content: flex-start; 

  background-color: #ffffff;
  border: 1px solid #e5e7eb; /* Tailwind border-gray-200 */
  border-radius: 1.25rem; /* rounded-2xl */
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%; /* full height for equal columns */
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05),
              0 2px 4px -2px rgba(0, 0, 0, 0.05); /* subtle depth */
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

/* Hover state: slightly lifted */
.pbox:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
              0 4px 6px -4px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

/* Image at the top */
.pbox img {
  width: 100%;
  height: auto; /* h-48 equivalent */
  object-fit: cover;
  border-radius: 1.25rem 1.25rem 0 0;
  display: block;
}


/* Content area */
.p-5 {
  flex-grow: 1; /* allow content to stretch evenly */
  padding: 1.25rem;
  border-radius: 0 0 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Heading */
.pbox h3 {
  font-size: 1.225rem; /* text-lg */
  font-weight: 600; /* font-semibold */
  margin-bottom: 0.5rem;
  color: var(--color-text-headings);
}

/* Description text */
.pbox .text-gray-700 {
  color: var(--color-text);
  margin-bottom: 1rem;
  line-height: 1.6;
  font-size: 1rem;
  flex-grow: 1; /* push the button to bottom if needed */
}

/* "Learn more" button */
.pbox a {
  display: inline-block;
  background-color: var(--color-link); 
  color: #ffffff;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.6rem 1.25rem;
  border-radius: 0.5rem;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.2s ease;
  margin-top: auto; /* ensures button sits at bottom */
}

.pbox a:hover {
  background-color: var(--color-link-hover); 
  transform: translateY(-1px);
}

/* Equal spacing and reset for paragraphs */
.pboxes p {
  margin-top: 0;
  margin-bottom: 0.75rem;
}

.pboxes .pbox > *:last-child,
.pboxes .pbox .p-5 > *:last-child {
  margin-bottom: 0;
}



/* === Responsive Two-Column Layout for [cols2] === */

.cols2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem; /* same spacing as pboxes */
  margin: 2rem 0;
  align-items: stretch; /* ensures equal heights in each row */
}

/* Two columns on medium+ screens */
@media (min-width: 768px) {
  .cols2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Each column card 
.col {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05),
              0 2px 4px -2px rgba(0,0,0,0.05);
  transition: box-shadow 0.25s ease, transform 0.25s ease;            
  flex-direction: column;      
  justify-content: flex-start;  
}

.col:hover {
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.08),
              0 4px 6px -4px rgba(0,0,0,0.05);
  transform: translateY(-2px);
}

/* Reset paragraph spacing to prevent margin collapse */
.col p:first-child {
  margin-top: 0;
}
.col p:last-child {
  margin-bottom: 0;
}


/* === Responsive Two-Column Boxes Layout for [boxes2] === */

.boxes2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem; /* same spacing as cols2 */
  margin: 2rem 0;
  align-items: stretch;
}

/* Two columns on medium+ screens */
@media (min-width: 768px) {
  .boxes2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Each box card */
.box {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05),
              0 2px 4px -2px rgba(0,0,0,0.05);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
  flex-direction: column;
  justify-content: flex-start;
}

.box:hover {
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.08),
              0 4px 6px -4px rgba(0,0,0,0.05);
  transform: translateY(-2px);
}

/* Paragraph spacing consistency */
.box p:first-child {
  margin-top: 0;
}
.box p:last-child {
  margin-bottom: 0;
}

/* Make the last single box in the final row span full width */
@media (min-width: 768px) {
  .boxes2 > .box:last-child:nth-child(odd) {
    grid-column: 1 / -1; /* spans the full row */
  }
}




/* === Home title === */
.home-title{margin:0 0 2rem 0;font-size:var(--font-size-h1);line-height:1.15;color:var(--color-text-headings)}

/* Masonry layout */
article.masonry-item { margin-bottom: 0px;}


.masonry-layout{--column-count:3;display:grid;gap:1.5rem;grid-template-columns:repeat(var(--column-count),1fr);width:100%}
@media (max-width:1024px){.masonry-layout{--column-count:2}}
@media (max-width:650px){.masonry-layout{--column-count:1}}
.masonry-column{display:flex;flex-direction:column;gap:1.5rem}
.masonry-column:empty{display:none}
.masonry-item{break-inside:avoid;display:flex;width:100%}
.masonry-noscript{display:grid;gap:1.5rem;margin-top:1.5rem}
.masonry-empty{text-align:center;color:var(--color-muted);margin:2rem 0}
#front-masonry-template{display:none}

/* Card */
.card{background:#fff;border:1px solid #e7e7e7;border-radius:20px;box-shadow:0 1px 2px rgba(0,0,0,.06);overflow:hidden;display:block;width:100%;transition:box-shadow .2s,transform .2s}
.card:hover{box-shadow:0 8px 24px rgba(0,0,0,.10);transform:translateY(-2px)}

/* Disable transform-on-hover in Safari to avoid zoom/lift issues */
html.is-safari .card,
body.is-safari .card{transition:box-shadow .2s !important;transform:none !important}
html.is-safari .card:hover,
body.is-safari .card:hover{transform:none !important}



/* Media: intrinsic image aspect, rounded top corners */
.card-media{display:block}
.card-img{display:block;width:100%;height:auto;border-top-left-radius:20px;border-top-right-radius:20px}
.card-img.placeholder{aspect-ratio:3/2;background:linear-gradient(180deg,#f1f1f1,#e9e9e9)}

/* Body */
.card-body{padding:16px 18px 18px;display:flex;flex-direction:column;height:100%}
.card-title{margin:6px 0 8px 0;font-size:1.25rem;line-height:1.25;font-weight:800}
.card-title a{color:var(--color-text-headings);text-decoration:none}
.card-title a:hover{text-decoration:underline}

/* Author line (under title) */
.card-meta{margin:0 0 12px 0;font-size:.98rem;color:#374151}
.card-author{color:var(--color-link,#1d4ed8);text-decoration:none}
.card-author:hover{text-decoration:underline}
.meta-sep{opacity:.75}

/* Excerpt */
.card-excerpt{margin:0 0 16px 0;font-size:1rem;color:#1f2937}

/* Actions: always stacked, full width, like screenshot */
.card-actions{display:grid;grid-template-columns:1fr;gap:12px; /*margin-top:auto */}
.btn{display:inline-flex;align-items:center;justify-content:center;width:100%;height:54px;padding:0px;border-radius:14px;font-weight:600;font-size:1.15rem;text-decoration:none;transition:background-color .15s,color .15s,border-color .15s,transform .15s;border:1px solid transparent}
.btn:focus-visible{outline:2px solid #000;outline-offset:2px;border-radius:16px}

/* Primary = vivid blue like your mock */
.btn-primary{background:#365CF7; /* close match to screenshot */
  color:#fff;box-shadow:0 2px 0 rgba(0,0,0,.05)}
.btn-primary:hover{background:#2e4fd3}

/* Secondary = soft grey pill */
.btn-secondary{background:#efefef;color:#1f2937;border-color:#e5e5e5}
.btn-secondary:hover{background:#e9e9e9}

/* Container + pagination (unchanged) */
.container{max-width:1100px;margin:0 auto;padding:0px}
.pagination-wrap ul{list-style:none;display:flex;gap:.5rem;padding:0;margin:2rem 0;flex-wrap:wrap}
.pagination-wrap a,.pagination-wrap span{display:inline-block;padding:.45rem .8rem;border-radius:8px;text-decoration:none}
.pagination-wrap a:hover{background:#f0f0f0}
.pagination-wrap .current{background:#222;color:#fff}

