:root {
  --primary-color: #F2C14E; /* Main brand color */
  --secondary-color: #FFD36B; /* Auxiliary brand color */
  --text-main-color: #FFF6D6; /* Main text color */
  --background-dark-color: #0A0A0A; /* Page background */
  --card-background-color: #111111; /* Card background */
  --border-color: #3A2A12; /* Border color */
  --button-gradient: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%); /* Button gradient */
  --glow-color: #FFD36B; /* Glow effect color */
}

.page-blog {
  background-color: var(--background-dark-color);
  color: var(--text-main-color);
  font-family: Arial, sans-serif;
  line-height: 1.6;
  padding-bottom: 50px; /* Ensure space above footer */
}

/* Ensure headings have good contrast */
.page-blog h1,
.page-blog h2,
.page-blog h3 {
  color: var(--text-main-color); /* Light text on dark background */
  font-weight: bold;
  margin-bottom: 20px;
}

.page-blog h1 {
  font-size: clamp(28px, 4vw, 48px); /* Responsive H1, no fixed huge values */
  line-height: 1.2;
  letter-spacing: 0.5px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.page-blog h2 {
  font-size: clamp(24px, 3.5vw, 40px);
  text-align: center;
  margin-bottom: 30px;
  color: var(--secondary-color); /* Use auxiliary color for section titles */
}

.page-blog h3 {
  font-size: clamp(20px, 2.5vw, 28px);
  margin-bottom: 15px;
}

.page-blog p {
  margin-bottom: 15px;
}

.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 */
  overflow: hidden; /* Prevent content overflow */
}

.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 width is 100% for flex item */
}

.page-blog__hero-image {
  width: 100%;
  margin-bottom: 30px;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.page-blog__hero-image img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  border-radius: 12px; /* Slightly larger radius */
  object-fit: cover;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4); /* Add shadow for depth */
}

.page-blog__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
  max-width: 800px; /* Constrain text width for readability */
  padding: 0 15px;
}

.page-blog__hero-content p {
  color: var(--text-main-color);
  font-size: 17px;
  margin-bottom: 25px;
}

.page-blog__cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: var(--button-gradient);
  color: var(--text-main-color); /* Text main color for button */
  text-decoration: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  margin-top: 30px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  border: none;
  cursor: pointer;
  max-width: 100%; /* Button responsive fix */
  box-sizing: border-box; /* Button responsive fix */
  white-space: normal; /* Button responsive fix */
  word-wrap: break-word; /* Button responsive fix */
}

.page-blog__cta-button:hover {
  opacity: 0.9;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

.page-blog__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  box-sizing: border-box;
  width: 100%; /* Ensure container takes full width */
}

.page-blog__section-title {
  color: var(--secondary-color);
  margin-bottom: 20px;
  text-shadow: 0 0 5px var(--glow-color); /* Subtle glow for titles */
}

.page-blog__section-description {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px auto;
  font-size: 17px;
  color: var(--text-main-color);
}

.page-blog__latest-posts-section {
  padding: 60px 0;
  background-color: var(--background-dark-color);
}

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

.page-blog__post-card {
  background-color: var(--card-background-color);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--border-color); /* Card border */
}

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

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

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

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

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

.page-blog__post-excerpt {
  font-size: 15px;
  color: rgba(255, 246, 214, 0.8); /* Slightly muted text for excerpt */
  margin-bottom: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-blog__post-meta {
  font-size: 14px;
  color: var(--primary-color);
  font-weight: 600;
}

.page-blog__view-all-button-wrapper {
    text-align: center;
    margin-top: 50px;
    width: 100%; /* Button container responsive fix */
    max-width: 100%; /* Button container responsive fix */
    overflow: hidden; /* Button container responsive fix */
    box-sizing: border-box; /* Button container responsive fix */
}

.page-blog__faq-section {
  padding: 60px 0;
  background-color: var(--background-dark-color);
}

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

details.page-blog__faq-item {
  margin-bottom: 15px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  background: var(--card-background-color);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

details.page-blog__faq-item[open] {
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
}

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;
  color: var(--text-main-color);
  font-weight: 600;
}

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: rgba(var(--primary-color), 0.1); /* Subtle hover effect */
}

.page-blog__faq-qtext {
  flex: 1;
  font-size: 18px;
  line-height: 1.5;
  text-align: left;
  color: var(--text-main-color);
}

.page-blog__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  color: var(--primary-color);
  flex-shrink: 0;
  margin-left: 20px;
  width: 30px;
  text-align: center;
  transition: transform 0.3s ease;
}

details.page-blog__faq-item[open] .page-blog__faq-toggle {
  transform: rotate(45deg); /* Rotate plus to become cross */
}

details.page-blog__faq-item .page-blog__faq-answer {
  padding: 0 25px 20px;
  background: rgba(var(--card-background-color), 0.8);
  border-top: 1px solid var(--border-color);
  border-radius: 0 0 10px 10px;
  color: rgba(255, 246, 214, 0.85);
  font-size: 16px;
}

.page-blog__call-to-action-section {
    background-color: var(--primary-color); /* Use primary color for CTA background */
    padding: 80px 20px;
    text-align: center;
    color: #000000; /* Dark text on primary color for contrast */
}

.page-blog__call-to-action-section .page-blog__section-title {
    color: #000000; /* Dark text on primary color for contrast */
    text-shadow: none;
}

.page-blog__call-to-action-section .page-blog__section-description {
    color: #333333; /* Dark text on primary color for contrast */
    margin-bottom: 40px;
}

.page-blog__call-to-action-section .page-blog__cta-button {
    background: var(--button-gradient); /* Keep the gradient for the button */
    color: var(--text-main-color);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.page-blog__call-to-action-section .page-blog__cta-button:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

/* Responsive design */
@media (max-width: 1024px) {
  .page-blog__posts-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
  .page-blog__post-card img {
    height: 200px;
  }
}

@media (max-width: 768px) {
  .page-blog {
    font-size: 16px;
    line-height: 1.6;
  }

  .page-blog h1 {
    font-size: clamp(24px, 7vw, 36px);
  }

  .page-blog h2 {
    font-size: clamp(20px, 6vw, 32px);
  }

  .page-blog h3 {
    font-size: clamp(18px, 5vw, 24px);
  }

  .page-blog__hero-section {
    padding-top: 10px !important; /* Important for mobile */
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .page-blog__hero-image img {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  }
  
  .page-blog__hero-content p {
    font-size: 16px;
  }

  .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__latest-posts-section,
  .page-blog__faq-section,
  .page-blog__call-to-action-section {
    padding: 40px 0;
  }

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

  .page-blog__section-description {
    font-size: 16px;
    margin-bottom: 30px;
  }

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

  .page-blog__post-card {
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  }

  .page-blog__post-card img {
    
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important; /* Allow auto height for image to prevent distortion */
  }

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

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

  details.page-blog__faq-item {
    border-radius: 8px;
  }

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

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

  .page-blog__faq-toggle {
    font-size: 24px;
    margin-left: 15px;
    width: 25px;
  }

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

  /* Image responsive fix for all images */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  /* Button container responsive fix */
  .page-blog__view-all-button-wrapper,
  .page-blog__call-to-action-section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
}