/* ===== Base responsiveness & wrap ===== */
*,*::before,*::after{box-sizing:border-box}
.wpsmm-wrap{max-width:var(--wpsmm-wrap-width,1200px);width:100%;margin:16px auto;padding:0 10px}
.wpsmm-skin .wpsmm-sec-title{font-size:1.25rem;margin:14px 0 10px;color:var(--wpsmm-accent,#111827);border-left:4px solid var(--wpsmm-accent,#111827);padding-left:8px}

.wpsmm-sr {
  position:absolute !important;
  width:1px; height:1px;
  padding:0; margin:-1px;
  overflow:hidden; border:0;
  clip:rect(0 0 0 0);
  clip-path: inset(50%);
  white-space:nowrap;
}

/* ===== Cards & Images ===== */
.wpsmm-card,
.wpsmm-row{
  background:#fff;
  border:1px solid rgba(17,24,39,.06);
  border-radius:14px;
  overflow:hidden;
  box-shadow:0 1px 3px rgba(0,0,0,.04);
}

/* Hover lift for cards, rows & carousel items */
.wpsmm-card,
.wpsmm-row,
.wpsmm-caro-item{
  transition:
    transform .16s ease-out,
    box-shadow .16s ease-out,
    border-color .16s ease-out,
    background-color .16s ease-out;
}

.wpsmm-card:hover,
.wpsmm-row:hover,
.wpsmm-caro-item:hover{
  transform:translateY(-2px);
  box-shadow:0 6px 18px rgba(15,23,42,.12);
  border-color:rgba(15,23,42,.18);
  background:#f9fafb;
}

/* On touch devices, don't apply hover-lift (prevents "sticky" hover on tap) */
@media (hover: none) and (pointer: coarse){
  .wpsmm-card:hover,
  .wpsmm-row:hover,
  .wpsmm-caro-item:hover{
    transform:none;
    box-shadow:0 1px 3px rgba(0,0,0,.04);
    border-color:rgba(17,24,39,.06);
    background:#fff;
  }
}

.wpsmm-thumb img{width:100%;height:auto;display:block;object-fit:cover}
.wpsmm-thumb-placeholder{width:100%;aspect-ratio:16/9;background:#f3f4f6}


/* ===== Grids ===== */
.wpsmm-grid{display:grid;gap:16px;min-width:0}
.wpsmm-grid-3{grid-template-columns:repeat(3,minmax(0,1fr))}
.wpsmm-grid-4{grid-template-columns:repeat(4,1fr)}
.wpsmm-grid-6{grid-template-columns:repeat(6,1fr)}
@media (max-width:1200px){.wpsmm-grid-6{grid-template-columns:repeat(4,1fr)}}
@media (max-width:980px){.wpsmm-grid-3{grid-template-columns:repeat(2,1fr)}.wpsmm-grid-4{grid-template-columns:repeat(2,1fr)}.wpsmm-grid-6{grid-template-columns:repeat(3,1fr)}}
@media (max-width:640px){.wpsmm-grid-3,.wpsmm-grid-4,.wpsmm-grid-6{grid-template-columns:1fr}}

/* Auto-fit helper: 1 card = full width, 2 cards = 2-up, 3+ cards flow */
.wpsmm-grid-auto{
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* ===== Card internals ===== */
.wpsmm-card{padding-bottom:12px}
.wpsmm-card .wpsmm-title{margin:10px 12px 6px;font-size:1.05rem;line-height:1.3}
.wpsmm-card .wpsmm-meta{margin:0 12px 8px;font-size:.85rem;opacity:.8}
.wpsmm-card .wpsmm-excerpt{margin:0 12px 10px}
.wpsmm-card .wpsmm-readmore{margin:0 12px;color:var(--wpsmm-accent,#111827);text-decoration:none;font-weight:600}

/* ===== List Rows ===== */
.wpsmm-list-wrap{display:grid;gap:14px;min-width:0}
.wpsmm-row{display:grid;grid-template-columns:220px 1fr;gap:12px;align-items:start;padding:10px;min-width:0}
.wpsmm-row .wpsmm-title{margin:0 0 6px;font-size:1.1rem}
.wpsmm-row .wpsmm-meta{font-size:.85rem;opacity:.8;margin-bottom:8px}
.wpsmm-row .wpsmm-excerpt{margin:0 0 8px}
.wpsmm-row .wpsmm-readmore{color:var(--wpsmm-accent,#111827);font-weight:600;text-decoration:none}
@media (max-width:780px){.wpsmm-row{grid-template-columns:1fr}}

/* Paged list (page 2+): ensure the thumb fills the entire left column */
.wpsmm-list .wpsmm-row > a.wpsmm-thumb{
  display:block !important;
  width:100% !important;
  max-width:100% !important;
  border-radius:10px;
  overflow:hidden;
  aspect-ratio:16/9;
}

.wpsmm-list .wpsmm-row > a.wpsmm-thumb img{
  display:block !important;
  width:100% !important;
  height:100% !important;
  max-width:100% !important;
  object-fit:cover !important;
  float:none !important;
  margin:0 !important;
}

/* Paged list hard override: the thumb must fill the entire left column */
.wpsmm-section.wpsmm-list .wpsmm-row a.wpsmm-thumb,
.wpsmm-section.wpsmm-list .wpsmm-row a.wpsmm-thumb *{
  display:block !important;
  width:100% !important;
  max-width:100% !important;
}

.wpsmm-section.wpsmm-list .wpsmm-row a.wpsmm-thumb img{
  height:100% !important;
  object-fit:cover !important;
  float:none !important;
  margin:0 !important;
}

/* ====================== Carousel (no visible scrollbar; arrows only) ====================== */
.wpsmm-caro{
  position:relative;
  overflow:hidden;
}
.wpsmm-caro-track{
  display:grid;
  grid-auto-flow:column;
  grid-auto-columns:minmax(260px,1fr);
  gap:12px;

  overflow-x:auto;
  overflow-y:hidden;
  -webkit-overflow-scrolling:touch;
  scroll-snap-type:x mandatory;
  padding:2px 40px;

  scrollbar-width:none;
  -ms-overflow-style:none;
}
.wpsmm-caro-track::-webkit-scrollbar{ display:none; }
.wpsmm-caro-track{ padding-bottom:14px; margin-bottom:-14px; }

/* Items */
.wpsmm-caro-item{
  scroll-snap-align:start;
  background:#fff;
  border:1px solid rgba(17,24,39,.06);
  border-radius:14px;
  overflow:hidden;
  min-width:260px;
}
.wpsmm-caro-item .wpsmm-title{ margin:10px 12px; font-size:1rem; }
.wpsmm-caro-item .wpsmm-meta{ margin:0 12px 12px; font-size:.85rem; opacity:.8; }

/* Arrows */
.wpsmm-caro-btn{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  border:none;
  background:#fff;
  box-shadow:0 2px 6px rgba(0,0,0,.1);
  width:40px;
  height:40px;
  border-radius:20px;
  cursor:pointer;
  z-index:2;
}
.wpsmm-caro-btn.prev{ left:6px; }
.wpsmm-caro-btn.next{ right:6px; }
.wpsmm-caro-btn:focus{ outline:2px solid var(--wpsmm-accent,#111827); }

/* Mobile carousel: show larger cards; still no scrollbar visible */
@media (max-width:640px){
  .wpsmm-caro-track{
    padding:2px 34px;
    grid-auto-columns:minmax(84%,1fr);
  }
  .wpsmm-caro-item{ min-width:auto; }
}

/* Similar posts carousel (single post) – show only ONE card per dot on mobile */
@media (max-width:640px){
  /* JS may mark a group of 3 cards as .is-active.
     On mobile we hide the 2nd and 3rd active ones so only one shows. */
  .bn-rel-carousel-track .bn-rel-item.is-active + .bn-rel-item.is-active,
  .bn-rel-carousel-track .bn-rel-item.is-active + .bn-rel-item.is-active + .bn-rel-item.is-active{
    display:none !important;
  }
}

/* ================= Mobile safety & overflow fixes (global) ================= */
.wpsmm-wrap,
.wpsmm-layout,
.wpsmm-main,
.wpsmm-grid,
.wpsmm-hero-grid,
.wpsmm-list-wrap,
.wpsmm-rail-col{ min-width:0; }

/* Make images never force overflow */
.wpsmm-thumb img{
  max-width:100%;
  height:auto;
  display:block;
  object-fit:cover;
}

/* === Mobile tap safety: disable thumb clicks so vertical scroll doesn't open posts === */
@media (max-width: 768px){
  /* Main cards & list rows: let users scroll using image, but tap titles/read-more to open */
  .wpsmm-card .wpsmm-thumb,
  .wpsmm-row > a.wpsmm-thumb,
  .wpsmm-cat-columns .wpsmm-row .wpsmm-thumb{
    pointer-events:none;
  }
}

/* Slightly reduce general text on very small phones */
@media (max-width:400px){
  .wpsmm-skin .wpsmm-sec-title{ font-size:1.1rem; }
  .wpsmm-card .wpsmm-title,
  .wpsmm-row .wpsmm-title{ font-size:1rem; }
}

/* Ensure the right-rail hero minis stay readable but compact on phones */
@media (max-width:640px){
  .wpsmm-hero-rail .wpsmm-hero-item .wpsmm-title{
    font-size:.92rem;
    -webkit-line-clamp:2;
  }
}

/* ===== Paged archive: List vs Grid modes ===== */
.wpsmm-paged-list .wpsmm-list-wrap{
  min-width:0;
}
.wpsmm-paged-list.wpsmm-view-grid .wpsmm-list-wrap{
  display:grid;
  gap:16px;
}

/* Column counts */
.wpsmm-paged-list.wpsmm-view-grid.wpsmm-cols-2 .wpsmm-list-wrap{
  grid-template-columns:repeat(2,minmax(0,1fr));
}
.wpsmm-paged-list.wpsmm-view-grid.wpsmm-cols-3 .wpsmm-list-wrap{
  grid-template-columns:repeat(3,minmax(0,1fr));
}
.wpsmm-paged-list.wpsmm-view-grid.wpsmm-cols-4 .wpsmm-list-wrap{
  grid-template-columns:repeat(4,minmax(0,1fr));
}

/* Responsive collapse */
@media (max-width:980px){
  .wpsmm-paged-list.wpsmm-view-grid.wpsmm-cols-4 .wpsmm-list-wrap{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
}
@media (max-width:780px){
  .wpsmm-paged-list.wpsmm-view-grid .wpsmm-list-wrap{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}
@media (max-width:640px){
  .wpsmm-paged-list.wpsmm-view-grid .wpsmm-list-wrap{
    grid-template-columns:1fr;
  }
}

/* Grid cards behave like nice stacked tiles */
.wpsmm-paged-list.wpsmm-view-grid .wpsmm-card{
  display:flex;
  flex-direction:column;
  height:100%;
}
.wpsmm-paged-list.wpsmm-view-grid .wpsmm-card .wpsmm-thumb{
  display:block;
  aspect-ratio:16/9;
  overflow:hidden;
}
.wpsmm-paged-list.wpsmm-view-grid .wpsmm-card .wpsmm-thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
}
.wpsmm-paged-list.wpsmm-view-grid .wpsmm-card .wpsmm-title{
  margin-top:10px;
}

/* ===== Pagination ===== */
.wpsmm-pagination ul{list-style:none;display:flex;gap:6px;justify-content:center;padding:0}
.wpsmm-pagination li a,.wpsmm-pagination li span{display:inline-block;padding:6px 10px;border:1px solid rgba(0,0,0,.1);border-radius:8px;text-decoration:none}
.wpsmm-pagination .current{background:var(--wpsmm-accent,#111827);color:#fff;border-color:var(--wpsmm-accent,#111827)}

/* =========================================================
   Hero Mosaic
   ========================================================= */
.wpsmm-hero-grid{
  display:grid;
  grid-template-columns:2fr 1fr;
  gap:16px;
  align-items:stretch;
  min-width:0;
}
.wpsmm-hero-lead .wpsmm-thumb{
  display:block;
  aspect-ratio:16/9;
  overflow:hidden;
  border-radius:12px;
}
.wpsmm-hero-lead .wpsmm-thumb img{ width:100%; height:100%; object-fit:cover; display:block; }

/* Right rail */
.wpsmm-hero-rail{
  display:flex;
  flex-direction:column;
  gap:12px;
  min-height:0;
}
.wpsmm-hero-rail .wpsmm-hero-item{
  position:relative;
  flex:1 1 0;
  min-height:0;
  border:none;
  border-radius:12px;
  overflow:hidden;
  background:#000;
}
.wpsmm-hero-rail .wpsmm-hero-item .wpsmm-thumb{
  position:absolute; inset:0; display:block; z-index:0;
}
.wpsmm-hero-rail .wpsmm-hero-item .wpsmm-thumb img{
  width:100%; height:100%; object-fit:cover; display:block;
}
.wpsmm-hero-rail .wpsmm-hero-item .wpsmm-thumb::after{
  content:""; position:absolute; inset:0;
  background:linear-gradient(180deg, rgba(0,0,0,0) 45%, rgba(0,0,0,.55) 100%);
  pointer-events:none; z-index:1;
}
.wpsmm-hero-rail .wpsmm-hero-item .wpsmm-title{
  position:absolute;
  left:8px; right:8px; bottom:8px;
  margin:0;
  padding:6px 8px;
  color:#fff;
  font-size:.90rem;
  line-height:1.3;
  font-weight:600;
  text-shadow:0 1px 2px rgba(0,0,0,.45);
  z-index:2;
  display:-webkit-box;
  -webkit-line-clamp:3;
  -webkit-box-orient:vertical;
  overflow:hidden;
  border-radius:6px;
  background:rgba(0,0,0,0.40);
  backdrop-filter:blur(2px);
}

.wpsmm-hero-rail .wpsmm-hero-item .wpsmm-meta{ display:none; }

@media (max-width:980px){
  .wpsmm-hero-grid{ grid-template-columns:1fr; }
  .wpsmm-hero-rail{ display:grid; grid-auto-rows:auto; }
  .wpsmm-hero-rail .wpsmm-hero-item{ height:auto; }
  .wpsmm-hero-rail .wpsmm-hero-item .wpsmm-thumb{ position:relative; aspect-ratio:16/9; }
  .wpsmm-hero-rail .wpsmm-hero-item .wpsmm-title{ font-size:.98rem; }
}

/* ===== Two-Column Masonry ===== */
.wpsmm-two-col-grid{columns:2;column-gap:16px}
@media (max-width:980px){.wpsmm-two-col-grid{columns:1}}
.wpsmm-two-col-grid .wpsmm-masonry{break-inside:avoid;margin:0 0 16px}

/* ===== ZigZag ===== */
.wpsmm-zz-row{display:grid;grid-template-columns:1fr 1fr;gap:16px;align-items:center;margin:0 0 16px}
.wpsmm-zz-row.reverse{direction:rtl}
.wpsmm-zz-row.reverse .wpsmm-zz-body{direction:ltr}
@media (max-width:780px){.wpsmm-zz-row{grid-template-columns:1fr}}

/* ===== Compact Cards ===== */
.wpsmm-compact .wpsmm-compact-card{display:grid;grid-template-columns:64px 1fr;gap:10px;align-items:center;padding:10px}
.wpsmm-compact .wpsmm-compact-card .wpsmm-title{margin:0;font-size:1rem}

/* ===== Feature Rail ===== */
.wpsmm-rail-col{display:grid;gap:16px}

/* ===== Big List+ ===== */
.wpsmm-row-lead{grid-template-columns:340px 1fr}
@media (max-width:980px){.wpsmm-row-lead{grid-template-columns:1fr}}

/* ===== Ads ===== */
.wpsmm-ad{min-height:90px;margin:12px 0}
.wpsmm-ad > ins.adsbygoogle{display:block;max-width:100%}

/* ===== Accent ===== */
.wpsmm-skin a{color:var(--wpsmm-accent,#111827)}
.wpsmm-skin a:hover{text-decoration:underline}

/* ----- Plugin Header Nav base (horizontal) ----- */
.wpsmm-nav .wpsmm-menu,
.wpsmm-footer-menu {
  display:flex;
  gap:12px;
  list-style:none;
  margin:0;
  padding:0;
  flex-wrap:wrap;
  align-items:center;
}
.wpsmm-nav .wpsmm-menu li,
.wpsmm-footer-menu li { display:inline-block; }
.wpsmm-nav .wpsmm-menu a,
.wpsmm-footer-menu a { text-decoration:none; }

/* ----- Layout with optional sidebar (grid that never collapses sidebar) ----- */
.wpsmm-layout { display:block; }

.wpsmm-layout.with-sidebar{
  display:grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 340px);
  gap:20px;
  align-items:start;
}

.wpsmm-layout.with-sidebar > .wpsmm-sidebar{
  min-width:300px;
  width:320px;
  flex:0 0 320px;
}

.wpsmm-main{ min-width:0; }

.wpsmm-sidebar .widget-title{
  writing-mode: horizontal-tb;
  white-space: normal;
  overflow-wrap:anywhere;
}

@media (max-width:980px){
  .wpsmm-layout.with-sidebar{ grid-template-columns:1fr; }
  .wpsmm-layout.with-sidebar > .wpsmm-sidebar{
    min-width:0; width:auto; flex:0 0 auto;
  }
}

/* Ensure article rows/cards don’t overflow on small screens */
@media (max-width:640px){
  .wpsmm-row { grid-template-columns:1fr !important; }
}

/* Constrain lead image aspect ratio (safety) */
.wpsmm-hero-lead .wpsmm-thumb { display:block; aspect-ratio:16/9; overflow:hidden; }
.wpsmm-hero-lead .wpsmm-thumb img { width:100%; height:100%; object-fit:cover; }

/* Ensure all thumb images can fill aspect-crops when needed */
.wpsmm-thumb img { width:100%; height:auto; display:block; object-fit:cover }
.wpsmm-card .wpsmm-thumb { display:block }

/* Carousels: prevent item squish on small screens */
@media (max-width:640px){
  .wpsmm-caro-track { padding:2px 30px; grid-auto-columns:minmax(220px,1fr); }
}

/* Footer spacing safety when using plugin header/footer */
.site-content { display:block; }

/* ===== Pagination clear & layout ===== */
.wpsmm-pagination{
  position:relative;
  z-index:1;
  margin:24px 0 0;
  clear:both;
}
.wpsmm-grid > .wpsmm-pagination,
.wpsmm-list-wrap > .wpsmm-pagination,
.wpsmm-rail-col > .wpsmm-pagination,
.wpsmm-two-col-grid > .wpsmm-pagination{ grid-column:1 / -1; }
.wpsmm-grid + .wpsmm-pagination,
.wpsmm-list-wrap + .wpsmm-pagination,
.wpsmm-rail-col + .wpsmm-pagination,
.wpsmm-two-col-grid + .wpsmm-pagination{ margin-top:24px; }
.wpsmm-two-col-grid + .wpsmm-pagination{ break-before:column; }
.wpsmm-pagination ul{
  list-style:none; display:flex; gap:6px; justify-content:center; padding:0; margin:0;
}
.wpsmm-pagination li a,
.wpsmm-pagination li span{
  display:inline-block; padding:6px 10px; border:1px solid rgba(0,0,0,.1); border-radius:8px; text-decoration:none;
}
.wpsmm-pagination .current{ background:var(--wpsmm-accent,#111827); color:#fff; border-color:var(--wpsmm-accent,#111827); }

/* ===== Category Columns (layout & compact rows) ===== */
.wpsmm-cat-columns .wpsmm-grid.wpsmm-grid-3{
  display:grid !important;
  grid-template-columns:repeat(auto-fit, minmax(280px, 1fr)) !important;
  gap:16px;
  align-items:start;
  width:100%;
}

.wpsmm-cat-columns .wpsmm-grid.wpsmm-grid-3{
  display:grid !important;
  grid-template-columns:repeat(auto-fit, minmax(280px, 1fr)) !important;
  gap:16px;
}

/* Force lists to flow vertically inside each card */
.wpsmm-cat-columns .wpsmm-list-wrap{
  display:block;
  padding:0 10px 12px;
}

/* Each post row: bigger thumb + text */
.wpsmm-cat-columns .wpsmm-row{
  display:grid !important;
  grid-template-columns:110px 1fr !important;
  gap:12px;
  padding:10px 12px;
  border-top:1px solid rgba(0,0,0,.06);
}

/* Thumb size */
.wpsmm-cat-columns .wpsmm-row .wpsmm-thumb{
  width:110px; height:110px; border-radius:8px; overflow:hidden;
}
.wpsmm-cat-columns .wpsmm-row .wpsmm-thumb img{
  width:100%; height:100%; object-fit:cover; display:block;
}

/* Text */
.wpsmm-cat-columns .wpsmm-row-body h4{
  margin:0 0 6px; font-size:1rem; line-height:1.3;
}
.wpsmm-cat-columns .wpsmm-row-body .wpsmm-meta{
  margin:0 0 6px; font-size:.85rem; opacity:.8;
}
.wpsmm-cat-columns .wpsmm-row-body .wpsmm-excerpt{
  margin:0; font-size:.92rem; color:#334155;
}

/* Card chrome */
.wpsmm-cat-columns .wpsmm-card{
  background:#fff;
  border:1px solid rgba(17,24,39,.06);
  border-radius:14px;
  overflow:hidden;
  box-shadow:0 1px 3px rgba(0,0,0,.04);
}
.wpsmm-cat-columns .wpsmm-card .wpsmm-title{ margin:12px; }

/* Safety */
.wpsmm-cat-columns .wpsmm-row,
.wpsmm-cat-columns .wpsmm-row *{ min-width:0; }

.wpsmm-cat-columns .wpsmm-grid-auto{
  display:grid !important;
  grid-template-columns:repeat(auto-fit, minmax(280px, 1fr)) !important;
  gap:20px !important;
  align-items:start !important;
  width:100%;
}

.wpsmm-cat-columns .wpsmm-row{
  grid-template-columns:96px 1fr;
  align-items:center;
}

@media (max-width:640px){
  .wpsmm-cat-columns .wpsmm-row{
    grid-template-columns:72px 1fr;
  }
}

/* ===== Global sidebar safety (archives, page 2+, theme templates) ===== */
#secondary .widget-title,
#secondary .widgettitle,
.widget-area .widget-title,
.widget-area .widgettitle,
.widget .widget-title,
.widget .widgettitle,
.sidebar .widget-title,
.sidebar .widgettitle {
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
  transform: none !important;
  rotate: 0 !important;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: anywhere !important;
  display: block !important;
}

#secondary, .widget-area, .sidebar {
  width: auto !important;
  max-width: 100% !important;
  float: none;
}

@media (min-width: 980px){
  #secondary, .widget-area, .sidebar {
    min-width: 300px;
  }
}

#secondary *, .widget-area *, .sidebar * { box-sizing: border-box; max-width: 100%; }
#secondary img, .widget-area img, .sidebar img { height: auto; }

/* ===================== Videos (tabs + grid) ===================== */
.wpsmm-videos .wpsmm-video-tabs{
  display:flex; gap:8px; flex-wrap:wrap;
  margin:6px 0 10px;
}
.wpsmm-videos .wpsmm-video-tabs button{
  appearance:none; border:1px solid rgba(17,24,39,.12);
  background:#fff; padding:6px 10px; border-radius:8px; cursor:pointer;
  font-weight:600;
}
.wpsmm-videos .wpsmm-video-tabs button.is-active{
  background:var(--wpsmm-accent,#111827); color:#fff; border-color:transparent;
  box-shadow:0 6px 12px rgba(2,6,23,.12);
}

.wpsmm-videos .wpsmm-video-panel{ display:none; }
.wpsmm-videos .wpsmm-video-panel.is-active{ display:block; }

.wpsmm-videos .wpsmm-video-grid{
  display:grid; gap:14px; min-width:0;
  grid-template-columns:repeat(3,minmax(0,1fr));
}
@media (max-width:980px){
  .wpsmm-videos .wpsmm-video-grid{ grid-template-columns:repeat(2,1fr); }
}
@media (max-width:640px){
  .wpsmm-videos .wpsmm-video-grid{ grid-template-columns:1fr; }
}

.wpsmm-videos .wpsmm-video-card{
  background:#fff; border:1px solid rgba(17,24,39,.06);
  border-radius:12px; overflow:hidden; box-shadow:0 1px 3px rgba(0,0,0,.04);
  padding:10px;
}
.wpsmm-videos .wpsmm-video-embed{
  position:relative; width:100%; aspect-ratio:16/9;
  overflow:hidden; border-radius:8px; background:#000;
}
.wpsmm-videos .wpsmm-video-embed iframe,
.wpsmm-videos .wpsmm-video-embed video{
  width:100%; height:100%; display:block; object-fit:cover;
}

/* =========================================================
   WPS Magazine: Plugin Header Shell
   ========================================================= */

.wpsmm-header{
  width:100%;
  background:#ffffff;
  border-bottom:1px solid rgba(15,23,42,.06);
  box-shadow:0 4px 14px rgba(15,23,42,.05);
}
.wpsmm-header .wpsmm-wrap{
  margin:0 auto;
  padding:10px 10px 6px;
}

/* Top row: logo + actions */
.wpsmm-header-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}

/* Logo / site title inside header only */
.wpsmm-header .site-title{
  font-weight:800;
  font-size:1.6rem;
  letter-spacing:.05em;
  text-decoration:none;
  color:var(--wpsmm-accent,#b91c1c);
}

/* Right actions (CTA + icons) */
.wpsmm-header-actions{
  display:flex;
  align-items:center;
  gap:10px;
}

/* CTA button */
.wpsmm-cta-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:7px 14px;
  border-radius:999px;
  font-weight:600;
  font-size:.88rem;
  text-decoration:none;
  background:var(--wpsmm-accent,#e11d48);
  color:#fff !important;
  box-shadow:0 8px 18px rgba(225,29,72,.35);
  transition:.15s transform ease,.15s box-shadow ease,.15s background-color ease;
}
.wpsmm-cta-btn:hover,
.wpsmm-cta-btn:focus{
  transform:translateY(-1px);
  box-shadow:0 10px 24px rgba(225,29,72,.4);
}

/* Icon buttons (hamburger + search icon) */
.wpsmm-icon-btn{
  display:none;
  width:34px;
  height:34px;
  border-radius:999px;
  border:1px solid rgba(15,23,42,.12);
  background:#f9fafb;
  font-size:18px;
  line-height:32px;
  text-align:center;
  cursor:pointer;
  user-select:none;
}

/* Bottom row: nav + search */
.wpsmm-header-bottom{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:8px 0 4px;
  margin-top:4px;
  border-top:1px solid rgba(148,163,184,.35);
}

/* Primary nav */
.wpsmm-nav{
  flex:1 1 auto;
}

/* Menu */
.wpsmm-menu{
  margin:0;
  padding:0;
  list-style:none;
  display:flex;
  gap:18px;
  flex-wrap:wrap;
}
.wpsmm-menu > li{
  position:relative;
}
.wpsmm-menu > li > a{
  text-decoration:none;
  font-weight:600;
  font-size:.95rem;
  padding:6px 0;
  color:var(--wpsmm-accent,#0f172a);
}
.wpsmm-menu > li > a:hover,
.wpsmm-menu > li > a:focus{
  text-decoration:underline;
}

/* Default dropdowns */
.wpsmm-menu li .sub-menu{
  position:absolute;
  left:0;
  top:100%;
  min-width:220px;
  margin-top:8px;
  padding:10px 12px;
  list-style:none;
  background:#ffffff;
  border-radius:12px;
  border:1px solid rgba(15,23,42,.10);
  box-shadow:0 16px 36px rgba(15,23,42,.12);
  opacity:0;
  visibility:hidden;
  transform:translateY(8px);
  transition:.12s ease;
  z-index:30;
}
.wpsmm-menu li:hover > .sub-menu,
.wpsmm-menu li:focus-within > .sub-menu{
  opacity:1;
  visibility:visible;
  transform:translateY(0);
}

/* Mega menu: add CSS class "wpsmm-mega-country" on that top-level item */
.wpsmm-menu > li.wpsmm-mega-country{
  position:static;
}
.wpsmm-menu > li.wpsmm-mega-country > .sub-menu{
  left:0;
  right:0;
  max-width:1200px;
  margin:10px auto 0;
  transform:none;
  opacity:0;
  visibility:hidden;
}
.wpsmm-menu > li.wpsmm-mega-country:hover > .sub-menu,
.wpsmm-menu > li.wpsmm-mega-country:focus-within > .sub-menu{
  opacity:1;
  visibility:visible;
}

/* Mega layout: regions as columns */
.wpsmm-menu > li.wpsmm-mega-country > .sub-menu{
  display:grid;
  grid-template-columns:repeat(4,minmax(140px,1fr));
  gap:18px;
}
.wpsmm-menu > li.wpsmm-mega-country > .sub-menu > li > a{
  font-weight:700;
  display:block;
  margin-bottom:4px;
}
.wpsmm-menu > li.wpsmm-mega-country > .sub-menu > li > .sub-menu{
  position:static;
  transform:none;
  opacity:1;
  visibility:visible;
  margin:4px 0 0;
  padding:0;
  box-shadow:none;
  border:none;
}
.wpsmm-menu > li.wpsmm-mega-country > .sub-menu > li > .sub-menu > li > a{
  font-weight:400;
  font-size:.9rem;
}

/* Header search form (scoped to header bottom only) */
.wpsmm-header-bottom .wpsmm-search-form{
  flex:0 0 320px;
  display:flex;
  align-items:center;
  gap:6px;
}

.wpsmm-header-bottom .wpsmm-search-field{
  flex:1 1 auto;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(148,163,184,.9);
  font-size:.9rem;
}

.wpsmm-header-bottom .wpsmm-search-submit{
  flex:0 0 auto;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(148,163,184,.9);
  background:#f9fafb;
  font-size:.85rem;
  cursor:pointer;
}

/* Let any non-header search forms (widgets, hero etc.) stay flexible */
.wpsmm-search-form{
  display:flex;
  align-items:center;
  gap:6px;
}

/* === Mobile header tweaks === */
@media (max-width:768px){
  .wpsmm-header .wpsmm-wrap{
    padding:8px 10px 6px;
  }
  .wpsmm-cta-btn{
    padding:6px 10px;
    font-size:.8rem;
    box-shadow:0 6px 16px rgba(225,29,72,.35);
  }
  .wpsmm-icon-btn{
    display:inline-block;
  }
  .wpsmm-header-bottom{
    flex-direction:column;
    align-items:stretch;
    gap:8px;
    padding-bottom:10px;
  }
    .wpsmm-header-bottom .wpsmm-nav,
  .wpsmm-header-bottom .wpsmm-search-form{
    display:none;
  }

  /* show nav when checkbox checked */
  #wpsmm-menu-toggle:checked ~ .wpsmm-header-bottom .wpsmm-nav{
    display:block;
  }

  /* show header search when checkbox checked */
  #wpsmm-search-toggle:checked ~ .wpsmm-header-bottom .wpsmm-search-form{
    display:flex;
  }

  /* Make header search fit small screens nicely when it is visible */
  .wpsmm-header-bottom .wpsmm-search-form{
    flex:1 1 auto;
    width:100%;
  }

  .wpsmm-menu{
    flex-direction:column;
    gap:0;
    padding:4px 0;
  }
  .wpsmm-menu > li > a{
    display:block;
    padding:8px 0;
  }
  /* mega menu collapses into simple nested list */
  .wpsmm-menu > li.wpsmm-mega-country > .sub-menu{
    position:static;
    max-width:none;
    box-shadow:none;
    border:none;
    margin:0;
    padding:4px 0 8px;
    opacity:1;
    visibility:visible;
    display:block;
  }
  
    /* Stack brand + actions nicely on small screens */
  .wpsmm-header-top{
    flex-direction:column;
    align-items:flex-start;
    gap:10px;
  }
  .wpsmm-header-actions{
    align-self:stretch;
    justify-content:flex-start;
  }

}

/* Screen-reader helper (fallback) */
.screen-reader-text{
  position:absolute;
  left:-9999px;
  top:auto;
  width:1px;
  height:1px;
  overflow:hidden;
}

/* =========================================================
   Plugin Footer: 4-column reference hub
   ========================================================= */

.wpsmm-footer{
  width:100%;
  background:#f9fafb;
  border-top:1px solid rgba(148,163,184,.4);
  margin-top:30px;
  font-size:.9rem;
  color:#0f172a;
}
.wpsmm-footer .wpsmm-wrap{
  margin:0 auto;
  padding:20px 10px 18px;
}

/* Grid */
.wpsmm-footer-grid{
  display:grid;
  gap:18px;
  grid-template-columns:repeat(4,minmax(0,1fr));
  align-items:flex-start;
}
@media (max-width:980px){
  .wpsmm-footer-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}
@media (max-width:640px){
  .wpsmm-footer-grid{
    grid-template-columns:1fr;
  }
}

/* Columns */
.wpsmm-footer-col h4{
  margin:0 0 8px;
  font-size:.98rem;
  font-weight:700;
  color:var(--wpsmm-accent,#111827);
}
.wpsmm-footer-col p{
  margin:0 0 8px;
  line-height:1.5;
}
.wpsmm-footer-links{
  list-style:none;
  margin:0;
  padding:0;
}
.wpsmm-footer-links li{
  margin-bottom:4px;
}
.wpsmm-footer-links a{
  text-decoration:none;
}
.wpsmm-footer-links a:hover{
  text-decoration:underline;
}

/* Bottom bar */
.wpsmm-footer-bottom{
  border-top:1px solid rgba(148,163,184,.4);
  margin-top:18px;
  padding-top:10px;
  display:flex;
  flex-wrap:wrap;
  gap:6px 16px;
  align-items:center;
  justify-content:space-between;
}
.wpsmm-footer-bottom small{
  opacity:.85;
}
.wpsmm-footer-bottom a{
  text-decoration:none;
}
.wpsmm-footer-bottom a:hover{
  text-decoration:underline;
}

/* Hide the theme’s own header/footer when the WPS shell is active */
.wpsmm-shell-active .site-header,
.wpsmm-shell-active #masthead,
.wpsmm-shell-active .site-footer,
.wpsmm-shell-active #colophon {
  display: none !important;
}

/* =========================================================
   HEADER & FOOTER FIXES (OVERRIDES)
   ========================================================= */

/* --- Header visual tweaks --- */

.wpsmm-header{
  background:#ffffff;
  border-bottom:1px solid rgba(148,163,184,.40);
  box-shadow:0 4px 14px rgba(15,23,42,.05);
}

.wpsmm-header .wpsmm-wrap{
  padding:12px 10px 8px;
}

/* Top row: brand block (title + optional tagline) + actions */
.wpsmm-header-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
}

/* Brand wrapper so long titles + tagline stay together */
.wpsmm-brand{
  flex:1 1 auto;
  min-width:0;
}

/* Logo / title: keep strong but not screaming, allow wrapping nicely */
.wpsmm-header .site-title{
  display:block;
  margin:0 0 4px;
  max-width:780px;
  font-weight:800;
  font-size:clamp(1.1rem, 1.9vw, 1.55rem);
  line-height:1.25;
  letter-spacing:.02em;
  word-break:break-word;
  text-decoration:none;
  color:var(--wpsmm-accent,#b91c1c);
}

/* Tagline under the big title (optional – only if set in WP) */
.wpsmm-header .site-tagline{
  margin:0;
  max-width:780px;
  font-size:.86rem;
  line-height:1.4;
  color:#4b5563;
}

/* Keep CTA & icons neatly aligned on the right */
.wpsmm-header-actions{
  display:flex;
  align-items:center;
  gap:12px;
  flex-shrink:0;
}


/* CTA: pill, not round blob; strong accent color */
.wpsmm-cta-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:8px 18px;
  border-radius:999px;
  font-weight:600;
  font-size:.9rem;
  white-space:nowrap;
  text-decoration:none;
  background:var(--wpsmm-accent,#e11d48);
  color:#fff !important;
  box-shadow:0 8px 18px rgba(225,29,72,.30);
}
.wpsmm-cta-btn:hover,
.wpsmm-cta-btn:focus{
  transform:translateY(-1px);
  box-shadow:0 10px 24px rgba(225,29,72,.40);
}

/* Search field + button colours */
.wpsmm-search-field{
  border:1px solid rgba(148,163,184,.9);
  background:#ffffff;
}
.wpsmm-search-field::placeholder{
  color:#9ca3af;
}

/* Make the Search button match the CTA colour */
.wpsmm-search-submit{
  border:1px solid var(--wpsmm-accent,#e11d48);
  background:var(--wpsmm-accent,#e11d48);
  color:#ffffff;
  font-weight:600;
  box-shadow:0 6px 14px rgba(225,29,72,.28);
}
.wpsmm-search-submit:hover,
.wpsmm-search-submit:focus{
  box-shadow:0 8px 18px rgba(225,29,72,.34);
}

/* --- Footer layout & styling --- */

.wpsmm-footer{
  background:#f9fafb;
  border-top:1px solid rgba(148,163,184,.40);
  margin-top:30px;
  font-size:.9rem;
  color:#0f172a;
}

.wpsmm-footer .wpsmm-wrap{
  padding:24px 10px 18px;
}

/* 4 columns where the first (About) is wider */
.wpsmm-footer-grid{
  display:grid;
  column-gap:32px;
  row-gap:18px;
  grid-template-columns:
    minmax(0,2.2fr)
    minmax(0,1.4fr)
    minmax(0,1.5fr)
    minmax(0,1.1fr);
  align-items:flex-start;
}

.wpsmm-footer-col h4{
  margin:0 0 10px;
  font-size:.98rem;
  font-weight:700;
  color:var(--wpsmm-accent,#111827);
}
.wpsmm-footer-col p{
  margin:0 0 8px;
  line-height:1.5;
}

.wpsmm-footer-links{
  list-style:none;
  margin:0;
  padding:0;
}
.wpsmm-footer-links li{
  margin-bottom:4px;
}
.wpsmm-footer-links a{
  text-decoration:none;
}
.wpsmm-footer-links a:hover{
  text-decoration:underline;
}

/* Bottom copyright bar alignment */
.wpsmm-footer-bottom{
  border-top:1px solid rgba(148,163,184,.40);
  margin-top:18px;
  padding-top:10px;
  display:flex;
  flex-wrap:wrap;
  gap:6px 16px;
  align-items:center;
  justify-content:space-between;
}
.wpsmm-footer-bottom small{
  opacity:.85;
}

/* Responsive footer columns */
@media (max-width:980px){
  .wpsmm-footer-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}
@media (max-width:640px){
  .wpsmm-footer-grid{
    grid-template-columns:1fr;
  }
}

/* --- Hide the old in-content "Magazine layout by WPS Plugin Suite" credit line.
   We re-print a cleaner credit in the footer bar instead. --- */
.wpsmm-credit,
.wps-magazine-credit,
body a[href*="wps-plugin-suite"],
body a[href*="wps-magazine-mode"]{
 .display:none !important;
}

/* =========================================================
   Shell header/footer hard overrides
   ========================================================= */

/* When the WPS shell is active, hide only the main theme header/footer
   containers – do NOT hide post entry headers/footers inside the content. */
.wpsmm-shell-active .site-header,
.wpsmm-shell-active #masthead,
.wpsmm-shell-active header.site-header,
.wpsmm-shell-active header#masthead,
.wpsmm-shell-active .site-footer,
.wpsmm-shell-active #colophon,
.wpsmm-shell-active footer.site-footer,
.wpsmm-shell-active footer#colophon,
.wpsmm-shell-active .site-info,
.wpsmm-shell-active .footer-credits,
.wpsmm-shell-active .credits {
  display: none !important;
}

/* Hide any old standalone WPS credit block printed by legacy layouts.
   (Your new footer credit in .wpsmm-footer-bottom will still show.) */
.wpsmm-shell-active .wpsmm-credit,
.wpsmm-shell-active .wps-magazine-credit {
  display: none !important;
}

/* Ensure single post titles + meta (entry header/footer) stay visible
   when the WPS shell is active on all devices. */
body.wpsmm-shell-active .entry-header,
body.wpsmm-shell-active header.entry-header,
body.wpsmm-shell-active .entry-footer,
body.wpsmm-shell-active footer.entry-footer {
  display:block !important;
}

/* =========================================================
   Mobile grid safety
   Force all magazine grids and paged-list grids to stack
   one-by-one on phones and tablets so cards stay readable.
   ========================================================= */
@media (max-width: 980px){
  /* Any 3/4/6-column magazine grids */
  .wpsmm-grid-3,
  .wpsmm-grid-4,
  .wpsmm-grid-6,
  /* Paged list "grid view" wrapper */
  .wpsmm-paged-list.wpsmm-view-grid .wpsmm-list-wrap {
    grid-template-columns: 1fr !important;
  }
}

/* =========================================================
   Mobile thumb tap safety – home page & magazine grids
   Prevent accidental opens when user is trying to scroll
   ========================================================= */
@media (max-width: 768px){

  /* 1) Any thumbnail that is itself a link */
  a.wpsmm-thumb{
    pointer-events: none !important;
    touch-action: pan-y;
  }

  /* 2) Thumbnails where the image/link sits inside .wpsmm-thumb */
  .wpsmm-thumb a{
    pointer-events: none !important;
    touch-action: pan-y;
  }

  /* 3) Hero mosaic lead + right-rail thumbnails (home top section) */
  .wpsmm-hero-lead .wpsmm-thumb,
  .wpsmm-hero-rail .wpsmm-hero-item .wpsmm-thumb{
    pointer-events: none !important;
    touch-action: pan-y;
  }
}

/* =========================================================
   NEW: Category Grid section (category_grid)
   ========================================================= */
.wpsmm-category-grid .wpsmm-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:16px;
  min-width:0;
}
@media (max-width:980px){
  .wpsmm-category-grid .wpsmm-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}
@media (max-width:640px){
  .wpsmm-category-grid .wpsmm-grid{
    grid-template-columns:1fr;
  }
}

/* Category cards inherit .wpsmm-card, but we make them more "hub-like" */
.wpsmm-category-grid .wpsmm-card{
  display:flex;
  flex-direction:column;
  height:100%;
  padding:12px 12px 14px;
}
.wpsmm-category-grid .wpsmm-title{
  margin:0 0 6px;
  font-size:1rem;
  line-height:1.35;
}
.wpsmm-category-grid .wpsmm-meta{
  margin:0 0 8px;
  font-size:.82rem;
  opacity:.8;
}

/* Optional list of inner links under each category */
.wpsmm-category-grid .wpsmm-cat-links{
  margin:0;
  padding:0;
  list-style:none;
}
.wpsmm-category-grid .wpsmm-cat-links li{
  margin:0 0 4px;
}
.wpsmm-category-grid .wpsmm-cat-links a{
  text-decoration:none;
  font-size:.9rem;
}
.wpsmm-category-grid .wpsmm-cat-links a:hover{
  text-decoration:underline;
}

/* =========================================================
   NEW: Newsletter CTA section (newsletter_cta)
   ========================================================= */
.wpsmm-newsletter-cta .wpsmm-newsletter-card{
  position:relative;
  overflow:hidden;
  border-radius:18px;
  border:1px solid rgba(248,250,252,.9);
  background:linear-gradient(135deg,#f9fafb,#fee2e2);
  padding:18px 16px;
  box-shadow:0 12px 30px rgba(15,23,42,.10);
}

.wpsmm-newsletter-cta .wpsmm-newsletter-title{
  margin:0 0 6px;
  font-size:1.15rem;
  font-weight:700;
  color:var(--wpsmm-accent,#b91c1c);
}

.wpsmm-newsletter-cta .wpsmm-newsletter-text{
  margin:0 0 10px;
  font-size:.92rem;
  color:#374151;
}

.wpsmm-newsletter-cta .wpsmm-newsletter-form{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:4px 0 4px;
}

.wpsmm-newsletter-cta .wpsmm-newsletter-form input[type="email"],
.wpsmm-newsletter-cta .wpsmm-newsletter-form input[type="text"]{
  flex:1 1 220px;
  min-width:0;
  padding:7px 10px;
  border-radius:999px;
  border:1px solid rgba(148,163,184,.9);
  font-size:.9rem;
}

.wpsmm-newsletter-cta .wpsmm-newsletter-form button{
  flex:0 0 auto;
  padding:7px 14px;
  border-radius:999px;
  border:1px solid var(--wpsmm-accent,#e11d48);
  background:var(--wpsmm-accent,#e11d48);
  color:#fff;
  font-weight:600;
  font-size:.9rem;
  cursor:pointer;
  box-shadow:0 6px 14px rgba(225,29,72,.3);
}
.wpsmm-newsletter-cta .wpsmm-newsletter-form button:hover,
.wpsmm-newsletter-cta .wpsmm-newsletter-form button:focus{
  box-shadow:0 8px 18px rgba(225,29,72,.38);
}

.wpsmm-newsletter-cta .wpsmm-newsletter-note{
  margin:8px 0 0;
  font-size:.78rem;
  color:#6b7280;
}

@media (max-width:640px){
  .wpsmm-newsletter-cta .wpsmm-newsletter-card{
    padding:14px 12px;
  }
  .wpsmm-newsletter-cta .wpsmm-newsletter-form{
    flex-direction:column;
    align-items:stretch;
  }
  .wpsmm-newsletter-cta .wpsmm-newsletter-form button{
    width:100%;
    justify-content:center;
  }
}

/* =========================================================
   NEW: Term Tiles section (term_tiles)
   ========================================================= */
.wpsmm-term-tiles .wpsmm-tiles{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

/* Individual term tile – pill tag style */
.wpsmm-term-tile{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:6px 12px;
  border-radius:999px;
  border:1px solid rgba(148,163,184,.6);
  background:#ffffff;
  font-size:.86rem;
  line-height:1.2;
  text-decoration:none;
  color:var(--wpsmm-accent,#0f172a);
  white-space:nowrap;
}
.wpsmm-term-tile:hover,
.wpsmm-term-tile:focus{
  background:var(--wpsmm-accent,#e11d48);
  border-color:transparent;
  color:#ffffff;
  box-shadow:0 4px 10px rgba(225,29,72,.3);
}

@media (max-width:640px){
  .wpsmm-term-tiles .wpsmm-tiles{
    gap:6px;
  }
}
