/* ============================================================
   RML BLOG INDEX — rml-blog-index.css
   Add <link href="/css/rml-blog-index.css" rel="stylesheet">
   to blog.html head AFTER rml-blog.css
   Uses same CSS variables as rml-blog.css (:root already set)
============================================================ */

/* ── Page wrapper ─────────────────────────────────────── */
.rml-blog-page{
  padding:64px 0 88px;
  background:linear-gradient(180deg,#fff 0%,#f9fbfd 100%);
}

/* ── Section label ───────────────────────────────────── */
.rml-section-label{
  display:flex;
  align-items:center;
  gap:12px;
  margin:52px 0 22px;
  font-size:11px;
  font-weight:800;
  letter-spacing:1.6px;
  text-transform:uppercase;
  color:var(--rml-red);
}
.rml-section-label::after{
  content:"";
  flex:1;
  height:1px;
  background:var(--rml-border);
}
.rml-section-label:first-child{ margin-top:0; }

/* ── Card grid ───────────────────────────────────────── */
.rml-card-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(300px,1fr));
  gap:24px;
  margin-bottom:12px;
}
.rml-card-grid--wide{
  grid-template-columns:repeat(auto-fill,minmax(260px,1fr));
}

/* ── Blog card ───────────────────────────────────────── */
.rml-blog-card{
  display:flex;
  flex-direction:column;
  background:#fff;
  border:1px solid var(--rml-border);
  border-radius:18px;
  overflow:hidden;
  text-decoration:none!important;
  color:inherit;
  transition:box-shadow .2s ease,transform .2s ease;
}
.rml-blog-card:hover{
  box-shadow:0 10px 32px rgba(15,23,42,.12);
  transform:translateY(-4px);
  color:inherit;
  text-decoration:none!important;
}

