/* style/blog.css */

/* Base styles for the blog page */
.page-blog {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Text Main */
  background-color: #F5F7FA; /* Background */
  padding-top: 0; /* Handled by body padding-top */
}

/* Container for consistent content width */
.page-blog__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

/* Hero Section */
.page-blog__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: 10px; /* Small top padding, body handles header offset */
  padding-bottom: 40px;
  background-color: #ffffff; /* Card BG */
}

.page-blog__hero-image {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  margin-bottom: 20px;
}

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

.page-blog__hero-title {
  font-size: 2.8em;
  font-weight: bold;
  color: #E53935; /* Main color for emphasis */
  margin-bottom: 15px;
  line-height: 1.2;
}

.page-blog__hero-description {
  font-size: 1.1em;
  color: #333333; /* Text Main */
  margin-bottom: 30px;
}

.page-blog__hero-button {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 8px;
  background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%); /* Button color */
  color: #ffffff;
  text-decoration: none;
  font-weight: bold;
  transition: opacity 0.3s ease;
  box-sizing: border-box;
  max-width: 100%;
  white-space: normal;
  word-wrap: break-word;
}

.page-blog__hero-button:hover {
  opacity: 0.9;
}

/* Section Titles */
.page-blog__section-title {
  font-size: 2.2em;
  color: #E53935; /* Main color */
  text-align: center;
  margin-top: 60px;
  margin-bottom: 40px;
  font-weight: bold;
}

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

.page-blog__article-card {
  background-color: #FFFFFF; /* Card BG */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid #E0E0E0; /* Border */
  display: flex;
  flex-direction: column;
}

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

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

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

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

.page-blog__article-title a {
  color: #E53935; /* Main color for links */
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-blog__article-title a:hover {
  color: #FF5A4F; /* Auxiliary color on hover */
}

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

.page-blog__article-excerpt {
  font-size: 1em;
  color: #333333; /* Text Main */
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-blog__read-more-button {
  display: inline-block;
  padding: 8px 15px;
  border-radius: 6px;
  background: #FF5A4F; /* Auxiliary color for secondary buttons */
  color: #ffffff;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease;
  align-self: flex-start;
  box-sizing: border-box;
  max-width: 100%;
  white-space: normal;
  word-wrap: break-word;
}

.page-blog__read-more-button:hover {
  background-color: #E53935; /* Main color on hover */
}

/* Latest Articles Section Specifics */
.page-blog__latest-articles {
  background-color: #F5F7FA; /* Background */
  padding-bottom: 60px;
}

.page-blog__view-all-button-container {
  text-align: center;
  margin-top: 40px;
}

.page-blog__view-all-button {
  display: inline-block;
  padding: 12px 30px;
  border-radius: 8px;
  background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%); /* Button color */
  color: #ffffff;
  text-decoration: none;
  font-weight: bold;
  transition: opacity 0.3s ease;
  box-sizing: border-box;
  max-width: 100%;
  white-space: normal;
  word-wrap: break-word;
}

.page-blog__view-all-button:hover {
  opacity: 0.9;
}

/* CTA Section */
.page-blog__cta-section {
  background-color: #E53935; /* Dark BG */
  color: #ffffff;
  padding: 80px 20px;
  text-align: center;
}

.page-blog__cta-title {
  font-size: 2.5em;
  font-weight: bold;
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-blog__cta-description {
  font-size: 1.1em;
  max-width: 800px;
  margin: 0 auto 40px auto;
  line-height: 1.6;
}

.page-blog__cta-button {
  display: inline-block;
  padding: 15px 35px;
  border-radius: 10px;
  background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%); /* Button color */
  color: #ffffff;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.2em;
  transition: opacity 0.3s ease;
  box-sizing: border-box;
  max-width: 100%;
  white-space: normal;
  word-wrap: break-word;
}

.page-blog__cta-button:hover {
  opacity: 0.9;
}

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

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

  .page-blog__container {
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-blog__hero-section {
    padding-top: 10px !important; /* body handles --header-offset, this is just small decorative padding */
    padding-bottom: 30px;
  }

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

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

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

  /* All image containers must be responsive */
  .page-blog__article-image, 
  .page-blog__hero-image {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important; /* Override fixed height for responsiveness */
    box-sizing: border-box !important;
  }

  .page-blog__article-card {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

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

  .page-blog__section-title {
    font-size: 1.6em;
    margin-top: 40px;
    margin-bottom: 30px;
  }

  .page-blog__cta-section {
    padding: 60px 15px;
  }

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

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

  /* Buttons responsive */
  .page-blog__hero-button,
  .page-blog__read-more-button,
  .page-blog__view-all-button,
  .page-blog__cta-button,
  .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 !important;
    padding-right: 15px !important;
  }

  .page-blog__view-all-button-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }

  .page-blog__hero-content,
  .page-blog__cta-description {
    padding-left: 15px;
    padding-right: 15px;
  }
}

/* Color Contrast Fixes (as per instructions) */
.page-blog__dark-bg {
  background: #E53935; /* Using brand color but ensuring contrast */
  color: #ffffff; /* Deep background needs light text */
}

.page-blog__light-bg {
  background: #F5F7FA; /* Light background */
  color: #333333; /* Light background needs dark text */
}

/* Ensure all links have sufficient contrast */
.page-blog a {
  color: #E53935; /* Main color for links */
  text-decoration: underline; /* Add underline for better accessibility */
}
.page-blog a:hover {
  color: #FF5A4F; /* Auxiliary color on hover */
}

/* Specific contrast for titles in dark sections */
.page-blog__dark-section .page-blog__cta-title {
  color: #ffffff;
}