/* Blog listing */

.blog-index {
  display: flex;
  flex-wrap: wrap;
}

.blog-index__post {
  flex: 0 0 100%;
  padding: 2.2rem 1.8rem;
}

@media (max-width: 767px) {
  .blog-index__post {
    padding: 2.2rem 0;
  }
}

.blog-index__wrapper {
  height: 100%;
  transition: .4s transform;
}
.blog-index__wrapper:hover {
  transform: translateY(-15px);
}

@media screen and (min-width: 768px) {
  .blog-index__post--small,
  .blog-index__post--mag {
    flex: 0 0 calc(100% / 2);
  }
  .blog-index__post--mag:nth-child(1),
  .blog-index__post--mag:nth-child(2) {
    padding-top: 0;
  }
}

@media screen and (min-width: 1000px) {
  .blog-index__post--small {
    padding: 5% 3% 3%;
  }
  .blog-index__post--mag {
    padding: 5% 3% 3%;
  }

  
}

@media screen and (min-width: 768px) {
  .blog-index__post--large {
    display: flex;
    flex: 1 0 100%;
  }
}

.blog-index__post-thumb {
  width: 100%;
}

.blog-index__post--large .blog-index__post-thumb {
  width: 100%;
  height: 480px;
}

.blog-index__post-image {
  height: auto;
  max-width: 100%;
  width: 100%;
}

.blog-index__post-title {
  margin-bottom: 10px;
}

.blog-index__post-content {
  padding: 30px 0 0;
  position: relative;
}

.blog-index__post--large .blog-index__post-content {
  padding: 60px;
}

@media screen and (min-width: 768px) {
  .blog-index__post-image-wrapper--large {
    flex: 1 1 48%;
  }

  .blog-index__post-content--large {
    flex: 1 1 48%;
    padding-left: 2rem;
  }

  .blog-index__post-content--full-width {
    flex: 1 1 100%;
    padding-left: 0;
  }
}

.blog-index__post-timestamp {
  display: inline;
  font-size: 16px;
  font-weight: 800;
}

.blog-index__post-tags {
  position: relative;
}

.blog-index__post-tags span {
  display: none;
}

.blog-index__post-tag {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 15px;
  display: none;
}

.blog-index__post-tag:first-child {
  display: block;
}

.blog-index__post-author {
  display: inline;
  font-size: 16px;
  font-weight: 800;
}

.blog-index__post-author + .blog-index__post-timestamp {
  margin-left: 20px;
}

.blog-index__post-author-image {
  border-radius: 50%;
  height: 30px;
  margin-right: 10px;
  width: 30px;
}

.blog-index__post-summary,
.blog-index__post-image--small {
  margin: 20px 0 0;
}

.blog-index__post-button {
  margin-top: 30px;
  display: block;
}

.blog-index__post--small .blog-index__post-button {
  width: 100%;
}

/* Blog pagination */

.blog-pagination {
  display: flex;
  justify-content: center;
  margin-top: 60px;
}

.blog-pagination__link {
  font-weight: 700;
  margin: 0 30px;
  text-decoration: none;
  font-size: 20px;
}

.blog-pagination__link:hover,
.blog-pagination__link:focus {
  text-decoration: none;
}

.blog-pagination__link.blog-pagination__prev-link--disabled,
.blog-pagination__link.blog-pagination__next-link--disabled {
  color: #ddd;
  cursor: default;
  pointer-events: none;
}

.blog-pagination__prev-link svg,
.blog-pagination__next-link svg {
  margin: 0 0.3rem;
  width: 12px;
  height: 12px;
  opacity: 0.3;
}

.blog-pagination__prev-link--disabled svg,
.blog-pagination__next-link--disabled svg {
  fill: #B0C1D4;
}

.blog-pagination__number-link {
  width: 36px;
  height: 36px;
  line-height: 36px;
  text-align: center;
  background-color: #fff;
  border: none;
  border-radius: 100px;
  padding: 0;
  margin: 0 5px;
  font-size: 20px;
}

.blog-pagination__number-link:hover,
.blog-pagination__number-link:focus {
  color: #fff;
  transition: background-color 0.3s;
}

.blog-pagination__link--active {
  opacity: 0.5;
}

@media (max-width: 767px) {
  .blog-pagination__number-link {
    display: none;
  }
}

/* Blog post */

.blog-post {
  margin: 0 auto;
  font-size: 21px;
}

.blog-post__title-wrapper {
  background-size: cover;
  background-position: left;
  background-color: #1b1b1b;
}

