/*
Theme Name: MES Times Pro
Theme URI: https://myelectricsparks.com/
Author: The MES Times
Description: A fast, Google-friendly news theme built from scratch for The MES Times.
Version: 1.0.38
License: GNU General Public License v2 or later
Text Domain: mes-times-pro
Tags: news, blog, custom-logo, threaded-comments, translation-ready
*/

/* ============================================================
   MES Times Pro - main stylesheet
   Mobile-first, single file. Original code written for
   The MES Times (myelectricsparks.com).
   Breakpoints: base (mobile), 576px, 768px, 992px, 1200px.
   ============================================================ */

/* ---------- 1. Design tokens ---------- */
:root {
  --mtp-primary: #249991;      /* links, buttons, active (customizer may override) */
  --mtp-teal-dark: #155b56;    /* primary hover */
  --mtp-red: #dc3545;          /* section left bars, NEW badge */
  --mtp-head: #242a3a;         /* headlines */
  --mtp-body: #313131;         /* article body text */
  --mtp-excerpt: #494d56;      /* card excerpts */
  --mtp-muted: #969dab;        /* muted meta text */
  --mtp-navy: #0a1a33;         /* dark navy */
  --mtp-footer: #292d30;       /* footer background */
  --mtp-topbar-link: #adb3b9;  /* top-bar links */
  --mtp-nav: #4e5c64;          /* primary nav links */
  --mtp-white: #fff;
  --mtp-line: #eee;            /* light dividers */
  --mtp-box: #f5f5f5;          /* light grey boxes */
}

/* ---------- 2. Reset and base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: 'Lato', Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--mtp-body);
  background: var(--mtp-white);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Lato', Arial, sans-serif;
  color: var(--mtp-head);
  font-weight: 900;
  line-height: 1.25;
  margin: 0 0 0.6em;
}

p { margin: 0 0 1em; }

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

a:hover, a:focus { color: var(--mtp-teal-dark); }

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol { margin: 0; padding: 0; }

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

body.drawer-open { overflow: hidden; }

/* ---------- 3. Utilities ---------- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 10px;
  z-index: 1000;
  background: var(--mtp-navy);
  color: var(--mtp-white);
  padding: 10px 16px;
  border-radius: 4px;
  font-weight: 700;
}

.skip-link:focus { top: 10px; }

.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- 4. Topbar (white thin utility bar, front page only) ---------- */
.topbar {
  background: var(--mtp-white);
  border-bottom: 1px solid var(--mtp-line);
  font-size: 14px;
}

.topbar__inner {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  min-height: 36px;
}

.topbar__menu {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  margin: 0;
  padding: 0;
}

.topbar__menu a {
  color: var(--mtp-topbar-link);
  text-transform: uppercase;
  font-size: 14px;
  letter-spacing: 0.4px;
}

.topbar__menu a:hover { color: var(--mtp-primary); }

/* ---------- 5. Mobile navbar (base) ---------- */
.mobile-navbar {
  background: var(--mtp-navy);
  color: var(--mtp-white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 15px;
  position: sticky;
  top: 0;
  z-index: 120;
}

.mobile-navbar .nav-toggle {
  background: transparent;
  border: 0;
  color: var(--mtp-white);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
}

.mobile-navbar .site-logo img {
  max-height: 34px;
}

.mobile-navbar__search {
  color: var(--mtp-white);
  padding: 4px;
  line-height: 1;
  background: none;
  border: 0;
  cursor: pointer;
}

.mobile-navbar__search:hover { color: var(--mtp-white); opacity: 0.85; }

/* ---------- 6. Drawer (mobile slide-in menu) ---------- */
.drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 84%;
  max-width: 340px;
  background: #1a1a1a;
  color: var(--mtp-white);
  z-index: 200;
  transform: translateX(-100%);
  transition: transform 0.28s ease;
  overflow-y: auto;
  padding: 20px;
}

.drawer--open { transform: none; }

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 26, 51, 0.55);
  z-index: 190;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s ease, visibility 0.28s;
}

