/* style/blog.css */

/* Base styles for the blog page */
.page-blog {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #FFF5E1; /* Text Main from custom colors, suitable for dark body background #B71C1C */
  background-color: transparent; /* Body background is handled by shared.css */
}

/* 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, body handles --header-offset */
  background-color: #7A0E0E; /* Deep Red from custom colors */
  overflow: hidden;
}

.page-blog__hero-image {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.page-blog__hero-content {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  z-index: 1; /* Ensure content is above image if any overlap occurs due to layout changes */
}

.page-blog__main-title {
  font-size: clamp(2.2rem, 4vw, 3rem); /* Responsive font size */
  font-weight: 700;
  line-height: 1.2;
  color: #FFCC66; /* Glow from custom colors */
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-blog__description {
  font-size: 1.1rem;
  color: #FFF5E1;
  margin-bottom: 30px;
}

/* CTA Button */
.page-blog__cta-button {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 50px;
  background: linear-gradient(180deg, #FFD86A 0%, #E6B800 100%); /* Button gradient from custom colors */
  color: #333333; /* Dark text for contrast on gold button */
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  border: 2px solid #F2B544; /* Border from custom colors */
}

.page-blog__cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
  opacity: 0.9;
}

/* Articles Section */
.page-blog__articles-section {
  padding: 80px 0;
  background-color: #B71C1C; /* Background from custom colors */
}

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

.page-blog__section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 700;
  color: #F4D34D; /* Gold from custom colors */
  text-align: center;
  margin-bottom: 50px;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
}

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

.page-blog__article-card {
  background-color: #D32F2F; /* Card BG from custom colors */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: #FFF5E1; /* Text Main from custom colors */
  display: flex;
  flex-direction: column;
}

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

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

.page-blog__article-image {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  min-width: 200px; /* Minimum image size requirement */
  min-height: 200px; /* Minimum image size requirement */
}

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

.page-blog__card-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: #F4D34D; /* Gold from custom colors */
  margin-bottom: 10px;
  line-height: 1.4;
}

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

.page-blog__card-excerpt {
  font-size: 1rem;
  color: #FFF5E1;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-blog__read-more {
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  color: #FFD86A; /* Lighter gold for read more */
  transition: color 0.3s ease;
}

.page-blog__read-more:hover {
  color: #E6B800;
}

.page-blog__read-more .fas {
  margin-left: 8px;
  font-size: 0.9em;
}

/* Pagination */
.page-blog__pagination {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 50px;
  margin-bottom: 80px;
}

.page-blog__pagination-link {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background-color: #D32F2F; /* Card BG */
  color: #FFF5E1; /* Text Main */
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s ease, color 0.3s ease;
  border: 1px solid #7A0E0E; /* Deep Red */
}

.page-blog__pagination-link:hover {
  background-color: #C91F17; /* Main color */
  color: #FFF5E1;
}

.page-blog__pagination-link--active {
  background: linear-gradient(180deg, #FFD86A 0%, #E6B800 100%); /* Button gradient */
  color: #333333; /* Dark text for contrast */
  border-color: #F2B544;
}

/* CTA Section at bottom */
.page-blog__cta-section {
  text-align: center;
  padding: 50px 0;
  background-color: #7A0E0E; /* Deep Red */
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.page-blog__cta-text {
  font-size: 1.3rem;
  color: #FFF5E1;
  margin-bottom: 30px;
  font-weight: 500;
}

/* Primary button style for the bottom CTA */
.page-blog__btn-primary {
  background: linear-gradient(180deg, #FFD86A 0%, #E6B800 100%); /* Button gradient */
  color: #333333; /* Dark text for contrast */
  border: 2px solid #F2B544; /* Border from custom colors */
}

.page-blog__btn-primary:hover {
  background: linear-gradient(180deg, #E6B800 0%, #FFD86A 100%); /* Slightly altered gradient on hover */
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-blog__hero-section {
    padding: 40px 15px;
  }

  .page-blog__articles-section {
    padding: 60px 0;
  }

  .page-blog__article-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
  }
}

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

  .page-blog__hero-section {
    padding: 20px 15px;
    padding-top: 10px !important; /* Ensure small top padding for mobile */
  }

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

  .page-blog__description {
    font-size: 1rem;
  }

  .page-blog__cta-button,
  .page-blog__btn-primary {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding: 12px 20px;
  }

  .page-blog__hero-content .page-blog__cta-button {
    margin-top: 20px;
  }

  .page-blog__section-title {
    font-size: clamp(1.5rem, 5vw, 2rem);
    margin-bottom: 30px;
  }

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

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

  .page-blog__article-image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-blog__card-title {
    font-size: 1.2rem;
  }

  .page-blog__card-excerpt {
    font-size: 0.95rem;
  }

  .page-blog__pagination {
    gap: 10px;
    margin-top: 30px;
    margin-bottom: 50px;
  }

  .page-blog__pagination-link {
    width: 40px;
    height: 40px;
    font-size: 0.9rem;
  }

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

  .page-blog__cta-text {
    font-size: 1.1rem;
    margin-bottom: 20px;
  }

  /* Ensure all content containers are responsive */
  .page-blog__container,
  .page-blog__hero-section,
  .page-blog__articles-section,
  .page-blog__cta-section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }
}