/* style/blog.css */

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

/* Base styles for the blog page, inherits body padding-top from shared.css */
.page-blog {
  background-color: var(--page-blog-background);
  color: var(--page-blog-text-main);
  font-family: Arial, sans-serif;
  line-height: 1.6;
  font-size: 16px;
}

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

.page-blog__section {
  padding: 60px 0;
  text-align: center;
}

.page-blog__dark-section {
  background-color: var(--page-blog-card-bg);
  color: var(--page-blog-text-main);
}

.page-blog__light-bg {
  background-color: var(--page-blog-light-bg);
  color: var(--page-blog-dark-text);
}

.page-blog__section-title {
  font-size: 2.5em;
  color: var(--page-blog-text-main);
  margin-bottom: 20px;
  font-weight: bold;
}

.page-blog__section-description {
  font-size: 1.1em;
  color: var(--page-blog-text-secondary);
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Hero Section */
.page-blog__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 500px;
  padding-top: 10px; /* Small top padding, body handles main header offset */
  padding-bottom: 60px;
  overflow: hidden;
}

.page-blog__hero-image-wrapper {
  width: 100%;
  max-height: 600px;
  overflow: hidden;
  margin-bottom: 40px;
}

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

.page-blog__hero-content {
  text-align: center;
  max-width: 800px;
  padding: 0 20px;
}

.page-blog__hero-title {
  font-size: clamp(2.2em, 4vw, 3.5em);
  color: var(--page-blog-text-main);
  margin-bottom: 15px;
  line-height: 1.2;
  font-weight: bold;
}

.page-blog__hero-description {
  font-size: 1.2em;
  color: var(--page-blog-text-secondary);
  margin-bottom: 30px;
}

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

.page-blog__btn-primary {
  background: var(--page-blog-btn-gradient);
  color: var(--page-blog-text-main);
  border: none;
  margin: 0 10px 10px 0;
}

.page-blog__btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

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

.page-blog__btn-secondary:hover {
  background-color: var(--page-blog-primary-color);
  color: var(--page-blog-text-main);
  transform: translateY(-2px);
}

/* Latest Posts Grid */
.page-blog__latest-posts {
  background-color: var(--page-blog-background);
}

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

