/* style/blog.css */

:root {
  --primary-color: #FF8C1A;
  --secondary-color: #FFA53A;
  --card-bg: #17191F;
  --body-bg: #0D0E12;
  --text-main: #FFF3E6;
  --border-color: #A84F0C;
  --glow-color: #FFB04D;
  --deep-orange: #D96800;
}

.page-blog {
  color: var(--text-main); /* Default text color for the page */
  background-color: var(--body-bg); /* Ensure body background is respected */
}

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

.page-blog__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 60px;
  padding-top: 10px; /* Small top padding, body handles header offset */
  text-align: center;
  background: var(--body-bg);
  overflow: hidden;
}

.page-blog__hero-image-wrapper {
  width: 100%;
  max-height: 600px; /* 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;
}

.page-blog__hero-content {
  position: relative;
  z-index: 10;
  margin-top: 30px;
  max-width: 800px;
}

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

.page-blog__hero-description {
  font-size: 1.15rem;
  line-height: 1.6;
  color: rgba(255, 243, 230, 0.8);
  margin-bottom: 30px;
}

.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  box-sizing: border-box;
  max-width: 100%;
  white-space: normal;
  word-wrap: break-word;
}

.page-blog__btn-primary {
  background: linear-gradient(180deg, var(--secondary-color) 0%, var(--deep-orange) 100%);
  color: #ffffff;
  border: none;
  margin-right: 15px;
}

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

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

.page-blog__btn-secondary:hover {
  background: rgba(255, 165, 58, 0.1);
  transform: translateY(-2px);
}

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

.page-blog__latest-articles {
  padding: 80px 0;
  background-color: var(--body-bg);
}

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

.page-blog__article-card {
  background-color: var(--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;
  display: flex;
  flex-direction: column;
}

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

.page-blog__article-image-wrapper {
  width: 100%;
  height: 220px;
  overflow: hidden;
}

.page-blog__article-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.page-blog__article-card:hover .page-blog__article-image {
  transform: scale(1.05);
}

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

.page-blog__article-title {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 10px;
  line-height: 1.4;
}

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

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

.page-blog__article-meta {
  font-size: 0.9rem;
  color: rgba(255, 243, 230, 0.6);
  margin-bottom: 15px;
}

.page-blog__article-excerpt {
  font-size: 1rem;
  color: rgba(255, 243, 230, 0.8);
  line-height: 1.6;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-blog__read-more {
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
  align-self: flex-start;
}

.page-blog__read-more:hover {
  text-decoration: underline;
}

.page-blog__view-all {
  text-align: center;
}

.page-blog__featured-topics {
  padding: 80px 0;
  background-color: var(--card-bg);
}

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

.page-blog__topic-card {
  background-color: var(--body-bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  text-align: center;
  padding-bottom: 25px;
}

.page-blog__topic-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  margin-bottom: 15px;
}

.page-blog__topic-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 10px;
}

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

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

.page-blog__topic-description {
  font-size: 0.95rem;
  color: rgba(255, 243, 230, 0.7);
  line-height: 1.5;
  padding: 0 20px;
}

.page-blog__why-choose-us {
  padding: 80px 0;
  background-color: var(--body-bg);
}

.page-blog__features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  text-align: center;
}

.page-blog__feature-item {
  background-color: var(--card-bg);
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.page-blog__feature-icon {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin-bottom: 20px;
  filter: none; /* Ensure no filter changes image color */
}

.page-blog__feature-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--secondary-color);
  margin-bottom: 15px;
}

.page-blog__feature-description {
  font-size: 1rem;
  color: rgba(255, 243, 230, 0.8);
  line-height: 1.6;
}

.page-blog__faq-section {
  padding: 80px 0;
  background-color: var(--card-bg);
}

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

.page-blog__faq-item {
  background-color: var(--body-bg);
  border-radius: 8px;
  margin-bottom: 15px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.page-blog__faq-item summary {
  list-style: none;
}

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

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  cursor: pointer;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-main);
  background-color: var(--card-bg);
  border-bottom: 1px solid rgba(255, 243, 230, 0.1);
}

.page-blog__faq-question:hover {
  background-color: rgba(255, 165, 58, 0.1);
}

.page-blog__faq-toggle {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--secondary-color);
  margin-left: 15px;
  transition: transform 0.3s ease;
}

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

.page-blog__faq-answer {
  padding: 20px 25px;
  font-size: 1rem;
  color: rgba(255, 243, 230, 0.8);
  line-height: 1.6;
}

.page-blog__cta-section {
  padding: 80px 0;
  text-align: center;
  background-color: var(--body-bg);
}

.page-blog__cta-description {
  font-size: 1.15rem;
  line-height: 1.6;
  color: rgba(255, 243, 230, 0.9);
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

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

/* Responsive styles */
@media (max-width: 1024px) {
  .page-blog__hero-content {
    padding: 0 20px;
  }
  .page-blog__main-title {
    font-size: 3rem;
  }
  .page-blog__section-title {
    font-size: 2rem;
  }
}

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

  .page-blog__container {
    padding: 0 15px;
  }

  .page-blog__hero-section {
    padding-bottom: 40px;
    padding-top: 10px !important; /* body handles header offset */
  }

  .page-blog__main-title {
    font-size: clamp(2rem, 8vw, 2.8rem); /* Adjust clamp for mobile */
  }

  .page-blog__hero-description {
    font-size: 1rem;
  }

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

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

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

  .page-blog__articles-grid,
  .page-blog__topics-grid,
  .page-blog__features-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .page-blog__article-card {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  }

  .page-blog__article-title {
    font-size: 1.2rem;
  }

  .page-blog__article-excerpt {
    font-size: 0.95rem;
  }

  .page-blog__topic-title {
    font-size: 1.1rem;
  }

  .page-blog__feature-title {
    font-size: 1.3rem;
  }

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

  .page-blog__faq-answer {
    font-size: 0.95rem;
    padding: 15px 20px;
  }

  /* Mobile image responsiveness */
  .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-section,
  .page-blog__latest-articles,
  .page-blog__featured-topics,
  .page-blog__why-choose-us,
  .page-blog__faq-section,
  .page-blog__cta-section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
}

@media (max-width: 480px) {
  .page-blog__main-title {
    font-size: 2.2rem;
  }
  .page-blog__section-title {
    font-size: 1.6rem;
  }
}