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

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

.page-blog__section {
  padding: 60px 20px;
  margin-bottom: 0;
}

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

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

/* 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, body handles header offset */
  background-color: var(--bg-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__hero-content h1 {
  font-size: clamp(2em, 3.5vw, 2.8em); /* Clamp for H1, not fixed large value */
  color: var(--primary-color);
  margin-bottom: 15px;
  line-height: 1.2;
  font-weight: 700;
}

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

.page-blog__cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: var(--secondary-color); /* Use login color for primary CTA */
  color: var(--text-light);
  text-decoration: none;
  border-radius: 5px;
  font-size: 18px;
  font-weight: bold;
  margin-top: 10px;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.page-blog__cta-button:hover {
  background: #c76500;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Latest Posts Section */
.page-blog__latest-posts {
  background-color: var(--bg-white);
}

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

.page-blog__post-card {
  background: var(--bg-white);
  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;
}

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

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

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

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

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

.page-blog__post-date {
  font-size: 14px;
  color: #666;
  margin-bottom: 15px;
}

.page-blog__post-excerpt {
  font-size: 15px;
  color: var(--text-dark);
  margin-bottom: 20px;
}

.page-blog__read-more {
  display: inline-block;
  color: var(--secondary-color);
  font-weight: bold;
  font-size: 15px;
  transition: color 0.3s ease;
}

.page-blog__read-more:hover {
  color: #c76500;
}

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

.page-blog__view-all-button {
  display: inline-block;
  padding: 12px 30px;
  background: var(--primary-color);
  color: var(--text-light);
  text-decoration: none;
  border-radius: 5px;
  font-size: 16px;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.page-blog__view-all-button:hover {
  background: #1e87b8;
  transform: translateY(-2px);
}

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

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

.page-blog__category-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
}

.page-blog__category-item a {
  display: block;
  padding: 10px 25px;
  background: rgba(255, 255, 255, 0.15);
  color: var(--text-light);
  text-decoration: none;
  border-radius: 25px;
  font-size: 16px;
  font-weight: 500;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.page-blog__category-item a:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

/* FAQ Section */
.page-blog__faq-section {
  background-color: var(--bg-light);
}

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

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: 17px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: var(--primary-color);
}

.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: #fcfcfc;
  border-top: 1px solid var(--border-color);
  border-radius: 0 0 8px 8px;
  color: var(--text-dark);
}

details.page-blog__faq-item .page-blog__faq-answer p {
  margin: 0;
  padding-top: 15px;
  font-size: 15px;
}

/* CTA Section */
.page-blog__cta-section {
  background-color: var(--bg-white);
  padding-top: 80px;
  padding-bottom: 80px;
}

.page-blog__cta-section .page-blog__container {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 40px;
  background: linear-gradient(to right, var(--primary-color), #1e87b8);
  border-radius: 12px;
  padding: 40px 50px;
  color: var(--text-light);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.page-blog__cta-content {
  flex: 1;
}

.page-blog__cta-content .page-blog__section-title {
  color: var(--text-light);
  text-align: left;
  margin-bottom: 20px;
  font-size: 32px;
}

.page-blog__cta-content p {
  font-size: 18px;
  line-height: 1.6;
  margin-bottom: 30px;
  color: rgba(255, 255, 255, 0.9);
}

.page-blog__cta-image {
  flex-shrink: 0;
  width: 350px;
  height: 263px; /* Maintain aspect ratio for 1000x750 image */
}

.page-blog__cta-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.page-blog__btn-primary {
  display: inline-block;
  padding: 15px 40px;
  background: var(--secondary-color);
  color: var(--text-light);
  text-decoration: none;
  border-radius: 5px;
  font-size: 18px;
  font-weight: bold;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.page-blog__btn-primary:hover {
  background: #c76500;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-blog__cta-section .page-blog__container {
    flex-direction: column;
    text-align: center;
    padding: 30px;
  }

  .page-blog__cta-content .page-blog__section-title {
    text-align: center;
  }

  .page-blog__cta-image {
    width: 100%;
    max-width: 400px;
    margin-top: 30px;
    height: auto;
  }
}

@media (max-width: 768px) {
  .page-blog__section {
    padding: 40px 0;
  }

  .page-blog__hero-section {
    padding-top: 10px !important;
    padding-bottom: 30px;
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .page-blog__hero-content h1 {
    font-size: 28px;
  }

  .page-blog__hero-content p {
    font-size: 16px;
    margin-bottom: 20px;
  }

  .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__section-title {
    font-size: 28px;
    margin-bottom: 30px;
  }

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

  .page-blog__post-card img {
    
  }

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

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

  .page-blog__category-item a {
    font-size: 14px;
    padding: 8px 18px;
  }

  details.page-blog__faq-item summary.page-blog__faq-question {
    padding: 15px;
  }
  .page-blog__faq-qtext {
    font-size: 15px;
  }
  .page-blog__faq-toggle {
    font-size: 20px;
    width: 24px;
    height: 24px;
  }
  details.page-blog__faq-item .page-blog__faq-answer {
    padding: 0 15px 15px;
  }

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

  .page-blog__cta-content .page-blog__section-title {
    font-size: 24px;
  }

  .page-blog__cta-content p {
    font-size: 16px;
  }
  
  /* General mobile image and container adaptation */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-blog__section,
  .page-blog__card,
  .page-blog__container,
  .page-blog__hero-container,
  .page-blog__cta-section .page-blog__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  
  /* Button specific mobile adaptation */
  .page-blog__btn-primary,
  .page-blog a[class*="button"],
  .page-blog a[class*="btn"] {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }
  
  .page-blog__cta-buttons,
  .page-blog__button-group,
  .page-blog__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-wrap: wrap !important;
    gap: 10px;
  }
}