/* style/blog.css */

/* Base styles for the blog page */
.page-blog {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #ffffff; /* Light text for dark body background */
  background-color: #000000; /* Ensure consistency with body background */
}

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

.page-blog__section {
  padding: 60px 0;
  text-align: center;
}

.page-blog__section-title {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 700;
  margin-bottom: 30px;
  color: #26A9E0; /* Brand color for titles */
  line-height: 1.2;
}

.page-blog__paragraph {
  font-size: 18px;
  margin-bottom: 20px;
  color: #f0f0f0;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.page-blog__highlight {
  color: #26A9E0;
  font-weight: bold;
}

/* Hero Section */
.page-blog__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 0 60px 0; /* Small top padding, body handles header offset */
  min-height: 500px;
  text-align: center;
  overflow: hidden;
}

.page-blog__hero-image-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  order: 1; /* Image block on top */
}

.page-blog__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  filter: brightness(0.5); /* Darken image for text readability */
}

.page-blog__hero-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  color: #ffffff;
  max-width: 900px;
  padding: 20px;
  box-sizing: border-box;
  order: 2; /* Content block below image in DOM flow */
}

.page-blog__main-title {
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 800;
  margin-bottom: 20px;
  line-height: 1.1;
  color: #ffffff;
}

.page-blog__intro-text {
  font-size: 20px;
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: #f0f0f0;
}

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

.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 18px;
  transition: all 0.3s ease;
  box-sizing: border-box;
  max-width: 100%;
  white-space: normal;
  word-wrap: break-word;
}

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

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

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

.page-blog__btn-secondary:hover {
  background-color: #c06305;
  border-color: #c06305;
}

.page-blog__btn-text {
  display: inline-block;
  color: #26A9E0;
  text-decoration: none;
  font-weight: bold;
  margin-top: 15px;
  transition: color 0.3s ease;
}

.page-blog__btn-text:hover {
  color: #1e87c0;
}

/* About Blog Section */
.page-blog__about-blog {
  background-color: #0d0d0d;
  color: #ffffff;
}

/* Featured Categories Section */
.page-blog__featured-categories {
  background-color: #000000;
}

.page-blog__category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-blog__card {
  background-color: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 25px;
  text-align: left;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  color: #ffffff;
}

.page-blog__card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.page-blog__card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
  display: block;
}

.page-blog__card-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 15px;
  color: #26A9E0;
  flex-grow: 1;
}