/* Card image */
.rml-blog-card__img{
  width:100%;
  height:200px;
  object-fit:cover;
  object-position:center;
  display:block;
  flex-shrink:0;
}
.rml-blog-card__img--placeholder{
  width:100%;
  height:200px;
  background:linear-gradient(135deg,#f0f4f8,#e4e9ef);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:36px;
  color:#cbd5e0;
  flex-shrink:0;
}

/* Card body */
.rml-blog-card__body{
  padding:20px 22px 22px;
  flex:1;
  display:flex;
  flex-direction:column;
  min-width:0;
}

/* Meta row */
.rml-blog-card__meta{
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:10px;
  font-size:12px;
  color:var(--rml-muted);
  flex-wrap:wrap;
}
.rml-blog-card__meta i{ color:var(--rml-red); }

/* Tag pill */
.rml-blog-card__tag{
  display:inline-flex;
  padding:3px 10px;
  border-radius:999px;
  background:#fff0f2;
  color:var(--rml-red);
  font-size:11px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.5px;
  white-space:nowrap;
}

/* Title */
.rml-blog-card__title{
  font-size:16px;
  font-weight:700;
  color:var(--rml-black);
  line-height:1.35;
  margin:0 0 10px;
  word-break:break-word;
}
.rml-blog-card:hover .rml-blog-card__title{ color:var(--rml-red); }

/* Excerpt */
.rml-blog-card__excerpt{
  font-size:13.5px;
  color:var(--rml-muted);
  line-height:1.6;
  margin:0 0 16px;
  flex:1;
}

/* CTA link */
.rml-blog-card__cta{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:12.5px;
  font-weight:700;
  color:var(--rml-red);
  text-transform:uppercase;
  letter-spacing:.5px;
  margin-top:auto;
  text-decoration:none!important;
}
.rml-blog-card__cta i{
  font-size:11px;
  transition:transform .18s ease;
}
.rml-blog-card:hover .rml-blog-card__cta i{ transform:translateX(3px); }

/* ── Featured card (side-by-side) ───────────────────── */
.rml-blog-card--featured{
  grid-column:1/-1;
  flex-direction:row;
  max-height:280px;
}
.rml-blog-card--featured .rml-blog-card__img{
  width:380px;
  min-width:380px;
  height:100%;
  max-height:280px;
}
.rml-blog-card--featured .rml-blog-card__title{ font-size:20px; }

/* ── Blog page layout ────────────────────────────────── */
.rml-blog-layout{
  display:grid;
  grid-template-columns:minmax(0,1fr) 300px;
  gap:40px;
  align-items:start;
}

/* ── Sidebar ─────────────────────────────────────────── */
.rml-blog-sidebar{
  position:sticky;
  top:24px;
  display:grid;
  gap:20px;
  min-width:0;
}
.rml-sidebar-widget{
  border:1px solid var(--rml-border);
  border-radius:var(--rml-radius);
  background:#fff;
  padding:22px;
  box-shadow:0 10px 30px rgba(15,23,42,.04);
  overflow:hidden;
  box-sizing:border-box;
  width:100%;
  min-width:0;
  word-break:break-word;
  overflow-wrap:break-word;
}
.rml-sidebar-widget h3{
  font-size:16px;
  font-weight:700;
  color:var(--rml-black);
  margin:0 0 16px;
  padding-bottom:10px;
  position:relative;
}
.rml-sidebar-widget h3::after{
  content:"";
  position:absolute;
  left:0;
  bottom:0;
  width:34px;
  height:3px;
  border-radius:999px;
  background:var(--rml-red);
}

/* Sidebar post rows */
.rml-sidebar-post{
  display:grid;
  grid-template-columns:72px 1fr;
  gap:12px;
  padding:11px 0;
  border-bottom:1px solid #f3f4f6;
  min-width:0;
}
.rml-sidebar-post:last-child{ border-bottom:0;padding-bottom:0; }
.rml-sidebar-post img{
  width:72px;
  height:54px;
  object-fit:cover;
  border-radius:10px;
  flex-shrink:0;
}
.rml-sidebar-post div{ min-width:0; }
.rml-sidebar-post a{
  display:block;
  font-size:13px;
  font-weight:700;
  color:var(--rml-black);
  line-height:1.35;
  text-decoration:none!important;
  margin-bottom:3px;
  word-break:break-word;
}
.rml-sidebar-post a:hover{ color:var(--rml-red); }
.rml-sidebar-post span{ font-size:11px;color:var(--rml-muted); }

/* Sidebar categories */
.rml-sidebar-cats{ list-style:none;margin:0;padding:0; }
.rml-sidebar-cats li{ border-bottom:1px solid #f3f4f6; }
.rml-sidebar-cats li:last-child{ border-bottom:0; }
.rml-sidebar-cats a{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding:11px 0;
  color:#374151;
  font-size:13.5px;
  font-weight:700;
  text-decoration:none!important;
  line-height:1.3;
}
.rml-sidebar-cats a::after{ content:"›";font-size:20px;color:#d1d5db;flex-shrink:0; }
.rml-sidebar-cats a:hover{ color:var(--rml-red); }

/* Sidebar tags */
.rml-sidebar-tags{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
  width:100%;
}
.rml-sidebar-tags a{
  display:inline-flex;
  padding:7px 12px;
  border-radius:999px;
  background:#f3f4f6;
  color:#374151;
  font-size:12px;
  font-weight:800;
  text-decoration:none!important;
  white-space:nowrap;
}
.rml-sidebar-tags a:hover{ background:var(--rml-red);color:#fff; }

/* Sidebar CTA widget */
.rml-sidebar-cta{
  background:linear-gradient(145deg,#111827,#1e2a3a);
  border-radius:var(--rml-radius);
  padding:24px;
  text-align:center;
  color:#fff;
  position:relative;
  overflow:hidden;
}
.rml-sidebar-cta::after{
  content:"";
  position:absolute;
  right:-40px;
  bottom:-40px;
  width:120px;
  height:120px;
  border-radius:50%;
  background:rgba(228,29,55,.2);
}
.rml-sidebar-cta h3{
  color:#fff;
  font-size:17px;
  font-weight:700;
  margin:0 0 10px;
  padding-bottom:0;
  position:relative;
  z-index:1;
}
.rml-sidebar-cta h3::after{ display:none!important; }
.rml-sidebar-cta p{
  color:rgba(255,255,255,.75);
  font-size:13.5px;
  line-height:1.65;
  margin:0 0 18px;
  position:relative;
  z-index:1;
}
.rml-sidebar-cta .rml-btn{
  position:relative;
  z-index:1;
  width:100%;
  justify-content:center;
  box-sizing:border-box;
}

/* ============================================================
   RESPONSIVE
============================================================ */

/* Tablet landscape */
@media (max-width:1199px){
  .rml-blog-layout{
    grid-template-columns:minmax(0,1fr) 270px;
    gap:28px;
  }
}

/* Tablet portrait */
@media (max-width:991px){
  .rml-blog-layout{
    grid-template-columns:1fr;
  }
  .rml-blog-sidebar{
    position:static;
    grid-template-columns:repeat(2,1fr);
  }
  .rml-sidebar-cta{ grid-column:1/-1; }
  .rml-card-grid{
    grid-template-columns:repeat(2,1fr);
    gap:18px;
  }
  .rml-card-grid--wide{
    grid-template-columns:repeat(2,1fr);
  }
}

/* Mobile landscape / large phone */
@media (max-width:767px){
  .rml-blog-page{ padding:40px 0 56px; }
  .rml-section-label{ font-size:10px;margin:36px 0 16px; }

  .rml-card-grid,
  .rml-card-grid--wide{
    grid-template-columns:1fr;
    gap:14px;
  }

  /* Featured card stacks on mobile */
  .rml-blog-card--featured{
    flex-direction:column;
    max-height:none;
    grid-column:1/-1;
  }
  .rml-blog-card--featured .rml-blog-card__img{
    width:100%;
    min-width:0;
    height:200px;
    max-height:none;
  }
  .rml-blog-card--featured .rml-blog-card__title{ font-size:17px; }

  .rml-blog-card__img,
  .rml-blog-card__img--placeholder{ height:170px; }
  .rml-blog-card__body{ padding:16px 16px 18px; }
  .rml-blog-card__title{ font-size:15px; }
  .rml-blog-card__excerpt{ font-size:13px; }

  .rml-blog-sidebar{ grid-template-columns:1fr; }
  .rml-sidebar-widget{ padding:18px 16px; }
}

/* Small phone */
@media (max-width:480px){
  .rml-blog-card__img,
  .rml-blog-card__img--placeholder{ height:150px; }
  .rml-blog-card__body{ padding:14px 14px 16px; }
  .rml-blog-card__title{ font-size:14.5px; }
  .rml-blog-card__meta{ gap:8px; }
  .rml-blog-card__excerpt{ display:none; }
}

/* Very small phone */
@media (max-width:360px){
  .rml-blog-card__img,
  .rml-blog-card__img--placeholder{ height:130px; }
  .rml-sidebar-post{ grid-template-columns:58px 1fr; gap:8px; }
  .rml-sidebar-post img{ width:58px;height:44px; }
}

/* ── Load More ───────────────────────────────────────── */
.rml-card-hidden{
  display:none!important;
}

.rml-load-more-wrap{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:12px;
  padding:36px 0 8px;
}

.rml-load-more-btn{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:14px 32px;
  border:2px solid var(--rml-red);
  border-radius:12px;
  background:#fff;
  color:var(--rml-red);
  font-size:15px;
  font-weight:700;
  cursor:pointer;
  transition:background .2s ease, color .2s ease, transform .2s ease, box-shadow .2s ease;
  letter-spacing:.01em;
}
.rml-load-more-btn:hover{
  background:var(--rml-red);
  color:#fff;
  transform:translateY(-2px);
  box-shadow:0 8px 24px rgba(228,29,55,.28);
}
.rml-load-more-btn i{ font-size:16px; }

.rml-load-more-count{
  font-size:13px;
  color:var(--rml-muted);
  margin:0;
}

@media (max-width:480px){
  .rml-load-more-btn{
    width:100%;
    justify-content:center;
    padding:14px 20px;
  }
}