.drawer-backdrop.is-visible {
  opacity: 1;
  visibility: visible;
}

.drawer__close {
  background: transparent;
  border: 0;
  color: var(--mtp-white);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  float: right;
  padding: 0 0 10px 10px;
}

.drawer__search { clear: both; margin-bottom: 18px; }

.drawer__search .search-form { display: flex; }

.drawer__search input[type="search"] {
  flex: 1;
  border: 0;
  padding: 10px 12px;
  border-radius: 4px 0 0 4px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--mtp-white);
}

.drawer__search input[type="search"]::placeholder { color: #9aa5b1; }

.drawer__search .search-submit {
  border: 0;
  background: var(--mtp-primary);
  color: var(--mtp-white);
  padding: 10px 16px;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
  font-weight: 700;
}

.drawer__menu { list-style: none; }

.drawer__menu a {
  display: block;
  color: var(--mtp-white);
  font-size: 20px;
  font-weight: 700;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.drawer__menu a:hover { color: var(--mtp-primary); }

/* ---------- 7. Site header (desktop) ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  transition: transform 0.3s ease;
}

.site-header--hidden { transform: translateY(-100%); }

/* Homepage mode: full-width light-grey navbar. */
.navbar-main {
  background: #f5f6f7;
}

.navbar-main__inner {
  display: flex;
  align-items: stretch;
  gap: 0;
  padding-top: 0;
  padding-bottom: 0;
}

/* Teal logo block, full navbar height. */
.logo-block {
  background: var(--mtp-primary);
  display: flex;
  align-items: center;
  padding: 12px 26px;
  flex-shrink: 0;
}

.logo-block img {
  height: 40px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
}

/* Desktop header parts are hidden on mobile; mobile navbar shows instead. */
.primary-nav,
.nav-tools { display: none; }

.primary-nav { padding: 0 26px; min-width: 0; flex: 1 1 auto; }

.primary-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 26px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  max-width: 100%;
}

.primary-nav ul::-webkit-scrollbar { display: none; }

.primary-nav a {
  color: var(--mtp-nav);
  font-size: 19.2px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

.primary-nav a:hover,
.primary-nav .current-menu-item > a { color: var(--mtp-primary); }

/* Dropdown submenus: hidden until hover/focus. */
.primary-nav li { position: relative; }

.primary-nav .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: var(--mtp-white);
  border: 1px solid var(--mtp-line);
  border-top: 3px solid var(--mtp-primary);
  box-shadow: 0 12px 28px rgba(10, 26, 51, 0.14);
  list-style: none;
  padding: 8px 0;
  z-index: 200;
}

.primary-nav li:hover > .sub-menu,
.primary-nav li:focus-within > .sub-menu { display: block; }

.primary-nav .sub-menu a {
  display: block;
  padding: 10px 20px;
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
}

.primary-nav .sub-menu a:hover { background: #f5f6f7; }

.nav-tools {
  align-items: stretch;
  margin-left: auto;
}

.search-toggle {
  background: #e9ebed;
  border: 0;
  cursor: pointer;
  color: var(--mtp-nav);
  font-size: 20px;
  padding: 0 22px;
  align-self: stretch;
  display: flex;
  align-items: center;
}

.search-toggle:hover { color: var(--mtp-primary); }

.search-expand {
  display: none;
  background: var(--mtp-white);
  border-bottom: 1px solid var(--mtp-line);
  padding: 14px 0;
}

.search-expand.is-open { display: block; }

.search-expand .search-form {
  display: flex;
  max-width: 640px;
  margin: 0 auto;
}

.search-expand input[type="search"] {
  flex: 1;
  border: 1px solid #ddd;
  border-right: 0;
  padding: 10px 14px;
  border-radius: 4px 0 0 4px;
}

.search-expand .search-submit {
  background: var(--mtp-primary);
  color: var(--mtp-white);
  border: 0;
  padding: 10px 22px;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
  font-weight: 700;
  text-transform: uppercase;
}

.search-expand .search-submit:hover { background: var(--mtp-teal-dark); }

/* ---------- 8. Navy header bar (category / single mode) ---------- */
.navybar {
  background: var(--mtp-navy);
  color: var(--mtp-white);
}

.navybar__inner {
  display: flex;
  align-items: center;
  gap: 26px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.navybar__logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.navybar__lockup {
  height: 38px;
  width: auto;
  max-width: 320px;
  object-fit: contain;
}

.navybar__logo img {
  height: 34px;
  width: auto;
  max-width: 240px;
  object-fit: contain;
  display: block;
}

.navybar__home {
  color: var(--mtp-white);
  font-size: 18px;
  flex-shrink: 0;
  line-height: 1;
  display: flex;
  align-items: center;
}

.navybar__home:hover { color: var(--mtp-primary); }

.navybar__nav {
  display: flex;
  align-items: center;
  gap: 24px;
  white-space: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}

.navybar__nav::-webkit-scrollbar { display: none; }

.navybar__nav a {
  color: #aeb6c2;
  font-size: 17px;
  font-weight: 700;
  text-transform: uppercase;
  flex-shrink: 0;
}

.navybar__nav a:hover,
.navybar__nav a[aria-current="page"] { color: var(--mtp-white); }

.navybar__search {
  color: var(--mtp-white);
  margin-left: auto;
  flex-shrink: 0;
  line-height: 1;
  display: flex;
  align-items: center;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.navybar__search:hover { color: var(--mtp-primary); }

/* Red NEW badge */
.badge-new {
  display: inline-block;
  background: var(--mtp-red);
  color: var(--mtp-white);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 999px;
  margin-left: 6px;
  vertical-align: middle;
}

/* ---------- 9. Hero ---------- */
.hero { padding-top: 20px; padding-bottom: 36px; }

.topnews-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.topnews-head__bar {
  width: 4px;
  height: 22px;
  background: #e02e2e;
  flex-shrink: 0;
}
.topnews-head--light .topnews-head__title { color: #fff; }

.section--dark { background: #0a1a33; }

/* Text headlines: 3 columns x 4 rows */
.latest-textgrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px 32px;
  margin-bottom: 36px;
}
@media (min-width: 768px) {
  .latest-textgrid { grid-template-columns: repeat(3, 1fr); }
}
.titem { border-bottom: 1px solid rgba(255,255,255,0.12); padding-bottom: 14px; }
.titem a { text-decoration: none; display: block; }
.titem__time {
  display: block;
  font-size: 11px;
  color: #8a94a6;
  margin-bottom: 5px;
}
.titem__title {
  font-family: 'Lato', Arial, sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
  color: #fff;
  margin: 0;
}
.titem a:hover .titem__title { color: var(--mtp-primary); }

/* Image cards row: 4 in a line */
.latest-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px 20px;
}
@media (min-width: 768px) {
  .latest-grid--cards { grid-template-columns: repeat(4, 1fr); }
}

.lcard a { display: block; text-decoration: none; }
.lcard__img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  margin-bottom: 10px;
  background: #12294d;
}
.lcard__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.lcard__time {
  display: block;
  font-size: 12px;
  color: #8a94a6;
  margin-bottom: 6px;
}
.lcard__title {
  font-family: 'Lato', Arial, sans-serif;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.4;
  color: #fff;
  margin: 0;
}
.lcard a:hover .lcard__title { color: var(--mtp-primary); }

.latest-more { text-align: center; margin-top: 28px; }
.btn-viewall {
  display: inline-block;
  background: #e02e2e;
  color: #fff;
  font-family: 'Lato', Arial, sans-serif;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 26px;
  border-radius: 3px;
  text-decoration: none;
}
.btn-viewall:hover { background: #c42727; color: #fff; }

.topnews-head__title {
  font-family: 'Lato', Arial, sans-serif;
  font-size: 20px;
  font-weight: 900;
  color: #111;
  margin: 0;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.hero-tile--lead { grid-column: span 2; }
.hero-tile { min-height: 150px; }
.hero-tile--lead { min-height: 240px; }
.hero-tile__title { font-size: 13px; padding: 10px 12px; }
.hero-tile--lead .hero-tile__title { font-size: 18px; padding: 14px 16px; }

.hero-tile {
  position: relative;
  min-height: 220px;
  border-radius: 0;
  overflow: hidden;
  display: block;
  background: var(--mtp-navy);
}

.hero-tile__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-tile__img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-tile__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 26, 51, 0.92) 0%, rgba(10, 26, 51, 0.45) 45%, rgba(10, 26, 51, 0) 75%);
}

.hero-tile__body {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 18px;
}

.hero-tile__title {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 14px 16px;
  margin: 0;
  color: #fff;
  font-family: 'Lato', Arial, sans-serif;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
}

.hero-tile--lead .hero-tile__title {
  font-size: 22px;
  padding: 18px 20px;
}

.hero-tile__meta { display: none; }

.hero-tile:hover .hero-tile__title { color: var(--mtp-primary); }

/* ---------- 10. Sections, news list, category blocks, cards ---------- */
.section { padding: 36px 0; }

.section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.section__title {
  font-size: 32px;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--mtp-head);
  margin: 0;
}

.section__title--bar {
  border-left: 6px solid var(--mtp-primary);
  padding-left: 12px;
}

.section__title--teal { color: var(--mtp-primary); }

/* Light-grey tinted panel (homepage Latest News). */
.section--tint {
  background: #f5f6f7;
}

.section--tint .news-time { color: var(--mtp-muted); }

.section--dark {
  background: var(--mtp-navy);
  color: var(--mtp-white);
}

.section--dark .section__title,
.section--dark .section__title--bar { color: var(--mtp-white); }

.section--dark .catblock__title { color: var(--mtp-white); }

.section--dark .news-list li { border-bottom-color: rgba(255, 255, 255, 0.14); }

.section--dark .news-time { color: var(--mtp-muted); }

.section--dark .news-link { color: var(--mtp-white); }

.section--dark .news-link:hover { color: var(--mtp-primary); }

.btn-more {
  display: inline-block;
  background: var(--mtp-primary);
  color: var(--mtp-white);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 15px;
  padding: 10px 22px;
  border-radius: 4px;
  white-space: nowrap;
}

.btn-more:hover {
  background: var(--mtp-teal-dark);
  color: var(--mtp-white);
}

/* Latest news list */
.news-list { list-style: none; }

.news-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--mtp-line);
}

