/* style/blog.css */

:root {
  --page-blog-primary-color: #FF8C1A;
  --page-blog-secondary-color: #FFA53A;
  --page-blog-dark-bg: #0D0E12;
  --page-blog-card-bg: #17191F;
  --page-blog-text-main: #FFF3E6;
  --page-blog-border-color: #A84F0C;
  --page-blog-button-gradient: linear-gradient(180deg, #FFA53A 0%, #D96800 100%);
}

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

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

.page-blog__section {
  padding: 60px 0;
  position: relative;
  z-index: 1;
}

.page-blog__section-title {
  font-size: 36px;
  font-weight: 700;
  color: var(--page-blog-text-main);
  text-align: center;
  margin-bottom: 40px;
  text-transform: uppercase;
}

/* Hero Section */
.page-blog__hero-section {
  padding-top: 10px; /* Small top padding, body handles header offset */
  padding-bottom: 60px;
  background: var(--page-blog-dark-bg);
  text-align: center;
}

.page-blog__hero-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-blog__hero-image {
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 30px;
  border: 1px solid var(--page-blog-border-color);
}

.page-blog__hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.page-blog__main-title {
  font-size: 48px;
  font-weight: 800;
  color: var(--page-blog-primary-color);
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-blog__hero-description {
  font-size: 18px;
  line-height: 1.6;
  color: var(--page-blog-text-main);
  margin-bottom: 30px;
}

/* Buttons */
.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
  max-width: 100%;
}

.page-blog__btn-primary {
  background: var(--page-blog-button-gradient);
  color: #ffffff;
  box-shadow: 0 5px 15px rgba(255, 140, 26, 0.4);
}

.page-blog__btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(255, 140, 26, 0.6);
}

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

.page-blog__btn-secondary:hover {
  background: var(--page-blog-primary-color);
  color: #ffffff;
  transform: translateY(-3px);
}

/* Latest Posts Section */
.page-blog__latest-posts {
  background: var(--page-blog-dark-bg);
}

.page-blog__post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-bottom: 40px;
}

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

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

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

.page-blog__post-image {
  width: 100%;
  height: 200px; /* Fixed height for consistency */
  object-fit: cover;
  display: block;
}

.page-blog__post-content {
  padding: 20px;
  color: var(--page-blog-text-main);
}

.page-blog__post-title {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 10px;
  color: var(--page-blog-primary-color);
}

.page-blog__post-meta {
  font-size: 14px;
  color: #aaa;
  margin-bottom: 15px;
}

.page-blog__post-excerpt {
  font-size: 16px;
  line-height: 1.6;
  color: var(--page-blog-text-main);
  margin-bottom: 20px;
}

.page-blog__read-more {
  color: var(--page-blog-secondary-color);
  font-weight: 600;
  display: inline-block;
  position: relative;
}

.page-blog__read-more::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 2px;
  background-color: var(--page-blog-secondary-color);
  transform: scaleX(0);
  transform-origin: bottom right;
  transition: transform 0.3s ease;
}

.page-blog__post-link:hover .page-blog__read-more::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

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

/* Categories Section */
.page-blog__categories {
  background: var(--page-blog-dark-bg);
}

.page-blog__category-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
}

.page-blog__category-item {
  background: var(--page-blog-card-bg);
  border: 1px solid var(--page-blog-border-color);
  border-radius: 8px;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.page-blog__category-item:hover {
  background-color: var(--page-blog-primary-color);
  border-color: var(--page-blog-secondary-color);
}

.page-blog__category-link {
  display: block;
  padding: 12px 25px;
  font-size: 16px;
  font-weight: 600;
  color: var(--page-blog-text-main);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-blog__category-item:hover .page-blog__category-link {
  color: #ffffff;
}

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

details.page-blog__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  border: 1px solid var(--page-blog-border-color);
  overflow: hidden;
  background: var(--page-blog-card-bg);
}

details.page-blog__faq-item summary.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.3s ease;
}

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

