/*
Blog Detail Page
- Hero3
- Blog Content
*/

/* =========================================
- Hero3
========================================= */
.ko-hero3 {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  max-height: 625px;

  @media (width >= 992px) {
    aspect-ratio: 16 / 9;
    padding-top: 50px;
  }
}

.ko-hero3__bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.ko-hero3__img,
.ko-hero3__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ko-hero3__bg::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3); /* Subtle overlay for text legibility */
  z-index: 2;
}

.ko-hero3__container {
  position: relative;
  z-index: 3;
  width: 100%;
}

.ko-hero3__content {
  color: var(--ko-white);
  max-width: 1000px;
  margin-inline: auto;
  font-size: clamp(16px, 1.375vw, 22px);
  font-weight: 200;
}

.ko-hero3__title {
  font-family: var(--ko-font-heading);
  font-size: clamp(1.724rem, 4.6875vw, 4.3125rem);
  font-weight: inherit;
  line-height: 1.2;
  text-wrap: balance; /* Modern CSS for balanced wrap */
}

/* =========================================
- Blog Content
========================================= */
/*
Blog Content Component
This component is used for rendering HTML content from external sources (e.g., WordPress).
Since we cannot control the classes inside this content, we style the tags directly.
*/

.ko-blog-content {
  color: var(--ko-primary);
  font-family: var(--ko-font-main);
  line-height: 1.8;
  font-size: 16px;
  max-width: 940px;
  padding-inline: 20px;
  margin-inline: auto;

  @media (width >= 768px) {
    font-size: 18px;
  }

  & p {
    margin-bottom: 24px;
  }

  & h1, & h2, & h3, & h4, & h5, & h6 {
    font-family: var(--ko-font-heading);
    color: var(--ko-primary);
    margin-top: 48px;
    margin-bottom: 20px;
    line-height: 1.2;
    font-weight: 300;
  }

  & h1 { font-size: 42px; }
  & h2 { font-size: 36px; }
  & h3 { font-size: 30px; }
  & h4 { font-size: 24px; }
  & h5 { font-size: 20px; }
  & h6 { font-size: 18px; }

  @media (width >= 768px) {
    & h1 { font-size: 56px; }
    & h2 { font-size: 48px; }
    & h3 { font-size: 38px; }
    & h4 { font-size: 30px; }
    & h5 { font-size: 24px; }
    & h6 { font-size: 20px; }
  }

  & strong, & b {
    font-weight: 700;
  }

  & em, & i {
    font-style: italic;
  }

  & a {
    color: var(--ko-blue);
    text-decoration: underline;
    text-underline-offset: 4px;
    transition: opacity 0.3s ease;

    &:hover {
      opacity: 0.7;
    }
  }

  & ul, & ol {
    margin-bottom: 32px;
    padding-left: 20px;
  }

  & ul {
    list-style-type: disc;
  }

  & ol {
    list-style-type: decimal;
  }

  & li {
    margin-bottom: 12px;
    padding-left: 8px;

    &::marker {
      color: var(--ko-blue);
    }
  }

  & blockquote {
    margin: 40px 0;
    padding: 20px 40px;
    border-left: 4px solid var(--ko-blue);
    background-color: #f9f9f9;
    font-style: italic;
    font-size: 1.1em;

    & p {
      margin-bottom: 0;
    }
  }

  & img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 32px auto;
    border-radius: 4px;
  }

  & figure {
    margin: 40px 0;
    text-align: center;

    & img {
      margin-bottom: 12px;
    }
  }

  & figcaption {
    font-size: 14px;
    color: #666;
    font-style: italic;
  }

  & hr {
    border: 0;
    border-top: 1px solid #eee;
    margin: 48px 0;
  }

  /* Table styles if needed */
  & table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 32px;
  }

  & th, & td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
  }

  & th {
    background-color: #f5f5f5;
    font-weight: 600;
  }
}
