/* =========================================================
   Martin Fusing blog — layout fixes (native look, stable flex)
   ========================================================= */

:root {
  --martin-red: #d10a10;
  --martin-red-dark: #a8080d;
  --martin-ink: #1a1a1a;
  --martin-muted: #5c5c5c;
  --martin-line: #e6e6e6;
  --martin-max: 1140px;
  --martin-header-h: 88px;
}

/* Hide maps everywhere on blog */
.mefi-google-map,
#g-footer iframe,
iframe[src*="google.com/maps"],
iframe[src*="maps.google"] {
  display: none !important;
  height: 0 !important;
  visibility: hidden !important;
}

/* ---------- Header ---------- */
.martin-header,
#g-navigation.martin-header {
  background: #fff !important;
  color: #a8a8a8;
  border-top: 5px solid var(--martin-red);
  position: relative;
  z-index: 100;
  margin: 0 !important;
  padding: 0 !important;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.martin-header-inner {
  width: min(var(--martin-max), calc(100% - 2rem));
  margin: 0 auto;
  min-height: var(--martin-header-h);
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: nowrap;
}

.martin-logo {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  line-height: 0;
  text-decoration: none;
}
.martin-logo img {
  display: block;
  height: 48px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
}

.martin-nav {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0 !important;
}

.martin-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 0.15rem 0.35rem;
}

.martin-nav-item {
  position: relative;
  margin: 0 !important;
  flex: 0 0 auto;
}

.martin-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: #8a8a8a !important;
  text-decoration: none !important;
  padding: 0.5rem 0.45rem !important;
  white-space: nowrap;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.2;
}

.martin-nav-title {
  border-bottom: 1px solid transparent;
  padding-bottom: 3px;
}

.martin-nav-item:hover > .martin-nav-link,
.martin-nav-item.is-active > .martin-nav-link,
.martin-nav-item.active > .martin-nav-link {
  color: var(--martin-red) !important;
}
.martin-nav-item:hover .martin-nav-title,
.martin-nav-item.is-active .martin-nav-title,
.martin-nav-item.active .martin-nav-title {
  border-bottom-color: var(--martin-red);
}

.martin-nav-caret {
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 2px;
  border-left: 3px solid transparent;
  border-right: 3px solid transparent;
  border-top: 4px solid currentColor;
  opacity: 0.7;
}

/* Dropdown */
.martin-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 260px;
  max-width: 360px;
  margin: 0;
  padding: 0.4rem 0;
  list-style: none;
  background: var(--martin-red);
  border: 1px solid #88070a;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
  z-index: 200;
}
.martin-nav-item.has-children:hover > .martin-dropdown,
.martin-nav-item.has-children:focus-within > .martin-dropdown {
  display: block;
}
.martin-dropdown a {
  display: block;
  padding: 0.55rem 1rem;
  color: #fff !important;
  text-decoration: none !important;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.35;
  white-space: normal;
}
.martin-dropdown a:hover {
  background: rgba(0, 0, 0, 0.12);
  color: #fff !important;
}

/* Language flags — always horizontal */
.martin-langs {
  flex: 0 0 auto;
  margin-left: auto;
}
.martin-langs .lang-inline,
.mod-languages .lang-inline {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center;
  gap: 5px;
}
.martin-langs .lang-inline li {
  display: block !important;
  margin: 0 !important;
  float: none !important;
  line-height: 0;
}
.martin-langs .lang-inline a {
  display: block;
  opacity: 0.7;
  line-height: 0;
  border: 1px solid transparent;
  padding: 1px;
}
.martin-langs .lang-inline .lang-active a,
.martin-langs .lang-inline a:hover {
  opacity: 1;
  border-color: #ddd;
}
.martin-langs img {
  display: block;
  width: 18px;
  height: 12px;
  object-fit: cover;
}

/* Burger (mobile only) */
.martin-burger {
  display: none;
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: #333;
  font-size: 1.35rem;
  cursor: pointer;
  padding: 0.35rem;
  line-height: 1;
}

