/* style/blog.css */
:root {
  /* Custom Colors */
  --page-blog-bg: #08160F;
  --page-blog-card-bg: #11271B;
  --page-blog-text-main: #F2FFF6;
  --page-blog-text-secondary: #A7D9B8;
  --page-blog-button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  --page-blog-border: #2E7A4E;
  --page-blog-glow: #57E38D;
  --page-blog-gold: #F2C14E;
  --page-blog-divider: #1E3A2A;
  --page-blog-deep-green: #0A4B2C;

  /* Brand Colors (from prompt) - for fallback/general use */
  --brand-primary: #11A84E;
  --brand-secondary: #22C768;
}

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

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

/* Hero Section */
.page-blog__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column; /* Image on top, text below */
  align-items: center;
  padding: 60px 20px;
  padding-top: 10px; /* Small top padding, body handles header offset */
  background-color: var(--page-blog-bg);
}

.page-blog__hero-image-wrapper {
  width: 100%;
  max-width: 1200px; /* Match container width */
  margin-bottom: 30px; /* Space between image and content */
}

.page-blog__hero-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.page-blog__hero-content {
  text-align: center;
  max-width: 900px;
  z-index: 1; /* Ensure text is above any potential background elements */
  color: var(--page-blog-text-main);
}

.page-blog__main-title {
  font-size: clamp(2.5rem, 4vw, 3.5rem); /* Responsive font size for H1 */
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--page-blog-gold); /* Use gold for title highlight */
  line-height: 1.2;
}

.page-blog__description {
  font-size: 1.15rem;
  margin-bottom: 30px;
  color: var(--page-blog-text-secondary);
}

.page-blog__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap; /* Allow wrapping on smaller screens */
  width: 100%; /* Ensure container takes full width for wrapping */
  max-width: 600px; /* Limit button group width */
  margin: 0 auto;
}

.page-blog__btn-primary,
.page-blog__btn-secondary,
.page-blog__read-more-btn {
  display: inline-flex; /* Use flex for vertical alignment if text wraps */
  align-items: center;
  justify-content: center;
  padding: 14px 30px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-sizing: border-box; /* Crucial for max-width on buttons */
  max-width: 100%; /* Ensure button doesn't overflow */
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Allow text to break words */
  text-align: center; /* Center text if it wraps */
}

