/* style/blog.css */

/* Base styles for the blog page content */
.page-blog {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #FFF6D6; /* Text Main on dark background */
  background-color: transparent; /* Inherit from body's var(--site-bg) */
}

/* Container for main content, ensuring max-width and centering */
.page-blog__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  box-sizing: border-box;
}

/* Section titles */
.page-blog__section-title {
  font-size: 2.5em;
  font-weight: 700;
  text-align: center;
  margin-bottom: 20px;
  color: #F2C14E; /* Main brand color for emphasis */
  line-height: 1.2;
}

/* Section subtitles/descriptions */
.page-blog__section-subtitle {
  font-size: 1.1em;
  text-align: center;
  margin-bottom: 40px;
  color: #FFF6D6; /* Text Main */
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Dark section background */
.page-blog__dark-section {
  background-color: #0A0A0A; /* Background color */
  padding: 60px 0;
}

/* Light section background for contrast */
.page-blog__light-bg {
  background-color: #ffffff; /* White background for contrast */
  color: #333333; /* Dark text for contrast */
  padding: 60px 0;
}

.page-blog__light-bg .page-blog__section-title,
.page-blog__light-bg .page-blog__section-subtitle {
  color: #333333; /* Dark text for titles/subtitles in light section */
}

/* Hero Section */
.page-blog__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 500px; /* Minimum height for hero */
  padding-top: 10px; /* Small top padding, body handles --header-offset */
  overflow: hidden;
  background-color: #0A0A0A; /* Fallback background */
}

.page-blog__hero-image-wrapper {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
}

.page-blog__hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.4); /* Darken image for text readability */
}

.page-blog__hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 900px;
  padding: 40px 20px;
  box-sizing: border-box;
  color: #FFF6D6;
}

.page-blog__main-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem); /* Responsive font size for H1 */
  font-weight: 800;
  margin-bottom: 20px;
  color: #F2C14E; /* Brand color for main title */
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.page-blog__hero-description {
  font-size: 1.2em;
  margin-bottom: 30px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* CTA Buttons */
.page-blog__cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  transition: all 0.3s ease;
  box-sizing: border-box;
  max-width: 100%;
  white-space: normal;
  word-wrap: break-word;
  text-align: center;
}

.page-blog__btn-primary {
  background: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%); /* Button gradient */
  color: #111111; /* Dark text for contrast on yellow button */
  border: 2px solid transparent;
}

.page-blog__btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(242, 193, 78, 0.4);
}

.page-blog__btn-secondary {
  background-color: transparent;
  color: #F2C14E; /* Brand color for secondary button text */
  border: 2px solid #F2C14E; /* Brand color border */
}

.page-blog__btn-secondary:hover {
  background-color: #F2C14E;
  color: #111111;
}

/* Latest Posts Section */
.page-blog__latest-posts-section {
  background-color: #0A0A0A; /* Background color */
}

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

.page-blog__post-card {
  background-color: #111111; /* Card BG */
  border: 1px solid #3A2A12; /* Border color */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  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 25px rgba(0, 0, 0, 0.5);
}

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

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

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

.page-blog__post-card-title a {
  color: #F2C14E; /* Brand color for titles */
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-blog__post-card-title a:hover {
  color: #FFD36B; /* Glow color on hover */
}

.page-blog__post-card-meta {
  font-size: 0.9em;
  color: #FFD36B; /* Glow color for meta info */
  margin-bottom: 15px;
}

.page-blog__post-card-excerpt {
  font-size: 1em;
  color: #FFF6D6; /* Text Main */
  margin-bottom: 20px;
  flex-grow: 1; /* Allow excerpt to take available space */
}

.page-blog__btn-text {
  color: #FFD36B; /* Glow color for text links */
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
  align-self: flex-start; /* Align to start */
}

.page-blog__btn-text:hover {
  text-decoration: underline;
  color: #F2C14E; /* Main brand color on hover */
}

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

/* Categories Section */
.page-blog__categories-section {
  background-color: #ffffff; /* Light background */
}

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

.page-blog__category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background-color: #f8f8f8; /* Lighter background for light section */
  border-radius: 8px;
  text-decoration: none;
  color: #333333; /* Dark text */
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  min-height: 120px;
}

