/* Base styles for the blog page */
.page-blog {
  font-family: 'Arial', sans-serif;
  color: #333333; /* Default text color for light background */
  line-height: 1.6;
  background-color: #f8f8f8; /* Light background for the page */
}

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

.page-blog__hero-section {
  background: linear-gradient(135deg, #26A9E0 0%, #4CAF50 100%); /* Example gradient, adjust as needed */
  color: #ffffff;
  text-align: center;
  padding-top: 10px; /* Small top padding as body already handles header offset */
  padding-bottom: 50px;
  position: relative;
  overflow: hidden;
}

.page-blog__hero-image {
  position: relative;
  width: 100%;
  height: 450px; /* Fixed height for desktop hero image */
  margin-bottom: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.page-blog__hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Ensures image covers the area */
  display: block;
}

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

.page-blog__main-title {
  font-size: clamp(2.5em, 5vw, 3.5em); /* Responsive font size */
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.2;
  color: #ffffff;
}

.page-blog__description {
  font-size: 1.1em;
  margin-bottom: 30px;
  color: #e0f7fa;
}

.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  cursor: pointer;
  max-width: 100%; /* Ensure button adapts to container */
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.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: #e66a00;
  border-color: #e66a00;
}

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

.page-blog__btn-secondary:hover {
  background-color: #f0f8ff;
  color: #1a7fb2;
  border-color: #1a7fb2;
}

.page-blog__latest-posts,
.page-blog__explore-categories,
.page-blog__app-download,
.page-blog__faq-section,
.page-blog__cta-section {
  padding: 60px 0;
}

.page-blog__light-bg {
  background-color: #ffffff;
  color: #333333;
}

.page-blog__dark-section {
  background-color: #26A9E0;
  color: #ffffff;
}

.page-blog__section-title {
  font-size: 2.2em;
  font-weight: 700;
  text-align: center;
  margin-bottom: 20px;
  color: inherit;
}

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

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

.page-blog__post-card {
  background: #ffffff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

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

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

.page-blog__post-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.page-blog__post-content {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.page-blog__post-title {
  font-size: 1.3em;
  font-weight: 600;
  margin-bottom: 10px;
  color: #26A9E0;
  flex-grow: 1;
}

.page-blog__post-meta {
  font-size: 0.9em;
  color: #666;
  margin-bottom: 15px;
}

.page-blog__post-excerpt {
  font-size: 1em;
  color: #555;
  margin-bottom: 15px;
}

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

.page-blog__category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
}

.page-blog__category-item {
  background: #ffffff;
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: #333333;
}

.page-blog__category-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.12);
}

.page-blog__category-title {
  font-size: 1.4em;
  font-weight: 600;
  margin-bottom: 10px;
}

.page-blog__category-title a {
  color: #26A9E0;
  text-decoration: none;
}

.page-blog__category-title a:hover {
  text-decoration: underline;
}

.page-blog__category-text {
  font-size: 1em;
  color: #555;
}

.page-blog__app-content-wrapper {
  display: flex;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
}

.page-blog__app-text {
  flex: 1;
  min-width: 300px;
}

.page-blog__app-image-wrapper {
  flex: 1;
  min-width: 300px;
  text-align: center;
}

.page-blog__app-image {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.page-blog__app-benefits {
  list-style: disc;
  padding-left: 20px;
  margin-bottom: 30px;
  color: #555;
}

.page-blog__app-benefits li {
  margin-bottom: 8px;
  font-size: 1em;
}

.page-blog__btn-app-download {
  background-color: #EA7C07;
  color: #ffffff;
  border-color: #EA7C07;
}

.page-blog__btn-app-download:hover {
  background-color: #e66a00;
  border-color: #e66a00;
}

/* FAQ Section */
details.page-blog__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  border: 1px solid #e0e0e0;
  overflow: hidden;
  background: #fff;
}
details.page-blog__faq-item summary.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.3s ease;
}
details.page-blog__faq-item summary.page-blog__faq-question::-webkit-details-marker {
  display: none;
}
details.page-blog__faq-item summary.page-blog__faq-question:hover {
  background: #f5f5f5;
}
.page-blog__faq-qtext {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: #333333;
}
.page-blog__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: #666;
  flex-shrink: 0;
  margin-left: 15px;
  width: 28px;
  text-align: center;
}
details.page-blog__faq-item .page-blog__faq-answer {
  padding: 0 20px 20px;
  background: #f9f9f9;
  border-radius: 0 0 5px 5px;
  color: #555;
}

