/* style/blog.css */

/* Base styles for the blog page, ensures text color contrast against dark body background */
.page-blog {
  font-family: Arial, sans-serif;
  color: #FFF6D6; /* Main text color for dark backgrounds */
  line-height: 1.6;
  background-color: transparent; /* Inherit from body, which is #0A0A0A */
}

/* Section spacing to ensure content is not covered by fixed header */
.page-blog__hero-section {
  padding-top: var(--header-offset, 120px); /* Desktop: controlled by shared.css var */
  background: linear-gradient(135deg, #F2C14E, #FFD36B);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 500px;
}

.page-blog__section-spacing {
  padding: 60px 0;
}

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

/* Hero Section */
.page-blog__hero-container {
  display: flex;
  flex-direction: column; /* Image on top, content below */
  align-items: center;
  text-align: center;
  position: relative;
  z-index: 1;
  width: 100%;
}

.page-blog__hero-image {
  width: 100%;
  height: auto;
  object-fit: cover;
  margin-bottom: 30px; /* Space between image and text */
}

.page-blog__hero-content {
  max-width: 800px;
  padding: 20px;
  background: rgba(17, 17, 17, 0.7); /* Card BG color with transparency */
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(5px);
  border: 1px solid #3A2A12; /* Border color */
}

.page-blog__hero-title {
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  font-weight: bold;
  color: #FFF6D6; /* Main text color */
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-blog__hero-description {
  font-size: 1.1rem;
  color: #FFF6D6; /* Main text color */
  margin-bottom: 30px;
}

.page-blog__hero-cta {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Buttons */
.page-blog__btn-primary,
.page-blog__btn-secondary,
.page-blog__read-more-btn {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  cursor: pointer;
  box-sizing: border-box;
  text-align: center;
  white-space: normal;
  word-wrap: break-word;
}

.page-blog__btn-primary {
  background: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%);
  color: #FFF6D6; /* Text Main color */
  border: 2px solid transparent;
  box-shadow: 0 4px 10px rgba(242, 193, 78, 0.4);
}

.page-blog__btn-primary:hover {
  background: linear-gradient(180deg, #DDA11D 0%, #FFD86A 100%);
  box-shadow: 0 6px 15px rgba(242, 193, 78, 0.6);
}

.page-blog__btn-secondary {
  background: #111111; /* Card BG */
  color: #F2C14E; /* Main brand color */
  border: 2px solid #F2C14E;
}

.page-blog__btn-secondary:hover {
  background: #F2C14E;
  color: #111111; /* Card BG */
  border-color: #F2C14E;
}

.page-blog__read-more-btn {
  background: transparent;
  color: #F2C14E; /* Main brand color */
  border: 1px solid #3A2A12; /* Border color */
  padding: 8px 15px;
  font-size: 0.9em;
}

.page-blog__read-more-btn:hover {
  background: #F2C14E;
  color: #111111; /* Card BG */
  border-color: #F2C14E;
}

/* General Section Titles and Text Blocks */
.page-blog__section-title {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  color: #FFF6D6; /* Main text color */
  text-align: center;
  margin-bottom: 40px;
  position: relative;
  padding-bottom: 10px;
}

.page-blog__section-title::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: #FFD36B; /* Glow color */
  border-radius: 2px;
}

.page-blog__text-block {
  font-size: 1rem;
  color: #FFF6D6; /* Main text color */
  margin-bottom: 20px;
  text-align: justify;
}

/* Post Cards */
.page-blog__posts-grid,
.page-blog__featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-blog__post-card,
.page-blog__category-card {
  background: #111111; /* Card BG */
  border: 1px solid #3A2A12; /* Border color */
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  color: #FFF6D6; /* Main text color */
}

.page-blog__post-card:hover,
.page-blog__category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(242, 193, 78, 0.3);
}

.page-blog__post-image {
  width: 100%;
  height: 225px; /* Fixed height for consistency */
  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.3rem;
  margin-bottom: 10px;
  line-height: 1.4;
}

.page-blog__post-title a {
  color: #FFD36B; /* Glow color for links */
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-blog__post-title a:hover {
  color: #F2C14E; /* Main brand color on hover */
}

.page-blog__post-meta {
  font-size: 0.9em;
  color: rgba(255, 246, 214, 0.7); /* Lighter text for meta info */
  margin-bottom: 15px;
}

.page-blog__post-excerpt {
  font-size: 0.95rem;
  margin-bottom: 20px;
  flex-grow: 1;
}

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

/* Categories Section */
.page-blog__categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.page-blog__category-card {
  text-align: center;
  padding: 25px 15px;
  text-decoration: none;
  color: #FFF6D6; /* Main text color */
}

.page-blog__category-icon {
  font-size: 2.5rem;
  margin-bottom: 15px;
  display: block;
}

.page-blog__category-title {
  font-size: 1.1rem;
  font-weight: bold;
}

/* Why Follow Section */
.page-blog__benefits-list {
  list-style: none;
  padding: 0;
  margin-top: 40px;
}

.page-blog__benefit-item {
  background: #111111; /* Card BG */
  border: 1px solid #3A2A12; /* Border color */
  border-radius: 8px;
  padding: 25px;
  margin-bottom: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

.page-blog__benefit-item:hover {
  transform: translateX(5px);
}

.page-blog__benefit-title {
  font-size: 1.4rem;
  color: #FFD36B; /* Glow color */
  margin-bottom: 15px;
  position: relative;
  padding-left: 30px;
}

.page-blog__benefit-title::before {
  content: '⭐';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2em;
}

/* CTA Section */
.page-blog__cta-section {
  background: #111111; /* Card BG */
  border-top: 1px solid #3A2A12;
  border-bottom: 1px solid #3A2A12;
}

.page-blog__cta-container {
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 40px 20px;
}

.page-blog__cta-image {
  flex: 1;
  max-width: 50%;
  height: auto;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.page-blog__cta-content {
  flex: 1;
  text-align: left;
}

.page-blog__cta-content .page-blog__section-title {
  text-align: left;
  margin-bottom: 20px;
}

.page-blog__cta-content .page-blog__section-title::after {
  left: 0;
  transform: translateX(0);
}

.page-blog__cta-buttons {
  margin-top: 30px;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

/* FAQ Section */
.page-blog__faq-list {
  margin-top: 40px;
}

.page-blog__faq-item {
  background: #111111; /* Card BG */
  border: 1px solid #3A2A12; /* Border color */
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  cursor: pointer;
  background: #111111; /* Card BG */
  color: #FFF6D6; /* Main text color */
  font-weight: bold;
  font-size: 1.1rem;
  transition: background-color 0.3s ease;
}

.page-blog__faq-question:hover {
  background-color: rgba(242, 193, 78, 0.1); /* Slight highlight on hover */
}

.page-blog__faq-title {
  margin: 0;
  color: #FFF6D6;
}

.page-blog__faq-toggle {
  font-size: 1.5rem;
  line-height: 1;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #F2C14E; /* Main brand color */
  transition: transform 0.3s ease;
}

.page-blog__faq-item.active .page-blog__faq-toggle {
  transform: rotate(45deg); /* Plus to X */
}

.page-blog__faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 25px;
  transition: max-height 0.3s ease-out, padding 0.3s ease-out;
  color: #FFF6D6; /* Main text color */
}

.page-blog__faq-item.active .page-blog__faq-answer {
  max-height: 1000px !important; /* Sufficiently large value */
  padding: 15px 25px 25px 25px;
}

.page-blog__faq-answer p {
  margin-top: 0;
  margin-bottom: 10px;
  color: #FFF6D6;
}

/* Responsive Design */
@media (max-width: 992px) {
  .page-blog__hero-content {
    max-width: 90%;
  }

  .page-blog__cta-container {
    flex-direction: column;
    text-align: center;
  }

  .page-blog__cta-image {
    max-width: 80%;
    margin-bottom: 30px;
  }

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

  .page-blog__cta-content .page-blog__section-title::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .page-blog__cta-buttons {
    justify-content: center;
  }
}

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

  .page-blog__hero-section {
    padding-top: var(--header-offset, 120px) !important; /* Mobile: controlled by shared.css media query */
  }

  .page-blog__hero-title {
    font-size: 2rem;
  }

  .page-blog__hero-description {
    font-size: 1rem;
  }

  .page-blog__hero-cta {
    flex-direction: column;
    gap: 15px;
  }

  .page-blog__btn-primary,
  .page-blog__btn-secondary,
  .page-blog__read-more-btn {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding-left: 15px; /* Added for mobile button padding */
    padding-right: 15px; /* Added for mobile button padding */
  }

  .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; /* Ensure vertical stacking for buttons */
    gap: 10px;
  }

  /* Images responsiveness for mobile */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
    box-sizing: border-box;
  }
  
  /* Ensure content containers also adapt */
  .page-blog__container,
  .page-blog__post-card,
  .page-blog__category-card,
  .page-blog__benefit-item,
  .page-blog__faq-item,
  .page-blog__hero-content,
  .page-blog__cta-image {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px; /* Ensure content has side padding */
    padding-right: 15px; /* Ensure content has side padding */
  }

  .page-blog__cta-image {
    max-width: 100% !important; /* Override specific max-width for image */
  }

  .page-blog__post-image {
    height: 180px; /* Adjust height for smaller screens */
  }
  
  .page-blog__section-title {
    font-size: 1.5rem;
  }

  .page-blog__text-block,
  .page-blog__post-excerpt,
  .page-blog__faq-answer p {
    font-size: 0.95rem;
  }

  .page-blog__faq-question {
    font-size: 1rem;
    padding: 15px 20px;
  }

  .page-blog__faq-item.active .page-blog__faq-answer {
    padding: 10px 20px 20px 20px;
  }
}