/* D Square Builders — blog listing & article UI */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.dsb-blog-section {
  position: relative;
  padding: 70px 0 90px;
  background:
    linear-gradient(180deg, #f7f8fa 0%, #ffffff 42%, #ffffff 100%);
}

.dsb-blog-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 42px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(26, 41, 64, 0.12);
}

.dsb-blog-kicker {
  display: inline-block;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #f79d2b;
}

.dsb-blog-intro h2 {
  margin: 0 0 10px;
  color: #1a2940;
  font-size: 34px;
  line-height: 1.2;
  font-weight: 700;
}

.dsb-blog-intro p {
  margin: 0;
  max-width: 520px;
  color: #666666;
  font-size: 16px;
  line-height: 1.7;
}

.dsb-blog-search {
  position: relative;
  flex: 0 0 320px;
  max-width: 100%;
}

.dsb-blog-search input {
  width: 100%;
  height: 54px;
  padding: 0 54px 0 18px;
  border: 1px solid rgba(26, 41, 64, 0.16);
  background: #fff;
  color: #1a2940;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.dsb-blog-search input:focus {
  border-color: #f79d2b;
  box-shadow: 0 0 0 3px rgba(247, 157, 43, 0.18);
}

.dsb-blog-search button {
  position: absolute;
  top: 0;
  right: 0;
  width: 54px;
  height: 54px;
  border: 0;
  background: #1a2940;
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease;
}

.dsb-blog-search button:hover {
  background: #f79d2b;
}

.dsb-blog-results-meta {
  margin: -18px 0 28px;
  color: #666;
  font-size: 14px;
}

.dsb-blog-results-meta a {
  color: #f79d2b;
  font-weight: 600;
}

.dsb-blog-empty {
  padding: 48px 0 20px;
  text-align: center;
}

.dsb-blog-empty h3 {
  margin: 0 0 12px;
  color: #1a2940;
  font-size: 28px;
}

.dsb-blog-empty p {
  margin: 0;
  color: #666;
  font-size: 16px;
}

.dsb-blog-empty a {
  color: #f79d2b;
  font-weight: 600;
}

/* Featured */
.dsb-blog-featured {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 0;
  margin-bottom: 36px;
  background: #fff;
  border: 1px solid rgba(26, 41, 64, 0.08);
  overflow: hidden;
}

.dsb-blog-featured__media {
  position: relative;
  display: block;
  min-height: 320px;
  aspect-ratio: 4 / 3;
  background: #1a2940;
  overflow: hidden;
}

.dsb-blog-featured__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease, opacity 0.3s ease;
}

.dsb-blog-featured:hover .dsb-blog-featured__media img {
  transform: scale(1.04);
  opacity: 0.88;
}

.dsb-blog-featured__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 36px 34px;
}

.dsb-blog-featured__body h3 {
  margin: 0 0 14px;
  font-size: 28px;
  line-height: 1.3;
  font-weight: 700;
}

.dsb-blog-featured__body h3 a {
  color: #1a2940;
}

.dsb-blog-featured__body h3 a:hover {
  color: #f79d2b;
}

.dsb-blog-featured__body p {
  margin: 0 0 22px;
  color: #666;
  font-size: 15px;
  line-height: 1.75;
}

/* Meta / links */
.dsb-blog-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 12px;
  color: #8a8a8a;
  font-size: 13px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.dsb-blog-meta time,
.dsb-blog-meta span {
  position: relative;
}

.dsb-blog-meta time + span::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  margin-right: 16px;
  border-radius: 50%;
  background: #f79d2b;
  vertical-align: middle;
}

.dsb-blog-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #1a2940;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dsb-blog-link:hover {
  color: #f79d2b;
}

.dsb-blog-link i {
  transition: transform 0.2s ease;
}

.dsb-blog-link:hover i {
  transform: translateX(3px);
}

/* Grid cards */
.dsb-blog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  margin-bottom: 40px;
}

.dsb-blog-grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dsb-blog-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  border: 1px solid rgba(26, 41, 64, 0.08);
  overflow: hidden;
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.dsb-blog-card:hover {
  border-color: rgba(247, 157, 43, 0.45);
  transform: translateY(-3px);
}

.dsb-blog-card__media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  background: #1a2940;
  overflow: hidden;
}

.dsb-blog-card__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease, opacity 0.3s ease;
}

.dsb-blog-card:hover .dsb-blog-card__media img {
  transform: scale(1.05);
  opacity: 0.88;
}

.dsb-blog-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 22px 22px 24px;
}

.dsb-blog-card__body h3 {
  margin: 0 0 12px;
  font-size: 20px;
  line-height: 1.35;
  font-weight: 700;
}

.dsb-blog-card__body h3 a {
  color: #1a2940;
}

.dsb-blog-card__body h3 a:hover {
  color: #f79d2b;
}

.dsb-blog-card__body p {
  margin: 0 0 18px;
  color: #666;
  font-size: 14px;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dsb-blog-card__body .dsb-blog-link {
  margin-top: auto;
}

/* Pagination */
.dsb-blog-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 10px;
}

