/* ============================================================
   Blog Page — modern, minimalist styles for blog.html
   Extends/overrides blog-* classes from main.css
   ============================================================ */

/* ---------- Hero — minimal & professional ---------- */
.blog-page-hero {
  background: #ffffff;
  border-bottom: 1px solid #e8edf2;
  padding: 48px 0 40px;
  text-align: left;
}

.blog-page-hero .hero-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 28px;
  text-align: left;
}

.blog-hero-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #004C80;
  margin: 0 0 10px;
  font-family: 'Roboto', sans-serif;
  text-align: left;
}

.blog-page-hero h1 {
  font-size: 3rem;
  font-weight: 700;
  color: #0a1628;
  margin: 0 0 10px;
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-family: 'Roboto', sans-serif;
  text-align: left;
}

.blog-hero-sub {
  font-size: 0.95rem;
  color: #6b7e90;
  text-align: left;
  margin: 0;
  font-family: 'Roboto', sans-serif;
  font-weight: 400;
}

/* ---------- Page Layout — sized so 3-col cards match index page ---------- */
.blog-page-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 36px 28px 80px;
  display: flex;
  gap: 28px;
  align-items: flex-start;
  background: #ffffff;
}

/* ---------- Sidebar ---------- */
.blog-sidebar {
  flex: 0 0 155px;
  min-width: 0;
  position: sticky;
  top: 90px;
}

.blog-sidebar-heading {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #9aaabb;
  margin: 0 0 10px;
  font-family: 'Roboto', sans-serif;
}

.blog-topic-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.blog-topic-btn {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 0.85rem;
  font-weight: 500;
  color: #4a5e72;
  cursor: pointer;
  font-family: 'Roboto', sans-serif;
  transition: background 0.13s ease, color 0.13s ease;
}

.blog-topic-btn:hover {
  background-color: #f0f5fa;
  color: #004C80;
}

.blog-topic-btn.active {
  background-color: #004C80;
  color: #ffffff;
  font-weight: 600;
}

/* ---------- Main content area ---------- */
.blog-main {
  flex: 1;
  min-width: 0;
}

/* ---------- Search bar ---------- */
.blog-search-wrap {
  margin-bottom: 24px;
  position: relative;
}

.blog-search-wrap svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  fill: none;
  stroke: #b0bec5;
  stroke-width: 2;
  pointer-events: none;
}

.blog-search-input {
  width: 100%;
  padding: 10px 14px 10px 36px;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.875rem;
  font-family: 'Roboto', sans-serif;
  color: #1a2a3a;
  background: #f8fafc;
  box-sizing: border-box;
  transition: border-color 0.18s ease, background 0.18s ease;
  outline: none;
}

.blog-search-input:focus {
  border-color: #004C80;
  background: #ffffff;
}

.blog-search-input::placeholder {
  color: #b8c8d8;
}

/* ---------- 3-column grid — portrait cards same size as index page ---------- */
.blog-main .blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px 14px;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

/* Cards inherit the portrait 177.78% thumb from main.css — no override needed */

/* ---------- Card style ---------- */
.blog-main .blog-card {
  background: transparent;
  border-radius: 10px;
  box-shadow: none;
  transition: transform 0.2s ease;
}

.blog-main .blog-card:hover,
.blog-main .blog-card:focus {
  transform: translateY(-3px);
  box-shadow: none;
}

.blog-main .blog-card-body {
  padding: 8px 2px 10px;
}

.blog-main .blog-card-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #0d1a26;
  margin-bottom: 4px;
  line-height: 1.35;
}

.blog-main .blog-card-desc {
  font-size: 0.75rem;
  color: #7a8fa6;
  margin-bottom: 8px;
  line-height: 1.45;
}

/* ---------- Read More button ---------- */
.blog-read-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: 1px solid #c8d8e8;
  color: #004C80;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: 20px;
  cursor: pointer;
  font-family: 'Roboto', sans-serif;
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  margin-top: 1px;
}

.blog-read-more-btn:hover {
  background-color: #004C80;
  border-color: #004C80;
  color: #ffffff;
  text-decoration: none;
}

/* ---------- Video modal — portrait 9:16 ---------- */
.blog-modal-box {
  position: relative;
  height: min(88vh, 700px);
  width: calc(min(88vh, 700px) * 0.5625);
  max-width: calc(100vw - 40px);
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}

/* ---------- No results message ---------- */
.blog-no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 0;
  color: #b0bec5;
  font-size: 0.95rem;
  font-family: 'Roboto', sans-serif;
}

/* ---------- Responsive ---------- */

/* iPad landscape (≤1024px) — already fine at desktop */

/* iPad portrait (≤820px) — collapse sidebar to top pill row, keep 3-col grid */
@media (max-width: 820px) {
  .blog-page-wrap {
    flex-direction: column;
    gap: 0;
    padding: 20px 20px 60px;
    max-width: 100%;
  }

  .blog-page-hero {
    padding: 36px 0 30px;
  }

  .blog-page-hero .hero-inner {
    max-width: 100%;
    padding: 0 20px;
  }

  .blog-sidebar {
    flex: none;
    width: 100%;
    position: static;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f4f8;
  }

  .blog-sidebar-heading {
    margin-bottom: 10px;
  }

  /* Horizontal scrollable pill row */
  .blog-topic-list {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .blog-topic-list::-webkit-scrollbar {
    display: none;
  }

  .blog-topic-btn {
    flex-shrink: 0;
    width: auto;
    padding: 7px 16px;
    border-radius: 20px;
    background: #f0f5fa;
    font-size: 0.82rem;
  }

  .blog-topic-btn.active {
    background: #004C80;
    color: #ffffff;
  }

  /* 3 columns is fine on iPad portrait */
  .blog-main .blog-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px 12px;
  }

  .blog-search-wrap {
    margin-bottom: 20px;
  }
}

/* Large mobile (≤600px) — 2-column grid */
@media (max-width: 600px) {
  .blog-page-hero {
    padding: 28px 0 22px;
  }

  .blog-page-hero .hero-inner {
    padding: 0 16px;
  }

  .blog-page-hero h1 {
    font-size: 2.4rem;
  }

  .blog-page-wrap {
    padding: 16px 16px 60px;
  }

  .blog-main .blog-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px 10px;
  }

}

/* Small mobile (≤380px) — tighten everything */
@media (max-width: 380px) {
  .blog-page-hero h1 {
    font-size: 2rem;
  }

  .blog-hero-label {
    font-size: 0.62rem;
  }

  .blog-page-wrap {
    padding: 14px 12px 50px;
  }

  .blog-main .blog-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 8px;
  }

  .blog-main .blog-card-title {
    font-size: 0.76rem;
  }

  .blog-read-more-btn {
    font-size: 0.68rem;
    padding: 3px 9px;
  }
}
