/* style/blog.css */

/* Base styles for the blog page */
.page-blog {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #ffffff; /* Default text color for dark body background */
  background-color: transparent; /* Body handles background color */
}

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

.page-blog__section-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 30px;
  line-height: 1.2;
  color: #26A9E0;
}

.page-blog__section-subtitle {
  font-size: 1.2rem;
  text-align: center;
  margin-bottom: 40px;
  color: #f0f0f0;
}

.page-blog__paragraph {
  font-size: 1.1rem;
  margin-bottom: 20px;
  color: #ffffff;
  text-align: justify;
}

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

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

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

.page-blog__hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  text-align: center;
  color: #ffffff;
}

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

.page-blog__hero-description {
  font-size: 1.3rem;
  margin-bottom: 30px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

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

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

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

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

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

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

/* Intro Section */
.page-blog__intro-section {
  padding: 80px 0;
  background-color: #1a1a1a; /* Lighter dark background */
  color: #ffffff;
}

.page-blog__intro-section .page-blog__section-title {
  color: #26A9E0;
}

.page-blog__intro-section .page-blog__paragraph {
  color: #f0f0f0;
}

/* Featured Posts Section */
.page-blog__featured-posts {
  padding: 80px 0;
  background-color: #0d0d0d; /* Darker background */
  color: #ffffff;
}

.page-blog__featured-posts .page-blog__section-title {
  color: #26A9E0;
}

.page-blog__featured-posts .page-blog__section-subtitle {
  color: #f0f0f0;
}

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

.page-blog__post-card {
  background-color: rgba(255, 255, 255, 0.05); /* Semi-transparent white for cards */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-blog__post-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

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

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

.page-blog__post-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: #26A9E0;
  line-height: 1.3;
}

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

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

.page-blog__post-date {
  font-size: 0.9rem;
  color: #aaaaaa;
  display: block;
  margin-bottom: 10px;
}

.page-blog__read-more {
  color: #26A9E0;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
}

.page-blog__read-more i {
  transition: transform 0.3s ease;
}

.page-blog__post-card:hover .page-blog__read-more i {
  transform: translateX(5px);
}

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

/* Categories Section */
.page-blog__categories-section {
  padding: 80px 0;
  background-color: #1a1a1a;
  color: #ffffff;
}

.page-blog__categories-section .page-blog__section-title {
  color: #26A9E0;
}

.page-blog__categories-section .page-blog__section-subtitle {
  color: #f0f0f0;
}

.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-color: rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 25px;
  text-align: center;
  text-decoration: none;
  color: #ffffff;
  transition: background-color 0.3s ease, transform 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

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

.page-blog__category-description {
  font-size: 0.95rem;
  color: #f0f0f0;
}

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

.page-blog__faq-section .page-blog__section-title {
  color: #26A9E0;
}

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

.page-blog__faq-item {
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
}

.page-blog__faq-item summary {
  cursor: pointer;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.2rem;
  font-weight: 600;
  color: #26A9E0;
  list-style: none; /* Hide default marker */
}

.page-blog__faq-item summary::-webkit-details-marker {
  display: none; /* Hide default marker for Webkit */
}

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

.page-blog__faq-toggle {
  font-size: 1.8rem;
  line-height: 1;
  margin-left: 15px;
  transition: transform 0.3s ease;
}

.page-blog__faq-item[open] .page-blog__faq-toggle {
  transform: rotate(45deg); /* Rotate plus to become cross */
}

.page-blog__faq-answer {
  padding: 0 20px 20px 20px;
  font-size: 1rem;
  color: #f0f0f0;
}

/* CTA Section */
.page-blog__cta-section {
  padding: 80px 0;
  background-color: #1a1a1a;
  text-align: center;
  color: #ffffff;
}

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

.page-blog__cta-section .page-blog__paragraph {
  color: #f0f0f0;
  max-width: 800px;
  margin: 0 auto 30px auto;
}

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

/* Responsive Design */
@media (max-width: 1024px) {
  .page-blog__hero-content {
    padding: 0 15px;
  }

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

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

  .page-blog__container {
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-blog__section-title {
    font-size: clamp(2rem, 8vw, 2.8rem);
  }

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

  .page-blog__main-title {
    font-size: clamp(2.2rem, 9vw, 3.5rem);
  }

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

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

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

  .page-blog__intro-section,
  .page-blog__featured-posts,
  .page-blog__categories-section,
  .page-blog__faq-section,
  .page-blog__cta-section {
    padding: 50px 0;
  }

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

  .page-blog__post-title {
    font-size: 1.3rem;
  }

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

  .page-blog__faq-item summary {
    font-size: 1rem;
    padding: 15px;
  }

  /* Mobile image and container responsive styles */
  .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, .page-blog__category-card {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  
  /* Ensure no overflow */
  .page-blog__hero-section, .page-blog__intro-section, .page-blog__featured-posts, .page-blog__categories-section, .page-blog__faq-section, .page-blog__cta-section {
    overflow: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
}

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

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

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

  .page-blog__posts-grid,
  .page-blog__category-grid {
    grid-template-columns: 1fr;
  }

  .page-blog__faq-item summary {
    font-size: 0.95rem;
  }

  .page-blog__faq-answer {
    font-size: 0.9rem;
  }
}

/* General dark background with light text */
.page-blog__dark-bg {
  background-color: #0d0d0d;
  color: #ffffff;
}

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

/* Ensure color contrast for elements */
.page-blog__post-card,
.page-blog__category-card,
.page-blog__faq-item {
  background-color: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}

.page-blog__post-title,
.page-blog__category-title,
.page-blog__faq-question .page-blog__faq-qtext {
  color: #26A9E0;
}

.page-blog__paragraph,
.page-blog__post-excerpt,
.page-blog__category-description,
.page-blog__faq-answer p {
  color: #f0f0f0;
}

/* Specific color overrides */
.page-blog__btn-primary {
  background-color: #EA7C07; /* Login color for primary action */
  border-color: #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;
}