/* ===========================================================
   M7 MAIN CSS MANIFEST
   Global stylesheet assembler for all sites
   =========================================================== */

/* 1. Base layer — resets, element defaults, utilities */
@import "base/typography.css";
@import "base/elements.css";
@import "base/utilities.css";

/* 2. Layout structure — page grid, header, footer, containers */
@import "layout/containers.css";
@import "layout/header.css";
@import "layout/footer.css";

/* 3. Theme — visual identity (colors, gradients, shadows)
   Swap 'default.css' for 'golden.css' or 'classic.css' as needed */
@import "themes/default.css";
@import "themes/golden.css";
@import "themes/classic.css";

/* 4. Fonts — external IBM Plex Sans (served from static.m7.org)
   NOTE: keep this last in the cascade so it can override fallbacks */
@import url("https://static.m7.org/font/ibm-plex-sans/css/ibm-plex-sans-all.min.css");

/* 5. Forms */
@import "components/modal.css";
@import "components/tab-panels.css";
@import "components/loading-modal.css";
@import "components/buttons.css";
@import "components/alerts.css";
@import "components/pills.css";
@import "components/forms.css";
@import "components/about.css";
@import "components/docs.css";
@import "components/icons.css";
@import "components/switch.css";
@import "components/navbar.css";
@import "components/breadcrumbs.css";
@import "components/content-pages.css";
@import "components/m7script-console.css";
@import "components/home-ops.css";
@import "components/entity/list/card.css";

/* 6. Immediate shell overrides
   Keep cache-sensitive layout fixes in the served manifest until the
   underlying imported partials are guaranteed to refresh everywhere. */
.content-page--breadcrumb-shell {
  max-width: none;
  margin-top: 0;
  padding: 0;
}

.content-page--breadcrumb-shell > .breadcrumb-bar {
  margin: 0 0 1rem;
}

.content-page--breadcrumb-shell > .section-lander--compact,
.content-page--breadcrumb-shell > .content-page__section {
  box-sizing: border-box;
  width: min(1020px, calc(100% - 40px));
  margin-left: auto;
  margin-right: auto;
}

/* Blog listing: kept here so category-hero styling refreshes with this manifest. */
.blog-listing {
  width: min(980px, calc(100% - 40px));
  margin: 28px auto 56px;
}

.blog-listing__heading,
.blog-listing__state {
  margin: 0 0 28px;
}

.blog-listing__heading h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.25rem);
  letter-spacing: -0.03em;
}

.blog-listing__heading p {
  margin: 0.65rem 0 0;
}

.blog-category-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 28px;
  align-items: center;
  min-height: 280px;
  margin: 0 0 32px;
  padding: 26px 28px;
  overflow: hidden;
  border: 1px solid #d8e1ee;
  border-radius: 22px;
  color: #10213c;
  background: linear-gradient(135deg, #f7fbff 0%, #eef5ff 100%);
  box-shadow: 0 16px 34px rgba(71, 85, 105, 0.1);
}

.blog-category-hero__content {
  position: relative;
  z-index: 1;
}

.blog-category-hero__eyebrow,
.blog-article-feed__eyebrow {
  margin: 0 0 10px;
  color: #58677d;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.blog-category-hero h1 {
  margin: 0;
  font-size: clamp(2.6rem, 6vw, 4.5rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.blog-category-hero__lede {
  max-width: 32rem;
  margin: 16px 0 0;
  color: #58677d;
  font-size: 1.08rem;
  line-height: 1.55;
}

.blog-category-hero__count {
  display: inline-flex;
  margin: 18px 0 0;
  padding: 6px 10px;
  border: 1px solid #d8e1ee;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #58677d;
  font-size: 0.84rem;
}

.blog-category-hero__media {
  min-width: 0;
  margin: 0;
}

.blog-category-hero__media img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border: 1px solid #d8e1ee;
  border-radius: 14px;
  box-shadow: 0 10px 22px rgba(71, 85, 105, 0.14);
}

.blog-article-feed {
  margin: 0;
}

.blog-article-feed__heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 14px;
  padding: 0 2px;
}

.blog-article-feed__heading h2 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(1.35rem, 2vw, 1.7rem);
  line-height: 1.1;
}

.blog-article-feed__heading > p {
  margin: 0;
  color: #64748b;
  font-size: 0.88rem;
}

.blog-article-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.blog-article-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  padding: 20px;
  border: 1px solid #dbe4ee;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.blog-article-card--with-media {
  grid-template-columns: 144px minmax(0, 1fr);
  align-items: start;
}

.blog-article-card__media {
  width: 144px;
  aspect-ratio: 1;
  margin: 0;
}

.blog-article-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 10px;
}

.blog-article-card__content h3 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(1.12rem, 2vw, 1.35rem);
  line-height: 1.2;
}

.blog-article-card__content h3 a {
  color: inherit;
  text-decoration: none;
}

.blog-article-card__content h3 a:hover,
.blog-article-card__content h3 a:focus-visible {
  color: #075985;
  text-decoration: underline;
}

.blog-article-card__excerpt {
  margin: 9px 0 0;
  color: #475569;
  line-height: 1.55;
}

.blog-article-card__meta {
  margin: 13px 0 0;
  color: #64748b;
  font-size: 0.88rem;
  line-height: 1.5;
}

.blog-article-card__meta a {
  color: #0369a1;
}

@media (max-width: 900px) {
  .blog-category-hero {
    grid-template-columns: minmax(0, 1fr) minmax(250px, 0.8fr);
    gap: 20px;
    padding: 22px;
  }
}

@media (max-width: 680px) {
  .blog-listing {
    width: min(100% - 28px, 980px);
    margin-top: 18px;
  }

  .blog-article-feed {
    padding: 0;
  }

  .blog-category-hero,
  .blog-article-card--with-media {
    grid-template-columns: 1fr;
  }

  .blog-category-hero {
    gap: 22px;
    padding: 22px 20px;
    border-radius: 18px;
  }

  .blog-category-hero h1 {
    font-size: clamp(2.5rem, 15vw, 3.5rem);
  }

  .blog-category-hero__media {
    max-width: 420px;
    order: -1;
  }

  .blog-article-feed__heading {
    align-items: start;
    flex-direction: column;
    gap: 6px;
  }

  .blog-article-card {
    padding: 17px;
  }

  .blog-article-card__media {
    width: 100%;
    max-width: none;
    aspect-ratio: 3 / 2;
  }

  .blog-article-card__media img {
    aspect-ratio: 3 / 2;
  }
}

/* ===========================================================
   Optional Notes:
   - Add per-site overrides (e.g. /css/overrides/id.m7.css)
   - Vendor components (like navbar) can be loaded via <link>
   =========================================================== */