.news-list li:last-child { border-bottom: 0; }

.news-time {
  display: block;
  color: var(--mtp-primary);
  font-size: 14.4px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.4px;
  margin-bottom: 2px;
}

.news-link {
  font-family: 'Lato', Arial, sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--mtp-head);
  line-height: 1.35;
}

.news-link:hover { color: var(--mtp-primary); }

/* Two-column timestamped list (dark Latest News panels). */
@media (min-width: 768px) {
  .news-list--cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 44px;
  }
}

/* Category blocks with red left bar and red pill */
.catblock { margin-bottom: 10px; }

.catblock__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.catblock__title {
  font-size: 28px;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--mtp-head);
  border-left: 6px solid var(--mtp-red);
  padding-left: 12px;
  margin: 0;
}

.pill-link {
  display: inline-block;
  background: var(--mtp-red);
  color: var(--mtp-white);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 8px 20px;
  border-radius: 999px;
  white-space: nowrap;
}

.pill-link:hover {
  background: #b02a37;
  color: var(--mtp-white);
}

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.pcard {
  background: var(--mtp-white);
  border-radius: 0 0 4px 4px;
  overflow: hidden;
}

.pcard__img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.pcard__body { padding: 14px 2px 4px; }

.pcard__meta {
  font-size: 14.4px;
  text-transform: uppercase;
  color: var(--mtp-muted);
  letter-spacing: 0.4px;
  margin-bottom: 6px;
}

