/* ========== PAGE HEADER OVERRIDE (blog) ========== */
.page-header {
  padding: 30px 0 0;
}
.page-header__title {
  font-family: 'Oswald', sans-serif;
  font-size: 38px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--brand-blue);
  margin: 12px 0 20px;
}

/* Category Pills */
.blog-pills {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 12px;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.blog-pills__btn {
  flex-shrink: 0;
  padding: 10px 22px;
  border-radius: 50px;
  border: 1px solid #CBD5E0;
  background: #fff;
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #4A5568;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}
.blog-pills__btn:hover {
  border-color: var(--brand-orange);
  color: var(--brand-orange);
}
.blog-pills__btn--active {
  background: var(--brand-orange);
  color: #fff;
  border-color: var(--brand-orange);
}

/* ========== HERO POST ========== */
.blog-hero {
  padding: 50px 0 60px;
}
.blog-hero__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  align-items: stretch;
}
.blog-hero__image {
  border-radius: 8px;
  overflow: hidden;
  min-height: 0;
}
.blog-hero__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.blog-hero__badge {
  display: inline-block;
  padding: 5px 14px;
  background: var(--brand-orange);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.blog-hero__date {
  display: block;
  margin-top: 12px;
  font-size: 13px;
  color: #A0AEC0;
}
.blog-hero__title {
  font-family: 'Oswald', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--brand-blue);
  margin: 14px 0 16px;
  line-height: 1.25;
}
.blog-hero__excerpt {
  font-size: 15px;
  color: #718096;
  line-height: 1.65;
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Mobile Hero: premium card with overlay */
@media (max-width: 767px) {
  .blog-hero__inner {
    display: block;
    position: relative;
    min-height: 450px;
    border-radius: 8px;
    overflow: hidden;
  }
  .blog-hero__image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    border-radius: 0;
  }
  .blog-hero__content {
    position: relative;
    z-index: 2;
    width: 100%;
    min-height: 450px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 30%, rgba(0,0,0,0.1) 70%, transparent 100%);
  }
  .blog-hero__meta {
    display: flex;
    gap: 10px;
    justify-content: space-between;
    width: 100%;
    align-items: baseline;
  }
  a.btn.btn--primary {
    display: none;
  }
  .blog-hero__title {
    color: #fff;
  }
  .blog-hero__excerpt {
    display: none;
  }
  .blog-hero__date {
    color: rgba(255,255,255,0.6);
  }
}

@media (min-width: 768px) {
  .page-header__title {
    font-size: 48px;
  }
  .blog-hero__inner {
    grid-template-columns: 1fr 1fr;
    gap: 50px;
  }
  .blog-hero__content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    height: 100%;
  }
  .blog-hero__content .btn {
    margin-bottom: 0;
  }
  .blog-hero__title {
    font-size: 36px;
  }
}

/* ========== EDITORIAL GRID ========== */
.blog-grid-section {
  padding: 0 0 40px;
}
.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  grid-auto-flow: dense;
  grid-auto-rows: 280px;
}