.blog_post__overlay {
  padding: 25vw 0 140px;
  width: 100%;
  height: 100%;
  z-index: -10;
  background: rgba(15,15,15,.5);
}

@media (max-width: 767px) {
  .blog_post__overlay {
    padding: 180px 0 140px;
  }
}

.blog-post__title-wrapper * {
  color: #fff;
}

.blog-post__title-wrapper h1 {
  max-width: 960px;
  margin: 0;
}

.blog-post__meta {
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: 13px;
  margin-bottom: 40px;
}

.blog-post__meta span {
  margin: 0 10px 0 0;
}

.blog-post__meta a:hover {
  color: #fff;
}

.blog-post__timestamp {
  display: inline-block;
  margin: 0 10px;
}

.blog-post__tags svg {
  height: auto;
  margin-right: 10px;
  width: 15px;
}

.blog-post__body {
  max-width: 860px;
  margin: 0 auto;
}

.blog-post__tags {
  color: #fff;
  margin: 40px auto 0;
  max-width: 860px;
}

.blog-post__tag-link {
  font-size: 11px;
  font-weight: bold;
  padding: 8px 12px;
  background-color: #eee;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* Blog related posts */

.blog-related-posts {
  background-color: #f6f6f6;
}

.blog-related-posts__post-image-wrapper {
  width: 100%;
  height: 320px;
}

.blog-related-posts h3 {
  text-align: center;
}

.blog-related-posts__list {
  display: flex;
  flex-wrap: wrap;
  padding-top: 0px;
  padding-bottom: 50px;
}

.blog-related-posts__post {
  flex: 0 0 100%;
  padding: 1rem;
}

@media screen and (min-width: 768px) {
  .blog-related-posts__post {
    flex: 0 0 calc(100% / 2);
  }
}

@media screen and (min-width: 1000px) {
  .blog-related-posts__post {
    flex: 0 0 calc(100% / 3);
  }
}

.blog-related-posts__image {
  width: 100%;
  height: 260px;
  background-size: cover;
  background-position: center;
}

.blog-related-posts__title {
  margin: 0.7rem 0;
}

.blog-related-posts__content {
  padding: 35px 40px 40px;
}
.blog-pagination-posts .content-wrapper {
  display: flex;
  justify-content: space-between;
}
.prev-post,
.next-post {
  display: flex;
  align-items: center;
  font-size: 14px;
  letter-spacing: .02em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 80px;
}
.prev-post {
  margin-left: 20px;
}
.next-post {
  margin-right: 20px;
}
.prev-post svg, 
.next-post svg {
  display: inline-block;
  height: 16px;
}
.prev-post svg {
  margin-right: 10px;
  transform: rotate(180deg);
}
.next-post svg {
  margin-left: 10px;
}


/* Blog comments */

.blog-comments {
  margin: 0 auto;
  max-width: 960px;
  border-top: 1px solid #eee;
}

.blog-comments .hs-submit {
  text-align: center;
}

.blog-comments .comment-reply-to {
  border: 0 none;
  padding: 0;
  margin-top: 20px;
  font-size: 12px;
  background-color: transparent;
  text-transform: uppercase;
  opacity: 0.5;
  transition: opacity .3s;
}

.blog-comments .comment-reply-to:hover,
.blog-comments .comment-reply-to:focus {
  background-color: transparent;
  opacity: 1;
}

.blog-comments .comment-reply-to em {
  -webkit-text-fill-color: unset;
  -webkit-text-stroke-width: unset;
}

.blog-comments form {
  margin-top: 40px;
}

.blog-comments form:after{
  content: "";
  display: table;
  clear: both;
}

.blog-comments div[class*='hs_firstname'],
.blog-comments div[class*='hs_lastname'],
.blog-comments div[class*='hs_email'],
.blog-comments div[class*='hs_website'] {
  float: left;
  width: 50%;
}

.blog-comments div[class*='hs_firstname'],
.blog-comments div[class*='hs_email'] {
  padding-right: 10px;
}

.blog-comments div[class*='hs_lastname'],
.blog-comments div[class*='hs_website'] {
  padding-left: 10px;
}

.blog-comments .comment {
  margin-bottom: 60px;
}

.blog-comments .comment-date {
  margin-left: 10px;
}

.blog-comments .replying-to {
  font-size: 24px;
  letter-spacing: -0.02em;
 } 
  
/* CASE + INDSIGTER - LISTING - STYLING *

/* Ensure all items use this box model */
#main-content .blog-index__post,
#main-content .blog-index__post--small,
#main-content .blog-index__post--mag {
    box-sizing: border-box; 
    /* Set a base vertical padding here if needed */
    padding-top: 0; 
    padding-bottom: 30px; 
}