.pcard__title {
  font-size: 16px;
  font-weight: 900;
  margin: 0 0 8px;
  line-height: 1.4;
}

.pcard__title a { color: var(--mtp-head); }
.pcard__title a:hover { color: var(--mtp-primary); }

.pcard__excerpt {
  font-size: 15px;
  color: var(--mtp-excerpt);
  margin: 0;
}

/* ---------- 11. Layout, content area, widgets ---------- */
.layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  padding-top: 24px;
  padding-bottom: 24px;
}

.content-area { min-width: 0; }

.widget-area { min-width: 0; }

.widget { margin-bottom: 30px; }

.widget__title {
  background: var(--mtp-navy);
  color: var(--mtp-white);
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 10px 14px;
  margin: 0 0 16px;
}

.widget-list { list-style: none; }

.widget-list li { margin-bottom: 14px; }

.widget-list li a {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  text-decoration: none;
}

.widget-list__title {
  order: -1;
  flex: 1;
  min-width: 0;
  font-size: 15px;
  font-weight: 700;
  color: #242a3a;
  line-height: 1.4;
}

.widget-list li a:hover .widget-list__title { color: var(--mtp-primary); }

.widget-list__thumb {
  width: 84px;
  height: 64px;
  flex-shrink: 0;
}

.widget-list__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 2px;
}

