/* style/blog.css */
:root {
  --primary-color: #E53935;
  --secondary-color: #FF5A4F;
  --text-main-color: #333333;
  --card-bg-color: #FFFFFF;
  --bg-color-page: #F5F7FA;
  --border-color: #E0E0E0;
}

.page-blog {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-main-color);
  background-color: var(--bg-color-page);
}

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

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

.page-blog__section-intro {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px;
  font-size: 1.1em;
  color: #555;
}

/* Hero Section (Blog specific) */
.page-blog__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  padding-top: 10px; /* Small top padding, body handles header offset */
  background-color: var(--card-bg-color);
  margin-bottom: 40px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.page-blog__hero-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.page-blog__hero-image {
  width: 100%;
  margin-bottom: 30px;
}

.page-blog__hero-image img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  border-radius: 8px;
  object-fit: cover;
}

.page-blog__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
}

.page-blog__main-title {
  font-weight: 700;
  line-height: 1.2;
  color: var(--primary-color);
  margin-bottom: 15px;
  /* Using clamp for responsive font size, avoiding fixed large values */
  font-size: clamp(2em, 4vw, 3.5em);
}

.page-blog__hero-description {
  font-size: 1.2em;
  color: var(--text-main-color);
  max-width: 900px;
  margin: 0 auto;
}

/* Latest Posts Section */
.page-blog__latest-posts-section {
  padding: 40px 0;
  margin-bottom: 40px;
}

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

.page-blog__post-card {
  background-color: var(--card-bg-color);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

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

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

.page-blog__post-title {
  font-size: 1.5em;
  color: var(--primary-color);
  margin-top: 0;
  margin-bottom: 10px;
  line-height: 1.3;
}

.page-blog__post-meta {
  font-size: 0.9em;
  color: #777;
  margin-bottom: 15px;
}

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

.page-blog__read-more {
  display: inline-block;
  color: var(--secondary-color);
  font-weight: bold;
  transition: color 0.3s ease;
}

.page-blog__read-more:hover {
  color: var(--primary-color);
}

/* CTA Section */
.page-blog__cta-section {
  background: linear-gradient(180deg, var(--secondary-color) 0%, var(--primary-color) 100%);
  color: #ffffff;
  text-align: center;
  padding: 80px 20px;
  margin-bottom: 40px;
  border-radius: 10px;
}

.page-blog__cta-title {
  font-size: 2.8em;
  margin-bottom: 20px;
  font-weight: bold;
  color: #ffffff;
}

.page-blog__cta-description {
  font-size: 1.2em;
  max-width: 800px;
  margin: 0 auto 30px;
}

.page-blog__cta-button {
  display: inline-block;
  padding: 18px 45px;
  background-color: var(--card-bg-color);
  color: var(--primary-color);
  text-decoration: none;
  border-radius: 50px;
  font-size: 1.2em;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.page-blog__cta-button:hover {
  background-color: #f0f0f0;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

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

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

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

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: #f5f5f5;
}

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

.page-blog__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: #666;
  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: #f9f9f9;
  border-radius: 0 0 5px 5px;
  color: var(--text-main-color);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-blog__section-title {
    font-size: 2em;
  }
  .page-blog__cta-title {
    font-size: 2.2em;
  }
}

@media (max-width: 768px) {
  .page-blog__container {
    padding: 0 15px; /* Add padding to container on mobile */
  }

  .page-blog__hero-section,
  .page-blog__latest-posts-section,
  .page-blog__cta-section,
  .page-blog__faq-section {
    padding: 30px 0;
  }

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

  .page-blog__main-title {
    font-size: clamp(1.8em, 7vw, 2.5em);
  }

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

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

  .page-blog__section-intro {
    font-size: 0.95em;
  }

  .page-blog__post-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-blog__post-thumbnail {
    height: 200px;
  }

  .page-blog__post-title {
    font-size: 1.3em;
  }

  .page-blog__cta-title {
    font-size: 1.8em;
  }

  .page-blog__cta-description {
    font-size: 1em;
  }

  .page-blog__cta-button {
    padding: 15px 30px;
    font-size: 1em;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  details.page-blog__faq-item summary.page-blog__faq-question {
    padding: 15px;
  }
  .page-blog__faq-qtext {
    font-size: 1em;
  }
  details.page-blog__faq-item .page-blog__faq-answer {
    padding: 0 15px 15px;
  }

  /* Image responsive rules */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important;
  }
  
  /* All containers with images/buttons */
  .page-blog__hero-container,
  .page-blog__post-grid,
  .page-blog__cta-section,
  .page-blog__faq-list,
  .page-blog__post-card,
  .page-blog__post-content {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .page-blog__cta-section {
    border-radius: 0;
  }
}