/* ================================
   CASES LISTING – 2 COLUMNS (No outer padding, 30px between cards)
================================ */

/* Add negative margins to the container to pull the cards to the edge of the section */
#main-content.blog-template--cases .blog-index {
  display: flex;
  flex-wrap: wrap;
  margin-left: -15px;  /* Half of your desired 30px gap */
  margin-right: -15px; /* Half of your desired 30px gap */
}

/* Apply column layout and horizontal padding ONLY to items *after* the first child */
#main-content.blog-template--cases .blog-index__post:not(:first-child),
#main-content.blog-template--cases .blog-index__post--small:not(:first-child),
#main-content.blog-template--cases .blog-index__post--mag:not(:first-child) {
  flex: 0 0 100%; 
  padding-left: 15px; /* 15px left/right padding creates the 30px gap when combined with negative margin */
  padding-right: 15px;
}

@media (min-width: 768px) {
  #main-content.blog-template--cases .blog-index__post:not(:first-child),
  #main-content.blog-template--cases .blog-index__post--small:not(:first-child),
  #main-content.blog-template--cases .blog-index__post--mag:not(:first-child) {
    flex: 0 0 50%; /* 2 columns desktop */
  }
}

/* ================================
   ARTICLES LISTING – 3 COLUMNS (No outer padding, 30px between cards)
================================ */

/* Add negative margins to the container to pull the cards to the edge of the section */
#main-content.blog-template--articles .blog-index {
  display: flex;
  flex-wrap: wrap;
  margin-left: -15px;  /* Half of your desired 30px gap */
  margin-right: -15px; /* Half of your desired 30px gap */
}

/* Apply column layout and horizontal padding ONLY to items *after* the first child */
#main-content.blog-template--articles .blog-index__post:not(:first-child),
#main-content.blog-template--articles .blog-index__post--small:not(:first-child),
#main-content.blog-template--articles .blog-index__post--mag:not(:first-child) {
  flex: 0 0 100%; 
  padding-left: 15px; /* 15px left/right padding creates the 30px gap */
  padding-right: 15px;
}

@media (min-width: 768px) {
  #main-content.blog-template--articles .blog-index__post:not(:first-child),
  #main-content.blog-template--articles .blog-index__post--small:not(:first-child),
  #main-content.blog-template--articles .blog-index__post--mag:not(:first-child) {
    flex: 0 0 33.333%; /* 3 columns desktop */
  }
}


/* ================================
   FEATURED TOP POST - Full Width
================================ */

/* Target the very first post item in the list within EITHER template */
#main-content.blog-template--articles .blog-index__post:first-child,
#main-content.blog-template--cases .blog-index__post:first-child {
  flex: 0 0 100% !important; /* Force full width on all screen sizes */
  max-width: 100% !important; /* Ensure it spans the entire container */
  padding: 15px !important; /* Ensure no padding on the featured item itself */
  margin-bottom: 1rem; /* Add spacing below the featured post */
}

/* Ensure the image and content inside the first post also expand correctly */
#main-content .blog-index__post:first-child .hs-featured-image-wrapper,
#main-content .blog-index__post:first-child img {
    width: 100% !important;
    display: block !important;
    max-height: 40vw;
    object-fit: cover;
}


/* ================================
   CARD STYLING
================================ */
/* Apply border-radius to ALL images within the specific blog templates */
#main-content .blog-index__post img {
  border-radius: 12px !important; /* Rounded corners */
  display: block; /* Helps prevent gaps below the image */
}

/* Ensure the wrapper hides any overflow to make the radius work correctly */
#main-content .blog-index__post .hs-featured-image-wrapper {
  overflow: hidden !important;
  border-radius: 12px !important;
}

/* Ensure the wrapper maintains the 1:1 ratio for all non-featured posts */
#main-content .blog-index__post:not(:first-child) .hs-featured-image-wrapper {
  max-height: 40vw;
  width: 100%;
  overflow: hidden !important; /* Keep the border radius working */
}