.page-blog__btn-primary {
  background: var(--page-blog-button-gradient);
  color: #ffffff; /* White text for contrast */
  border: 2px solid transparent;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-blog__btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.page-blog__btn-secondary {
  background: transparent;
  color: var(--brand-secondary); /* Use brand secondary for text */
  border: 2px solid var(--page-blog-border);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.page-blog__btn-secondary:hover {
  background: var(--brand-secondary);
  color: var(--page-blog-bg); /* Darker background, so dark text */
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.page-blog__read-more-btn {
  background: var(--page-blog-deep-green);
  color: var(--page-blog-text-main);
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  font-size: 0.9rem;
  margin-top: 15px;
}

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

/* General Sections */
.page-blog__intro-section,
.page-blog__strategies-section,
.page-blog__safety-section,
.page-blog__cta-section {
  padding: 80px 0;
  background-color: var(--page-blog-bg);
  color: var(--page-blog-text-main);
}

.page-blog__dark-section {
  background-color: var(--page-blog-card-bg); /* Slightly different dark background */
  color: var(--page-blog-text-main);
  padding: 80px 0;
}

.page-blog__section-title {
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 40px;
  color: var(--page-blog-gold);
}

.page-blog__sub-title {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 600;
  margin-top: 40px;
  margin-bottom: 20px;
  color: var(--page-blog-text-main);
}

.page-blog__text-block {
  font-size: 1rem;
  margin-bottom: 20px;
  color: var(--page-blog-text-secondary);
}

.page-blog__list {
  list-style: none;
  padding: 0;
  margin: 20px 0;
}

.page-blog__list-item {
  font-size: 1rem;
  margin-bottom: 10px;
  position: relative;
  padding-left: 25px;
  color: var(--page-blog-text-secondary);
}

.page-blog__list-item strong {
  color: var(--page-blog-text-main);
}

.page-blog__list-item::before {
  content: '✔'; /* Checkmark icon */
  color: var(--brand-secondary);
  position: absolute;
  left: 0;
  top: 0;
  font-weight: bold;
}

/* Article Grid */
.page-blog__article-grid,
.page-blog__promotions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-blog__article-card,
.page-blog__promotion-card {
  background-color: var(--page-blog-card-bg);
  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;
  border: 1px solid var(--page-blog-border);
  display: flex;
  flex-direction: column;
}

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

.page-blog__article-image,
.page-blog__promotion-image {
  width: 100%;
  height: 220px; /* Fixed height for consistency */
  object-fit: cover;
  display: block;
}

.page-blog__card-content {
  padding: 20px;
  flex-grow: 1; /* Allow content to fill available space */
  display: flex;
  flex-direction: column;
}

.page-blog__card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 10px;
  line-height: 1.3;
  flex-grow: 1; /* Allow title to grow if needed */
}

.page-blog__card-title a {
  color: var(--page-blog-gold);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-blog__card-title a:hover {
  color: var(--brand-secondary);
}

.page-blog__card-meta {
  font-size: 0.85rem;
  color: var(--page-blog-text-secondary);
  margin-bottom: 15px;
}

.page-blog__card-excerpt {
  font-size: 0.95rem;
  color: var(--page-blog-text-secondary);
  margin-bottom: 20px;
}

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

/* Strategies Section */
.page-blog__strategy-item {
  display: flex;
  align-items: center;
  gap: 40px;
  margin-bottom: 60px;
  flex-direction: column; /* Default to column on mobile */
}

.page-blog__strategy-item:last-child {
  margin-bottom: 0;
}

.page-blog__strategy-item--reverse {
  flex-direction: column; /* Default to column on mobile */
}

.page-blog__strategy-image {
  width: 100%;
  max-width: 600px;
  height: auto;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}

.page-blog__strategy-content {
  flex: 1;
  color: var(--page-blog-text-main);
}

.page-blog__strategy-content .page-blog__read-more-btn {
  margin-right: 10px;
}

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

.page-blog__faq-item {
  background-color: var(--page-blog-card-bg);
  border: 1px solid var(--page-blog-border);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  transition: all 0.3s ease;
}

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

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  font-size: 1.15rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--page-blog-text-main);
  background-color: var(--page-blog-deep-green);
  border-bottom: 1px solid var(--page-blog-border);
}

.page-blog__faq-item[open] .page-blog__faq-question {
  border-bottom: 1px solid var(--page-blog-border);
}

.page-blog__faq-question::-webkit-details-marker {
  display: none;
}

.page-blog__faq-question::marker {
  display: none;
}

.page-blog__faq-qtext {
  flex-grow: 1;
}

.page-blog__faq-toggle {
  font-size: 1.5rem;
  line-height: 1;
  margin-left: 15px;
  color: var(--page-blog-gold);
}

.page-blog__faq-answer {
  padding: 20px;
  font-size: 1rem;
  color: var(--page-blog-text-secondary);
}

.page-blog__faq-answer .page-blog__text-block {
  margin-bottom: 15px;
}

.page-blog__faq-answer .page-blog__btn-primary {
  margin-top: 10px;
  display: inline-block;
}

/* Call to Action Section */
.page-blog__cta-section {
  text-align: center;
  padding-bottom: 80px;
}

/* Image/Video/Button Responsive Rules (GLOBAL FOR PAGE-BLOG) */
.page-blog img {
  max-width: 100%;
  height: auto;
  display: block;
}

.page-blog video,
.page-blog__video {
  max-width: 100%;
  width: 100%;
  height: auto;
  display: block;
}

.page-blog__video-section,
.page-blog__video-container,
.page-blog__video-wrapper,
.page-blog__section,
.page-blog__card,
.page-blog__container,
.page-blog__cta-buttons,
.page-blog__button-group,
.page-blog__btn-container {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden; /* Prevent overflow */
}

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

  .page-blog__hero-section {
    padding: 40px 15px;
    padding-top: 10px !important; /* Small top padding for mobile */
  }

  .page-blog__main-title {
    font-size: clamp(2rem, 8vw, 2.5rem);
    margin-bottom: 15px;
  }

  .page-blog__description {
    font-size: 1rem;
    margin-bottom: 25px;
  }

  .page-blog__cta-buttons {
    flex-direction: column; /* Stack buttons vertically */
    gap: 15px;
    padding: 0 15px; /* Add padding to button container */
  }

  .page-blog__btn-primary,
  .page-blog__btn-secondary,
  .page-blog__read-more-btn {
    width: 100% !important; /* Force full width on mobile */
    max-width: 100% !important;
    padding: 12px 20px !important;
    font-size: 0.95rem !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-blog__intro-section,
  .page-blog__dark-section,
  .page-blog__strategies-section,
  .page-blog__safety-section,
  .page-blog__cta-section,
  .page-blog__faq-section {
    padding: 40px 0;
  }

  .page-blog__container {
    padding: 0 15px; /* Add padding to main containers on mobile */
  }

  .page-blog__section-title {
    font-size: clamp(1.8rem, 7vw, 2.2rem);
    margin-bottom: 30px;
  }

  .page-blog__sub-title {
    font-size: clamp(1.3rem, 5vw, 1.6rem);
    margin-top: 30px;
    margin-bottom: 15px;
  }

  .page-blog__article-grid,
  .page-blog__promotions-grid {
    grid-template-columns: 1fr; /* Single column layout for cards */
    gap: 20px;
  }

  .page-blog__article-image,
  .page-blog__promotion-image {
    height: 180px; /* Adjust image height for mobile cards */
  }

  .page-blog__strategy-item {
    flex-direction: column; /* Ensure column layout on mobile */
    gap: 20px;
    margin-bottom: 40px;
  }

  .page-blog__strategy-item--reverse {
    flex-direction: column; /* Ensure column layout on mobile */
  }

  .page-blog__strategy-image {
    width: 100%;
    max-width: 100%;
  }

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

  .page-blog__faq-answer {
    padding: 15px;
  }

  /* Force responsive images/videos/buttons with !important */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-blog video,
  .page-blog__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-blog__video-section,
  .page-blog__video-container,
  .page-blog__video-wrapper,
  .page-blog__section,
  .page-blog__card,
  .page-blog__container,
  .page-blog__cta-buttons,
  .page-blog__button-group,
  .page-blog__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    padding-left: 15px; /* Ensure content is not glued to edges */
    padding-right: 15px;
  }
}

/* Desktop-specific adjustments for strategy items */
@media (min-width: 769px) {
  .page-blog__strategy-item {
    flex-direction: row; /* Row layout on desktop */
  }

  .page-blog__strategy-item--reverse {
    flex-direction: row-reverse; /* Reverse row layout on desktop */
  }

  .page-blog__strategy-image {
    flex-shrink: 0; /* Prevent image from shrinking */
    width: 45%; /* Adjust width for desktop layout */
    max-width: none; /* Remove max-width constraint for flex item */
  }
}