/* style/blog.css */

/* --- Base Styles --- */
.page-blog {
  color: #FFF1E8; /* Text Main color, chosen for dark body background */
  font-family: Arial, sans-serif; /* Example font */
  line-height: 1.6;
  background-color: transparent; /* Body background is handled by shared.css, this ensures transparency for main content */
}

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

.page-blog__section-title {
  font-size: 2.5em;
  font-weight: bold;
  text-align: center;
  margin-bottom: 40px;
  color: #FFF1E8; /* Text Main */
}

.page-blog__section-title--light {
  color: #FFF1E8; /* Ensure light color on dark backgrounds */
}

/* --- Hero Section --- */
.page-blog__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column; /* Image on top, content below */
  align-items: center;
  padding-top: 10px; /* Small top padding, body handles --header-offset */
  padding-bottom: 60px;
  background-color: #140C0C; /* Background color from custom scheme */
}

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

.page-blog__hero-content {
  text-align: center;
  max-width: 900px;
  padding: 0 20px;
}

.page-blog__main-title {
  /* H1 font-size clamp or not fixed, using weight/line-height for hierarchy */
  font-weight: bold;
  line-height: 1.2;
  color: #F3C54D; /* Gold color for main title */
  margin-bottom: 20px;
  font-size: clamp(2em, 4vw, 3.5em); /* Responsive font size for H1 */
}

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

.page-blog__description--light {
  color: #FFF1E8; /* Ensure light color on dark backgrounds */
}

/* --- Buttons --- */
.page-blog__cta-button {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  text-align: center;
  transition: background-color 0.3s ease, transform 0.2s ease;
  background: linear-gradient(180deg, #FFB04A 0%, #D86A14 100%); /* Button gradient */
  color: #ffffff; /* White text for buttons */
  border: none;
  cursor: pointer;
  box-sizing: border-box; /* Crucial for responsive buttons */
}

.page-blog__cta-button:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.page-blog__cta-button--secondary {
  background: #2A1212; /* Card BG color for secondary button */
  color: #F3C54D; /* Gold text for secondary button */
  border: 2px solid #F3C54D; /* Gold border */
}

.page-blog__cta-button--secondary:hover {
  background: #F3C54D;
  color: #2A1212;
}

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

/* --- Blog Posts Section --- */
.page-blog__posts-section {
  padding: 60px 0;
  background-color: #140C0C; /* Background color from custom scheme */
}

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

.page-blog__post-card {
  background-color: #2A1212; /* Card BG color */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease;
  color: #FFF1E8; /* Text Main */
  display: flex;
  flex-direction: column;
}

.page-blog__post-card:hover {
  transform: translateY(-5px);
}

.page-blog__post-cover {
  width: 100%;
  height: 225px; /* Fixed height for consistent card image appearance */
  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.4em;
  font-weight: bold;
  margin-bottom: 10px;
  line-height: 1.4;
}

.page-blog__post-title a {
  color: #F3C54D; /* Gold color for titles */
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-blog__post-title a:hover {
  color: #FFB04A; /* Lighter gold on hover */
}

.page-blog__post-meta {
  font-size: 0.9em;
  color: #6A1E1E; /* Border color for meta info */
  margin-bottom: 15px;
}

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

.page-blog__read-more-link {
  display: inline-block;
  color: #FFB04A; /* Button gradient start color */
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
  align-self: flex-start; /* Align to the start of the flex container */
}

.page-blog__read-more-link:hover {
  color: #D86A14; /* Button gradient end color */
}

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

/* --- CTA Section --- */
.page-blog__cta-section {
  padding: 80px 20px;
  text-align: center;
  background-color: #C61F1F; /* Main brand color for dark section */
}

.page-blog__dark-section {
  background-color: #C61F1F;
  color: #FFF1E8; /* Light text on dark background */
}

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

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

@media (max-width: 768px) {
  .page-blog__container {
    padding: 0 15px;
  }

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

  .page-blog__hero-content {
    padding: 0 15px;
  }

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

  .page-blog__posts-grid {
    grid-template-columns: 1fr; /* Single column on mobile */
  }

  .page-blog__post-card {
    margin-bottom: 20px;
  }

  .page-blog__cta-buttons {
    flex-direction: column;
    gap: 15px;
  }

  .page-blog__cta-button {
    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;
  }

  /* All images must be responsive */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  /* All image/video/button containers must be responsive */
  .page-blog__section,
  .page-blog__card,
  .page-blog__container,
  .page-blog__hero-section,
  .page-blog__posts-section,
  .page-blog__cta-section,
  .page-blog__cta-buttons,
  .page-blog__post-card {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    /* Adding horizontal padding to content sections to prevent edge-to-edge content */
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Specific override for hero section and post section to allow full width background,
     while content inside still respects padding. */
  .page-blog__hero-section,
  .page-blog__posts-section,
  .page-blog__cta-section {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .page-blog__content-area {
    padding: 20px 15px !important;
  }
}

@media (max-width: 480px) {
  .page-blog__section-title {
    font-size: 1.8em;
  }

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

  .page-blog__cta-button {
    font-size: 1em;
    padding: 12px 20px;
  }
}

/* No CSS filter on images */
.page-blog img {
  filter: none;
}