/* 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 */
  background-color: var(--background-color, #FFFFFF);
}

/* Hero Section */
.page-blog__hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  padding-top: 10px; /* Small top padding, body handles header offset */
  background-color: #ffffff;
  position: relative;
  overflow: hidden;
}

.page-blog__hero-image {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  object-fit: cover;
  border-radius: 8px;
  margin-top: 30px;
}

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

.page-blog__main-title {
  font-size: clamp(2em, 4vw, 3em); /* Responsive font size for H1 */
  font-weight: bold;
  color: #26A9E0;
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-blog__description {
  font-size: 1.1em;
  color: #555555;
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

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

.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.05em;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  box-sizing: border-box;
  text-align: center;
  white-space: normal;
  word-wrap: break-word;
}

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

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

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

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

/* Video Section */
.page-blog__video-section {
  background-color: #ffffff;
  padding: 60px 20px;
  padding-top: 10px; /* Small top padding, body handles header offset */
  text-align: center;
}

.page-blog__video-container {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  box-sizing: border-box;
}

.page-blog__video-wrapper {
  display: block;
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  overflow: hidden;
  border-radius: 8px;
  margin-top: 30px;
  cursor: pointer;
}

.page-blog__video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-blog__video-caption {
  margin-top: 15px;
  font-style: italic;
  color: #666666;
}

/* General Section Styles */
.page-blog__content-area {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  box-sizing: border-box;
}

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

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

/* Latest Posts Section */
.page-blog__latest-posts-section {
  background-color: #f9f9f9;
  padding: 60px 0;
}

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

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

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

.page-blog__post-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  min-height: 200px; /* Enforce minimum size */
}

.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;
}

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

.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 {
  display: inline-block;
  color: #26A9E0;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.page-blog__read-more:hover {
  color: #1a8ccb;
  text-decoration: underline;
}

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

/* Categories Section */
.page-blog__categories-section {
  background-color: #26A9E0;
  padding: 60px 0;
  color: #ffffff;
}

.page-blog__categories-section .page-blog__section-title,
.page-blog__categories-section .page-blog__section-description {
  color: #ffffff;
}

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

.page-blog__category-card {
  background-color: rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 25px;
  text-align: center;
  text-decoration: none;
  color: #ffffff;
  transition: background-color 0.3s ease, transform 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 180px;
}

.page-blog__category-card:hover {
  background-color: 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;
}

/* About may999 Section */
.page-blog__about-may999 {
  background-color: #ffffff;
  padding: 60px 0;
}

.page-blog__feature-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  list-style: none;
  padding: 0;
  margin-top: 40px;
}

.page-blog__feature-item {
  background-color: #f9f9f9;
  border-left: 5px solid #26A9E0;
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.page-blog__feature-title {
  font-size: 1.3em;
  color: #26A9E0;
  margin-bottom: 10px;
  font-weight: bold;
}

.page-blog__feature-text {
  color: #555555;
  font-size: 0.95em;
}

/* FAQ Section */
.page-blog__faq-section {
  background-color: #f0f8ff;
  padding: 60px 0;
}

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

.page-blog__faq-item {
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
}

.page-blog__faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
  font-size: 1.1em;
  color: #26A9E0;
  background-color: #fdfdfd;
  transition: background-color 0.3s ease;
}

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

.page-blog__faq-item summary:hover {
  background-color: #f5f5f5;
}

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

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

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

/* CTA Section */
.page-blog__cta-section {
  background-color: #26A9E0;
  padding: 80px 20px;
  text-align: center;
  color: #ffffff;
}

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

.page-blog__cta-section .page-blog__cta-buttons {
  margin-top: 40px;
}

.page-blog__cta-section .page-blog__btn-primary {
  background-color: #EA7C07; /* Login color */
  border-color: #EA7C07;
}

.page-blog__cta-section .page-blog__btn-primary:hover {
  background-color: #cc6a00;
  border-color: #cc6a00;
}

.page-blog__cta-section .page-blog__btn-secondary {
  background-color: #ffffff;
  color: #26A9E0;
  border-color: #ffffff;
}

.page-blog__cta-section .page-blog__btn-secondary:hover {
  background-color: #f0f0f0;
  color: #1a8ccb;
  border-color: #f0f0f0;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-blog__main-title {
    font-size: clamp(2em, 5vw, 2.8em);
  }
  .page-blog__section-title {
    font-size: 2em;
  }
  .page-blog__hero-content,
  .page-blog__content-area {
    padding-left: 15px;
    padding-right: 15px;
  }
}

@media (max-width: 768px) {
  .page-blog__hero-section,
  .page-blog__video-section,
  .page-blog__latest-posts-section,
  .page-blog__categories-section,
  .page-blog__about-may999,
  .page-blog__faq-section,
  .page-blog__cta-section {
    padding: 40px 15px;
  }
  
  .page-blog__hero-section {
    padding-top: 10px !important; /* body handles header offset */
  }

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

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

  .page-blog__description,
  .page-blog__section-description {
    font-size: 1em;
  }

  .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-left: 15px;
    padding-right: 15px;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-blog__post-grid,
  .page-blog__category-grid,
  .page-blog__feature-list {
    grid-template-columns: 1fr;
    gap: 20px;
  }

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

  /* Mobile video responsiveness */
  .page-blog video,
  .page-blog__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
    box-sizing: border-box !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;
  }

  .page-blog__video-section {
    padding-top: 10px !important; /* body already handles --header-offset */
  }

  .page-blog__section,
  .page-blog__card,
  .page-blog__container,
  .page-blog__post-card,
  .page-blog__category-card,
  .page-blog__feature-item,
  .page-blog__faq-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    /* Add horizontal padding to main content containers to avoid edge-to-edge content */
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Reset padding for elements inside already padded containers if needed */
  .page-blog__content-area .page-blog__post-card,
  .page-blog__content-area .page-blog__category-card,
  .page-blog__content-area .page-blog__feature-item,
  .page-blog__content-area .page-blog__faq-item {
    padding-left: 0;
    padding-right: 0;
  }

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

  .page-blog__faq-answer {
    padding: 0 20px 15px 20px;
  }
}