/* =============================================
   Blog — listing & article pages
   ============================================= */

body.page-blog .header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: transparent;
  box-shadow: none;
}

body.page-blog .header__nav {
  background: var(--header-nav-bg-solid);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body.page-blog .header__links a.is-active {
  color: #ffffff;
  font-weight: 600;
  opacity: 1;
}

body.page-blog .header__enquire {
  padding: 0.625rem 1.25rem;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 999px;
  background: #000000;
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
}

body.page-blog .header__enquire:hover {
  background: #222222;
}

/* ---- Listing page ---- */

.blog-page {
  background: #fafafa;
}

.blog-page__hero {
  padding: clamp(3rem, 6vw, 4.5rem) 0 clamp(2rem, 4vw, 2.5rem);
  background: #ffffff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.blog-page__hero-inner {
  max-width: 720px;
}

.blog-page__eyebrow {
  margin: 0 0 0.625rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #888888;
}

.blog-page__title {
  margin: 0 0 0.875rem;
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.12;
  color: #111111;
}

.blog-page__lead {
  margin: 0;
  font-size: clamp(1rem, 1.5vw, 1.0625rem);
  line-height: 1.65;
  color: #666666;
}

.blog-page__content {
  padding: clamp(2rem, 4vw, 3rem) 0 clamp(4rem, 8vw, 5.5rem);
}

.blog-page__content .container {
  max-width: 1400px;
}

.blog-page__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: clamp(1.5rem, 3vw, 2rem);
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.blog-page__count {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #666666;
}

.blog-page__page-label {
  margin: 0;
  font-size: 0.8125rem;
  color: #888888;
}

/* Prevent scroll-motion flicker on blog headings */
body.page-blog .blog-page__hero,
body.page-blog .blog-page__hero * {
  opacity: 1 !important;
  transform: none !important;
  clip-path: none !important;
  visibility: visible !important;
}

/* Article grid */

.blog-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1.25rem, 2vw, 1.75rem);
}

.blog-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.07);
  text-decoration: none;
  color: #111111;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.blog-card:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
}

.blog-card__media {
  position: relative;
  aspect-ratio: 5 / 4;
  overflow: hidden;
  background: #ececec;
}

.blog-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.blog-card:hover .blog-card__media img {
  transform: scale(1.03);
}

.blog-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.25rem 1.375rem 1.375rem;
  background: #ffffff;
}

.blog-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.blog-card__category {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #111111;
}

.blog-card__date {
  font-size: 0.6875rem;
  color: #888888;
  white-space: nowrap;
}

.blog-card__title {
  margin: 0 0 0.625rem;
  font-family: var(--font-heading);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.35;
  color: #111111;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.blog-card__excerpt {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.6;
  color: #666666;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  flex: 1;
}

.blog-card__read {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #111111;
}

.blog-card__read svg {
  transition: transform 0.25s ease;
}

.blog-card:hover .blog-card__read svg {
  transform: translateX(3px);
}

.blog-grid__empty {
  grid-column: 1 / -1;
  text-align: center;
  color: #666666;
  padding: 3rem 1rem;
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.07);
}

/* ---- Sidebar (article page) ---- */

.blog-sidebar {
  position: relative;
}

.blog-sidebar--article {
  align-self: stretch;
  min-height: 100%;
  height: 100%;
}

.blog-sidebar__inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.blog-sidebar--article .blog-sidebar__inner {
  position: -webkit-sticky;
  position: sticky;
  top: 5.75rem;
  z-index: 10;
  max-height: calc(100vh - 6.5rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

.blog-sidebar__inner::-webkit-scrollbar {
  width: 4px;
}

.blog-sidebar__inner::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.18);
  border-radius: 999px;
}

.blog-sidebar__card {
  padding: 1.375rem 1.5rem;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
}

.blog-sidebar__title {
  margin: 0 0 0.35rem;
  font-family: var(--font-heading);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #111111;
}

.blog-sidebar__subtitle {
  margin: 0 0 1.25rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: #888888;
}

.blog-sidebar__list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.blog-sidebar__item {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 0.875rem;
  align-items: center;
  padding: 0.875rem 0;
  text-decoration: none;
  color: inherit;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  transition: opacity 0.2s ease;
}

.blog-sidebar__item:first-child {
  border-top: 0;
  padding-top: 0;
}

.blog-sidebar__item:last-child {
  padding-bottom: 0;
}

.blog-sidebar__item:hover {
  opacity: 0.75;
}

.blog-sidebar__thumb {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  overflow: hidden;
  background: #ececec;
  flex-shrink: 0;
}

.blog-sidebar__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-sidebar__item-title {
  margin: 0 0 0.3rem;
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.35;
  color: #111111;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.blog-sidebar__item-meta {
  margin: 0;
  font-size: 0.6875rem;
  color: #999999;
}

.blog-sidebar__all {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 1.25rem;
  padding-top: 1.125rem;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #111111;
  text-decoration: none;
  transition: color 0.2s ease;
}

.blog-sidebar__all:hover {
  color: #666666;
}

.blog-sidebar__card--cta {
  background: #111111;
  border-color: #111111;
  color: #ffffff;
}

