/* ============================================
   INAT Blog - Professional blog layout
   Desktop + mobile responsive
   ============================================ */

:root {
  --blog-navy: #042c6c;
  --blog-yellow: #ffeb3b;
  --blog-text: #1a1a1a;
  --blog-text-muted: #5c5c5c;
  --blog-bg: #fafafa;
  --blog-card-bg: #fff;
  --blog-border: #e8e8e8;
  --blog-radius: 12px;
  --blog-shadow: 0 4px 20px rgba(0,0,0,0.08);
  --blog-shadow-hover: 0 12px 32px rgba(0,0,0,0.12);
}

/* ---------- Blog index: hero ---------- */
.blog-hero {
  position: relative;
  min-height: 50vh;
  display: flex;
  align-items: flex-end;
  padding: clamp(24px, 6vw, 48px);
  box-sizing: border-box;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.blog-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.3) 50%, transparent 100%);
  z-index: 0;
}
.blog-hero-title {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
  max-width: 900px;
}

/* ---------- Blog index: posts grid ---------- */
.blog-section {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(32px, 6vw, 56px) clamp(20px, 4vw, 32px);
  box-sizing: border-box;
}
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: clamp(20px, 4vw, 32px);
  list-style: none;
  margin: 0;
  padding: 0;
}
.blog-card {
  background: var(--blog-card-bg);
  border-radius: var(--blog-radius);
  overflow: hidden;
  box-shadow: var(--blog-shadow);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.blog-card:hover {
  box-shadow: var(--blog-shadow-hover);
  transform: translateY(-4px);
}
.blog-card-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.blog-card-image-wrap {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  overflow: hidden;
  background: var(--blog-border);
}
.blog-card-image-wrap img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.blog-card-body {
  padding: clamp(16px, 3vw, 24px);
  flex: 1;
  display: flex;
  flex-direction: column;
}
.blog-card-date {
  font-size: 0.8125rem;
  color: var(--blog-text-muted);
  margin-bottom: 8px;
}
.blog-card-title {
  margin: 0 0 10px;
  font-size: clamp(1.125rem, 2vw, 1.35rem);
  font-weight: 700;
  line-height: 1.35;
  color: var(--blog-navy);
}
.blog-card-excerpt {
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--blog-text-muted);
  margin: 0 0 16px;
  flex: 1;
}
.blog-card-more {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--blog-navy);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.blog-card-more:hover { color: #001a3d; }
.blog-card-more::after {
  content: "→";
}

/* ---------- Blog index: empty state ---------- */
.blog-empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--blog-text-muted);
  font-size: 1.0625rem;
}

/* ---------- Blog post (single): article ---------- */
.blog-article-wrap {
  width: 100%;
  background: var(--blog-bg);
  padding-bottom: 48px;
}
.blog-article-hero {
  position: relative;
  width: 100%;
  min-height: 45vh;
  display: flex;
  align-items: flex-end;
  padding: clamp(24px, 6vw, 48px);
  box-sizing: border-box;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.blog-article-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.35) 60%, transparent 100%);
  z-index: 0;
}
.blog-article-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 800px;
  width: 100%;
}
.blog-article-title {
  margin: 0;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
}
.blog-article-meta {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.85);
  margin-top: 12px;
}

/* Article body - full page width */
.blog-article-body {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: clamp(28px, 5vw, 48px) clamp(20px, 4vw, 32px);
  box-sizing: border-box;
}
.blog-article-content {
  width: 100%;
  max-width: 100%;
  background: var(--blog-card-bg);
  padding: clamp(24px, 5vw, 40px) clamp(20px, 4vw, 32px);
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--blog-text);
  box-sizing: border-box;
}
.blog-article-content h2 {
  font-size: 1.5rem;
  margin: 1.75em 0 0.5em;
  color: var(--blog-navy);
}
.blog-article-content h2:first-child { margin-top: 0; }
.blog-article-content h3 { font-size: 1.25rem; margin: 1.5em 0 0.4em; color: var(--blog-navy); }
.blog-article-content p { margin: 0 0 1em; }
.blog-article-content p:last-child { margin-bottom: 0; }
.blog-article-content ul, .blog-article-content ol {
  margin: 0 0 1em;
  padding-left: 1.5em;
}
.blog-article-content li { margin-bottom: 0.35em; }
.blog-article-content a { color: var(--blog-navy); text-decoration: underline; }
.blog-article-content a:hover { color: #001a3d; }
.blog-article-content img { max-width: 100%; height: auto; border-radius: 8px; }

/* Back link */
.blog-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 24px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--blog-navy);
  text-decoration: none;
}
.blog-back:hover { text-decoration: underline; }
.blog-back::before { content: "←"; }

/* ---------- Mobile ---------- */
@media (max-width: 768px) {
  .blog-hero { min-height: 40vh; }
  .blog-article-hero { min-height: 38vh; }
  .blog-grid { grid-template-columns: 1fr; }
}
