/* style/blog.css */

/* Variables */
:root {
  --page-blog-primary-color: #26A9E0;
  --page-blog-secondary-color: #FFFFFF;
  --page-blog-dark-text: #000000;
  --page-blog-light-text: #FFFFFF;
  --page-blog-accent-login: #EA7C07;
  --page-blog-bg-dark: #0a0a0a; /* Inherited from body */
  --page-blog-bg-light: #FFFFFF;
  --page-blog-card-bg-dark: rgba(255, 255, 255, 0.1);
}

.page-blog {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--page-blog-light-text); /* Default text color for dark body background */
  background-color: var(--page-blog-bg-dark); /* Ensure consistency if not inherited */
}

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

/* Typography */
.page-blog h1, .page-blog h2, .page-blog h3 {
  font-weight: bold;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.page-blog h1 {
  color: var(--page-blog-light-text);
  /* No fixed font-size for H1, relying on clamp if needed, otherwise relative units */
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  text-align: center;
}

.page-blog h2 {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  color: var(--page-blog-light-text);
  text-align: center;
  margin-bottom: 2rem;
}

.page-blog h3 {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  color: var(--page-blog-light-text);
}

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

.page-blog__section-subtitle {
  font-size: 1.1rem;
  color: var(--page-blog-light-text);
  text-align: center;
  margin-bottom: 3rem;
}

.page-blog p {
  margin-bottom: 1rem;
  color: var(--page-blog-light-text);
}

.page-blog__description {
  font-size: 1.1rem;
  text-align: center;
  max-width: 800px;
  margin: 1.5rem auto 2.5rem auto;
}

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

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

/* Buttons */
.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 25px;
  border-radius: 8px;
  font-weight: bold;
  text-transform: uppercase;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  text-align: center;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
  max-width: 100%;
}

.page-blog__btn-primary {
  background-color: var(--page-blog-primary-color);
  color: var(--page-blog-light-text);
  border: 2px solid var(--page-blog-primary-color);
}

.page-blog__btn-primary:hover {
  background-color: darken(var(--page-blog-primary-color), 10%);
  border-color: darken(var(--page-blog-primary-color), 10%);
}

.page-blog__btn-secondary {
  background-color: transparent;
  color: var(--page-blog-primary-color);
  border: 2px solid var(--page-blog-primary-color);
}

.page-blog__btn-secondary:hover {
  background-color: var(--page-blog-primary-color);
  color: var(--page-blog-light-text);
}

.page-blog__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 2rem;
  flex-wrap: wrap;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

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

/* Hero Section */
.page-blog__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end; /* Align content to bottom, image to top */
  padding: 60px 20px;
  padding-top: 10px; /* Small top padding, body handles header offset */
  min-height: 600px;
  box-sizing: border-box;
  background-color: var(--page-blog-bg-dark);
}

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

.page-blog__hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.3; /* Slightly dim the background image */
}

.page-blog__hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 900px;
  padding: 20px;
  background: rgba(0, 0, 0, 0.5); /* Semi-transparent overlay for text readability */
  border-radius: 10px;
  margin-bottom: 20px; /* Space from bottom of hero section */
}

/* Latest Articles Section */
.page-blog__latest-articles {
  padding: 80px 0;
  background-color: var(--page-blog-bg-light);
  color: var(--page-blog-dark-text);
}

.page-blog__latest-articles .page-blog__section-title,
.page-blog__latest-articles .page-blog__section-subtitle {
  color: var(--page-blog-dark-text);
}

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

.page-blog__article-card {
  background-color: var(--page-blog-bg-light);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%; /* Ensure cards have equal height */
  display: flex;
  flex-direction: column;
}

.page-blog__article-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.page-blog__article-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
}

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

.page-blog__article-content {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  color: var(--page-blog-dark-text);
}

.page-blog__article-content .page-blog__article-title {
  font-size: 1.3rem;
  margin-bottom: 10px;
  color: var(--page-blog-dark-text);
}

.page-blog__article-content .page-blog__article-title:hover {
  color: var(--page-blog-primary-color);
}

.page-blog__article-excerpt {
  font-size: 0.95rem;
  color: #555;
  margin-bottom: 15px;
  flex-grow: 1;
}

.page-blog__article-date {
  font-size: 0.85rem;
  color: #888;
  margin-top: auto;
  margin-bottom: 10px;
}

.page-blog__read-more {
  color: var(--page-blog-primary-color);
  font-weight: bold;
  font-size: 0.9rem;
}

/* Categories Section */
.page-blog__categories-section {
  padding: 80px 0;
  background-color: var(--page-blog-primary-color);
  color: var(--page-blog-light-text);
}

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

.page-blog__categories-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.15);
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  transition: background-color 0.3s ease, transform 0.3s ease;
  color: var(--page-blog-light-text);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
}

.page-blog__category-card:hover {
  background-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-3px);
  text-decoration: none;
}