.page-blog__card-title a {
  color: #26A9E0;
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-blog__card-title a:hover {
  color: #1e87c0;
}

.page-blog__card-text {
  font-size: 16px;
  color: #f0f0f0;
  margin-bottom: 15px;
}

.page-blog__card-meta {
  font-size: 14px;
  color: #aaaaaa;
  margin-bottom: 10px;
}

/* Why Read Section */
.page-blog__why-read {
  background-color: #0d0d0d;
  text-align: left;
}

.page-blog__list {
  list-style: none;
  padding: 0;
  margin-top: 30px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.page-blog__list-item {
  font-size: 18px;
  margin-bottom: 15px;
  position: relative;
  padding-left: 30px;
  color: #f0f0f0;
}

.page-blog__list-item::before {
  content: '✔';
  color: #26A9E0;
  position: absolute;
  left: 0;
  font-weight: bold;
}

.page-blog__cta-wrapper {
  margin-top: 40px;
  text-align: center;
}

/* Latest Posts Section */
.page-blog__latest-posts {
  background-color: #000000;
}

.page-blog__post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-blog__post-card .page-blog__card-content {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.page-blog__post-card .page-blog__card-title {
  margin-top: 0;
}

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

/* FAQ Section */
.page-blog__faq-section {
  background-color: #0d0d0d;
}

.page-blog__faq-list {
  margin-top: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}

.page-blog__faq-item {
  margin-bottom: 15px;
  background-color: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  color: #ffffff;
}

.page-blog__faq-item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-size: 20px;
  font-weight: bold;
  color: #26A9E0;
  padding: 10px 0;
  list-style: none;
}

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

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.page-blog__faq-qtext {
  flex-grow: 1;
  color: #ffffff;
}

.page-blog__faq-toggle {
  font-size: 24px;
  margin-left: 15px;
  color: #26A9E0;
}

.page-blog__faq-answer {
  padding-top: 15px;
  font-size: 16px;
  color: #f0f0f0;
}

.page-blog__faq-answer a {
  color: #26A9E0;
  text-decoration: none;
  font-weight: bold;
}

.page-blog__faq-answer a:hover {
  text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .page-blog__hero-content {
    max-width: 700px;
  }

  .page-blog__main-title {
    font-size: clamp(32px, 4.5vw, 50px);
  }

  .page-blog__intro-text {
    font-size: 18px;
  }

  .page-blog__section-title {
    font-size: clamp(26px, 3.5vw, 40px);
  }

  .page-blog__paragraph,
  .page-blog__list-item,
  .page-blog__card-text,
  .page-blog__card-meta,
  .page-blog__faq-answer p {
    font-size: 16px;
  }
}

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

  .page-blog__section {
    padding: 40px 0;
  }

  .page-blog__container {
    padding: 0 15px;
  }

  .page-blog__hero-section {
    padding: 10px 0 40px 0;
    min-height: 400px;
  }

  .page-blog__hero-content {
    padding: 15px;
    position: static;
    transform: none;
    margin-top: 20px;
  }

  .page-blog__hero-image-wrapper {
    order: 1;
    height: 300px;
  }

  .page-blog__hero-content {
    order: 2;
    position: relative;
    width: 100%;
  }

  .page-blog__main-title {
    font-size: clamp(28px, 6vw, 40px);
    margin-bottom: 15px;
  }

  .page-blog__intro-text {
    font-size: 16px;
    margin-bottom: 25px;
  }

  .page-blog__cta-buttons {
    flex-direction: column;
    gap: 10px;
    width: 100%;
    padding: 0 15px;
    box-sizing: border-box;
  }

  .page-blog__btn-primary,
  .page-blog__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 20px;
    font-size: 16px;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-blog__section-title {
    font-size: clamp(24px, 5vw, 36px);
    margin-bottom: 25px;
  }

  .page-blog__category-grid,
  .page-blog__post-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-blog__card {
    padding: 20px;
    border-radius: 10px;
  }

  .page-blog__card-image {
    height: 180px;
    border-radius: 6px;
    margin-bottom: 15px;
  }

  .page-blog__card-title {
    font-size: 20px;
    margin-bottom: 10px;
  }

  .page-blog__list-item {
    font-size: 16px;
    padding-left: 25px;
  }

  .page-blog__list-item::before {
    font-size: 18px;
  }

  .page-blog__faq-item summary {
    font-size: 18px;
    padding: 8px 0;
  }

  .page-blog__faq-qtext {
    font-size: 16px;
  }

  .page-blog__faq-toggle {
    font-size: 20px;
  }

  .page-blog__faq-answer {
    padding-top: 10px;
    font-size: 15px;
  }

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

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

  .page-blog__hero-section {
    padding-top: 10px !important; /* body already handles --header-offset */
  }
}

@media (max-width: 480px) {
  .page-blog__hero-section {
    min-height: 350px;
  }

  .page-blog__hero-image-wrapper {
    height: 250px;
  }

  .page-blog__main-title {
    font-size: clamp(24px, 7vw, 36px);
  }

  .page-blog__intro-text {
    font-size: 15px;
  }

  .page-blog__btn-primary,
  .page-blog__btn-secondary {
    padding: 10px 15px;
    font-size: 15px;
  }

  .page-blog__section-title {
    font-size: clamp(22px, 6vw, 32px);
  }

  .page-blog__card-image {
    height: 160px;
  }

  .page-blog__card-title {
    font-size: 18px;
  }

  .page-blog__paragraph,
  .page-blog__list-item,
  .page-blog__card-text,
  .page-blog__faq-answer p {
    font-size: 14px;
  }

  .page-blog__faq-qtext {
    font-size: 14px;
  }
}