/* style/blog.css */

/* --- Custom Color Variables --- */
:root {
  --primary-color: #11A84E;
  --secondary-color: #22C768;

  --button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  --card-bg: #11271B;
  --background: #08160F;
  --text-main: #F2FFF6;
  --text-secondary: #A7D9B8;
  --border: #2E7A4E;
  --glow: #57E38D;
  --gold: #F2C14E;
  --divider: #1E3A2A;
  --deep-green: #0A4B2C;
}

/* --- General Styles --- */
.page-blog {
  font-family: Arial, sans-serif;
  color: var(--text-main); /* Default text color for the page */
  background-color: var(--background); /* Default background for the page */
}

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

.page-blog__section-title {
  font-size: 2.5rem;
  font-weight: bold;
  text-align: center;
  margin-bottom: 20px;
  color: var(--text-main);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.page-blog__section-intro,
.page-blog__description {
  font-size: 1.1rem;
  line-height: 1.6;
  text-align: center;
  margin-bottom: 30px;
  color: var(--text-secondary);
}

.page-blog__dark-section {
  background-color: var(--deep-green); /* Use Deep Green for dark sections */
  color: var(--text-main); /* Light text on dark background */
  padding: 60px 0;
}

.page-blog__dark-bg {
  background-color: var(--background); /* Use the main background color */
  color: var(--text-main); /* Light text on dark background */
  padding: 60px 0;
}

/* --- Buttons --- */
.page-blog__cta-buttons {
  display: flex;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
  gap: 15px;
  margin-top: 30px;
}

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

.page-blog__cta-buttons--left {
  justify-content: flex-start;
}

.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
  min-width: 180px;
  text-align: center;
  box-sizing: border-box;
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Ensure long words break */
}

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

.page-blog__btn-primary:hover {
  background: linear-gradient(180deg, #13994A 0%, #2AD16F 100%);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
}

.page-blog__btn-secondary {
  background-color: transparent;
  color: var(--text-main); /* Light green text on transparent/dark background */
  border: 2px solid var(--border); /* Green border */
}

.page-blog__btn-secondary:hover {
  background-color: var(--border); /* Lighter green background on hover */
  color: #ffffff;
}

/* --- Hero Section --- */
.page-blog__hero-section {
  position: relative;
  display: flex;
  flex-direction: column; /* Image on top, text below */
  align-items: center;
  padding-top: 10px; /* Small top padding, body handles header offset */
  padding-bottom: 60px;
  text-align: center;
  overflow: hidden; /* Ensure nothing spills out */
}

.page-blog__hero-image-wrapper {
  width: 100%;
  max-width: 100%;
  margin-bottom: 30px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.page-blog__hero-image {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
  min-width: 200px; /* Enforce min size */
  min-height: 200px;
}

.page-blog__hero-content {
  max-width: 900px;
  padding: 0 20px;
}

.page-blog__main-title {
  font-size: 3.2rem;
  font-weight: bold;
  margin-bottom: 20px;
  color: var(--gold); /* Use gold for main title for luxury feel */
  line-height: 1.2;
  letter-spacing: -0.03em;
}

/* --- Latest Articles Section --- */
.page-blog__latest-articles {
  padding: 80px 0;
}

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

.page-blog__article-card {
  background-color: var(--card-bg); /* Darker green for card background */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

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

.page-blog__card-image {
  width: 100%;
  height: 220px; /* Fixed height for consistent card appearance */
  object-fit: cover;
  display: block;
  min-width: 200px; /* Enforce min size */
  min-height: 200px;
}

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

.page-blog__card-title {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 10px;
  line-height: 1.3;
}

.page-blog__card-title a {
  color: var(--text-main); /* Light text for titles */
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-blog__card-title a:hover {
  color: var(--glow); /* Glow color on hover */
}

.page-blog__card-meta {
  font-size: 0.9rem;
  color: var(--text-secondary); /* Secondary text color for meta */
  margin-bottom: 15px;
}

.page-blog__card-description {
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-secondary);
  margin-bottom: 20px;
  flex-grow: 1; /* Allow description to take available space */
  text-align: left; /* Override global text-align for cards */
}

.page-blog__card-link {
  display: inline-block;
  color: var(--glow); /* Glow color for links */
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
  margin-top: auto; /* Push to bottom */
}

.page-blog__card-link:hover {
  color: var(--gold); /* Gold color on hover */
}

/* --- Why Follow Section --- */
.page-blog__why-follow-section {
  padding: 80px 0;
  background-color: var(--deep-green);
}

.page-blog__why-follow-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 40px;
  text-align: left; /* Reset text align for this section */
}

.page-blog__why-follow-text {
  flex: 1;
  min-width: 300px;
}

.page-blog__why-follow-text .page-blog__section-title {
  text-align: left;
}

.page-blog__why-follow-text .page-blog__description {
  text-align: left;
  margin-bottom: 40px;
}

.page-blog__features-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 25px;
}

.page-blog__feature-item {
  background-color: rgba(17, 39, 27, 0.6); /* Semi-transparent card BG for features */
  padding: 20px;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.page-blog__feature-title {
  font-size: 1.3rem;
  font-weight: bold;
  color: var(--gold); /* Gold for feature titles */
  margin-bottom: 10px;
}

.page-blog__feature-description {
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-secondary);
  margin-bottom: 0;
  text-align: left;
}

.page-blog__why-follow-image-wrapper {
  flex: 1;
  min-width: 300px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.page-blog__why-follow-image {
  width: 100%;
  height: auto;
  max-width: 600px; /* Limit image width */
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  min-width: 200px; /* Enforce min size */
  min-height: 200px;
}

/* --- FAQ Section --- */
.page-blog__faq-section {
  padding: 80px 0;
}

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

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

.page-blog__faq-item[open] {
  background-color: var(--deep-green); /* Darker when open */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--text-main);
  cursor: pointer;
  background-color: var(--card-bg);
  transition: background-color 0.3s ease;
  list-style: none; /* Remove default marker for details */
}

.page-blog__faq-question::-webkit-details-marker {
  display: none; /* Hide default marker for webkit */
}

.page-blog__faq-item[open] .page-blog__faq-question {
  background-color: var(--deep-green);
  color: var(--gold); /* Gold for open question */
}

.page-blog__faq-question:hover {
  background-color: var(--deep-green);
}

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

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

.page-blog__faq-item[open] .page-blog__faq-toggle {
  color: var(--gold);
}

.page-blog__faq-answer {
  padding: 0 25px 20px;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-secondary);
  text-align: left;
}