/* Now Trending: vertical cards (thumbnail on top, title below), like the reference */
.widget-list--cards li { margin-bottom: 20px; }
.widget-list--cards li a { display: block; }
.widget-list--cards .widget-list__thumb {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  margin-bottom: 10px;
}
.widget-list--cards .widget-list__thumb img { border-radius: 3px; }
.widget-list--cards .widget-list__title {
  font-size: 16px;
  line-height: 1.45;
}

.widget p, .widget ul:not(.widget-list) { font-size: 15px; }

/* ---------- 12. Single article ---------- */
/* Headline spans the full container so titles sit on one line, like the reference */
.article__head { max-width: none; }

.article { max-width: 735px; }

.article__title {
  font-family: 'Lato', Arial, sans-serif;
  font-size: 40px;
  font-weight: 900;
  color: #242a3a;
  line-height: 1.2;
  margin: 0 0 8px;
}

.byline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-family: 'Lato', Arial, sans-serif;
  font-size: 19px;
  color: #6c707c;
  margin: 15px 0 20px;
}

.byline__meta { display: flex; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 4px 8px; }
.byline__line { display: inline; }
.byline__line + .byline__line::before {
  content: "|";
  margin: 0 8px 0 0;
  color: #9aa0ab;
}

.byline__author { color: var(--mtp-primary); font-weight: 700; }

.byline__sep { margin: 0 4px; }

.byline__share { display: flex; align-items: center; gap: 14px; margin-left: auto; }