/* Blog Card */
.blog-card {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  display: block;
  text-decoration: none;
  min-height: 0;
}
.blog-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}
.blog-card:hover .blog-card__img {
  transform: scale(1.05);
}
.blog-card__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(to top, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.15) 50%, transparent 100%);
  padding: 20px;
}
.blog-card__meta {
  display: flex;
  align-items: center;
  gap: 12px;
}
.blog-card__badge {
  display: inline-block;
  padding: 4px 10px;
  background: var(--brand-orange);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.blog-card__date {
  font-size: 12px;
  color: rgba(255,255,255,0.7);
}
.blog-card__bottom {
  margin-top: auto;
}
.blog-card__title {
  font-family: 'Oswald', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
  margin: 0;
}

/* Excerpt hidden by default, shown only on big cards */
.blog-card__excerpt {
  display: none;
}

/* ========== GRID PATTERN: nth-child ========== */
/* Big Left Post: 4th, 16th, 28th... */
.blog-grid .blog-card:nth-child(12n + 4) {
  grid-column: span 2;
  grid-row: span 2;
}
.blog-grid .blog-card:nth-child(12n + 4) .blog-card__title {
  font-size: 22px;
}
.blog-grid .blog-card:nth-child(12n + 4) .blog-card__excerpt {
  display: block;
  font-size: 14px;
  color: rgba(255,255,255,0.75);
  line-height: 1.5;
  margin-top: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Big Right Post: 12th, 24th, 36th... */
.blog-grid .blog-card:nth-child(12n + 10) {
  grid-column: 2 / 4;
  grid-row: span 2;
}
.blog-grid .blog-card:nth-child(12n + 10) .blog-card__title {
  font-size: 22px;
}
.blog-grid .blog-card:nth-child(12n + 10) .blog-card__excerpt {
  display: block;
  font-size: 14px;
  color: rgba(255,255,255,0.75);
  line-height: 1.5;
  margin-top: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Desktop grid: 3 columns */
@media (min-width: 768px) {
  .blog-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .blog-card__title {
    font-size: 20px;
  }
  .blog-grid .blog-card:nth-child(12n + 4) .blog-card__title,
  .blog-grid .blog-card:nth-child(12n + 10) .blog-card__title {
    font-size: 28px;
  }
}

/* Tablet: 2 columns, big cards span full width */
@media (max-width: 767px) and (min-width: 480px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .blog-grid .blog-card:nth-child(12n + 4),
  .blog-grid .blog-card:nth-child(12n + 10) {
    grid-column: span 2;
    grid-row: span 2;
  }
}

/* Small mobile: single column, no spanning */
@media (max-width: 479px) {
  .blog-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 260px;
  }
  .blog-grid .blog-card:nth-child(12n + 4),
  .blog-grid .blog-card:nth-child(12n + 10) {
    grid-column: span 1;
    grid-row: span 2;
  }
}

/* ========== PAGINATION ========== */
.blog-pagination-section {
  padding: 20px 0 60px;
}
.blog-pagination {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}
.blog-pagination__load {
  padding: 14px 40px;
  font-size: 15px;
}
.blog-pagination__pages {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}
.blog-pagination__page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  color: #4A5568;
  text-decoration: none;
  transition: all 0.2s;
  border: 1px solid transparent;
}
.blog-pagination__page:hover {
  background: var(--bg-light, #F7FAFC);
  border-color: #E2E8F0;
}
.blog-pagination__page--active {
  background: var(--brand-blue);
  color: #fff;
  border-color: var(--brand-blue);
}
.blog-pagination__dots {
  font-size: 14px;
  color: #A0AEC0;
  padding: 0 4px;
}
.blog-pagination__next {
  font-weight: 600;
  color: var(--brand-blue);
  white-space: nowrap;
}
.blog-pagination__next:hover {
  color: var(--brand-orange);
}

/* ========== LEAD MAGNET ========== */
.lead-magnet {
  padding: 60px 0;
  background: var(--bg-light, #F7FAFC);
}
.lead-magnet__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  align-items: center;
}
.lead-magnet__title {
  font-family: 'Oswald', sans-serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--brand-blue);
  margin: 0 0 12px;
  line-height: 1.25;
}
.lead-magnet__text {
  font-size: 15px;
  color: #718096;
  line-height: 1.6;
}
.lead-magnet__form-wrap {
  background: #fff;
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}
.lead-magnet__form-row {
  display: flex;
  gap: 12px;
}
.lead-magnet__form-row .form-input {
  flex: 1;
  min-width: 0;
  padding: 12px 16px;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  color: #2D3748;
  outline: none;
  transition: border-color 0.2s;
}
.lead-magnet__form-row .form-input:focus {
  border-color: var(--brand-blue);
}
.lead-magnet__form-row .btn {
  flex-shrink: 0;
  white-space: nowrap;
}

/* Form consent */
.form-consent {
  width: 100%;
  margin-top: 12px;
  font-size: 12px;
  color: #718096;
  text-align: left;
}
.form-consent label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
}
.form-consent input[type="checkbox"] {
  margin-top: 2px;
  flex-shrink: 0;
}
.form-consent a {
  color: var(--brand-orange);
  text-decoration: none;
  transition: color 0.2s;
}
.form-consent a:hover {
  color: var(--brand-blue);
}

@media (min-width: 768px) {
  .lead-magnet__inner {
    grid-template-columns: 1fr 1fr;
    gap: 50px;
  }
  .lead-magnet__title {
    font-size: 32px;
  }
}

@media (max-width: 540px) {
  .lead-magnet__form-row {
    flex-direction: column;
  }
  .lead-magnet__form-row .btn {
    width: 100%;
  }
}

/* ========== BUTTON OUTLINE VARIANT ========== */
.btn--outline {
  background: transparent;
  border: 2px solid var(--brand-blue);
  color: var(--brand-blue);
  padding: 12px 32px;
  border-radius: 6px;
  font-family: 'Manrope', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.btn--outline:hover {
  background: var(--brand-blue);
  color: #fff;
}
