/* style/blog.css */

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

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

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

.page-blog__section-title {
  font-size: 2.5em;
  font-weight: bold;
  text-align: center;
  margin-bottom: 20px;
  color: #26A9E0; /* Brand color for titles */
}

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

/* Color contrast classes */
.page-blog__dark-bg {
  background: #26A9E0; /* Main brand color */
  color: #ffffff; /* White text for dark background */
}

.page-blog__light-bg {
  background: #ffffff; /* White background */
  color: #333333; /* Dark text for light background */
}

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

.page-blog__hero-image-wrapper {
  width: 100%;
  height: auto;
  position: relative;
  margin-bottom: 30px;
}

.page-blog__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.page-blog__hero-content {
  text-align: center;
  padding-top: 20px;
  color: #ffffff;
  position: relative;
  z-index: 1;
}

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

.page-blog__description {
  font-size: 1.1em;
  max-width: 800px;
  margin: 0 auto 30px auto;
}

/* CTA Buttons */
.page-blog__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.page-blog__cta-button {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  transition: background-color 0.3s ease, transform 0.3s ease;
  box-sizing: border-box;
  max-width: 100%;
  white-space: normal;
  word-wrap: break-word;
  text-align: center;
}

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

.page-blog__btn-primary:hover {
  background: #d46c06;
  transform: translateY(-2px);
}

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

.page-blog__btn-secondary:hover {
  background: #f0f0f0;
  transform: translateY(-2px);
}

/* Latest Posts Grid */
.page-blog__post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

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

.page-blog__post-card:hover {
  transform: translateY(-5px);
}

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

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

.page-blog__post-title {
  font-size: 1.4em;
  font-weight: bold;
  margin-bottom: 10px;
  line-height: 1.3;
}

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

.page-blog__post-title a:hover {
  color: #1a7bb2;
}

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

.page-blog__post-excerpt {
  font-size: 1em;
  color: #555555;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-blog__read-more-link {
  color: #EA7C07; /* Login color */
  text-decoration: none;
  font-weight: bold;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: color 0.3s ease;
}

.page-blog__read-more-link:hover {
  color: #d46c06;
}

.page-blog__arrow {
  font-size: 1.2em;
  line-height: 1;
}

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

.page-blog__view-all-button {
  padding: 12px 25px;
  font-size: 1.05em;
}

/* Categories Section */
.page-blog__category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
  margin-top: 40px;
}

.page-blog__category-card {
  background: rgba(255, 255, 255, 0.15); /* Slightly transparent white on dark background */
  color: #ffffff;
  padding: 30px;
  border-radius: 10px;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.3s ease, transform 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 150px;
}

.page-blog__category-card:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-5px);
}

.page-blog__category-title {
  font-size: 1.5em;
  font-weight: bold;
  margin-bottom: 10px;
  color: #ffffff;
}

.page-blog__category-desc {
  font-size: 0.95em;
  color: #f0f0f0;
}

/* FAQ Section */
.page-blog__faq-list {
  max-width: 900px;
  margin: 40px auto 0 auto;
}

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

.page-blog__faq-item[open] {
  background: #ffffff;
  border-color: #26A9E0;
}

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.1em;
  font-weight: bold;
  color: #333333;
  cursor: pointer;
  list-style: none; /* Remove default marker for details/summary */
}

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

.page-blog__faq-item[open] .page-blog__faq-question {
  color: #26A9E0;
}

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

.page-blog__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  margin-left: 15px;
  color: #26A9E0;
  transition: transform 0.3s ease;
}

.page-blog__faq-item[open] .page-blog__faq-toggle {
  transform: rotate(45deg);
}

.page-blog__faq-answer {
  padding: 0 25px 20px 25px;
  font-size: 1em;
  color: #555555;
}

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

/* Final CTA Section */
.page-blog__cta-final {
  text-align: center;
  padding: 80px 0;
}

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

.page-blog__cta-final .page-blog__description {
  color: #f0f0f0;
  margin-bottom: 40px;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-blog__section-title {
    font-size: 2em;
  }
  .page-blog__main-title {
    font-size: clamp(1.8em, 5vw, 2.8em);
  }
  .page-blog__post-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
  .page-blog__category-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}

@media (max-width: 768px) {
  .page-blog {
    font-size: 16px;
    line-height: 1.6;
  }
  .page-blog__container {
    padding: 0 15px;
  }
  .page-blog__section {
    padding: 40px 0;
  }
  .page-blog__section-title {
    font-size: 1.8em;
    margin-bottom: 15px;
  }
  .page-blog__section-description {
    font-size: 1em;
    margin-bottom: 20px;
  }
  .page-blog__hero-section {
    padding: 40px 0;
    padding-top: 10px !important; /* Ensure small top padding */
  }
  .page-blog__main-title {
    font-size: clamp(1.6em, 6vw, 2.5em);
    margin-bottom: 15px;
  }
  .page-blog__description {
    font-size: 1em;
    margin-bottom: 20px;
  }
  .page-blog__cta-buttons {
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
    padding: 0 15px; /* Add padding to container */
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
  .page-blog__cta-button {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 20px;
    font-size: 1em;
    white-space: normal !important;
    word-wrap: break-word !important;
    box-sizing: border-box !important;
  }
  .page-blog__post-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  .page-blog__post-card {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  }
  .page-blog__post-image {
    height: 200px;
  }
  .page-blog__post-title {
    font-size: 1.2em;
  }
  .page-blog__category-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  .page-blog__category-card {
    padding: 20px;
    min-height: 120px;
  }
  .page-blog__category-title {
    font-size: 1.3em;
  }
  .page-blog__faq-question {
    padding: 15px 20px;
    font-size: 1em;
  }
  .page-blog__faq-answer {
    padding: 0 20px 15px 20px;
  }
  .page-blog__view-all-posts-container {
    margin-top: 30px;
  }

  /* Image responsive rules */
  .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__post-card {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-blog__hero-image-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .page-blog__hero-content {
    padding-left: 15px;
    padding-right: 15px;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  .page-blog__post-content {
    padding-left: 15px;
    padding-right: 15px;
  }
}

/* Ensure no filter on images */
.page-blog img {
  filter: none; /* Absolutely no CSS filters to change image colors */
}

/* Desktop video width for flex containers (if video section were present) */
.page-blog__video-container {
  width: 100%; /* Explicitly set for desktop as per requirement */
  max-width: 1200px; /* Example max-width */
}