/* ---------- Offcanvas ---------- */
.martin-offcanvas {
  position: fixed;
  z-index: 10050;
  inset: 0 auto 0 0;
  width: min(20rem, 88vw);
  background: #111;
  color: #fff;
  transform: translateX(-105%);
  transition: transform 0.25s ease;
  overflow-y: auto;
}
body.g-offcanvas-open .martin-offcanvas {
  transform: translateX(0);
}
body.g-offcanvas-open::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 10040;
}
.martin-offcanvas-inner {
  padding: 1rem 0.75rem 2rem;
}
.martin-offcanvas-close {
  float: right;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  margin: 0 0.25rem 0.5rem 0;
}
.martin-mobile-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  clear: both;
}
.martin-mobile-nav > li > a {
  display: block;
  padding: 0.7rem 0.75rem;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.martin-mobile-nav > li.is-active > a {
  color: #ffb3b3;
}
.martin-mobile-nav ul {
  list-style: none;
  margin: 0;
  padding: 0 0 0.35rem 0.85rem;
}
.martin-mobile-nav ul a {
  display: block;
  padding: 0.4rem 0.5rem;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 0.9rem;
}

/* ---------- Hero ---------- */
.blog-hero {
  background: #fff;
  color: var(--martin-ink);
  padding: 2rem 0 1.25rem;
  margin: 0;
  width: 100%;
  box-sizing: border-box;
  border-top: 1px solid #eeeeee;
  border-bottom: 1px solid #eeeeee;
}
.blog-hero-inner {
  width: min(var(--martin-max), calc(100% - 2rem));
  margin: 0 auto;
  box-sizing: border-box;
  padding: 0.25rem 0;
}
.blog-hero h1 {
  margin: 0 0 0.55rem;
  font-size: clamp(1.55rem, 2.5vw, 2.15rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--martin-ink) !important;
  text-transform: none;
  word-wrap: break-word;
}
.blog-hero .intro,
.blog-hero .intro p {
  margin: 0;
  opacity: 0.92;
  font-size: 1.02rem;
  color: #444 !important;
  max-width: 48rem;
}
.blog-hero a {
  color: #fff;
  text-decoration: underline;
}

/* ---------- Main content ---------- */
.blog-main,
#g-page-content.blog-main {
  padding: 0 0 3rem !important;
  min-height: 40vh;
  background: #fff;
  margin: 0 !important;
}
.blog-post .blog-main {
  padding-top: 1.75rem !important;
}
.blog-content-panel {
  max-width: 100%;
  margin: 0 !important;
  padding: 0 !important;
}
/* neutralize Gantry content margins inside blog panel */
.blog-main .g-content.blog-content-panel {
  margin: 0 !important;
  padding: 0 !important;
}
.blog-main > .g-container {
  width: min(var(--martin-max), calc(100% - 2rem));
  margin-left: auto;
  margin-right: auto;
}

.blog-list {
  width: 100%;
  margin: 1.75rem 0 0;
  box-sizing: border-box;
}
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.35rem;
  width: 100%;
}
.post-card {
  background: #fff;
  border: 1px solid var(--martin-line);
  border-radius: 3px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: box-shadow 0.2s ease;
}
.post-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}
.post-card-image img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}
.post-card-body {
  padding: 1.05rem 1.15rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}
.post-card-body time {
  color: #777;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.post-card-body h2 {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.35;
  font-weight: 700;
}
.post-card-body h2 a {
  color: var(--martin-ink);
  text-decoration: none;
}
.post-card-body h2 a:hover {
  color: var(--martin-red);
}
.post-card-body p {
  margin: 0;
  color: var(--martin-muted);
  flex: 1;
  font-size: 0.93rem;
}
.read-more {
  font-weight: 700;
  color: var(--martin-red);
  text-transform: uppercase;
  font-size: 0.8rem;
  margin-top: 0.3rem;
  text-decoration: none;
}
.read-more:hover {
  color: var(--martin-red-dark);
  text-decoration: underline;
}
.empty {
  background: #f7f7f8;
  border: 1px dashed #ddd;
  border-radius: 3px;
  padding: 2rem;
  text-align: center;
  color: #777;
}