.page-blog__category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  background-color: #f0f0f0;
}

.page-blog__category-icon {
  width: 30px;
  height: 30px;
  object-fit: contain;
  margin-bottom: 10px;
}

.page-blog__category-name {
  font-weight: bold;
  font-size: 1.1em;
  text-align: center;
}

/* Guides & Strategies Section */
.page-blog__guides-strategies-section {
  background-color: #0A0A0A; /* Background color */
}

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

.page-blog__text-block {
  background-color: #111111; /* Card BG */
  border: 1px solid #3A2A12; /* Border color */
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.page-blog__content-title {
  font-size: 1.5em;
  color: #F2C14E; /* Brand color */
  margin-bottom: 15px;
  line-height: 1.3;
}

.page-blog__text-block p {
  color: #FFF6D6; /* Text Main */
  font-size: 1em;
}

/* Call to Action Section (Bottom) */
.page-blog__cta-section {
  padding: 80px 0;
  background-color: #ffffff; /* Light background */
}

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

/* FAQ Section */
.page-blog__faq-section {
  background-color: #0A0A0A; /* Background color */
}

.page-blog__faq-list {
  margin-top: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-blog__faq-item {
  background-color: #111111; /* Card BG */
  border: 1px solid #3A2A12; /* Border color */
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  cursor: pointer;
  background-color: #1a1a1a; /* Slightly lighter than card BG for question */
  color: #F2C14E; /* Brand color */
  font-size: 1.2em;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.page-blog__faq-question:hover {
  background-color: #2a2a2a;
}

.page-blog__faq-question h3 {
  margin: 0;
  color: inherit; /* Inherit color from parent */
  font-size: 1em; /* Reset h3 size within question */
}

.page-blog__faq-toggle {
  font-size: 1.5em;
  font-weight: normal;
  transition: transform 0.3s ease;
  color: #FFD36B; /* Glow color for toggle */
}

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

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

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

.page-blog__faq-answer p {
  margin: 0;
  padding-bottom: 10px;
}

/* --- Responsive Design --- */

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

  .page-blog__container {
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-blog__hero-section {
    min-height: 400px;
    padding-top: 10px !important; /* Small top padding, body handles --header-offset */
  }

  .page-blog__main-title {
    font-size: clamp(2rem, 8vw, 3rem); /* Adjust H1 for smaller screens */
  }

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

  .page-blog__cta-buttons {
    flex-direction: column;
    gap: 15px;
  }

  .page-blog__btn-primary,
  .page-blog__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 20px;
    font-size: 1em;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-blog__section-title {
    font-size: 2em;
  }

  .page-blog__section-subtitle {
    font-size: 1em;
    margin-bottom: 30px;
  }

  .page-blog__post-grid {
    grid-template-columns: 1fr; /* Single column for posts */
  }

  .page-blog__post-card-image {
    height: 180px;
  }

  .page-blog__post-card-title {
    font-size: 1.2em;
  }

  .page-blog__category-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); /* Adjust category grid */
  }

  .page-blog__category-card {
    padding: 15px;
    min-height: 100px;
  }

  .page-blog__content-grid {
    grid-template-columns: 1fr; /* Single column for guides */
  }

  .page-blog__content-title {
    font-size: 1.3em;
  }

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

  /* Images responsive */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-blog__section,
  .page-blog__card,
  .page-blog__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
}

/* Tablet devices (max-width: 1024px) */
@media (max-width: 1024px) and (min-width: 769px) {
  .page-blog__section-title {
    font-size: 2.2em;
  }

  .page-blog__post-grid {
    grid-template-columns: repeat(2, 1fr); /* Two columns for posts */
  }

  .page-blog__content-grid {
    grid-template-columns: repeat(2, 1fr); /* Two columns for guides */
  }
}