/* style/blog.css */

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

.page-blog {
  font-family: 'Arial', sans-serif;
  color: var(--page-blog-text-main); /* Main text color for the page */
  background-color: var(--page-blog-bg-color); /* Body background is handled by shared.css var(--bg-color), this is for internal sections */
}

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

.page-blog__section-title {
  font-size: clamp(28px, 4vw, 42px);
  color: var(--page-blog-text-main);
  text-align: center;
  margin-bottom: 20px;
  font-weight: 700;
  line-height: 1.2;
}

.page-blog__section-description {
  font-size: clamp(16px, 2vw, 18px);
  color: var(--page-blog-text-secondary);
  text-align: center;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

/* Hero Section */
.page-blog__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 0 60px 0; /* body already handles padding-top from header */
  overflow: hidden;
  background-color: var(--page-blog-bg-color);
}

.page-blog__hero-image-wrapper {
  width: 100%;
  max-height: 700px; /* Limit height for hero image */
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.page-blog__hero-image {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}

.page-blog__hero-content {
  text-align: center;
  padding: 40px 20px;
  max-width: 900px;
  margin-top: -100px; /* Pull content up over image slightly for visual flow */
  position: relative;
  z-index: 2; /* Ensure content is above image */
  background: linear-gradient(180deg, rgba(8, 22, 15, 0.8) 0%, var(--page-blog-bg-color) 100%);
  border-radius: 15px;
  padding-top: 120px; /* Compensate for negative margin */
}

.page-blog__main-title {
  font-size: clamp(32px, 5vw, 54px);
  color: var(--page-blog-text-main);
  margin-bottom: 20px;
  font-weight: 700;
  line-height: 1.2;
}

.page-blog__hero-description {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--page-blog-text-secondary);
  margin-bottom: 30px;
  line-height: 1.6;
}

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

.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 18px;
  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: var(--page-blog-btn-gradient);
  color: #ffffff;
  border: 2px solid transparent;
}

.page-blog__btn-primary:hover {
  background: linear-gradient(180deg, #13994A 0%, #2AD16F 100%);
  box-shadow: 0 0 15px var(--page-blog-glow-color);
}

.page-blog__btn-secondary {
  background: transparent;
  color: var(--page-blog-glow-color);
  border: 2px solid var(--page-blog-glow-color);
}

.page-blog__btn-secondary:hover {
  background: var(--page-blog-glow-color);
  color: var(--page-blog-bg-color);
}

/* Latest Articles Section */
.page-blog__latest-articles-section {
  padding: 60px 0;
  background-color: var(--page-blog-bg-color);
}

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

.page-blog__article-card {
  background-color: var(--page-blog-card-bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--page-blog-border-color);
}

.page-blog__article-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3), 0 0 20px var(--page-blog-glow-color);
}

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

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

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

.page-blog__article-title {
  font-size: 22px;
  color: var(--page-blog-text-main);
  margin-bottom: 10px;
  line-height: 1.4;
  font-weight: 600;
}

.page-blog__article-excerpt {
  font-size: 15px;
  color: var(--page-blog-text-secondary);
  line-height: 1.6;
  margin-bottom: 15px;
}

.page-blog__article-date {
  font-size: 13px;
  color: var(--page-blog-gold-color);
  display: block;
  margin-top: 10px;
}

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

/* Categories Section */
.page-blog__categories-section {
  padding: 60px 0;
  background-color: var(--page-blog-bg-color);
}

.page-blog__categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
}

.page-blog__category-card {
  background-color: var(--page-blog-card-bg);
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--page-blog-border-color);
}

.page-blog__category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3), 0 0 15px var(--page-blog-glow-color);
}

.page-blog__category-title {
  font-size: 24px;
  color: var(--page-blog-text-main);
  margin-bottom: 10px;
  font-weight: 600;
}

.page-blog__category-desc {
  font-size: 15px;
  color: var(--page-blog-text-secondary);
  line-height: 1.6;
}

/* Featured Article Section */
.page-blog__featured-article-section {
  padding: 60px 0;
  background-color: var(--page-blog-bg-color);
}

.page-blog__featured-content {
  display: flex;
  flex-direction: column;
  gap: 30px;
  align-items: center;
}

.page-blog__featured-image {
  width: 100%;
  max-width: 800px;
  height: auto;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  display: block;
}

.page-blog__featured-text {
  background-color: var(--page-blog-card-bg);
  border-radius: 12px;
  padding: 30px;
  border: 1px solid var(--page-blog-border-color);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-blog__featured-text p {
  font-size: 16px;
  color: var(--page-blog-text-secondary);
  line-height: 1.7;
  margin-bottom: 20px;
}

.page-blog__featured-text p:last-of-type {
  margin-bottom: 0;
}

/* Guides & Tips Section */
.page-blog__guides-tips-section {
  padding: 60px 0;
  background-color: var(--page-blog-bg-color);
}

.page-blog__guides-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.page-blog__guide-card {
  background-color: var(--page-blog-card-bg);
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--page-blog-border-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-blog__guide-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3), 0 0 20px var(--page-blog-glow-color);
}

.page-blog__guide-title {
  font-size: 22px;
  color: var(--page-blog-text-main);
  margin-bottom: 15px;
  font-weight: 600;
  line-height: 1.4;
}