.page-blog__post-card {
  background-color: var(--page-blog-card-bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  text-align: left;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

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

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

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

.page-blog__post-card.page-blog__light-bg .page-blog__post-title a {
    color: var(--page-blog-dark-text);
}

.page-blog__post-title a:hover {
  color: var(--page-blog-primary-color);
}

.page-blog__post-meta {
  font-size: 0.9em;
  color: var(--page-blog-text-secondary);
  margin-bottom: 15px;
}

.page-blog__post-excerpt {
  font-size: 1em;
  color: var(--page-blog-text-secondary);
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-blog__post-card .page-blog__btn-secondary {
  align-self: flex-start;
  margin-left: 0;
  margin-right: 0;
  padding: 8px 18px;
  font-size: 0.9em;
}

.page-blog__view-all {
  margin-top: 50px;
}

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

.page-blog__category-card {
  background-color: var(--page-blog-background);
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  text-align: center;
  transition: transform 0.3s ease, background-color 0.3s ease;
  border: 1px solid var(--page-blog-border);
}

.page-blog__category-card:hover {
  transform: translateY(-5px);
  background-color: var(--page-blog-deep-green);
}

.page-blog__category-title {
  font-size: 1.5em;
  margin-bottom: 15px;
  color: var(--page-blog-text-main);
}

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

.page-blog__category-title a:hover {
  color: var(--page-blog-primary-color);
}

.page-blog__category-text {
  color: var(--page-blog-text-secondary);
  font-size: 0.95em;
}

/* In-depth Guides */
.page-blog__in-depth-guides {
  background-color: var(--page-blog-background);
  text-align: left;
}

.page-blog__in-depth-guides .page-blog__section-description {
    text-align: center;
}

.page-blog__guide-item {
  background-color: var(--page-blog-card-bg);
  padding: 30px;
  border-radius: 12px;
  margin-bottom: 25px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  border: 1px solid var(--page-blog-border);
}

.page-blog__guide-title {
  font-size: 1.6em;
  margin-bottom: 15px;
  line-height: 1.3;
}

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

.page-blog__guide-title a:hover {
  color: var(--page-blog-primary-color);
}

.page-blog__guide-text {
  color: var(--page-blog-text-secondary);
  margin-bottom: 20px;
}

/* Why Choose Section */
.page-blog__why-choose {
  background-color: var(--page-blog-deep-green);
}

.page-blog__why-list {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
  text-align: left;
}

.page-blog__why-item {
  background-color: var(--page-blog-card-bg);
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--page-blog-border);
}

.page-blog__why-item-title {
  font-size: 1.4em;
  color: var(--page-blog-gold);
  margin-bottom: 10px;
}

.page-blog__why-item-text {
  color: var(--page-blog-text-secondary);
  font-size: 0.95em;
}

/* FAQ Section */
.page-blog__faq-section {
  background-color: var(--page-blog-background);
}

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

.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] {
  background-color: var(--page-blog-deep-green);
}

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.1em;
  font-weight: bold;
  color: var(--page-blog-text-main);
  cursor: pointer;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

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

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

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

/* CTA Section */
.page-blog__cta-section {
  padding: 80px 0;
  background-color: var(--page-blog-deep-green);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-blog__cta-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.page-blog__cta-image {
  max-width: 600px;
  height: auto;
  display: block;
  margin: 0 auto 30px;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.page-blog__cta-title {
  font-size: clamp(2em, 3.5vw, 3em);
  color: var(--page-blog-text-main);
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-blog__cta-description {
  font-size: 1.1em;
  color: var(--page-blog-text-secondary);
  margin-bottom: 40px;
  max-width: 700px;
}

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

/* Global image responsive styles (must be present) */
.page-blog img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .page-blog__section-title {
    font-size: 2em;
  }
  .page-blog__hero-title {
    font-size: clamp(2em, 5vw, 3em);
  }
  .page-blog__posts-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
  .page-blog__category-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
  .page-blog__why-list {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
  .page-blog__cta-title {
    font-size: clamp(1.8em, 4.5vw, 2.5em);
  }
}

@media (max-width: 768px) {
  .page-blog {
    font-size: 15px;
  }
  .page-blog__section {
    padding: 40px 0;
  }
  .page-blog__container {
    padding: 0 15px;
  }
  .page-blog__hero-section {
    padding-bottom: 40px;
  }
  .page-blog__hero-title {
    font-size: clamp(1.8em, 6vw, 2.5em);
  }
  .page-blog__hero-description {
    font-size: 1.1em;
  }

  /* Images, Videos, Buttons must be responsive */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  /* All containers with images/videos/buttons */
  .page-blog__section,
  .page-blog__card,
  .page-blog__container,
  .page-blog__hero-image-wrapper,
  .page-blog__post-card,
  .page-blog__category-card,
  .page-blog__guide-item,
  .page-blog__why-item,
  .page-blog__faq-item,
  .page-blog__cta-section,
  .page-blog__cta-content,
  .page-blog__cta-buttons {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }

  /* Specific padding for sections that might not have a container immediately inside */
  .page-blog__latest-posts,
  .page-blog__categories,
  .page-blog__in-depth-guides,
  .page-blog__why-choose,
  .page-blog__faq-section,
  .page-blog__cta-section {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  
  /* Resetting padding for hero section specifically */
  .page-blog__hero-section {
      padding-left: 15px !important;
      padding-right: 15px !important;
      padding-top: 10px !important;
  }

  .page-blog__post-image {
    height: auto !important;
  }

  .page-blog__btn-primary,
  .page-blog__btn-secondary {
    width: 100% !important;
    margin: 0 0 15px 0 !important;
    padding: 12px 20px !important;
  }

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

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

@media (max-width: 480px) {
  .page-blog__section-title {
    font-size: 1.8em;
  }
  .page-blog__hero-title {
    font-size: clamp(1.6em, 7vw, 2.2em);
  }
  .page-blog__post-title {
    font-size: 1.2em;
  }
  .page-blog__category-title {
    font-size: 1.3em;
  }
  .page-blog__guide-title {
    font-size: 1.4em;
  }
}