.dsb-blog-pagination ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dsb-blog-pagination a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(26, 41, 64, 0.14);
  background: #fff;
  color: #1a2940;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.dsb-blog-pagination li.is-active a,
.dsb-blog-pagination a:hover {
  background: #1a2940;
  border-color: #1a2940;
  color: #fff;
}

.dsb-blog-page-btn.is-disabled {
  opacity: 0.35;
  pointer-events: none;
}

/* Aside */
.dsb-blog-aside {
  position: sticky;
  top: 120px;
}

.dsb-blog-aside__block {
  margin-bottom: 28px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(26, 41, 64, 0.1);
}

.dsb-blog-aside__block h3,
.dsb-blog-cta h3 {
  margin: 0 0 18px;
  color: #1a2940;
  font-size: 20px;
  font-weight: 700;
}

.dsb-blog-aside__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.dsb-blog-aside__list li + li {
  margin-top: 16px;
}

.dsb-blog-aside__list a {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 14px;
  align-items: center;
}

.dsb-blog-aside__thumb {
  position: relative;
  display: block;
  width: 72px;
  height: 72px;
  overflow: hidden;
  background: #1a2940;
}

.dsb-blog-aside__thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.dsb-blog-aside__list a:hover .dsb-blog-aside__thumb img {
  transform: scale(1.06);
}

.dsb-blog-aside__copy strong {
  display: block;
  margin-bottom: 6px;
  color: #1a2940;
  font-size: 15px;
  line-height: 1.35;
  font-weight: 600;
}

.dsb-blog-aside__list a:hover strong {
  color: #f79d2b;
}

.dsb-blog-aside__copy time {
  color: #8a8a8a;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.dsb-blog-cta {
  padding: 28px 24px;
  background:
    linear-gradient(160deg, #1a2940 0%, #243652 100%);
  color: #fff;
}

.dsb-blog-cta h3 {
  color: #fff;
}

.dsb-blog-cta p {
  margin: 0 0 16px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  line-height: 1.65;
}

.dsb-blog-cta__phone {
  display: inline-block;
  margin-bottom: 18px;
  color: #f79d2b;
  font-size: 22px;
  font-weight: 700;
}

.dsb-blog-cta .theme-btn {
  width: 100%;
  text-align: center;
}

/* Article detail */
.dsb-article__header {
  margin-bottom: 28px;
}

.dsb-article__header h1 {
  margin: 0 0 14px;
  color: #1a2940;
  font-size: 40px;
  line-height: 1.2;
  font-weight: 700;
}

.dsb-article__deck {
  margin: 0;
  max-width: 720px;
  color: #666;
  font-size: 18px;
  line-height: 1.7;
}

.dsb-article__hero {
  position: relative;
  margin: 0 0 34px;
  aspect-ratio: 16 / 9;
  min-height: 240px;
  max-height: 460px;
  overflow: hidden;
  background: #1a2940;
}

.dsb-article__hero img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dsb-article__content {
  color: #444;
  font-size: 16px;
  line-height: 1.85;
}

.dsb-article__content h3 {
  margin: 28px 0 12px;
  color: #1a2940;
  font-size: 24px;
  font-weight: 700;
}

.dsb-article__content p {
  margin: 0 0 18px;
}

.dsb-article__content ul {
  margin: 0 0 22px;
  padding-left: 22px;
}

.dsb-article__content li {
  margin-bottom: 8px;
}

.dsb-article__content a {
  color: #f79d2b;
  font-weight: 600;
}

.dsb-article__footer {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid rgba(26, 41, 64, 0.1);
}

.dsb-article__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.dsb-related {
  margin-top: 56px;
  padding-top: 36px;
  border-top: 1px solid rgba(26, 41, 64, 0.1);
}

.dsb-related__head {
  margin-bottom: 24px;
}

.dsb-related__head h2 {
  margin: 0;
  color: #1a2940;
  font-size: 28px;
  font-weight: 700;
}

.dsb-blog-detail-section .dsb-blog-grid--3 {
  margin-bottom: 0;
}

@media (max-width: 991px) {
  .dsb-blog-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .dsb-blog-search {
    flex-basis: auto;
  }

  .dsb-blog-featured {
    grid-template-columns: 1fr;
  }

  .dsb-blog-featured__media {
    min-height: 240px;
    aspect-ratio: 16 / 10;
  }

  .dsb-blog-aside {
    position: static;
    margin-top: 40px;
  }

  .dsb-blog-grid--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dsb-article__header h1 {
    font-size: 32px;
  }
}

@media (max-width: 767px) {
  .dsb-blog-section {
    padding: 50px 0 70px;
  }

  .dsb-blog-intro h2 {
    font-size: 28px;
  }

  .dsb-blog-grid,
  .dsb-blog-grid--3 {
    grid-template-columns: 1fr;
  }

  .dsb-blog-featured__body {
    padding: 26px 22px;
  }

  .dsb-blog-featured__body h3 {
    font-size: 24px;
  }

  .dsb-article__header h1 {
    font-size: 28px;
  }

  .dsb-article__deck {
    font-size: 16px;
  }

  .dsb-article__actions {
    flex-direction: column;
    align-items: flex-start;
  }
}