.page-blog__faq-answer p {
  margin-bottom: 0;
  color: var(--text-secondary); /* Ensure paragraph color in FAQ answer */
}

.page-blog__faq-answer a {
  color: var(--glow);
  text-decoration: underline;
}

.page-blog__faq-answer a:hover {
  color: var(--gold);
}

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

.page-blog__cta-content {
  max-width: 800px;
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
  .page-blog__main-title {
    font-size: 2.8rem;
  }
  .page-blog__section-title {
    font-size: 2.2rem;
  }
  .page-blog__why-follow-content {
    flex-direction: column;
    text-align: center;
  }
  .page-blog__why-follow-text .page-blog__section-title,
  .page-blog__why-follow-text .page-blog__description {
    text-align: center;
  }
  .page-blog__cta-buttons--left {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  /* --- Global Mobile Adjustments --- */
  .page-blog {
    font-size: 16px;
    line-height: 1.6;
  }
  .page-blog__container {
    padding: 0 15px; /* Add padding to container on mobile */
  }

  .page-blog__hero-section,
  .page-blog__dark-section,
  .page-blog__dark-bg {
    padding-left: 15px;
    padding-right: 15px;
    padding-top: 10px !important; /* Small top padding for sections, body handles header offset */
    padding-bottom: 40px;
  }

  .page-blog__main-title {
    font-size: 2.2rem;
  }

  .page-blog__section-title {
    font-size: 1.8rem;
  }

  .page-blog__description,
  .page-blog__section-intro {
    font-size: 1rem;
    margin-bottom: 20px;
  }

  /* --- Images (Mandatory Responsive Rules) --- */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
    min-width: 200px !important; /* Ensure min size */
    min-height: 200px !important;
  }
  
  /* All containers holding images or content sections */
  .page-blog__section,
  .page-blog__card,
  .page-blog__container,
  .page-blog__hero-image-wrapper,
  .page-blog__why-follow-image-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  /* Specific padding for sections if they are direct children of main and need inner padding */
  .page-blog__latest-articles .page-blog__container,
  .page-blog__why-follow-section .page-blog__container,
  .page-blog__faq-section .page-blog__container,
  .page-blog__cta-section .page-blog__container {
    padding-left: 0;
    padding-right: 0;
  }
  
  /* Ensure card images adapt */
  .page-blog__card-image {
    height: auto !important; /* Allow height to be auto */
  }

  /* --- Buttons (Mandatory Responsive Rules) --- */
  .page-blog__cta-buttons {
    flex-direction: column; /* Stack buttons vertically */
    gap: 10px;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 0 15px; /* Add padding to button container */
  }
  
  .page-blog__btn-primary,
  .page-blog__btn-secondary {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 12px 15px !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    font-size: 1rem !important;
  }

  /* --- Article Grid --- */
  .page-blog__articles-grid {
    grid-template-columns: 1fr; /* Single column layout */
    padding: 0 15px; /* Add padding to grid */
  }
  .page-blog__article-card {
    margin-bottom: 20px;
  }

  /* --- Why Follow Section --- */
  .page-blog__why-follow-text .page-blog__section-title,
  .page-blog__why-follow-text .page-blog__description {
    text-align: center;
  }
  .page-blog__features-list {
    padding: 0 15px;
  }
  .page-blog__feature-item {
    margin-bottom: 15px;
  }

  /* --- FAQ Section --- */
  .page-blog__faq-list {
    padding: 0 15px;
  }
  .page-blog__faq-question {
    font-size: 1.1rem;
    padding: 15px 20px;
  }
  .page-blog__faq-answer {
    padding: 0 20px 15px;
  }
}

/* Ensure images do not use filter */
.page-blog img {
  filter: none !important;
}