/* style/blog.css */
:root {
  --primary-color: #26A9E0;
  --secondary-color: #FFFFFF;
  --login-color: #EA7C07;
  --background-color-body: #FFFFFF; /* Assuming light body background from shared */
  --text-color-dark: #333333;
  --text-color-light: #ffffff;
  --border-color: #e0e0e0;
  --card-bg: #ffffff;
}

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

/* 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 in shared.css */
  background-color: var(--background-color-body);
  color: var(--text-color-dark);
}

.page-blog__hero-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%; /* Ensure full width within max-width */
}

.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-weight: bold;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--primary-color);
  margin-bottom: 20px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  font-size: clamp(28px, 4vw, 48px); /* Using clamp for responsive H1 font size */
}

.page-blog__description {
  font-size: 18px;
  color: var(--text-color-dark);
  max-width: 800px;
  margin: 0 auto 30px auto;
}

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

.page-blog__cta-button:hover {
  background: darken(var(--login-color), 10%); /* Placeholder for darken, will be processed */
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* General Section Styling */
.page-blog__section {
  padding: 60px 0;
  background-color: var(--background-color-body);
  color: var(--text-color-dark);
}

.page-blog__section:nth-of-type(even) {
  background-color: #f9f9f9;
}

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

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

/* Latest Posts Grid */
.page-blog__posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.page-blog__post-card {
  background: var(--card-bg);
  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;
  border: 1px solid var(--border-color);
}

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

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

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

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

.page-blog__post-title {
  font-size: 22px;
  font-weight: bold;
  color: var(--primary-color);
  margin-top: 0;
  margin-bottom: 10px;
  line-height: 1.3;
}

.page-blog__post-excerpt {
  font-size: 16px;
  color: var(--text-color-dark);
  margin-bottom: 15px;
  min-height: 75px; /* Ensure consistent height for excerpts */
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3; /* Limit to 3 lines */
  -webkit-box-orient: vertical;
}

.page-blog__post-meta {
  font-size: 14px;
  color: #666;
  display: block;
}

/* Button Group */
.page-blog__button-group {
  text-align: center;
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 5px;
  font-size: 16px;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

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

.page-blog__btn-primary:hover {
  background: darken(var(--primary-color), 10%); /* Placeholder for darken */
  border-color: darken(var(--primary-color), 10%);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

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

.page-blog__btn-secondary:hover {
  background: #f0f0f0;
  color: darken(var(--primary-color), 10%); /* Placeholder for darken */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Categories List */
.page-blog__category-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
}

.page-blog__category-item {
  display: inline-block;
  padding: 10px 20px;
  background: #e9ecef;
  color: var(--text-color-dark);
  border-radius: 25px;
  text-decoration: none;
  font-size: 16px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.page-blog__category-item:hover {
  background: var(--primary-color);
  color: var(--text-color-light);
}

/* About Us Section */
.page-blog__text-block {
  font-size: 17px;
  margin-bottom: 20px;
  text-align: justify;
}

/* FAQ Section */
details.page-blog__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  background: var(--card-bg);
  box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

details.page-blog__faq-item summary.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.3s ease;
  font-size: 18px;
  font-weight: bold;
  color: var(--primary-color);
}

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;
  line-height: 1.5;
  text-align: left;
}

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

details.page-blog__faq-item .page-blog__faq-answer {
  padding: 0 25px 20px;
  background: #fcfcfc;
  border-radius: 0 0 8px 8px;
  font-size: 16px;
  color: var(--text-color-dark);
}

/* Responsive Design */
@media (max-width: 992px) {
  .page-blog__section-title {
    font-size: 30px;
  }

  .page-blog__main-title {
    font-size: clamp(24px, 5vw, 40px);
  }

  .page-blog__description {
    font-size: 16px;
  }

  .page-blog__post-title {
    font-size: 20px;
  }

  .page-blog__post-excerpt {
    font-size: 15px;
  }
}

@media (max-width: 768px) {
  .page-blog__hero-section {
    padding-top: 10px !important;
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-blog__hero-image img {
    border-radius: 4px;
  }

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

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

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

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

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

  .page-blog__post-card:hover {
    transform: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  }

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

  .page-blog__post-title {
    font-size: 18px;
  }

  .page-blog__post-excerpt {
    font-size: 14px;
    min-height: auto;
  }

  .page-blog__button-group {
    flex-direction: column;
    gap: 10px;
    padding: 0 15px;
  }

  .page-blog__btn-primary,
  .page-blog__btn-secondary {
    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__category-item {
    font-size: 14px;
    padding: 8px 15px;
  }

  details.page-blog__faq-item summary.page-blog__faq-question {
    padding: 15px 20px;
    font-size: 16px;
  }

  .page-blog__faq-qtext {
    font-size: 15px;
  }

  .page-blog__faq-toggle {
    font-size: 24px;
    width: 24px;
    height: 24px;
  }

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

  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
}

/* Ensure images in content area are not too small */
.page-blog__post-thumbnail {
  min-width: 200px;
  min-height: 200px;
}

/* Placeholder for darken function */
/* This would typically be handled by a preprocessor or JS */
.page-blog__cta-button:hover {
  background: #d46c06; /* Darker version of #EA7C07 */
}
.page-blog__btn-primary:hover {
  background: #1f8ac4;
  border-color: #1f8ac4;
}
.page-blog__btn-secondary:hover {
  color: #1f8ac4;
}