.blog-sidebar__cta-title {
  margin: 0 0 0.5rem;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: #ffffff;
}

.blog-sidebar__cta-text {
  margin: 0 0 1.125rem;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.72);
}

.blog-sidebar__cta-btn {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.75rem;
  text-align: center;
  text-decoration: none;
  background: #ffffff !important;
  color: #111111 !important;
}

.blog-sidebar__cta-btn:hover {
  background: #f0f0f0 !important;
}

/* ---- Pagination ---- */

.blog-pagination {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
}

.blog-pagination__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 1.25rem 1.5rem;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
}

.blog-pagination__summary {
  margin: 0;
  font-size: 0.875rem;
  color: #666666;
}

.blog-pagination__controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.blog-pagination__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 6.5rem;
  padding: 0.6875rem 1.125rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: #ffffff;
  background: #111111;
  border: 1px solid #111111;
  border-radius: 999px;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.blog-pagination__btn:hover:not(.is-disabled) {
  background: #333333;
  border-color: #333333;
}

.blog-pagination__btn.is-disabled {
  opacity: 0.35;
  pointer-events: none;
  cursor: default;
}

.blog-pagination__pages {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.blog-pagination__page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.375rem;
  height: 2.375rem;
  padding: 0 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  color: #444444;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: background 0.2s ease, color 0.2s ease;
}

.blog-pagination__page:hover {
  background: #f5f5f5;
  color: #111111;
}

.blog-pagination__page.is-active {
  color: #ffffff;
  background: #111111;
}

.blog-pagination__ellipsis {
  padding: 0 0.35rem;
  color: #888888;
  font-size: 0.875rem;
}

/* ---- Single article ---- */

.blog-article {
  background: #ffffff;
  padding: 0 0 clamp(4rem, 8vw, 6rem);
}

.blog-article__hero {
  position: relative;
  width: 100%;
  height: clamp(240px, 42vh, 480px);
  overflow: hidden;
  background: #0a0a0a;
}

.blog-article__hero-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.blog-article__hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0.35) 100%);
  pointer-events: none;
}

.blog-article__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: stretch;
  max-width: 1320px;
  padding-top: clamp(2rem, 4vw, 3rem);
}

.blog-article__main {
  min-width: 0;
  max-width: 720px;
}

.blog-article__back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: clamp(1.5rem, 3vw, 2rem);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #888888;
  text-decoration: none;
  transition: color 0.2s ease;
}

.blog-article__back:hover {
  color: #111111;
}

.blog-article__header {
  margin-bottom: clamp(1.5rem, 3vw, 2rem);
  padding-bottom: clamp(1.5rem, 3vw, 2rem);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.blog-article__category {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.4rem 0.875rem;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ffffff;
  background: #111111;
  border-radius: 999px;
}

.blog-article__title {
  margin: 0 0 1rem;
  font-family: var(--font-heading);
  font-size: clamp(1.875rem, 4vw, 2.75rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.12;
  color: #111111;
}

.blog-article__meta {
  margin: 0;
  font-size: 0.875rem;
  color: #888888;
}

.blog-article__excerpt {
  margin: 0 0 2rem;
  padding-left: 1.25rem;
  border-left: 3px solid #111111;
  font-size: 1.125rem;
  line-height: 1.75;
  color: #444444;
}

.blog-article__body {
  font-size: 1.0625rem;
  line-height: 1.85;
  color: #444444;
}

.blog-article__body p {
  margin: 0 0 1.35rem;
}

.blog-article__body h2,
.blog-article__body h3 {
  margin: 2.25rem 0 0.875rem;
  font-family: var(--font-heading);
  font-size: 1.375rem;
  font-weight: 600;
  color: #111111;
}

.blog-article__body ul,
.blog-article__body ol {
  margin: 0 0 1.35rem;
  padding-left: 1.35rem;
}

.blog-article__body a {
  color: #111111;
  text-decoration: underline;
}

.blog-article__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.blog-article__footer-link {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #888888;
  text-decoration: none;
  transition: color 0.2s ease;
}

.blog-article__footer-link:hover {
  color: #111111;
}

.blog-article__footer-cta {
  padding: 0.75rem 1.5rem;
  font-size: 0.75rem;
}

body.page-blog--article .blog-page {
  display: none;
}

body.page-blog--article {
  background: #ffffff;
}

/* ---- Responsive ---- */

@media (max-width: 1200px) {
  .blog-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) {
  .blog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .blog-article__layout {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .blog-sidebar--article {
    height: auto;
    min-height: 0;
  }

  .blog-sidebar--article .blog-sidebar__inner {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .blog-sidebar--article .blog-sidebar__inner {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }
}

@media (max-width: 680px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }

  .blog-page__toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .blog-pagination__inner {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .blog-pagination__controls {
    justify-content: center;
  }

  .blog-pagination__btn {
    flex: 1;
    min-width: 0;
  }

  .blog-article__footer {
    flex-direction: column;
    align-items: stretch;
  }

  .blog-article__footer-cta {
    width: 100%;
    text-align: center;
  }

  .blog-sidebar--article .blog-sidebar__inner {
    grid-template-columns: 1fr;
  }
}