/* Article */
.post-article {
  width: min(780px, 100%);
  margin: 0 auto;
  padding: 0.25rem 0 2rem;
  box-sizing: border-box;
}
.breadcrumb {
  color: #888;
  font-size: 0.9rem;
  margin: 0 0 1rem;
}
.breadcrumb a {
  color: var(--martin-red);
  text-decoration: none;
}
.breadcrumb a:hover {
  text-decoration: underline;
}
.breadcrumb span {
  margin: 0 0.35rem;
}
.post-header time {
  color: #777;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.post-header h1 {
  margin: 0.4rem 0 0.75rem;
  font-size: clamp(1.55rem, 2.6vw, 2.15rem);
  line-height: 1.25;
  font-weight: 700;
  color: var(--martin-ink);
}
.post-header .lead {
  font-size: 1.1rem;
  color: #555;
  margin: 0;
  line-height: 1.55;
}
.post-hero-image {
  margin: 1.5rem 0;
  border-radius: 3px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}
.post-hero-image img {
  width: 100%;
  height: auto;
  display: block;
}
.post-body {
  font-size: 1.05rem;
  line-height: 1.7;
  color: #2a2a2a;
}
.post-body h2 {
  margin: 1.8rem 0 0.75rem;
  font-size: 1.35rem;
  color: var(--martin-ink);
}
.post-body p {
  margin: 0 0 1rem;
}
.post-body .rich-text {
  margin-bottom: 1rem;
}
.post-body .rich-text p:last-child {
  margin-bottom: 0;
}
.post-body blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--martin-red);
  background: #fafafa;
  color: #333;
}
.post-body blockquote cite {
  display: block;
  margin-top: 0.5rem;
  color: #777;
  font-style: normal;
  font-size: 0.9rem;
}
.body-image {
  margin: 1.5rem 0;
  border-radius: 3px;
  overflow: hidden;
}
.body-image img {
  width: 100%;
  height: auto;
  display: block;
}
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 2rem 0 1rem;
}
.tag {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 999px;
  padding: 0.2rem 0.75rem;
  font-size: 0.85rem;
  color: #666;
}
.back-link {
  margin-top: 2rem;
  font-weight: 700;
}
.back-link a {
  color: var(--martin-red);
  text-decoration: none;
  text-transform: uppercase;
  font-size: 0.9rem;
}
.back-link a:hover {
  text-decoration: underline;
}

/* ---------- Footer (no map) ---------- */
.blog-footer-bottom {
  background: #f5f5f5;
  border-top: 1px solid #e8e8e8;
}
.blog-footer-bottom #g-footside,
.blog-footer-bottom .g-footside {
  width: 100%;
}
.blog-footer-bottom .g-container {
  width: min(var(--martin-max), calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.5rem 0 1.75rem;
}
.blog-footer-bottom .g-subpromo span {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--martin-ink);
}
.blog-footer-bottom .g-title {
  font-size: 1.05rem;
  margin: 1rem 0 0.75rem;
  color: var(--martin-ink);
}
.blog-footer-bottom .g-contact-item {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 0.35rem 0.75rem;
  margin-bottom: 0.4rem;
  font-size: 0.92rem;
}
.blog-footer-bottom .g-contact-label {
  color: #888;
}
.blog-footer-bottom .g-contact-text {
  color: #333;
}
.blog-footer-bottom .g-contact-text a {
  color: var(--martin-red);
  text-decoration: none;
}
#g-copyright {
  background: #fff;
  color: #333;
  padding: 1.25rem 0 1.5rem;
  border-top: 1px solid #eeeeee;
}
#g-copyright .g-container {
  width: min(var(--martin-max), calc(100% - 2rem));
  margin: 0 auto;
}
#g-copyright a {
  color: var(--martin-red);
}
#g-copyright .footer-contacts {
  margin-bottom: 0.75rem;
  color: #333;
}
#g-copyright #copy {
  font-size: 0.85rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .martin-nav-link {
    font-size: 0.68rem;
    padding: 0.45rem 0.3rem !important;
  }
}
@media (max-width: 960px) {
  .martin-nav {
    display: none !important;
  }
  .martin-burger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .martin-header-inner {
    gap: 0.75rem;
  }
  .martin-logo {
    margin-right: auto;
  }
  .blog-footer-bottom .g-contact-item {
    grid-template-columns: 1fr;
  }
  .blog-footer-bottom .g-grid {
    display: block;
  }
  .blog-footer-bottom .g-block {
    width: 100% !important;
    float: none !important;
  }
}
@media (max-width: 560px) {
  .martin-logo img {
    height: 40px;
  }
  .post-grid {
    grid-template-columns: 1fr;
  }
}
