/* style/blog.css */

/* Base styles for the blog page content */
.page-blog {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #333333; /* Text Main */
  background-color: #F5F7FA; /* Background */
}

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

/* Hero Section */
.page-blog__hero-section {
  position: relative;
  background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%); /* Using main brand colors */
  padding-bottom: 60px;
  display: flex;
  flex-direction: column; /* Image above content */
  align-items: center;
  text-align: center;
  color: #ffffff;
  padding-top: 10px; /* Small top padding, body handles header offset */
}

.page-blog__hero-image-wrapper {
  width: 100%;
  max-width: 1200px;
  margin-bottom: 40px;
}

.page-blog__hero-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  min-width: 200px; /* Ensure min size */
  min-height: 200px; /* Ensure min size */
}

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

.page-blog__hero-title {
  font-size: clamp(2em, 4vw, 3.5em); /* Responsive H1 font size */
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.2;
  color: #ffffff;
}

.page-blog__hero-description {
  font-size: 1.1em;
  margin-bottom: 30px;
  color: #f0f0f0;
}

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

/* Latest Posts Section */
.page-blog__latest-posts {
  padding: 60px 0;
  background-color: #F5F7FA; /* Background */
}

.page-blog__section-title {
  font-size: clamp(1.8em, 3vw, 2.8em);
  font-weight: 700;
  text-align: center;
  margin-bottom: 40px;
  color: #333333; /* Text Main */
}

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

.page-blog__post-card {
  background-color: #FFFFFF; /* Card BG */
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid #E0E0E0; /* Border */
}

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

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

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

.page-blog__post-content {
  padding: 20px;
  color: #333333; /* Text Main */
}

.page-blog__post-title {
  font-size: 1.4em;
  font-weight: 600;
  margin-bottom: 10px;
  color: #E53935; /* Main color for links/titles */
  transition: color 0.3s ease;
}

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

.page-blog__post-excerpt {
  font-size: 0.95em;
  color: #555555;
  margin-bottom: 15px;
}

.page-blog__post-date {
  font-size: 0.85em;
  color: #888888;
  display: block;
}

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

/* Call to Action Section */
.page-blog__cta-section {
  background: linear-gradient(180deg, #E53935 0%, #FF5A4F 100%); /* Using main brand colors */
  padding: 60px 20px;
  text-align: center;
  color: #ffffff;
}

.page-blog__cta-title {
  font-size: clamp(1.8em, 3vw, 2.8em);
  font-weight: 700;
  margin-bottom: 20px;
  color: #ffffff;
}

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

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

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

.page-blog__btn-primary {
  background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%); /* Button color */
  color: #ffffff;
  border: 2px solid transparent;
}

.page-blog__btn-primary:hover {
  background: linear-gradient(180deg, #E53935 0%, #FF5A4F 100%);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.page-blog__btn-secondary {
  background-color: #ffffff;
  color: #E53935; /* Main color */
  border: 2px solid #E53935; /* Main color */
}

.page-blog__btn-secondary:hover {
  background-color: #f0f0f0;
  color: #FF5A4F; /* Auxiliary color */
  border-color: #FF5A4F; /* Auxiliary color */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

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

  .page-blog__container {
    padding-left: 15px;
    padding-right: 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-blog__hero-section {
    padding: 40px 15px;
    padding-top: 10px !important; /* Small top padding for mobile */
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-blog__hero-image-wrapper {
    margin-bottom: 30px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-blog__hero-image {
    height: auto; /* Ensure aspect ratio */
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    min-width: 200px !important;
    min-height: 200px !important;
  }

  .page-blog__hero-content {
    padding: 0;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

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

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

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

  .page-blog__latest-posts {
    padding: 40px 0;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

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

  .page-blog__post-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .page-blog__post-card {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 0;
  }

  .page-blog__post-image {
    height: 180px; /* Adjust height for mobile */
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    min-width: 200px !important;
    min-height: 200px !important;
  }

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

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

  .page-blog__cta-section {
    padding: 40px 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

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

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

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

  /* Mobile image responsiveness (general) */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
    min-width: 200px !important;
    min-height: 200px !important;
  }

  /* Mobile button responsiveness (general) */
  .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-left: 15px;
    padding-right: 15px;
  }
}