.page-blog__cta-section {
  text-align: center;
  padding: 80px 0;
  background-color: #26A9E0;
  color: #ffffff;
}

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

.page-blog__cta-section .page-blog__description {
  max-width: 800px;
  margin: 0 auto 40px auto;
  color: #e0f7fa;
}

/* --- Responsive Styles --- */

/* Desktop/Tablet (max-width: 1024px) - General adjustments */
@media (max-width: 1024px) {
  .page-blog__container {
    padding: 15px;
  }

  .page-blog__hero-image {
    height: 350px;
  }

  .page-blog__main-title {
    font-size: clamp(2em, 4vw, 3em);
  }

  .page-blog__section-title {
    font-size: 2em;
  }

  .page-blog__posts-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }

  .page-blog__category-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }

  .page-blog__app-content-wrapper {
    flex-direction: column;
    text-align: center;
  }

  .page-blog__app-text,
  .page-blog__app-image-wrapper {
    min-width: unset;
    width: 100%;
  }

  .page-blog__app-benefits {
    text-align: left;
    margin: 0 auto 30px auto;
    max-width: 500px;
  }
}

/* Mobile (max-width: 768px) */
@media (max-width: 768px) {
  .page-blog__container {
    padding-left: 15px !important;
    padding-right: 15px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-blog__hero-section {
    padding-top: 10px; /* Small top padding for mobile */
    padding-bottom: 30px;
  }

  .page-blog__hero-image {
    height: 250px;
    margin-bottom: 20px;
  }

  .page-blog__hero-image img {
    object-fit: contain !important; /* HERO main image: contain for mobile */
    aspect-ratio: unset !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-blog__main-title {
    font-size: clamp(1.8em, 7vw, 2.5em); /* More restrained font size for mobile H1 */
    margin-bottom: 15px;
  }

  .page-blog__description {
    font-size: 1em;
    margin-bottom: 25px;
  }

  .page-blog__btn-primary,
  .page-blog__btn-secondary,
  .page-blog a[class*="button"],
  .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;
    font-size: 0.95em;
  }

  .page-blog__view-all-button-wrapper,
  .page-blog__cta-section .page-blog__btn-primary {
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-blog__posts-grid {
    grid-template-columns: 1fr; /* Single column for blog posts on mobile */
    gap: 20px;
  }

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

  .page-blog__post-title {
    font-size: 1.1em;
  }

  .page-blog__category-grid {
    grid-template-columns: 1fr; /* Single column for categories on mobile */
    gap: 15px;
  }

  .page-blog__app-content-wrapper {
    flex-direction: column;
    gap: 30px;
  }

  .page-blog__app-text,
  .page-blog__app-image-wrapper {
    width: 100%;
  }

  .page-blog__app-benefits {
    padding-left: 15px;
    margin-left: 0;
    max-width: 100%;
  }

  .page-blog__section-title {
    font-size: 1.8em;
  }

  .page-blog__section-description {
    font-size: 1em;
    margin-bottom: 30px;
  }

  /* FAQ specific mobile styles */
  details.page-blog__faq-item summary.page-blog__faq-question { padding: 15px; }
  .page-blog__faq-qtext { font-size: 15px; }
  details.page-blog__faq-item .page-blog__faq-answer { padding: 0 15px 15px; }

  /* General image responsiveness */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important;
  }

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

  .page-blog__cta-section {
    padding: 50px 15px;
  }

  /* Article body adjustments for mobile */
  .page-blog__content-area,
  .page-blog__text-block,
  .page-blog__article-body {
    max-width: 100%;
    padding-left: 15px;
    padding-right: 15px;
    box-sizing: border-box;
  }

  .page-blog__article-body h2,
  .page-blog__article-body h3,
  .page-blog__article-body h4 {
    text-align: left; /* Ensure headings are left-aligned in article body */
    font-size: clamp(1.2em, 5vw, 1.8em); /* Responsive font size for article headings */
    margin-top: 1.5em;
    margin-bottom: 0.8em;
  }

  .page-blog__article-body p {
    font-size: 1em;
    margin-bottom: 1em;
  }

  /* Ensure all images in content areas are responsive */
  .page-blog__article-body img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
    margin: 20px auto;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  }
}