/* Ensure the image fills the wrapper correctly */
#main-content .blog-index__post:not(:first-child) img {
  width: 100%;
  height: 40vw; 
  object-fit: cover !important; /* Crops the image nicely to fit without stretching */
  border-radius: 12px !important; /* Keep your existing border-radius here */
}
@media (max-width: 1000px) {

  /* Ensure the wrapper maintains the desired height for all non-featured posts */
  #main-content .blog-index__post:not(:first-child) .hs-featured-image-wrapper {
    max-height: 400px;
    width: 100%;
    overflow: hidden !important; /* Keep the border radius working */
  }
  
  /* Ensure the image fills the wrapper correctly */
  #main-content .blog-index__post:not(:first-child) img {
    width: 100%;
    height: 400px; 
    object-fit: cover !important; /* Crops the image nicely to fit without stretching */
    border-radius: 12px !important; /* Keep your existing border-radius here */
  }

}

}
/* =============================================
   NEW CARD STYLING FOR INDSIGTER LISTING PAGE 
   ============================================= */

/* The main post wrapper, ensure position context for children */
.blog-template--articles .blog-card {
    box-sizing: border-box; 
    padding: 15px; /* Matches your 30px gap system (15px padding + negative margins) */
}

/* The inner wrapper that has the background image */
.blog-template--articles .blog-card-inner {
    height: 550px; /* Set a fixed height for a consistent card size */
    background-size: cover; /* Ensures the image covers the entire area */
    background-position: center; 
    border-radius: 12px; /* Rounded corners */
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Pushes top and bottom meta areas to the edges */
    padding: 40px; /* Internal padding for text */
    position: relative;
    color: white; /* Default text color on the dark background */
    overflow: hidden;

}
/* Optional: Add a subtle overlay so text is readable on light images */
.blog-template--articles .blog-card-inner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2); /* Subtle dark overlay */
    border-radius: 12px;
    z-index: 0;
}

/* Ensure all text/elements are above the overlay */
.blog-template--articles .blog-card-meta-top, 
.blog-template--articles .blog-card-content, 
.blog-template--articles .blog-card-meta-bottom {
    position: relative;
    z-index: 1;
}

/* Top Meta (Read Time) */
.blog-template--articles .blog-card-meta-top .read-time {
    font-size: 20px !important;
    align-items: top;
}

/* Content (Title) */
.blog-template--articles .blog-card-content {
    flex-grow: 1; /* Pushes date/button to the bottom */
    display: flex;
    align-items: top; /* Center the title vertically within the remaining space */
    padding-top: 20px;
    text-align: left; /* Center the title text */
}

.blog-template--articles .blog-post-title {
    /* These styles are applied to the h3 element with the class */
    font-size: inherit;
    line-height: inherit;
    margin: 0 auto;
    color: #fff; /* Default font color: white */
    text-decoration: none;
    /* Adding a transition for smooth color change on hover */
    transition: color 0.3s ease;
}

/* Hover Styling */
.blog-template--articles .blog-post-title:hover {
    color: #dddddd; /* New font color on hover */
}


/* Bottom Meta (Date and Button) */
.blog-template--articles .blog-card-meta-bottom {
    display: flex;
    justify-content: space-between; /* Pushes date left, button right */
    
}

.blog-template--articles .blog-card-meta-bottom .publish-date {
     font-size: 20px !important;
     margin: 0 0 0rem;

}

/* The "Læs nu" Button Styling (Pill style from post page) */
.blog-template--articles .read-more-btn {
    background-color: transparent;
    border: 1px solid #ffffff;
    color: #ffffff; /* Default font color: white */
    padding: 0px 10px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 18px !important;
    font-weight: 400;
    font-family: inherit;
    line-height: inherit;
    letter-spacing: -0.03rem;
    display: inline-block;
    align-items: flex-end;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s; /* Added border-color to the transition */
}

/* Hover Styling */
.blog-template--articles .read-more-btn:hover {
    background-color: #ffffff; /* New background: white */
    border-color: #000000;      /* New border: black */
    color: #000000;             /* New font color: black */
}


/* 1. Target the H2 specifically within the first post using your selector */
#main-content.blog-template--articles .blog-index__post:first-child .blog-post-title {
    font-size: 2.5rem; /* Make the H2 larger than the standard H3s */
    line-height: 1.1;
    margin-bottom: 1rem;
    color: #fff;
    text-decoration: none;
}

/* 3. Ensure the bottom section uses Flexbox for alignment in all posts */
.blog-card-meta-bottom {
  display: flex;
  justify-content: space-between; /* Pushes date/summary to left, button to right */
  align-items: flex-end;         /* Aligns both items to the bottom vertically */
}