.page-blog__category-title {
  font-size: 1.4rem;
  margin-bottom: 10px;
  color: var(--page-blog-light-text);
}

.page-blog__category-description {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.8);
}

/* Featured Article Section */
.page-blog__featured-article {
  padding: 80px 0;
  background-color: var(--page-blog-bg-light);
  color: var(--page-blog-dark-text);
}

.page-blog__featured-article .page-blog__section-title {
  color: var(--page-blog-dark-text);
}

.page-blog__featured-content {
  display: flex;
  gap: 40px;
  margin-top: 40px;
  align-items: flex-start;
}

.page-blog__featured-image {
  width: 50%;
  max-width: 600px;
  border-radius: 10px;
  object-fit: cover;
  display: block;
}

.page-blog__featured-text {
  width: 50%;
  color: var(--page-blog-dark-text);
}

.page-blog__featured-title {
  font-size: 2rem;
  margin-top: 0;
  color: var(--page-blog-dark-text);
}

.page-blog__featured-description {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  color: #333333;
}

/* FAQ Section */
.page-blog__faq-section {
  padding: 80px 0;
  background-color: var(--page-blog-bg-dark);
  color: var(--page-blog-light-text);
}

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

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

.page-blog__faq-item {
  background-color: var(--page-blog-card-bg-dark);
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.page-blog__faq-item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  cursor: pointer;
  font-weight: bold;
  font-size: 1.1rem;
  color: var(--page-blog-light-text);
  list-style: none;
}

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

.page-blog__faq-qtext {
  flex-grow: 1;
  color: var(--page-blog-light-text);
}

.page-blog__faq-toggle {
  font-size: 1.5rem;
  line-height: 1;
  width: 25px;
  text-align: center;
  color: var(--page-blog-primary-color);
}

.page-blog__faq-answer {
  padding: 0 25px 20px 25px;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.8);
}

/* Call to Action Section */
.page-blog__cta-section {
  padding: 80px 0;
  text-align: center;
  background-color: var(--page-blog-bg-light);
  color: var(--page-blog-dark-text);
}

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

.page-blog__cta-section .page-blog__description {
  color: #333333;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-blog__featured-content {
    flex-direction: column;
    align-items: center;
  }

  .page-blog__featured-image,
  .page-blog__featured-text {
    width: 100%;
    max-width: 800px;
  }

  .page-blog__featured-text {
    text-align: center;
  }
}

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

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

  .page-blog h1 {
    font-size: clamp(1.8rem, 7vw, 2.5rem);
  }

  .page-blog h2 {
    font-size: clamp(1.5rem, 6vw, 2.2rem);
  }

  .page-blog h3 {
    font-size: clamp(1.2rem, 5vw, 1.8rem);
  }

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

  .page-blog__hero-content {
    padding: 15px;
    margin-bottom: 10px;
  }

  .page-blog__description {
    font-size: 1rem;
    margin: 1rem auto 1.5rem auto;
  }

  .page-blog__cta-buttons {
    flex-direction: column;
    gap: 15px;
    padding: 0 15px;
  }

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

  .page-blog__latest-articles,
  .page-blog__categories-section,
  .page-blog__featured-article,
  .page-blog__faq-section,
  .page-blog__cta-section {
    padding: 50px 0;
  }

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

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

  .page-blog__article-content .page-blog__article-title {
    font-size: 1.1rem;
  }

  .page-blog__article-excerpt {
    font-size: 0.9rem;
  }

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

  .page-blog__faq-answer {
    padding: 0 20px 15px 20px;
    font-size: 0.95rem;
  }

  /* Image responsive rules for mobile */
  .page-blog img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-blog__hero-image-wrapper,
  .page-blog__article-card,
  .page-blog__category-card,
  .page-blog__featured-image,
  .page-blog__article-link,
  .page-blog__video-section,
  .page-blog__video-container,
  .page-blog__video-wrapper,
  .page-blog__cta-buttons,
  .page-blog__button-group,
  .page-blog__btn-container,
  .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;
    overflow: hidden !important;
  }

  .page-blog__hero-section,
  .page-blog__video-section {
    padding-top: 10px !important;
  }

  .page-blog__cta-buttons {
    flex-direction: column;
    gap: 10px;
  }
}

/* Ensure all content images in .page-blog are at least 200px wide for desktop */
.page-blog__article-image,
.page-blog__featured-image {
  min-width: 200px;
  min-height: 200px;
}

/* Ensure specific text colors for light background sections */
.page-blog__latest-articles p,
.page-blog__featured-article p,
.page-blog__cta-section p {
  color: #333333;
}

.page-blog__latest-articles h3,
.page-blog__featured-article h3,
.page-blog__cta-section h2 {
  color: #000000;
}

.page-blog__latest-articles a {
  color: var(--page-blog-primary-color);
}

.page-blog__featured-text a {
  color: var(--page-blog-primary-color);
}