/* style/blog.css */

/* General page styling */
.page-blog {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #FFF5E1; /* Text Main - for body background #B71C1C */
  background-color: #B71C1C; /* Background */
}

/* Hero Section */
.page-blog__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 20px;
  padding-top: 10px; /* Small top padding for hero section */
  background-color: #7A0E0E; /* Deep Red for contrast */
  text-align: center;
}

.page-blog__hero-content {
  max-width: 800px;
  margin-bottom: 30px;
  z-index: 1;
}

.page-blog__main-title {
  font-size: clamp(2em, 4vw, 3.2em); /* Responsive font size */
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
  color: #FFCC66; /* Glow */
  text-shadow: 0 0 10px rgba(255, 204, 102, 0.7);
}

.page-blog__intro-text {
  font-size: 1.1em;
  margin-bottom: 30px;
  color: #FFF5E1; /* Text Main */
}

.page-blog__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap; /* Allow wrapping on small screens */
  width: 100%; /* Ensure container takes full width for wrapping */
  max-width: 100%; /* Ensure container takes full width for wrapping */
  box-sizing: border-box;
  padding: 0 15px; /* Add padding to prevent buttons from touching edges */
}

.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.05em;
  transition: all 0.3s ease;
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow text breaking */
  box-sizing: border-box;
  max-width: 100%; /* Ensure buttons don't exceed container width */
}

.page-blog__btn-primary {
  background: linear-gradient(180deg, #FFD86A 0%, #E6B800 100%); /* Button */
  color: #333333; /* Dark text for contrast on light gold gradient */
  border: none;
  box-shadow: 0 4px 15px rgba(255, 216, 106, 0.4);
}

.page-blog__btn-primary:hover {
  background: linear-gradient(180deg, #E6B800 0%, #FFD86A 100%);
  box-shadow: 0 6px 20px rgba(255, 216, 106, 0.6);
}

.page-blog__btn-secondary {
  background: #ffffff;
  color: #C91F17; /* Main color for text */
  border: 2px solid #C91F17; /* Main color for border */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.page-blog__btn-secondary:hover {
  background: #f0f0f0;
  color: #E53935; /* Auxiliary color on hover */
  border-color: #E53935;
}

.page-blog__hero-image {
  width: 100%;
  max-width: 1200px;
  height: auto;
  margin-top: 40px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  object-fit: cover;
}

/* Latest Posts Section */
.page-blog__latest-posts {
  padding: 80px 20px;
  background-color: #7A0E0E; /* Deep Red for dark section */
  color: #FFF5E1; /* Text Main */
}

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

.page-blog__section-title {
  font-size: clamp(1.8em, 3.5vw, 2.5em); /* Responsive font size */
  font-weight: 700;
  color: #FFCC66; /* Glow */
  text-align: center;
  margin-bottom: 20px;
}

.page-blog__section-description {
  font-size: 1.1em;
  text-align: center;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: #FFF5E1; /* Text Main */
}

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

.page-blog__post-card {
  background-color: #D32F2F; /* Card B G */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  color: #FFF5E1; /* Text Main */
  border: 1px solid #F2B544; /* Border */
}

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

.page-blog__post-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}

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

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

.page-blog__post-title {
  font-size: 1.25em;
  font-weight: 600;
  margin-bottom: 10px;
  color: #FFCC66; /* Glow */
  line-height: 1.3;
}

.page-blog__post-excerpt {
  font-size: 0.95em;
  color: #FFF5E1; /* Text Main */
  margin-bottom: 15px;
  flex-grow: 1;
}

.page-blog__post-date {
  font-size: 0.85em;
  color: rgba(255, 245, 225, 0.7); /* Lighter Text Main */
  margin-top: auto;
}

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

/* Categories Section */
.page-blog__categories {
  padding: 80px 20px;
  background-color: #B71C1C; /* Background */
  color: #FFF5E1; /* Text Main */
}

.page-blog__category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
}

.page-blog__category-card {
  background-color: #D32F2F; /* Card B G */
  border-radius: 12px;
  padding: 25px;
  text-align: center;
  text-decoration: none;
  color: #FFF5E1; /* Text Main */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid #F2B544; /* Border */
}

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

.page-blog__category-title {
  font-size: 1.4em;
  font-weight: 600;
  margin-bottom: 10px;
  color: #FFCC66; /* Glow */
}

.page-blog__category-count {
  font-size: 0.95em;
  color: rgba(255, 245, 225, 0.8); /* Lighter Text Main */
}

/* CTA Section */
.page-blog__cta-section {
  padding: 80px 20px;
  background-color: #7A0E0E; /* Deep Red */
  text-align: center;
  color: #FFF5E1; /* Text Main */
}

.page-blog__cta-title {
  font-size: clamp(1.8em, 3.5vw, 2.5em); /* Responsive font size */
  font-weight: 700;
  color: #FFCC66; /* Glow */
  margin-bottom: 20px;
}

.page-blog__cta-description {
  font-size: 1.1em;
  max-width: 800px;
  margin: 0 auto 30px auto;
  color: #FFF5E1; /* Text Main */
}

.page-blog__btn-large {
  padding: 16px 40px;
  font-size: 1.15em;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .page-blog__hero-image {
    width: 90%;
  }
}

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

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

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

  .page-blog__intro-text,
  .page-blog__section-description,
  .page-blog__cta-description {
    font-size: 1em;
  }

  .page-blog__cta-buttons {
    flex-direction: column;
    gap: 15px;
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .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; /* Add padding to ensure text doesn't touch edges */
    padding-right: 15px;
  }

  .page-blog__cta-buttons,
  .page-blog__button-group,
  .page-blog__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-wrap: wrap !important;
    gap: 10px;
  }

  .page-blog__latest-posts,
  .page-blog__categories,
  .page-blog__cta-section {
    padding: 50px 15px;
  }

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

  .page-blog__post-image {
    height: 180px; /* Adjust height for mobile */
  }

  .page-blog__section-title,
  .page-blog__cta-title {
    font-size: clamp(1.5em, 7vw, 2em);
  }

  /* Image responsive rules */
  .page-blog img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-blog__hero-section,
  .page-blog__latest-posts,
  .page-blog__categories,
  .page-blog__cta-section,
  .page-blog__container,
  .page-blog__post-card,
  .page-blog__category-card {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
}

@media (max-width: 480px) {
  .page-blog__hero-section {
    padding: 30px 10px;
    padding-top: 10px !important;
  }
  .page-blog__main-title {
    font-size: clamp(1.6em, 9vw, 2.2em);
  }
  .page-blog__btn-primary,
  .page-blog__btn-secondary {
    font-size: 1em;
    padding: 12px 20px;
  }
}