:root {
  --primary-color: #017439;
  --secondary-color: #00562a; /* Darker shade of primary for hover */
  --text-color: #333333;
  --light-bg: #ffffff;
  --dark-bg: #017439;
  --register-btn-bg: #C30808;
  --login-btn-bg: #C30808;
  --register-login-text: #FFFF00;
  --border-color: #e0e0e0;
}

.page-blog {
  font-family: 'Arial', sans-serif;
  color: var(--text-color);
  line-height: 1.6;
  background-color: var(--light-bg); /* Body background is white, so main content text is dark */
}

/* 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; /* Adhering to the 10px top padding rule */
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: #ffffff;
}

.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 on desktop too */
}

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

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

.page-blog__hero-content h1 {
  font-size: clamp(2.2em, 4vw, 3.5em); /* Using clamp for H1 font size */
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
  color: #ffffff;
}

.page-blog__hero-content p {
  font-size: 1.1em;
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: #f0f0f0;
}

.page-blog__hero-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap; /* Ensure buttons wrap on smaller screens */
  width: 100%; /* Important for mobile button responsiveness */
  max-width: 500px; /* Limit button group width */
  margin: 0 auto;
}

.page-blog__cta-button {
  display: inline-block;
  padding: 15px 40px;
  text-decoration: none;
  border-radius: 5px;
  font-size: 18px;
  font-weight: bold;
  transition: all 0.3s ease;
  box-sizing: border-box;
  max-width: 100%;
  white-space: normal;
  word-wrap: break-word;
}

.page-blog__btn-register {
  background: var(--register-btn-bg);
  color: var(--register-login-text);
  border: 2px solid var(--register-btn-bg);
}

.page-blog__btn-login {
  background: var(--login-btn-bg);
  color: var(--register-login-text);
  border: 2px solid var(--login-btn-bg);
}

.page-blog__btn-register:hover,
.page-blog__btn-login:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

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

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

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

.page-blog__btn-secondary:hover {
  background: var(--primary-color);
  color: var(--light-bg);
  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: 0 20px;
  box-sizing: border-box;
}

.page-blog__section-title {
  font-size: clamp(1.8em, 3vw, 2.8em);
  font-weight: 700;
  text-align: center;
  margin-bottom: 40px;
  color: var(--text-color);
}

.page-blog__dark-section .page-blog__section-title {
  color: #ffffff;
}

.page-blog__light-bg {
  background-color: var(--light-bg);
  padding: 60px 0;
}

.page-blog__dark-bg {
  background-color: var(--dark-bg);
  padding: 60px 0;
  color: #ffffff;
}

/* Intro Section */
.page-blog__intro-text {
  font-size: 1.1em;
  text-align: center;
  max-width: 900px;
  margin: 0 auto 20px;
  color: var(--text-color);
}

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

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

.page-blog__category-card:hover {
  transform: translateY(-10px);
  background: rgba(255, 255, 255, 0.2);
}

.page-blog__category-title {
  font-size: 1.5em;
  font-weight: 600;
  margin-bottom: 15px;
  color: #ffffff;
}

.page-blog__category-desc {
  font-size: 1em;
  color: #f0f0f0;
}

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

.page-blog__post-card {
  background: var(--light-bg);
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  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 20px rgba(0, 0, 0, 0.12);
}

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

.page-blog__post-content {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.page-blog__post-title {
  font-size: 1.4em;
  font-weight: 600;
  margin-bottom: 10px;
  line-height: 1.3;
}

.page-blog__post-title a {
  color: var(--text-color);
  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: #777777;
  margin-bottom: 15px;
}

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

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

.page-blog__read-more-btn:hover {
  background: var(--secondary-color);
}

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

/* CTA Section */
.page-blog__cta-section p {
  font-size: 1.1em;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 30px;
  color: #f0f0f0;
}

.page-blog__cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}

/* FAQ Section */
.page-blog__faq-list {
  max-width: 900px;
  margin: 0 auto;
}

details.page-blog__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  background: var(--light-bg);
}
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: 16px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: var(--text-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: #f9f9f9;
  border-radius: 0 0 5px 5px;
  color: #555555;
}

/* More Info Section */
.page-blog__more-info-section p {
  font-size: 1.1em;
  text-align: center;
  max-width: 900px;
  margin: 0 auto 30px;
  color: #f0f0f0;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-blog__hero-content h1 {
    font-size: clamp(2em, 4.5vw, 3em);
  }
  .page-blog__section-title {
    font-size: clamp(1.6em, 3.5vw, 2.5em);
  }
  .page-blog__categories-grid,
  .page-blog__posts-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

@media (max-width: 768px) {
  .page-blog__hero-section {
    padding-top: 10px !important;
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .page-blog__hero-section img {
    border-radius: 4px;
    margin-bottom: 20px;
  }
  
  .page-blog__hero-content h1 {
    font-size: clamp(1.8em, 6vw, 2.5em);
    margin-bottom: 15px;
  }
  
  .page-blog__hero-content p {
    font-size: 1em;
    margin-bottom: 25px;
  }
  
  .page-blog__hero-buttons {
    flex-direction: column;
    gap: 15px;
    max-width: 300px;
  }
  
  .page-blog__cta-button {
    padding: 12px 25px;
    font-size: 16px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  /* General sections and containers */
  .page-blog__light-bg,
  .page-blog__dark-bg {
    padding: 40px 0;
  }

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

  .page-blog__section-title {
    font-size: clamp(1.5em, 5vw, 2em);
    margin-bottom: 30px;
  }

  .page-blog__intro-text,
  .page-blog__cta-section p,
  .page-blog__more-info-section p {
    font-size: 0.95em;
  }

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

  .page-blog__post-card img {
     /* Adjust height for mobile */
  }

  /* FAQ */
  details.page-blog__faq-item summary.page-blog__faq-question { padding: 15px; }
  .page-blog__faq-qtext { font-size: 15px; }
  details.page-blog__faq-item .page-blog__faq-answer { padding: 0 15px 15px; }
  
  .page-blog__cta-buttons {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-direction: column;
    gap: 15px;
  }
}

@media (max-width: 480px) {
  .page-blog__hero-content h1 {
    font-size: clamp(1.6em, 8vw, 2.2em);
  }
  .page-blog__section-title {
    font-size: clamp(1.4em, 6vw, 1.8em);
  }
  .page-blog__category-card {
    padding: 20px;
    min-height: 160px;
  }
  .page-blog__category-title {
    font-size: 1.3em;
  }
  .page-blog__post-card img {
    
  }
  .page-blog__post-title {
    font-size: 1.2em;
  }
  .page-blog__read-more-btn {
    padding: 8px 15px;
    font-size: 0.9em;
  }
}