/* style/blog.css */

/* --- General Styles & Body Background Adaptation --- */
.page-blog {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #FFF5E1; /* Text Main from custom palette, for dark body background */
  background-color: transparent; /* Body background handled by shared.css */
}

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

.page-blog__dark-section {
  background-color: #B71C1C; /* Background from custom palette */
  padding: 60px 0;
  color: #FFF5E1; /* Text Main for dark background */
}

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

.page-blog__card {
  background-color: #D32F2F; /* Card BG from custom palette */
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  color: #FFF5E1; /* Text Main for card background */
  border: 1px solid #F2B544; /* Border from custom palette */
}

/* --- Buttons --- */
.page-blog__btn-primary {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 8px;
  background: linear-gradient(180deg, #FFD86A 0%, #E6B800 100%); /* Button from custom palette */
  color: #000000; /* Dark text for bright gold button */
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1em;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  box-sizing: border-box;
}

.page-blog__btn-primary:hover {
  background: linear-gradient(180deg, #FFE89C 0%, #FFC81A 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.page-blog__btn-secondary {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 8px;
  background-color: #FFF5E1; /* Text Main for secondary button background */
  color: #C91F17; /* Primary color for text on light button */
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1em;
  transition: all 0.3s ease;
  border: 2px solid #C91F17; /* Primary color for border */
  cursor: pointer;
  box-sizing: border-box;
}

.page-blog__btn-secondary:hover {
  background-color: #E0E0E0;
  color: #7A0E0E; /* Deep Red for hover text */
  border-color: #7A0E0E; /* Deep Red for hover border */
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* --- Hero Section --- */
.page-blog__hero-section {
  position: relative;
  display: flex;
  flex-direction: column; /* Image on top, content below */
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px 0 60px 0; /* Small top padding, body handles main offset */
  overflow: hidden;
}

.page-blog__hero-image {
  width: 100%;
  height: auto;
  max-height: 600px; /* Limit height for aesthetic */
  object-fit: cover;
  display: block;
  margin-bottom: 30px; /* Space between image and content */
}

.page-blog__hero-content {
  max-width: 900px;
  padding: 0 20px;
  position: relative;
  z-index: 2;
}

.page-blog__hero-title {
  color: #FFF5E1;
  font-size: clamp(2.5em, 4.5vw, 3.5em);
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-blog__hero-description {
  color: #FFF5E1;
  font-size: 1.15em;
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

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

/* --- Latest Posts Section --- */
.page-blog__latest-posts {
  padding-top: 60px;
  padding-bottom: 60px;
}

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

.page-blog__post-card {
  text-decoration: none;
  color: #FFF5E1;
  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.3);
}

.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;
  border-bottom: 1px solid #F2B544; /* Border from custom palette */
}

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

.page-blog__post-title {
  font-size: 1.4em;
  font-weight: 600;
  margin-bottom: 10px;
  color: #FFD86A; /* Gold color for titles */
}

.page-blog__post-meta {
  font-size: 0.9em;
  color: rgba(255, 245, 225, 0.7); /* Lighter Text Main */
  margin-bottom: 15px;
}

.page-blog__post-excerpt {
  font-size: 1em;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-blog__read-more-btn {
  display: inline-block;
  padding: 8px 15px;
  background-color: #C91F17; /* Primary color */
  color: #FFF5E1;
  border-radius: 5px;
  text-decoration: none;
  font-size: 0.9em;
  align-self: flex-start;
  transition: background-color 0.3s ease;
}

.page-blog__read-more-btn:hover {
  background-color: #7A0E0E; /* Deep Red */
}

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

/* --- Categories Section --- */
.page-blog__categories-section {
  padding-top: 60px;
  padding-bottom: 60px;
}

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

.page-blog__category-card {
  text-decoration: none;
  text-align: center;
  padding: 30px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-blog__category-title {
  font-size: 1.5em;
  font-weight: 600;
  margin-bottom: 15px;
  color: #FFD86A; /* Gold color for titles */
}

.page-blog__category-description {
  font-size: 1em;
  color: rgba(255, 245, 225, 0.8);
}

/* --- CTA Section --- */
.page-blog__cta-section {
  text-align: center;
  padding-top: 60px;
  padding-bottom: 60px;
}

.page-blog__cta-description {
  font-size: 1.2em;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: #FFF5E1;
}

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

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

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

  .page-blog__dark-section {
    padding: 40px 0;
  }

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

  /* Hero Section */
  .page-blog__hero-section {
    padding: 10px 0 40px 0 !important; /* Small top padding */
  }

  .page-blog__hero-image {
    max-height: 300px !important;
    margin-bottom: 20px !important;
  }

  .page-blog__hero-title {
    font-size: 2em !important;
    margin-bottom: 15px !important;
  }

  .page-blog__hero-description {
    font-size: 1em !important;
    margin-bottom: 25px !important;
  }

  .page-blog__hero-cta-buttons,
  .page-blog__cta-buttons {
    flex-direction: column !important;
    gap: 15px !important;
  }

  .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 !important;
    padding-right: 15px !important;
  }

  /* Latest Posts Section */
  .page-blog__posts-grid {
    grid-template-columns: 1fr !important;
    gap: 25px !important;
  }

  .page-blog__post-image {
    height: 180px !important;
  }

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

  /* Categories Section */
  .page-blog__categories-grid {
    grid-template-columns: 1fr !important;
    gap: 25px !important;
  }

  .page-blog__category-title {
    font-size: 1.3em !important;
  }

  /* Image responsive enforcement */
  .page-blog img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-blog__section,
  .page-blog__card,
  .page-blog__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
  }
  
  .page-blog__hero-section {
    padding-top: 10px !important; /* body already handles --header-offset */
  }
}