/* style/blog.css */

/* Base styles for page-blog */
.page-blog {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #333333; /* Default text color for light background */
  background-color: var(--background-color, #ffffff); /* Inherit from shared, default to white */
}

/* Hero Section */
.page-blog__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  padding-top: 10px; /* Small top padding as body already handles header offset */
  overflow: hidden;
  color: #ffffff;
  background-color: #26A9E0;
}

.page-blog__hero-image-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
}

.page-blog__hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.6);
  display: block;
}

.page-blog__hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}

.page-blog__main-title {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin-bottom: 20px;
  /* Use clamp for font-size to ensure responsiveness without fixed large values */
  font-size: clamp(2.5rem, 5vw, 3.5rem);
}

.page-blog__hero-description {
  font-size: 1.15rem;
  margin-bottom: 30px;
  color: #f0f0f0;
}

.page-blog__hero-cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Sections General */
.page-blog__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  box-sizing: border-box;
}

.page-blog__section-title {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 20px;
  color: #26A9E0;
}

.page-blog__section-title--white {
  color: #ffffff;
}

.page-blog__section-description {
  font-size: 1.1rem;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px;
  color: #555555;
}

.page-blog__section-description--white {
  color: #f0f0f0;
}

/* Buttons */
.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  box-sizing: border-box;
  max-width: 100%; /* Ensure button responsiveness */
  white-space: normal;
  word-wrap: break-word;
  text-align: center;
}

.page-blog__btn-primary {
  background-color: #EA7C07; /* Login color for primary action */
  color: #ffffff;
  border: 2px solid #EA7C07;
}

.page-blog__btn-primary:hover {
  background-color: #d16b06;
  border-color: #d16b06;
}

.page-blog__btn-secondary {
  background-color: transparent;
  color: #26A9E0;
  border: 2px solid #26A9E0;
}

.page-blog__btn-secondary:hover {
  background-color: #26A9E0;
  color: #ffffff;
}

/* Articles Section */
.page-blog__articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.page-blog__article-card {
  background-color: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%; /* Ensure cards in a row have equal height */
  display: flex;
  flex-direction: column;
}

.page-blog__article-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.page-blog__article-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.page-blog__article-image {
  width: 100%;
  height: 220px; /* Fixed height for article images */
  object-fit: cover;
  display: block;
}

.page-blog__article-content {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.page-blog__article-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: #26A9E0;
  margin-bottom: 10px;
}

.page-blog__article-meta {
  font-size: 0.9rem;
  color: #888888;
  margin-bottom: 15px;
}

.page-blog__article-excerpt {
  font-size: 1rem;
  color: #555555;
  margin-bottom: 15px;
}

.page-blog__read-more {
  display: inline-block;
  color: #EA7C07;
  font-weight: 600;
  text-decoration: none;
}

.page-blog__read-more:hover {
  text-decoration: underline;
}

.page-blog__view-all-wrapper {
  text-align: center;
  margin-top: 50px;
}

/* Video Section */
.page-blog__video-section {
  padding: 60px 20px;
  padding-top: 10px; /* Small top padding as body already handles header offset */
  background-color: #26A9E0;
  color: #ffffff;
  text-align: center;
}

.page-blog__video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  overflow: hidden;
  max-width: 100%;
  margin: 40px auto 0;
  background-color: #000;
  border-radius: 10px;
}

.page-blog__video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* Why K9WIN Blog Section */
.page-blog__why-k9win-section {
  padding: 60px 20px;
  background-color: #f8f8f8;
}

.page-blog__feature-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.page-blog__feature-item {
  background-color: #ffffff;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  padding: 30px;
  text-align: center;
}

.page-blog__feature-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #26A9E0;
  margin-bottom: 15px;
}

.page-blog__feature-item p {
  font-size: 1rem;
  color: #666666;
}

/* CTA Section */
.page-blog__cta-section {
  padding: 80px 20px;
  background-color: #26A9E0;
  color: #ffffff;
  text-align: center;
}

.page-blog__cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-top: 40px;
  flex-wrap: wrap;
}

/* FAQ Section */
.page-blog__faq-section {
  padding: 60px 20px;
  background-color: #ffffff;
}

.page-blog__faq-list {
  max-width: 900px;
  margin: 0 auto;
}

.page-blog__faq-item {
  background-color: #f9f9f9;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
}

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  font-size: 1.15rem;
  font-weight: 600;
  color: #333333;
  cursor: pointer;
  background-color: #eaf7ff; /* Light blue background for questions */
  border-bottom: 1px solid #d0e8f7;
  list-style: none; /* Remove default marker for details/summary */
}

.page-blog__faq-item[open] .page-blog__faq-question {
  background-color: #d0e8f7;
}

.page-blog__faq-question::-webkit-details-marker {
  display: none;
}

.page-blog__faq-question .page-blog__faq-toggle {
  font-size: 1.5rem;
  line-height: 1;
  margin-left: 15px;
  color: #26A9E0;
}

.page-blog__faq-answer {
  padding: 15px 25px 20px;
  font-size: 1rem;
  color: #555555;
  background-color: #ffffff;
}

.page-blog__faq-answer p {
  margin-bottom: 0;
}

.page-blog__faq-answer a {
  color: #26A9E0;
  text-decoration: underline;
}

/* Dark background contrast fix */
.page-blog__dark-section {
  background-color: #26A9E0;
  color: #ffffff;
}

.page-blog__dark-section .page-blog__section-title {
  color: #ffffff;
}

.page-blog__dark-section .page-blog__section-description {
  color: #f0f0f0;
}

/* Light background contrast fix */
.page-blog__light-bg {
  background-color: #ffffff;
  color: #333333;
}

.page-blog__light-bg .page-blog__section-title {
  color: #26A9E0;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-blog__main-title {
    font-size: clamp(2rem, 4.5vw, 3rem);
  }
  .page-blog__section-title {
    font-size: 2rem;
  }
}

@media (max-width: 768px) {
  .page-blog {
    font-size: 16px;
    line-height: 1.6;
  }

  .page-blog__hero-section,
  .page-blog__articles-section,
  .page-blog__why-k9win-section,
  .page-blog__cta-section,
  .page-blog__faq-section,
  .page-blog__video-section {
    padding: 40px 15px;
    padding-top: 10px !important; /* body already handles --header-offset */
  }

  .page-blog__container {
    padding-left: 15px;
    padding-right: 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-blog__hero-content {
    padding: 10px;
  }

  .page-blog__main-title {
    font-size: clamp(1.8rem, 8vw, 2.5rem);
  }

  .page-blog__hero-description {
    font-size: 1rem;
  }

  .page-blog__hero-cta-buttons,
  .page-blog__cta-buttons {
    flex-direction: column;
    gap: 15px;
  }

  .page-blog__btn-primary,
  .page-blog__btn-secondary,
  .page-blog a[class*="btn"] {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding: 12px 20px;
  }

  .page-blog__articles-grid {
    grid-template-columns: 1fr;
  }

  .page-blog__article-image {
    height: 180px;
  }

  .page-blog__article-title {
    font-size: 1.2rem;
  }

  .page-blog__feature-list {
    grid-template-columns: 1fr;
  }

  /* Image responsive rules */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-blog__hero-image-wrapper,
  .page-blog__article-card,
  .page-blog__feature-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  /* Video responsive rules */
  .page-blog video,
  .page-blog__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-blog__video-section,
  .page-blog__video-container,
  .page-blog__video-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 0;
    padding-right: 0;
    overflow: hidden !important;
  }
  .page-blog__video-wrapper {
    margin-left: 0;
    margin-right: 0;
  }
}