/* style/blog.css */

:root {
  --primary-color: #26A9E0;
  --secondary-color: #FFFFFF;
  --text-dark: #333333;
  --text-light: #ffffff;
  --login-color: #EA7C07;
  --background-color: #FFFFFF;
  --black-color: #000000;
}

/* Base styles for the blog page */
.page-blog {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-light); /* Assuming body background is dark via shared.css var(--black-color) */
  background-color: transparent; /* Body background handled by shared.css */
}

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

.page-blog__section-title {
  font-size: clamp(2em, 5vw, 2.8em);
  font-weight: 700;
  text-align: center;
  margin-bottom: 40px;
  color: var(--text-light);
}

/* Hero Section */
.page-blog__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  padding-top: 10px; /* Small top padding as body handles --header-offset */
  background-color: var(--primary-color); /* A brand color for the hero background */
  color: var(--text-light);
  text-align: center;
}

.page-blog__hero-image {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  margin-bottom: 30px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-blog__hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.page-blog__main-title {
  font-size: clamp(2.5em, 6vw, 3.5em);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
  color: var(--text-light);
}

.page-blog__hero-description {
  font-size: 1.1em;
  margin-bottom: 30px;
  color: var(--text-light);
}

.page-blog__btn-primary {
  display: inline-block;
  background-color: var(--login-color); /* Using login color for primary CTA for emphasis */
  color: var(--text-light);
  padding: 15px 30px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease;
  border: 2px solid transparent;
}

.page-blog__btn-primary:hover {
  background-color: #d16b06; /* Darken manually, as darken() is not standard CSS */
  border-color: var(--text-light);
}

/* Latest Posts Section */
.page-blog__latest-posts-section {
  padding: 60px 20px;
  background-color: var(--secondary-color); /* Light background for blog posts */
  color: var(--text-dark);
}

.page-blog__latest-posts-section .page-blog__section-title {
  color: var(--text-dark);
}

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

.page-blog__post-card {
  background-color: var(--secondary-color);
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease;
  color: var(--text-dark);
  border: 1px solid #e0e0e0;
}

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

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

.page-blog__post-content {
  padding: 20px;
}

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

.page-blog__post-title a {
  color: var(--primary-color);
  text-decoration: none;
}

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

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

.page-blog__post-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85em;
  color: #777777;
}

.page-blog__read-more-btn {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: bold;
}

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

/* Categories Section */
.page-blog__categories-section {
  padding: 60px 20px;
  background-color: var(--primary-color); /* Dark background */
  color: var(--text-light);
}

.page-blog__categories-section .page-blog__section-title {
  color: var(--text-light);
}

.page-blog__categories-description {
  font-size: 1.1em;
  text-align: center;
  max-width: 900px;
  margin: 0 auto 40px auto;
  color: var(--text-light);
}

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

.page-blog__category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  text-decoration: none;
  color: var(--text-light);
  transition: background-color 0.3s ease, transform 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

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

.page-blog__category-image {
  width: 100%;
  max-width: 280px; /* Adjust to display width */
  height: 180px; /* Adjust to display height */
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 15px;
  display: block;
}

.page-blog__category-title {
  font-size: 1.3em;
  font-weight: 600;
  color: var(--text-light);
}

/* CTA Section */
.page-blog__cta-section {
  padding: 60px 20px;
  background-color: var(--secondary-color); /* Light background */
  color: var(--text-dark);
  text-align: center;
}

.page-blog__cta-section .page-blog__section-title {
  color: var(--text-dark);
}

.page-blog__cta-description {
  font-size: 1.1em;
  max-width: 800px;
  margin: 0 auto 30px auto;
  color: #555555;
}

/* FAQ Section */
.page-blog__faq-section {
  padding: 60px 20px;
  background-color: var(--black-color); /* Dark background from body variable */
  color: var(--text-light);
}

.page-blog__faq-section .page-blog__section-title {
  color: var(--text-light);
}

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

.page-blog__faq-item {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  color: var(--text-light);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  font-size: 1.1em;
  font-weight: 600;
  cursor: pointer;
  background-color: rgba(255, 255, 255, 0.05);
  transition: background-color 0.3s ease;
}

.page-blog__faq-item[open] .page-blog__faq-question {
  background-color: rgba(255, 255, 255, 0.1);
}

.page-blog__faq-question:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.page-blog__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  margin-left: 15px;
}

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

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

/* Responsive styles */
@media (max-width: 1024px) {
  .page-blog__hero-image {
    width: 90%;
    height: auto;
  }
  .page-blog__posts-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
  .page-blog__categories-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,
  .page-blog__hero-section,
  .page-blog__latest-posts-section,
  .page-blog__categories-section,
  .page-blog__cta-section,
  .page-blog__faq-section {
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-blog__hero-section {
    padding: 40px 15px;
    padding-top: 10px !important;
  }

  .page-blog__main-title {
    font-size: 2em; /* Adjusted for mobile */
  }

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

  .page-blog__btn-primary {
    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__posts-grid {
    grid-template-columns: 1fr;
  }

  .page-blog__post-card {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-blog__post-image,
  .page-blog__category-image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

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

  .page-blog__category-card {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* General image and container rules for mobile */
  .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 {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  
  /* Video specific mobile rules (if any videos were present) */
  .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: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }
}

@media (max-width: 480px) {
  .page-blog__main-title {
    font-size: 1.8em;
  }
  .page-blog__section-title {
    font-size: 1.8em;
  }
  .page-blog__post-title {
    font-size: 1.2em;
  }
  .page-blog__faq-question {
    font-size: 1em;
    padding: 15px 20px;
  }
  .page-blog__faq-answer {
    padding: 0 20px 15px;
  }
}