/* style/blog.css */

/* Base styles for the blog page */
.page-blog {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #FFF6D6; /* Text Main */
  background-color: #0A0A0A; /* Background */
}

/* Container for consistent content width */
.page-blog__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

/* Section styling */
.page-blog__section {
  padding: 60px 0;
  text-align: center;
}

.page-blog__section-title {
  font-size: 2.5em;
  margin-bottom: 20px;
  color: #F2C14E; /* Primary color for titles */
  font-weight: bold;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.page-blog__section-description {
  font-size: 1.1em;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: #FFF6D6;
}

/* Hero Section */
.page-blog__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 550px; /* Ensure sufficient height */
  overflow: hidden;
  padding-top: 10px; /* Small top padding, body handles --header-offset */
  background-color: #0A0A0A; /* Fallback for image loading */
}

.page-blog__hero-image-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

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

.page-blog__hero-content-wrapper {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 40px 20px;
  background: rgba(0, 0, 0, 0.6); /* Semi-transparent overlay for text readability */
  border-radius: 10px;
  max-width: 90%;
}

.page-blog__hero-title {
  font-size: clamp(2em, 4vw, 3.2em); /* Use clamp for H1 font size */
  margin-bottom: 15px;
  color: #FFD36B; /* Auxiliary color for hero title */
  font-weight: bold;
  line-height: 1.2;
  letter-spacing: -0.03em;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.page-blog__hero-description {
  font-size: 1.15em;
  margin-bottom: 30px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  color: #FFF6D6;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

/* Buttons */
.page-blog__btn-primary,
.page-blog__btn-secondary,
.page-blog__hero-cta,
.page-blog__read-more,
.page-blog__view-all-btn,
.page-blog__cta-button {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.05em;
  transition: all 0.3s ease;
  cursor: pointer;
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow text wrapping */
  box-sizing: border-box; /* Include padding and border in the element's total width and height */
}

.page-blog__btn-primary,
.page-blog__hero-cta,
.page-blog__view-all-btn,
.page-blog__cta-button.page-blog__btn-primary {
  background: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%); /* Button color */
  color: #111111; /* Dark text for light button */
  border: 2px solid transparent;
}

.page-blog__btn-primary:hover,
.page-blog__hero-cta:hover,
.page-blog__view-all-btn:hover,
.page-blog__cta-button.page-blog__btn-primary:hover {
  background: linear-gradient(180deg, #FFD36B 0%, #F2C14E 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(242, 193, 78, 0.4);
}

.page-blog__btn-secondary,
.page-blog__read-more,
.page-blog__cta-button.page-blog__btn-secondary {
  background: transparent;
  color: #FFD36B; /* Auxiliary color for text */
  border: 2px solid #FFD36B; /* Border color */
}

.page-blog__btn-secondary:hover,
.page-blog__read-more:hover,
.page-blog__cta-button.page-blog__btn-secondary:hover {
  background: #FFD36B;
  color: #111111;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(255, 211, 107, 0.3);
}

/* Latest Articles Section */
.page-blog__latest-articles {
  background-color: #111111; /* Card BG for light section */
  color: #FFF6D6;
}

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

.page-blog__article-card {
  background-color: #0A0A0A; /* Background color for individual cards */
  border-radius: 10px;
  overflow: hidden;
  text-align: left;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  border: 1px solid #3A2A12; /* Border color */
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-blog__article-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(242, 193, 78, 0.2);
}

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

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

.page-blog__article-title {
  font-size: 1.4em;
  margin-bottom: 10px;
  color: #FFD36B; /* Auxiliary color for titles */
  font-weight: bold;
}

.page-blog__article-title a {
  color: #FFD36B;
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-blog__article-title a:hover {
  color: #F2C14E; /* Primary color on hover */
}

.page-blog__article-meta {
  font-size: 0.9em;
  color: #AAA;
  margin-bottom: 15px;
}

.page-blog__article-excerpt {
  font-size: 1em;
  color: #FFF6D6;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-blog__read-more {
  align-self: flex-start;
  margin-top: auto; /* Push button to bottom */
}

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

/* Why rich9.ph Section */
.page-blog__why-rich9ph-section {
    background-color: #0A0A0A; /* Background */
    color: #FFF6D6;
    padding: 80px 0;
}

.page-blog__why-rich9ph-section .page-blog__section-title {
    color: #F2C14E;
}

.page-blog__why-rich9ph-section .page-blog__section-description {
    font-size: 1.1em;
    line-height: 1.8;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 40px;
}

/* Categories Section */
.page-blog__categories-section {
  background-color: #0A0A0A; /* Background color for dark section */
  color: #FFF6D6;
}

.page-blog__categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.page-blog__category-item {
  background-color: #111111; /* Card BG */
  border-radius: 10px;
  padding: 25px 15px;
  text-align: center;
  text-decoration: none;
  color: #FFF6D6;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
  border: 1px solid #3A2A12; /* Border color */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 120px;
}

.page-blog__category-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(242, 193, 78, 0.2);
  background-color: rgba(242, 193, 78, 0.1);
}

.page-blog__category-icon {
  display: block;
  margin-bottom: 15px;
  width: 30px; /* Specific size for category icons */
  height: 30px; /* Specific size for category icons */
}

.page-blog__category-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.page-blog__category-title {
  font-size: 1.1em;
  font-weight: bold;
  color: #FFD36B;
  margin: 0;
}

/* Featured Insights Section - Similar to Latest Articles */
.page-blog__featured-insights {
  background-color: #111111; /* Card BG for light section */
  color: #FFF6D6;
}

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

.page-blog__featured-card {
  background-color: #0A0A0A; /* Background color for individual cards */
  border-radius: 10px;
  overflow: hidden;
  text-align: left;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  border: 1px solid #3A2A12; /* Border color */
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-blog__featured-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(242, 193, 78, 0.2);
}

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

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

.page-blog__featured-title {
  font-size: 1.4em;
  margin-bottom: 10px;
  color: #FFD36B; /* Auxiliary color for titles */
  font-weight: bold;
}

.page-blog__featured-title a {
  color: #FFD36B;
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-blog__featured-title a:hover {
  color: #F2C14E; /* Primary color on hover */
}

.page-blog__featured-meta {
  font-size: 0.9em;
  color: #AAA;
  margin-bottom: 15px;
}

.page-blog__featured-excerpt {
  font-size: 1em;
  color: #FFF6D6;
  margin-bottom: 20px;
  flex-grow: 1;
}


/* FAQ Section */
.page-blog__faq-section {
  background-color: #0A0A0A; /* Background */
  color: #FFF6D6;
}

.page-blog__faq-list {
  max-width: 900px;
  margin: 40px auto 0 auto;
  text-align: left;
}

.page-blog__faq-item {
  background-color: #111111; /* Card BG */
  border: 1px solid #3A2A12; /* Border color */
  border-radius: 10px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  cursor: pointer;
  background-color: #111111; /* Card BG */
  color: #F2C14E; /* Primary color for questions */
  font-weight: bold;
  font-size: 1.15em;
  transition: background-color 0.3s ease;
}

.page-blog__faq-question:hover {
  background-color: rgba(242, 193, 78, 0.1);
}

.page-blog__faq-question h3 {
  margin: 0;
  color: inherit;
  font-size: inherit;
}

.page-blog__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  transition: transform 0.3s ease;
  color: #FFD36B;
}

.page-blog__faq-item.active .page-blog__faq-toggle {
  transform: rotate(45deg);
}

.page-blog__faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 25px;
  transition: max-height 0.3s ease-out, padding 0.3s ease-out;
  color: #FFF6D6;
}