/* =========================================================
   FINASTRA BLOG PAGE
========================================================= */

.finastra-blog-page {
  width: 100%;
  overflow: hidden;
  background: #ffffff;
}

/* =========================================================
   HERO
========================================================= */

.finastra-blog-hero {
  position: relative;

  min-height: 430px;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 100px 20px;

  text-align: center;

  background: linear-gradient(135deg, #081726 0%, #112a4a 50%, #0f3c78 100%);

  overflow: hidden;
}

.finastra-blog-hero-content {
  position: relative;

  z-index: 2;

  width: 100%;
  max-width: 950px;
}

.finastra-blog-hero h1 {
  margin: 0 0 25px;

  color: #ffffff;

  font-family: "Space Grotesk", sans-serif;

  font-size: clamp(38px, 6vw, 72px);

  font-weight: 700;

  line-height: 1.05;

  letter-spacing: -2px;
}

.finastra-blog-hero-description {
  max-width: 760px;

  margin: 0 auto;

  color: rgba(255, 255, 255, 0.85);

  font-size: 18px;

  line-height: 1.8;
}

/* Hero glow */

.finastra-blog-hero-glow {
  position: absolute;

  width: 450px;
  height: 450px;

  border-radius: 50%;

  filter: blur(100px);

  opacity: 0.25;
}

.finastra-blog-glow-one {
  top: -200px;
  left: -150px;

  background: #1e63ff;
}

.finastra-blog-glow-two {
  right: -200px;
  bottom: -200px;

  background: #b49558;
}

/* =========================================================
   MAIN
========================================================= */

.finastra-blog-main {
  width: min(1200px, calc(100% - 40px));

  margin: 0 auto;

  /* padding: 100px 0; */
}

/* =========================================================
   SECTION HEADING
========================================================= */

.finastra-blog-section-heading {
  display: flex;

  align-items: center;

  gap: 25px;

  margin-bottom: 40px;
}

@media (min-width: 768px) {
  .finastra-blog-section-heading {
    margin-bottom: 80px;
  }
}

.finastra-blog-section-heading span {
  flex-shrink: 0;

  color: #112a4a;

  font-family: "Space Grotesk", sans-serif;

  font-size: 14px;

  font-weight: 700;

  letter-spacing: 2px;
}

.finastra-blog-section-heading div {
  width: 100%;

  height: 1px;

  background: #dfe5ec;
}

/* =========================================================
   CATEGORY
========================================================= */

.finastra-blog-category-section {
  margin-bottom: 10px;
  margin-top: 40px;
}

.finastra-blog-category-grid {
  display: grid;

  grid-template-columns: repeat(3, minmax(0, 1fr));

  gap: 25px;
}

.finastra-blog-category-card {
  position: relative;

  min-height: 190px;

  width: 100%;

  border: 0;

  border-radius: 18px;

  overflow: hidden;

  cursor: pointer;

  display: flex;

  align-items: flex-end;

  padding: 30px;

  text-align: left;

  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.finastra-blog-category-card:hover {
  transform: translateY(-8px);

  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.15);
}

.finastra-blog-category-label {
  position: relative;

  z-index: 3;

  color: #ffffff;

  font-family: "Space Grotesk", sans-serif;

  font-size: 22px;

  font-weight: 700;
}

/* Category colors */

.finastra-blog-category-purple {
  background: linear-gradient(135deg, #563d91, #8d5fc7);
}

.finastra-blog-category-pink {
  background: linear-gradient(135deg, #a52d66, #e85b91);
}

.finastra-blog-category-orange {
  background: linear-gradient(135deg, #b95e21, #ed974f);
}

/* Category shapes */

.finastra-blog-shape {
  position: absolute;

  border-radius: 50%;
}

.finastra-blog-shape-one {
  width: 170px;
  height: 170px;

  top: -70px;
  right: -30px;

  border: 30px solid rgba(255, 255, 255, 0.15);
}

.finastra-blog-shape-two {
  width: 100px;
  height: 100px;

  right: 100px;
  bottom: -40px;

  background: rgba(255, 255, 255, 0.08);
}

.finastra-blog-shape-four {
  position: absolute;

  width: 160px;
  height: 160px;

  top: -80px;
  right: -40px;

  border: 25px solid rgba(255, 255, 255, 0.15);

  border-radius: 30%;
}

.finastra-blog-shape-five {
  position: absolute;

  width: 80px;
  height: 80px;

  right: 80px;
  bottom: -30px;

  background: rgba(255, 255, 255, 0.1);

  border-radius: 50%;
}

.finastra-blog-circle {
  position: absolute;

  border-radius: 50%;

  background: rgba(255, 255, 255, 0.12);
}

.finastra-blog-circle-one {
  width: 170px;
  height: 170px;

  top: -80px;
  right: -40px;
}

.finastra-blog-circle-two {
  width: 100px;
  height: 100px;

  top: 30px;
  right: 80px;
}

.finastra-blog-circle-three {
  width: 60px;
  height: 60px;

  right: 40px;
  bottom: 20px;
}

/* =========================================================
   FEATURED BLOGS
   IMPORTANT:
   DO NOT CHANGE THIS ALIGNMENT
========================================================= */

.finastra-blog-featured-section {
  /* margin-top: 40px; */
  margin-bottom: 10px;
}

/*
    ALWAYS 3 COLUMNS ON DESKTOP
*/

.finastra-blog-featured-grid {
  display: grid;

  grid-template-columns: repeat(3, minmax(0, 1fr));

  gap: 25px;

  align-items: stretch;

  width: 100%;
}

/*
    Featured card
*/

.finastra-blog-featured-card {
  width: 100%;

  min-width: 0;

  box-sizing: border-box;

  padding: 32px;

  border: 1px solid #e4e9ef;

  border-radius: 18px;

  background: #ffffff;

  box-shadow: 0 8px 30px rgba(17, 42, 74, 0.06);

  display: flex;

  flex-direction: column;

  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.finastra-blog-featured-card:hover {
  transform: translateY(-7px);

  box-shadow: 0 18px 45px rgba(17, 42, 74, 0.12);
}

/* Featured meta */

.finastra-blog-meta {
  display: flex;

  align-items: center;

  flex-wrap: wrap;

  gap: 12px;

  margin-bottom: 20px;

  color: #7c8794;

  font-size: 13px;

  font-weight: 500;
}

.finastra-blog-tag {
  color: #1e63ff;

  font-weight: 700;
}

.finastra-blog-separator {
  width: 4px;
  height: 4px;

  flex-shrink: 0;

  border-radius: 50%;

  background: #b8c0c9;
}

/* Featured title */

.finastra-blog-featured-card h2 {
  margin: 0 0 18px;

  color: #112a4a;

  font-family: "Space Grotesk", sans-serif;

  font-size: 25px;

  line-height: 1.3;
}

/* Featured description */

.finastra-blog-featured-card p {
  margin: 0 0 25px;

  color: #657180;

  font-size: 15px;

  line-height: 1.75;
}

/*
    Keep Read Article aligned
    at the bottom.
*/

.finastra-blog-featured-card .finastra-blog-read-more {
  margin-top: auto;
}

/* =========================================================
   READ ARTICLE
========================================================= */

.finastra-blog-read-more {
  display: inline-flex;

  align-items: center;

  gap: 8px;

  width: fit-content;

  color: #112a4a;

  text-decoration: none;

  font-size: 14px;

  font-weight: 700;

  transition:
    gap 0.3s ease,
    color 0.3s ease;
}

.finastra-blog-read-more:hover {
  gap: 14px;

  color: #1e63ff;
}

.finastra-blog-read-more span {
  font-size: 18px;
}

/* =========================================================
   RECENT POSTS
========================================================= */

.finastra-blog-recent-section {
  margin-bottom: 80px;
}

#recentBlogs {
  display: flex;

  flex-direction: column;

  gap: 70px;
}

.finastra-blog-recent-post {
  display: grid;

  grid-template-columns:
    minmax(0, 1fr)
    minmax(0, 1fr);

  gap: 60px;

  align-items: center;
}

.finastra-blog-recent-post.finastra-blog-recent-reverse {
  grid-template-columns:
    minmax(0, 1fr)
    minmax(0, 1fr);
}

/* Recent image */

.finastra-blog-recent-image {
  position: relative;

  width: 100%;

  aspect-ratio: 16 / 10;

  /* border-radius: 10px; */

  overflow: hidden;

  /* background: linear-gradient(135deg, #112a4a, #1e63ff); */
}

.finastra-blog-recent-image {
  width: 100%;
  overflow: hidden;
}

.finastra-blog-recent-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.5s ease;
}

.finastra-blog-recent-post:hover .finastra-blog-recent-image img {
  transform: scale(1.05);
}

/* Recent content */

.finastra-blog-recent-content {
  min-width: 0;
}

.finastra-blog-recent-content h2 {
  margin: 0 0 20px;

  color: #112a4a;

  font-family: "Space Grotesk", sans-serif;

  font-size: 34px;

  line-height: 1.2;
}

.finastra-blog-recent-content p {
  margin: 0 0 25px;

  color: #657180;

  font-size: 16px;

  line-height: 1.8;
}

/* =========================================================
   LOADING
========================================================= */

.finastra-blog-loading {
  width: 100%;

  padding: 50px 20px;

  text-align: center;

  color: #657180;

  font-size: 16px;
}

/* =========================================================
   ERROR
========================================================= */

.finastra-blog-error {
  width: 100%;

  box-sizing: border-box;

  padding: 40px;

  text-align: center;

  border-radius: 15px;

  background: #f8f9fb;

  color: #657180;
}

/* =========================================================
   PAGINATION
========================================================= */

.finastra-blog-pagination {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 60px;
}

.finastra-blog-pagination.hidden {
  display: none;
}

.finastra-blog-page-button {
  align-items: center;
  background: #ffffff;
  border: 1px solid #d9dfeb;
  border-radius: 8px;
  color: #112a4a;
  cursor: pointer;
  display: inline-flex;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  font-weight: 700;
  justify-content: center;
  min-height: 42px;
  min-width: 42px;
  padding: 0 14px;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.finastra-blog-page-button:hover,
.finastra-blog-page-button.active {
  background: #112a4a;
  border-color: #112a4a;
  color: #ffffff;
}

.finastra-blog-page-button:disabled {
  background: #f2f5f9;
  border-color: #e1e6ef;
  color: #9aa4b5;
  cursor: not-allowed;
}

.finastra-blog-detail-page {
  background: #f7f8fb;
  padding: 50px 20px 80px;
}

.finastra-blog-detail-layout {
  display: grid;
  gap: 46px;
  grid-template-columns: minmax(0, 920px) 280px;
  margin: 0 auto;
  max-width: 1260px;
}

.finastra-blog-detail-article {
  color: #1e2330;
  min-width: 0;
}

.finastra-blog-detail-back {
  display: inline-flex;
  align-items: center;
  color: #4048ff;
  font-weight: 700;
  margin-bottom: 28px;
  text-decoration: none;
}

.finastra-blog-detail-back:hover {
  text-decoration: underline;
}

.finastra-blog-detail-article h1 {
  color: #121521;
  font-family: "Gabarito", sans-serif;
  font-size: 48px;
  line-height: 1.12;
  letter-spacing: 0;
  margin: 20px 0;
}

.finastra-blog-detail-excerpt {
  color: #596173;
  font-size: 19px;
  line-height: 1.7;
  margin: 0 0 34px;
}

.finastra-blog-detail-author-row {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: #687083;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin: 0 0 22px;
  text-transform: uppercase;
}

.finastra-blog-detail-author-row span {
  align-items: center;
  display: inline-flex;
  gap: 8px;
}

.finastra-blog-detail-author-row i {
  color: #bbbbc8;
}

.finastra-blog-detail-image {
  display: block;
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  border-radius: 8px;
  margin: 0 0 42px;
}

.finastra-blog-detail-content {
  color: #252b3a;
  font-size: 18px;
  line-height: 1.78;
}

.finastra-blog-detail-content h2,
.finastra-blog-detail-content h3,
.finastra-blog-detail-content h4 {
  color: #141927;
  font-family: "Space Grotesk", sans-serif;
  line-height: 1.25;
  letter-spacing: 0;
  margin: 38px 0 14px;
  scroll-margin-top: 120px;
}

.finastra-blog-detail-content h2 {
  font-size: 32px;
}

.finastra-blog-detail-content h3 {
  font-size: 25px;
}

.finastra-blog-detail-content h4 {
  font-size: 21px;
}

.finastra-blog-detail-content p,
.finastra-blog-detail-content ul,
.finastra-blog-detail-content ol,
.finastra-blog-detail-content blockquote,
.finastra-blog-detail-content table {
  margin: 0 0 20px;
}

.finastra-blog-detail-content ul,
.finastra-blog-detail-content ol {
  padding-left: 26px;
}

.finastra-blog-detail-content ul,
.finastra-blog-detail-takeaways ul {
  list-style: disc outside;
}

.finastra-blog-detail-content ol {
  list-style: decimal outside;
}

.finastra-blog-detail-content li,
.finastra-blog-detail-takeaways li {
  display: list-item;
}

.finastra-blog-detail-content a {
  color: #0d1293;
    text-decoration: underline;
}

.finastra-blog-detail-content table {
  width: 100%;
  border-collapse: collapse;
  display: block;
  overflow-x: auto;
}

.finastra-blog-detail-content td,
.finastra-blog-detail-content th {
  border: 1px solid #dfe3ee;
  padding: 12px;
  vertical-align: top;
}

.finastra-blog-detail-content blockquote {
  border-left: 4px solid #4048ff;
  color: #4d5568;
  padding: 8px 0 8px 18px;
}

.finastra-blog-detail-takeaways,
.finastra-blog-detail-faq,
.finastra-blog-detail-related {
  margin: 34px 0;
}

.finastra-blog-detail-takeaways {
  background: #ffffff;
  border: 1px solid #e4e8f2;
  border-radius: 8px;
  padding: 24px;
}

.finastra-blog-detail-takeaways h2,
.finastra-blog-detail-faq h2,
.finastra-blog-detail-related h2 {
  color: #141927;
  font-family: "Space Grotesk", sans-serif;
  font-size: 24px;
  letter-spacing: 0;
  line-height: 1.25;
  margin: 0 0 16px;
}

.finastra-blog-detail-takeaways ul {
  margin: 0;
  padding-left: 22px;
}

.finastra-blog-detail-takeaways li {
  color: #4d5568;
  line-height: 1.7;
  margin: 0 0 10px;
}

.finastra-blog-detail-faq-item {
  background: #ffffff;
  border: 1px solid #e4e8f2;
  border-radius: 8px;
  margin-bottom: 12px;
  overflow: hidden;
}

.finastra-blog-detail-faq-question {
  align-items: center;
  background: transparent;
  border: 0;
  color: #171c2b;
  cursor: pointer;
  display: flex;
  font: inherit;
  font-weight: 700;
  justify-content: space-between;
  padding: 18px 20px;
  text-align: left;
  width: 100%;
}

.finastra-blog-detail-faq-question i {
  color: #4048ff;
  transition: transform 0.2s ease;
}

.finastra-blog-detail-faq-item.active .finastra-blog-detail-faq-question i {
  transform: rotate(90deg);
}

.finastra-blog-detail-faq-answer {
  border-top: 1px solid #eef1f7;
  color: #596173;
  display: none;
  line-height: 1.7;
  margin: 0;
  padding: 18px 20px;
}

.finastra-blog-detail-faq-item.active .finastra-blog-detail-faq-answer {
  display: block;
}

.finastra-blog-detail-related {
  border-top: 1px solid #e4e8f2;
  padding-top: 28px;
}

.finastra-blog-detail-related-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.finastra-blog-detail-related-card {
  background: #ffffff;
  border: 1px solid #e4e8f2;
  border-radius: 8px;
  color: #1e2330;
  display: grid;
  overflow: hidden;
  text-decoration: none;
  transition:
    border-color 0.2s ease,
    transform 0.2s ease;
}

.finastra-blog-detail-related-card:hover {
  border-color: #4048ff;
  transform: translateY(-2px);
}

.finastra-blog-detail-related-card:hover strong {
  color: #4048ff;
}

.finastra-blog-detail-related-image {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  width: 100%;
}

.finastra-blog-detail-related-image img {
  display: block;
  height: 100%;
  object-fit: contain;
  transition: transform 0.4s ease;
  width: 100%;
}

.finastra-blog-detail-related-card:hover img {
  transform: scale(1.04);
}

.finastra-blog-detail-related-content {
  display: grid;
  gap: 8px;
  padding: 16px;
}

.finastra-blog-detail-related-content span {
  color: #687083;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.finastra-blog-detail-related-content strong {
  font-size: 17px;
  line-height: 1.45;
}

.finastra-blog-detail-toc {
  align-self: start;
  background: #ffffff;
  border: 1px solid #e4e8f2;
  border-radius: 8px;
  padding: 22px;
  position: sticky;
  top: 110px;
}

.finastra-blog-detail-toc.hidden {
  display: none;
}

.finastra-blog-detail-toc h2 {
  color: #141927;
  font-family: "Space Grotesk", sans-serif;
  font-size: 18px;
  letter-spacing: 0;
  line-height: 1.3;
  margin: 0 0 14px;
}

.finastra-blog-detail-toc nav {
  display: grid;
  gap: 4px;
}

.finastra-blog-detail-toc a {
  border-left: 3px solid transparent;
  color: #687083;
  display: block;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  padding: 8px 0 8px 12px;
  text-decoration: none;
  transition:
    border-color 0.2s ease,
    color 0.2s ease,
    background-color 0.2s ease;
}

.finastra-blog-detail-toc a.nested {
  font-size: 13px;
  padding-left: 24px;
}

.finastra-blog-detail-toc a:hover,
.finastra-blog-detail-toc a.active {
  background: #f5f6ff;
  border-left-color: #01010c;
  color: #01010c;
  text-decoration: 800;
}

@media (max-width: 1180px) {
  .finastra-blog-detail-layout {
    grid-template-columns: minmax(0, 1fr) 250px;
  }
}

@media (max-width: 992px) {
  .finastra-blog-detail-layout {
    display: block;
  }

  .finastra-blog-detail-toc {
    margin: 28px 0 0;
    max-height: none;
    position: static;
  }
}

@media (max-width: 768px) {
  .finastra-blog-detail-page {
    padding: 110px 16px 56px;
  }

  .finastra-blog-detail-article h1 {
    font-size: 34px;
  }

  .finastra-blog-detail-excerpt,
  .finastra-blog-detail-content {
    font-size: 16px;
  }

  .finastra-blog-detail-content h2 {
    font-size: 26px;
  }

  .finastra-blog-detail-related-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   TABLET
========================================================= */

@media (max-width: 992px) {
  .finastra-blog-main {
    padding: 75px 0;
  }

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

  /*
        Featured remains 3 columns
        until mobile.

        This keeps the original
        desktop/tablet alignment.
    */

  .finastra-blog-recent-post,
  .finastra-blog-recent-post.finastra-blog-recent-reverse {
    grid-template-columns: 1fr;

    gap: 30px;
  }

  .finastra-blog-recent-image {
    order: 1;
  }

  .finastra-blog-recent-content {
    order: 2;
  }
}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 768px) {
  .finastra-blog-hero {
    min-height: 380px;

    padding: 80px 20px;
  }

  .finastra-blog-hero h1 {
    font-size: 42px;

    letter-spacing: -1px;
  }

  .finastra-blog-hero-description {
    font-size: 16px;
  }

  .finastra-blog-main {
    width: min(100% - 30px, 600px);

    padding: 60px 0;
  }

  .finastra-blog-category-grid {
    grid-template-columns: 1fr;
  }

  /*
        FEATURED:

        3 cards become
        one per row on mobile.
    */

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

  .finastra-blog-category-card {
    min-height: 170px;
  }


  .finastra-blog-section-heading span {
    font-size: 12px;

    letter-spacing: 1.5px;
  }

  .finastra-blog-featured-card {
    padding: 25px;
  }

  .finastra-blog-featured-card h2 {
    font-size: 22px;
  }

  .finastra-blog-recent-image {
    aspect-ratio: 16 / 10;
  }

  .finastra-blog-recent-content h2 {
    font-size: 28px;
  }

  .finastra-blog-recent-content p {
    font-size: 15px;
  }
}

/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 480px) {
  .finastra-blog-hero {
    min-height: 340px;

    padding: 70px 15px;
  }

  .finastra-blog-hero h1 {
    font-size: 34px;
  }

  .finastra-blog-hero-description {
    font-size: 14px;

    line-height: 1.7;
  }

  .finastra-blog-main {
    width: calc(100% - 24px);
  }

  .finastra-blog-category-card {
    min-height: 150px;

    padding: 24px;
  }

  .finastra-blog-category-label {
    font-size: 19px;
  }

  .finastra-blog-featured-card {
    padding: 22px;
  }

  .finastra-blog-meta {
    font-size: 12px;
  }

  .finastra-blog-recent-image {
    aspect-ratio: 16 / 10;
  }

  .finastra-blog-recent-content h2 {
    font-size: 24px;
  }
}
