/* Base styles for the blog page */
.page-blog {
  background-color: #B71C1C; /* Custom background color */
  color: #FFF5E1; /* Custom main text color */
  font-family: Arial, sans-serif;
  line-height: 1.6;
}

/* Hero Section */
.page-blog__hero-section {
  position: relative;
  padding-top: 10px; /* Small top padding, assuming body handles header offset */
  margin-bottom: 40px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-blog__hero-image {
  width: 100%;
  max-height: 500px; /* Limit hero image height */
  overflow: hidden;
}

.page-blog__hero-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

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

.page-blog__main-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 700;
  color: #FFD86A; /* Gold color for title */
  margin-bottom: 15px;
  line-height: 1.2;
}

.page-blog__hero-description {
  font-size: 1.15rem;
  margin-bottom: 30px;
  color: #FFF5E1;
}

/* CTA Buttons in Hero */
.page-blog__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
  width: 100%;
  max-width: 600px;
  box-sizing: border-box;
  padding: 0 20px;
}

.page-blog__btn-primary,
.page-blog__btn-secondary,
.page-blog__btn-tertiary {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  text-align: center;
  transition: all 0.3s ease;
  box-sizing: border-box;
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow text wrapping */
}

.page-blog__btn-primary {
  background: linear-gradient(180deg, #FFD86A 0%, #E6B800 100%); /* Custom button gradient */
  color: #7A0E0E; /* Deep Red for text on gold button */
  border: 2px solid #F2B544;
}

.page-blog__btn-primary:hover {
  background: linear-gradient(180deg, #E6B800 0%, #FFD86A 100%);
  transform: translateY(-2px);
}

.page-blog__btn-secondary {
  background: #D32F2F; /* Card BG color */
  color: #FFF5E1; /* Main text color */
  border: 2px solid #F2B544;
}

.page-blog__btn-secondary:hover {
  background: #C91F17;
  transform: translateY(-2px);
}

.page-blog__btn-tertiary {
  background: #7A0E0E; /* Deep Red */
  color: #FFF5E1;
  border: 2px solid #F2B544;
}

.page-blog__btn-tertiary:hover {
  background: #E53935;
  transform: translateY(-2px);
}

/* General Section Styles */
.page-blog__articles-overview,
.page-blog__deep-dive-topics,
.page-blog__cta-section {
  max-width: 1200px;
  margin: 0 auto 60px auto;
  padding: 0 20px;
  box-sizing: border-box;
}

.page-blog__section-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  color: #FFD86A;
  text-align: center;
  margin-bottom: 25px;
  font-weight: 700;
}

.page-blog__section-intro {
  font-size: 1.1rem;
  text-align: center;
  margin-bottom: 40px;
  color: #FFF5E1;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

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

.page-blog__article-card {
  background: #D32F2F; /* Card BG color */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid #F2B544;
}

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

.page-blog__article-card a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.page-blog__card-image {
  width: 100%;
  height: 200px; /* Fixed height for consistency */
  overflow: hidden;
}

.page-blog__card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.page-blog__card-content {
  padding: 20px;
}

.page-blog__card-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: #FFD86A;
  margin-bottom: 10px;
  line-height: 1.3;
}

.page-blog__card-excerpt {
  font-size: 0.95rem;
  color: #FFF5E1;
  margin-bottom: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.page-blog__card-date {
  font-size: 0.85rem;
  color: #F4D34D; /* Gold color */
  display: block;
  text-align: right;
}

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

/* Deep Dive Topics */
.page-blog__topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.page-blog__topic-card {
  background: #D32F2F; /* Card BG color */
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
  border: 1px solid #F2B544;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.page-blog__topic-card img {
  width: 100%;
  max-width: 400px; /* Limit image width in topic card */
  height: auto;
  border-radius: 8px;
  margin: 25px 0;
  display: block;
}

.page-blog__topic-title {
  font-size: 1.6rem;
  color: #FFD86A;
  margin-bottom: 15px;
  font-weight: 600;
}

.page-blog__topic-description {
  font-size: 1rem;
  color: #FFF5E1;
  margin-bottom: 20px;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-blog__main-title {
    font-size: clamp(2rem, 4.5vw, 3rem);
  }
  .page-blog__hero-description {
    font-size: 1.05rem;
  }
  .page-blog__section-title {
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  }
}

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

  /* HERO Section */
  .page-blog__hero-section {
    padding-top: 10px !important; /* Ensure small top padding */
    margin-bottom: 30px;
  }

  .page-blog__hero-image img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-blog__hero-content {
    padding: 0 15px;
  }

  .page-blog__main-title {
    font-size: clamp(1.8rem, 8vw, 2.5rem);
    margin-bottom: 10px;
  }

  .page-blog__hero-description {
    font-size: 1rem;
    margin-bottom: 20px;
  }

  /* CTA Buttons (Mobile) */
  .page-blog__cta-buttons {
    flex-direction: column !important;
    gap: 15px !important;
    padding: 0 15px !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-blog__btn-primary,
  .page-blog__btn-secondary,
  .page-blog__btn-tertiary,
  .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;
  }

  /* General Sections (Mobile) */
  .page-blog__articles-overview,
  .page-blog__deep-dive-topics,
  .page-blog__cta-section,
  .page-blog__section, 
  .page-blog__card, 
  .page-blog__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-blog__section-title {
    font-size: 1.8rem;
    margin-bottom: 20px;
  }

  .page-blog__section-intro {
    font-size: 1rem;
    margin-bottom: 30px;
  }

  /* Article Grid (Mobile - single column) */
  .page-blog__article-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-blog__article-card {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  }

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

  .page-blog__card-image {
    height: 180px;
  }

  /* Deep Dive Topics (Mobile - single column) */
  .page-blog__topic-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-blog__topic-card {
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  }

  .page-blog__topic-card img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    margin: 15px 0;
  }

  .page-blog__topic-title {
    font-size: 1.4rem;
  }
}