/* style/blog.css */
:root {
  --primary-color: #26A9E0;
  --secondary-color: #EA7C07;
  --text-color-dark: #333333;
  --text-color-light: #ffffff;
  --background-light: #ffffff;
  --background-dark: #26A9E0;
  --border-color: #e0e0e0;
}

.page-blog {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-color-dark);
  background: var(--background-light);
}

/* Hero Section */
.page-blog__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  padding-top: 10px; /* Small top padding, header offset handled by body */
  background: var(--background-dark);
  color: var(--text-color-light);
}

.page-blog__hero-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.page-blog__hero-image {
  width: 100%;
  margin-bottom: 30px;
}

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

.page-blog__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
}

.page-blog__main-title {
  font-size: clamp(2em, 4vw, 2.5em); /* Responsive font size */
  margin-bottom: 20px;
  line-height: 1.2;
  font-weight: bold;
  color: var(--text-color-light);
}

.page-blog__intro-description {
  font-size: 1.1em;
  max-width: 800px;
  margin: 0 auto 30px;
  color: var(--text-color-light);
}

.page-blog__cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: var(--secondary-color); /* Use login color for primary CTA */
  color: var(--text-color-light);
  text-decoration: none;
  border-radius: 5px;
  font-size: 18px;
  font-weight: bold;
  margin-top: 20px;
  transition: all 0.3s ease;
  border: none;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-blog__cta-button:hover {
  background: #c76706; /* Slightly darker secondary color on hover */
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* General Section Styles */
.page-blog__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

.page-blog__section-title {
  font-size: 2.2em;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 40px;
  font-weight: bold;
}

/* Latest Posts Section */
.page-blog__latest-posts {
  padding: 60px 0;
  background: var(--background-light);
}

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

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

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

.page-blog__post-thumbnail {
  width: 100%;
  height: 200px; /* Fixed height for thumbnails */
  overflow: hidden;
}

.page-blog__post-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.page-blog__post-content {
  padding: 20px;
  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.4;
}

.page-blog__post-title a {
  color: var(--text-color-dark);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-blog__post-title a:hover {
  color: var(--primary-color);
}

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

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

.page-blog__read-more {
  display: inline-block;
  padding: 10px 20px;
  background: var(--primary-color);
  color: var(--text-color-light);
  text-decoration: none;
  border-radius: 5px;
  font-size: 0.9em;
  font-weight: bold;
  transition: background-color 0.3s ease;
  border: none;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-blog__read-more:hover {
  background: #1e87b6;
}

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

.page-blog__cta-container {
  max-width: 900px;
}

.page-blog__cta-title {
  font-size: 2.5em;
  font-weight: bold;
  margin-bottom: 20px;
  color: var(--text-color-light);
}

.page-blog__cta-description {
  font-size: 1.2em;
  margin-bottom: 40px;
  color: var(--text-color-light);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* FAQ Section */
.page-blog__faq-section {
  padding: 60px 0;
  background: var(--background-light);
}

details.page-blog__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  background: #fff;
  color: var(--text-color-dark);
}

details.page-blog__faq-item summary.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.3s ease;
}

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

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

.page-blog__faq-qtext {
  flex: 1;
  font-size: 1.1em;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
}

.page-blog__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: #666;
  flex-shrink: 0;
  margin-left: 15px;
  width: 28px;
  text-align: center;
}

details.page-blog__faq-item .page-blog__faq-answer {
  padding: 0 20px 20px;
  background: #f9f9f9;
  border-radius: 0 0 5px 5px;
  color: #555;
}

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

/* Responsive Styles */
@media (max-width: 768px) {
  .page-blog {
    font-size: 15px;
    line-height: 1.6;
  }

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

  .page-blog__main-title {
    font-size: clamp(1.8em, 7vw, 2.2em);
    margin-bottom: 15px;
  }

  .page-blog__intro-description {
    font-size: 1em;
    margin-bottom: 20px;
  }

  .page-blog__cta-button {
    padding: 12px 30px;
    font-size: 16px;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-blog__container {
    padding: 30px 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-blog__section-title {
    font-size: 1.8em;
    margin-bottom: 30px;
  }

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

  .page-blog__post-title {
    font-size: 1.2em;
  }

  .page-blog__read-more {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-blog__cta-section {
    padding: 50px 15px;
  }

  .page-blog__cta-title {
    font-size: 2em;
  }

  .page-blog__cta-description {
    font-size: 1.1em;
  }

  details.page-blog__faq-item summary.page-blog__faq-question {
    padding: 15px;
  }

  .page-blog__faq-qtext {
    font-size: 1em;
  }

  .page-blog__faq-toggle {
    font-size: 20px;
  }

  details.page-blog__faq-item .page-blog__faq-answer {
    padding: 0 15px 15px;
  }
  
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-blog__post-thumbnail {
    height: auto; /* Allow height to adjust on mobile */
  }
}