/* Scoped editorial cards by Sajtfabriken */

/* Bundled Miller Text font (loaded only when shortcode is on the page) */
@font-face{
  font-family: "Miller Text";
  src: url("fonts/MillerText-Roman.otf") format("opentype");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face{
  font-family: "Miller Text";
  src: url("fonts/MillerText-Italic.otf") format("opentype");
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face{
  font-family: "Miller Text SC";
  src: url("fonts/MillerText-RomanSC.otf") format("opentype");
  font-weight: 400; font-style: normal; font-display: swap;
}

.ecsf-wrapper{
  --ecsf-font: "Miller Text", Georgia, serif;
  --ecsf-gap: 32px;
  --ecsf-title-size: 1.35rem;
  --ecsf-sub-size: 0.85rem;
  --ecsf-text: #111;
  --ecsf-muted: #6a6a6a;
  --ecsf-link: #1a1a1a;
  width:100%;
  box-sizing:border-box;
  font-family: "Miller Text", Georgia, serif !important;
  color: var(--ecsf-text);
}
.ecsf-wrapper *,.ecsf-wrapper *::before,.ecsf-wrapper *::after{box-sizing:border-box; font-family: inherit;}
.ecsf-wrapper .ecsf-title,
.ecsf-wrapper .ecsf-subtitle,
.ecsf-wrapper h1,.ecsf-wrapper h2,.ecsf-wrapper h3,
.ecsf-wrapper p,.ecsf-wrapper a,.ecsf-wrapper span{
  font-family: "Miller Text", Georgia, serif !important;
}
.ecsf-grid{
  display:grid;
  grid-template-columns: repeat(var(--ecsf-cols, 1), minmax(0, 1fr));
  gap: var(--ecsf-gap) calc(var(--ecsf-gap) * 1.25);
  align-items:start;
}
.ecsf-wrapper.ecsf-layout-horizontal .ecsf-grid{
  grid-auto-flow: column;
  grid-template-columns: none;
  grid-auto-columns: minmax(0, 1fr);
}
.ecsf-card{min-width:0}
.ecsf-card-inner{display:block;text-decoration:none;color:inherit}
a.ecsf-card-inner:hover .ecsf-title{text-decoration:underline}
.ecsf-media{
  position:relative;
  width:100%;
  aspect-ratio: 1536/720;
  overflow:hidden;
  background:#eee;
}
.ecsf-img{
  position:absolute; inset:0;
  width:100%; height:100%;
  object-fit: var(--ecsf-fit, cover);
  object-position: var(--ecsf-dx, 50%) var(--ecsf-dy, 50%);
  transform: scale(var(--ecsf-dz, 1));
  transform-origin: var(--ecsf-dx, 50%) var(--ecsf-dy, 50%);
  display:block;
}
.ecsf-placeholder{background:linear-gradient(135deg,#e7e7e7,#cfcfcf)}

/* Typography — variants applied per card via inline CSS variables */
.ecsf-title{
  margin: 14px 0 6px;
  font-family: var(--ecsf-title-font, var(--ecsf-font)) !important;
  font-style: var(--ecsf-title-style, normal) !important;
  font-weight: 600;
  font-size: var(--ecsf-title-size);
  line-height: 1.25;
  color: var(--ecsf-link);
  letter-spacing: -0.005em;
}
.ecsf-subtitle{
  margin: 0;
  font-family: var(--ecsf-sub-font, var(--ecsf-font)) !important;
  font-style: var(--ecsf-sub-style, normal) !important;
  font-size: var(--ecsf-sub-size);
  line-height: 1.4;
  color: var(--ecsf-muted);
}

/* Tablet */
@media (max-width: 900px){
  .ecsf-wrapper{ --ecsf-gap: 24px; --ecsf-title-size: 1.15rem; }
  .ecsf-wrapper .ecsf-grid,
  .ecsf-wrapper.ecsf-layout-horizontal .ecsf-grid{
    grid-auto-flow: row;
    grid-template-columns: repeat(var(--ecsf-cols, 1), minmax(0,1fr));
    grid-auto-columns: auto;
  }
}

/* Mobile */
@media (max-width: 600px){
  .ecsf-wrapper.ecsf-mobile-scroll .ecsf-grid{
    display:flex;
    grid-template-columns: none;
    overflow-x:auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
  }
  .ecsf-wrapper.ecsf-mobile-scroll .ecsf-card{
    flex: 0 0 78%;
    scroll-snap-align: start;
  }
  .ecsf-wrapper.ecsf-mobile-stack .ecsf-grid{
    grid-auto-flow: row;
    grid-template-columns: 1fr;
  }
  .ecsf-img{
    object-position: var(--ecsf-mx, 50%) var(--ecsf-my, 50%);
    transform: scale(var(--ecsf-mz, 1));
    transform-origin: var(--ecsf-mx, 50%) var(--ecsf-my, 50%);
  }
}

@media (min-width: 601px){
  .ecsf-wrapper.ecsf-mobile-stack .ecsf-grid{
    display:grid;
    grid-auto-flow: row;
    grid-template-columns: repeat(var(--ecsf-cols, 1), minmax(0, 1fr));
    grid-auto-columns: auto;
  }
}

/* ============ Article page ============ */
.ecsf-article{
  max-width: 880px;
  margin: 40px auto 80px;
  padding: 0 24px;
}
.ecsf-article .ecsf-article-inner{display:block}
.ecsf-article-title{
  font-family:"Miller Text", Georgia, serif !important;
  font-weight: 400;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.15;
  margin: 0 0 14px;
  color:#111;
}
.ecsf-article-subtitle{
  font-family:"Miller Text", Georgia, serif !important;
  font-size: 1.05rem;
  margin: 0 0 24px;
  color:#111;
}
.ecsf-article-figure{margin:0 0 12px}
.ecsf-article-figure img{
  display:block; width:100%; height:auto; border-radius:2px;
}
.ecsf-article-caption{
  font-family:"Miller Text", Georgia, serif !important;
  font-style: italic !important;
  font-size: .9rem;
  color:#555;
  margin: 8px 0 28px;
}
.ecsf-article-body{
  font-family:"Miller Text", Georgia, serif !important;
  font-size: 1.05rem;
  line-height: 1.6;
  color:#1a1a1a;
}
.ecsf-article-p{margin: 0 0 18px}
.ecsf-article-p-bold{font-weight:600}
.ecsf-article-h2{
  font-family:"Miller Text", Georgia, serif !important;
  font-weight: 700;
  font-size: 1.6rem;
  line-height: 1.25;
  margin: 36px 0 14px;
  color:#111;
}
.ecsf-article-link{
  color:#06AFEE !important;
  text-decoration: underline;
}
.ecsf-article-link:hover{ text-decoration: none; }
.ecsf-article-cta{
  margin: 28px 0 8px;
  font-size: 1.05rem;
}
.ecsf-article-cta a{
  color:#06AFEE !important;
  text-decoration: underline;
  font-weight: 600;
}
.ecsf-article-author{
  margin-top: 8px;
  font-size: .95rem;
  color:#333;
  font-weight: 600;
}
@media (max-width: 600px){
  .ecsf-article{ margin: 20px auto 60px; padding: 0 16px; }
  .ecsf-article-h2{ font-size: 1.35rem; }
}