.page-blog__guide-text {
  font-size: 15px;
  color: var(--page-blog-text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
}

/* FAQ Section */
.page-blog__faq-section {
  padding: 60px 0;
  background-color: var(--page-blog-bg-color);
}

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

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

.page-blog__faq-item:hover {
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.3), 0 0 10px var(--page-blog-glow-color);
}

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 18px;
  font-weight: 600;
  color: var(--page-blog-text-main);
  cursor: pointer;
  background-color: var(--page-blog-card-bg);
  user-select: none;
  position: relative;
  list-style: none;
}

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

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

.page-blog__faq-toggle {
  font-size: 24px;
  line-height: 1;
  margin-left: 15px;
  color: var(--page-blog-glow-color);
  transition: transform 0.3s ease;
}

.page-blog__faq-item[open] .page-blog__faq-toggle {
  transform: rotate(45deg);
}

.page-blog__faq-answer {
  padding: 0 25px 20px 25px;
  font-size: 16px;
  color: var(--page-blog-text-secondary);
  line-height: 1.7;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.page-blog__faq-item[open] .page-blog__faq-answer {
  max-height: 1000px; /* Large enough to show content */
  transition: max-height 0.5s ease-in;
}

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

.page-blog__faq-answer p:last-child {
  margin-bottom: 0;
}

/* Call to Action Bottom Section */
.page-blog__cta-bottom-section {
  padding: 80px 0;
  text-align: center;
  background-color: var(--page-blog-deep-green-color);
  border-top: 1px solid var(--page-blog-divider-color);
}

.page-blog__cta-bottom-section .page-blog__section-title {
  color: var(--page-blog-text-main);
  margin-bottom: 25px;
}

.page-blog__cta-bottom-section .page-blog__section-description {
  color: var(--page-blog-text-secondary);
  margin-bottom: 40px;
}

.page-blog__btn-large {
  padding: 18px 40px;
  font-size: 20px;
}

/* Responsive Design */
@media (min-width: 769px) {
  .page-blog__featured-content {
    flex-direction: row;
    align-items: flex-start;
  }
  .page-blog__featured-image {
    flex: 0 0 40%;
    max-width: 40%;
  }
  .page-blog__featured-text {
    flex: 1;
  }
}

@media (max-width: 1024px) {
  .page-blog__hero-content {
    margin-top: -50px;
    padding-top: 80px;
  }
}

@media (max-width: 768px) {
  .page-blog__container {
    padding-left: 15px !important;
    padding-right: 15px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-blog__hero-section {
    padding: 10px 0 40px 0; /* body already handles padding-top from header */
  }

  .page-blog__hero-image {
    max-height: 400px;
  }

  .page-blog__hero-content {
    margin-top: -30px;
    padding: 30px 15px;
    padding-top: 60px;
  }

  .page-blog__main-title {
    font-size: 30px;
  }

  .page-blog__hero-description {
    font-size: 16px;
  }

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

  .page-blog__btn-primary,
  .page-blog__btn-secondary,
  .page-blog a[class*="button"],
  .page-blog a[class*="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;
    padding-right: 15px;
  }

  .page-blog__latest-articles-section,
  .page-blog__categories-section,
  .page-blog__featured-article-section,
  .page-blog__guides-tips-section,
  .page-blog__faq-section,
  .page-blog__cta-bottom-section {
    padding: 40px 0;
  }

  .page-blog__section-title {
    font-size: 26px;
  }

  .page-blog__section-description {
    font-size: 15px;
  }

  .page-blog__articles-grid,
  .page-blog__categories-grid,
  .page-blog__guides-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-blog__article-image {
    height: 180px;
  }

  .page-blog__article-title {
    font-size: 20px;
  }

  .page-blog__category-title,
  .page-blog__guide-title {
    font-size: 20px;
  }

  .page-blog__featured-content {
    flex-direction: column;
  }

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

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

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

  .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,
  .page-blog__hero-image-wrapper,
  .page-blog__hero-content,
  .page-blog__articles-grid,
  .page-blog__categories-grid,
  .page-blog__featured-content,
  .page-blog__guides-grid,
  .page-blog__faq-list,
  .page-blog__faq-item,
  .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; /* Ensure no overflow */
  }

  .page-blog__video-section {
    padding-top: 10px !important;
  }
}

/* Color Contrast Fixes (if needed, though custom palette should prevent issues) */
.page-blog p,
.page-blog li,
.page-blog__article-excerpt,
.page-blog__category-desc,
.page-blog__guide-text,
.page-blog__faq-answer {
  color: var(--page-blog-text-secondary); /* Ensure secondary text is readable on dark backgrounds */
}

.page-blog h1,
.page-blog h2,
.page-blog h3,
.page-blog__article-title,
.page-blog__category-title,
.page-blog__guide-title,
.page-blog__faq-question {
  color: var(--page-blog-text-main); /* Ensure main text is readable on dark backgrounds */
}

.page-blog__btn-primary {
  color: #ffffff; /* Always white text on primary button */
}

.page-blog__btn-secondary {
  color: var(--page-blog-glow-color); /* Always glow color text on secondary button */
}