.share-ico { display: inline-flex; line-height: 0; background: transparent; }
.share-ico svg { width: 19px; height: 19px; display: block; }
.share-ico.share-btn--facebook { color: #1877f2; }
.share-ico.share-btn--x { color: #1da1f2; }
.share-ico.share-btn--whatsapp { color: #25d366; }
.share-ico.share-btn--linkedin { color: #0077b5; }
.share-ico:hover { opacity: 0.8; }

/* Small centered "Advertisement" label, like the reference */
.ad-label {
  font-size: 11px;
  color: #969dab;
  text-align: center;
  letter-spacing: 0.02em;
  margin-bottom: 12px;
}

.article__image { margin: 0 0 40px; }

.article__image img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.article__image figcaption {
  font-size: 14px;
  color: var(--mtp-muted);
  padding-top: 8px;
}

.article__content {
  font-family: 'Andada', Georgia, serif;
  font-size: 18px;
  line-height: 1.5;
  color: #313131;
  min-width: 0;
}

.article__content p { margin: 0 0 1rem; }

/* Mobile article: match reference mobile typography (desktop untouched) */
@media (max-width: 767px) {
  html, body { overflow-x: clip; }
  .byline__meta { flex-direction: column; align-items: flex-start; gap: 4px; }
  .byline__line { display: block; }
  .byline__line + .byline__line::before { content: none; }
  .article__image {
    margin: 0 -15px 24px;
  }
  .article__image img { aspect-ratio: 16 / 10; }
  .article__title {
    font-size: 28px;
    line-height: 1.25;
    margin-bottom: 10px;
  }
  .byline {
    font-size: 14px;
    margin: 12px 0 16px;
    gap: 6px 12px;
  }
  .share-ico svg { width: 18px; height: 18px; }
  .byline__share { gap: 12px; }
  .article__content { font-size: 17px; line-height: 1.6; }
  .article__content h2 { font-size: 22px; }
  .article__content h3 { font-size: 20px; }
  .article__content h4 { font-size: 18px; }
}

/* Hide the auto-inserted table-of-contents box (Foxiz) on all articles */
.ruby-table-contents.rbtoc { display: none !important; }

/* Hide Archives / Categories / Quick Links widgets from the sidebar */
#secondary .widget_archive,
#secondary .widget_categories,
#secondary .widget_nav_menu { display: none !important; }

/* Rail + content side-by-side on desktop */
.article__body-row {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.article__content h2,
.article__content h3,
.article__content h4 {
  font-family: 'Lato', Arial, sans-serif;
  color: var(--mtp-head);
  font-weight: 900;
}

.article__content h2 { font-size: 28px; margin: 0 0 16px; }
.article__content h3 { font-size: 28px; }
.article__content h4 { font-size: 24px; }

.article__content a { color: var(--mtp-primary); }
.article__content a:hover { color: var(--mtp-teal-dark); }

.article__content img {
  border-radius: 4px;
  margin: 1em 0;
}

.also-read {
  border: 1px solid var(--mtp-line);
  border-radius: 4px;
  padding: 16px 18px;
  margin: 1.6em 0;
  background: var(--mtp-white);
}

.also-read__label {
  display: inline-block;
  color: var(--mtp-red);
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 6px;
}

.also-read a {
  color: var(--mtp-primary);
  font-weight: 700;
  font-size: 17px;
  line-height: 1.45;
}

.also-read a:hover { color: var(--mtp-teal-dark); }

.stay-connected {
  background: var(--mtp-box);
  border-radius: 4px;
  padding: 20px;
  margin: 1.6em 0;
}

.stay-connected__title {
  font-size: 18px;
  font-weight: 900;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.stay-connected .pill-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.stay-connected .pill-buttons a {
  background: var(--mtp-primary);
  color: var(--mtp-white);
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
}

.stay-connected .pill-buttons a:hover { background: var(--mtp-teal-dark); }

.author-box {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: #f5f7fa;
  font-family: 'Lato', Arial, sans-serif;
  border-radius: 4px;
  padding: 20px;
  margin: 1.6em 0;
}

.author-box p { font-size: 14px; line-height: 1.5; color: #3d465e; }

.author-box .avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.author-box .author-name {
  font-size: 18px;
  font-weight: 900;
  margin-bottom: 6px;
}

.author-box .author-bio {
  font-size: 15px;
  color: var(--mtp-excerpt);
  margin: 0;
}

.share-bottom { margin: 1.6em 0; }

/* ---------- 13. Share rail (desktop sticky) ---------- */
.share-rail { display: none; }

.share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 4px;
  color: var(--mtp-white);
  border: 0;
  cursor: pointer;
}

.share-btn svg { width: 20px; height: 20px; display: block; }

.share-btn.share-btn--facebook { background: #1877f2; }
.share-btn.share-btn--x { background: #1da1f2; }
.share-btn.share-btn--whatsapp { background: #25d366; }
.share-btn.share-btn--linkedin { background: #0077b5; }

.share-btn:hover { opacity: 0.85; }

/* Left rail: light boxes, grey icons; brand background + white icon on hover */
.share-rail .share-btn {
  background: #f8f9fa;
  color: #83939d;
  width: 100%;
  border-radius: 0;
  margin-bottom: 9px;
}
.share-rail .share-btn svg { width: 25px; height: 25px; }
.share-rail .share-btn--facebook:hover { background: #4c76be; color: #fff; transform: scale(1.1); }
.share-rail .share-btn--x:hover { background: #00b8ec; color: #fff; transform: scale(1.1); }
.share-rail .share-btn--whatsapp:hover { background: #29b200; color: #fff; transform: scale(1.1); }
.share-rail .share-btn--linkedin:hover { background: #0077b5; color: #fff; transform: scale(1.1); }

/* ---------- 14. Breadcrumb, pagination, archive, 404, search ---------- */
.breadcrumb {
  font-size: 14px;
  color: var(--mtp-muted);
  margin: 16px 0;
}

.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; }

.breadcrumb li + li::before {
  content: "/";
  margin: 0 8px;
  color: #c9ced4;
}

.breadcrumb a { color: var(--mtp-primary); }

.archive-head {
  border-bottom: 2px solid var(--mtp-navy);
  padding-bottom: 12px;
  margin-bottom: 20px;
}

.archive-head h1 {
  font-size: 32px;
  font-weight: 900;
  text-transform: uppercase;
  margin: 0 0 6px;
}

.archive-head p { color: var(--mtp-muted); margin: 0; }

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 30px 0;
  justify-content: center;
}

.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  color: var(--mtp-head);
  font-weight: 700;
}

.pagination .page-numbers:hover { border-color: var(--mtp-primary); color: var(--mtp-primary); }

.pagination .page-numbers.current {
  background: var(--mtp-primary);
  border-color: var(--mtp-primary);
  color: var(--mtp-white);
}

.error-404 {
  text-align: center;
  padding: 60px 0;
}

.error-404 h1 {
  font-size: 96px;
  font-weight: 900;
  color: var(--mtp-primary);
  margin: 0;
  line-height: 1;
}

.error-404 h2 { font-size: 28px; text-transform: uppercase; }

.error-404 p { color: var(--mtp-muted); }

.search-form { display: flex; }

.search-form input[type="search"] {
  flex: 1;
  border: 1px solid #ddd;
  border-right: 0;
  padding: 10px 14px;
  border-radius: 4px 0 0 4px;
}

.search-form .search-submit {
  background: var(--mtp-primary);
  color: var(--mtp-white);
  border: 0;
  padding: 10px 20px;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
  font-weight: 700;
}

.search-form .search-submit:hover { background: var(--mtp-teal-dark); }

/* ---------- 15. Footer ---------- */
.site-footer {
  background: var(--mtp-footer);
  color: #d7dbe0;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  padding-top: 44px;
  padding-bottom: 34px;
}

.footer__about p { font-size: 15px; }

.footer__about .site-logo img { max-height: 44px; margin-bottom: 14px; }

.site-footer h4 {
  color: var(--mtp-white);
  font-size: 17px;
  font-weight: 900;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.site-footer ul { list-style: none; }

.site-footer li { margin-bottom: 8px; }

.site-footer a { color: #d7dbe0; font-size: 15px; }

.site-footer a:hover { color: var(--mtp-primary); }

.footer__social { display: flex; gap: 10px; }

.footer__social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: var(--mtp-white);
  font-size: 15px;
  font-weight: 700;
}

.footer__social a:hover { background: var(--mtp-primary); color: var(--mtp-white); }

.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 16px;
  padding-bottom: 16px;
}

.footer__bottom .container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  text-align: center;
  font-size: 14px;
  color: #9aa1a9;
}

.footer__bottom ul {
  list-style: none;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: center;
}

/* Alerts FAB: fixed bottom-left green circle */
.alerts-fab {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 150;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25d366;
  color: var(--mtp-white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.alerts-fab:hover { background: #1fb857; color: var(--mtp-white); }

/* ---------- 16. Ad slot placeholder ---------- */
.ad-slot {
  border: 1px dashed #c4c9cf;
  border-radius: 4px;
  background: #fafbfc;
  color: var(--mtp-muted);
  text-align: center;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 18px 10px;
  margin: 20px 0;
}

/* ============================================================
   Media queries (min-width, mobile-first)
   ============================================================ */

/* ---------- 576px and up ---------- */
@media (min-width: 576px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }

  .hero__grid { gap: 16px; }
}

/* ---------- 768px and up: desktop header replaces mobile navbar ---------- */
@media (min-width: 768px) {
  .mobile-navbar { display: none; }

  .drawer { display: none; }

  .primary-nav {
    display: flex;
    align-items: center;
  }

  .nav-tools { display: flex; }

  .hero__grid {
    grid-template-columns: 2fr 1fr 1fr;
    grid-auto-rows: minmax(220px, auto);
    gap: 16px;
  }
  .hero-tile { min-height: 220px; }
  .hero-tile--lead { grid-column: auto; min-height: 100%; }
  .hero-tile__title { font-size: 15px; padding: 14px 16px; }
  .hero-tile--lead .hero-tile__title { font-size: 22px; padding: 18px 20px; }

  .hero-tile--lead {
    grid-row: span 2;
    min-height: 100%;
  }

  .hero-tile--lead .hero-tile__body { padding: 26px; }

  .footer__grid { grid-template-columns: repeat(4, 1fr); }

  .footer__bottom .container {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

/* ---------- 992px and up ---------- */
@media (min-width: 992px) {
  .card-grid { grid-template-columns: repeat(4, 1fr); }

  .layout {
    grid-template-columns: 2fr 1fr;
    gap: 30px;
  }

  /* Single article: exact reference proportions (1140 container, 735 + 300) */
  .single .container { max-width: 1140px; }
  .single .layout {
    grid-template-columns: minmax(0, 735px) 300px;
    justify-content: center;
  }

  /* Sticky sidebar: follows the scroll until the article ends */
  .single .widget-area {
    position: sticky;
    top: 24px;
    align-self: start;
  }

  .share-rail {
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 14%;
    align-self: start;
  }

  .article__body-row {
    max-width: 900px;
  }
}

/* ---------- 1200px and up ---------- */
@media (min-width: 1200px) {
  .hero__grid { grid-auto-rows: minmax(240px, auto); }

  .section__title { font-size: 32px; }
}

/* ---------- Max-width tweaks where cleaner ---------- */
@media (max-width: 767px) {
  /* Hide desktop header row on mobile; mobile navbar + drawer take over. */
  .site-header { display: none; }

  .section__title { font-size: 24px; }

  .catblock__title { font-size: 22px; }

  .hero { padding-top: 14px; }

  .hero-tile { min-height: 200px; }

  .topbar__inner { min-height: 30px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
}

/* ---------- Assembly additions: no-image fallbacks, topic cloud, share-rail grid ---------- */
.hero-tile__fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--mtp-navy);
  color: #fff;
  font-size: 72px;
  font-weight: 900;
}
.pcard__fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 9;
  background: var(--mtp-navy);
  color: #fff;
  font-size: 48px;
  font-weight: 900;
}
.topic-cloud {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.topic-cloud a {
  display: inline-block;
  padding: 8px 18px;
  background: #eef1f4;
  border-radius: 999px;
  color: var(--mtp-head);
  font-weight: 700;
  font-size: 15px;
}
.topic-cloud a:hover {
  background: var(--mtp-primary);
  color: #fff;
}
@media (max-width: 1023px) {
  .article__body-row { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Search overlay (opens from the header search icon) ---------- */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(8, 12, 20, 0.82);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.search-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

body.search-open { overflow: hidden; }

.search-overlay__close {
  position: absolute;
  top: 14px;
  right: 24px;
  background: none;
  border: 0;
  color: var(--mtp-white);
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
  padding: 6px 10px;
}

.search-overlay__bar { padding-top: 20vh; }

.search-overlay__bar form {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 1100px;
  margin: 0 auto;
  background: rgba(43, 47, 54, 0.94);
  border-radius: 8px;
  padding: 14px 18px;
}

.search-overlay__bar svg {
  color: #cfd4da;
  flex-shrink: 0;
}

.search-overlay__bar input[type="search"] {
  flex: 1;
  min-width: 0;
  background: none;
  border: 0;
  outline: 0;
  color: var(--mtp-white);
  font-size: 20px;
  font-family: inherit;
}

.search-overlay__bar input[type="search"]::placeholder { color: #9aa0a8; }