details.page-blog__faq-item summary.page-blog__faq-question:hover {
  background: #2a2c35; /* Slightly lighter card background on hover */
}

.page-blog__faq-qtext {
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: var(--page-blog-text-main);
}

.page-blog__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: var(--page-blog-primary-color);
  flex-shrink: 0;
  margin-left: 15px;
  width: 28px;
  text-align: center;
}

details.page-blog__faq-item .page-blog__faq-answer {
  padding: 0 20px 20px;
  background: #1e2027; /* Slightly lighter than card bg for answer */
  border-radius: 0 0 5px 5px;
  color: var(--page-blog-text-main);
  font-size: 16px;
  line-height: 1.6;
}

/* CTA Section */
.page-blog__cta-section {
  background: var(--page-blog-dark-bg);
  text-align: center;
  padding: 80px 0;
}

.page-blog__cta-container {
  max-width: 900px;
}

.page-blog__cta-description {
  font-size: 18px;
  line-height: 1.6;
  color: var(--page-blog-text-main);
  margin-bottom: 40px;
}

.page-blog__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

/* Copyright Info */
.page-blog__copyright-info {
  text-align: center;
  padding: 30px 20px;
  background-color: #08090b; /* Even darker background for footer area */
  color: #888;
  font-size: 14px;
  border-top: 1px solid #1a1a1a;
}

.page-blog__copyright-info p {
  margin: 0;
}

/* General Image Responsiveness */
.page-blog img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Media Queries for Mobile (max-width: 768px) */
@media (max-width: 768px) {
  .page-blog__container {
    padding: 0 15px;
  }

  .page-blog__section {
    padding: 40px 0;
  }

  .page-blog__section-title {
    font-size: 28px;
    margin-bottom: 30px;
  }

  /* Hero Section */
  .page-blog__hero-section {
    padding-top: 10px !important; /* Ensure small top padding */
    padding-bottom: 40px;
  }

  .page-blog__main-title {
    font-size: 32px;
    line-height: 1.3;
  }

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

  /* Buttons */
  .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: 12px 20px;
    font-size: 16px;
  }

  .page-blog__cta-buttons,
  .page-blog__button-container {
    flex-direction: column !important;
    gap: 15px !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 0 15px;
  }

  /* Latest Posts Section */
  .page-blog__post-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

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

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

  .page-blog__post-excerpt {
    font-size: 15px;
  }

  /* Categories Section */
  .page-blog__category-list {
    flex-direction: column;
    gap: 10px;
  }

  .page-blog__category-item {
    width: 100%;
  }

  .page-blog__category-link {
    font-size: 15px;
    text-align: center;
  }

  /* FAQ Section */
  details.page-blog__faq-item summary.page-blog__faq-question {
    padding: 15px;
  }

  .page-blog__faq-qtext {
    font-size: 16px;
  }

  .page-blog__faq-toggle {
    font-size: 20px;
    width: 24px;
    margin-left: 10px;
  }

  details.page-blog__faq-item .page-blog__faq-answer {
    padding: 0 15px 15px;
    font-size: 15px;
  }

  /* CTA Section */
  .page-blog__cta-section {
    padding: 50px 0;
  }

  .page-blog__cta-description {
    font-size: 16px;
    margin-bottom: 30px;
  }

  /* General Image & Container Responsiveness */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !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;
  }
}

/* Media Queries for Tablet (max-width: 1024px) */
@media (max-width: 1024px) {
  .page-blog__section-title {
    font-size: 32px;
  }

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

  .page-blog__post-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
  }

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

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

  .page-blog__cta-description {
    font-size: 17px;
  }

  .page-blog__btn-primary,
  .page-blog__btn-secondary {
    padding: 12px 25px;
    font-size: 17px;
  }

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

  .page-blog__category-link {
    padding: 10px 20px;
  }

  .page-blog__faq-qtext {
    font-size: 17px;
  }
}