/* style/blog.css */

/* Base styles for the blog page, ensuring text color contrasts with shared body background */
.page-blog {
  font-family: 'Arial', sans-serif;
  color: #FFF6D6; /* Text Main color, assuming a dark body background from shared.css */
  background-color: #0A0A0A; /* Background color */
  line-height: 1.6;
}

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

/* Hero Section */
.page-blog__hero-section {
  position: relative;
  display: flex;
  flex-direction: column; /* Image above content */
  align-items: center;
  justify-content: center;
  padding-bottom: 60px; /* Space below hero content */
  background-color: #0A0A0A; /* Ensure background color for the section */
}

.page-blog__hero-image-wrapper {
  width: 100%;
  max-height: 600px; /* Limit height for hero image */
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

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

.page-blog__hero-content {
  text-align: center;
  padding: 40px 20px 0; /* Add top padding here, body handles header offset */
  max-width: 800px;
  margin-top: -80px; /* Overlap slightly with image for visual interest */
  position: relative;
  z-index: 1;
  background-color: #111111; /* Card BG for content block */
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  border: 1px solid #3A2A12; /* Border color */
}

.page-blog__main-title {
  color: #FFD36B; /* Glow color for main title */
  font-weight: bold;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 15px;
  max-width: 100%; /* Ensure H1 doesn't overflow */
}

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

.page-blog__cta-button {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  background: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%); /* Button color */
  color: #111111; /* Dark text for button for contrast */
  border: none;
  cursor: pointer;
  white-space: normal; /* Allow text wrap */
  word-wrap: break-word; /* Allow text wrap */
  box-sizing: border-box; /* Include padding in width calculation */
}

.page-blog__cta-button:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 211, 107, 0.4); /* Glow color for shadow */
}

/* Section Titles */
.page-blog__section-title {
  color: #FFD36B; /* Glow color for section titles */
  text-align: center;
  margin-bottom: 40px;
  font-size: 2.5em;
  font-weight: bold;
  line-height: 1.3;
}

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

/* Latest Posts Section */
.page-blog__latest-posts {
  padding: 60px 0;
  background-color: #0A0A0A; /* Background color */
}

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

.page-blog__post-card {
  background-color: #111111; /* Card BG */
  border: 1px solid #3A2A12; /* Border color */
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-blog__post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(255, 211, 107, 0.3); /* Glow color for shadow */
}

.page-blog__post-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.page-blog__post-image-wrapper {
  width: 100%;
  height: 200px; /* Fixed height for consistent card images */
  overflow: hidden;
}

.page-blog__post-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.page-blog__post-card:hover .page-blog__post-image {
  transform: scale(1.05);
}

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

.page-blog__post-title {
  color: #FFD36B; /* Glow color for post titles */
  font-size: 1.4em;
  margin-bottom: 10px;
  line-height: 1.3;
}

.page-blog__post-excerpt {
  color: #FFF6D6; /* Text Main color */
  font-size: 0.95em;
  margin-bottom: 15px;
  line-height: 1.5;
}

.page-blog__post-date {
  color: #F2C14E; /* Main color for date */
  font-size: 0.85em;
  display: block;
  text-align: right;
}

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

.page-blog__view-all-posts {
  padding: 10px 20px;
  font-size: 1.1em;
}

/* Categories Section */
.page-blog__categories {
  padding: 60px 0;
  background-color: #111111; /* Card BG */
}

.page-blog__category-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
}

.page-blog__category-link {
  display: block;
  padding: 10px 20px;
  background-color: rgba(255, 211, 107, 0.1); /* Light background with Glow color */
  color: #FFD36B; /* Glow color for category links */
  border: 1px solid #F2C14E; /* Main color border */
  border-radius: 25px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
}

.page-blog__category-link:hover {
  background-color: #F2C14E; /* Main color on hover */
  color: #111111; /* Dark text for contrast */
  box-shadow: 0 2px 10px rgba(255, 211, 107, 0.4); /* Glow color shadow */
}

/* Call to Action Section */
.page-blog__call-to-action {
  padding: 80px 0;
  text-align: center;
  background-color: #0A0A0A; /* Background color */
}

.page-blog__call-to-action .page-blog__section-title {
  margin-bottom: 20px;
}

.page-blog__call-to-action .page-blog__description {
  max-width: 900px;
  margin: 0 auto 40px auto;
}

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

.page-blog__register-now,
.page-blog__login-now {
  min-width: 180px;
}

/* Responsive design for mobile */
@media (max-width: 768px) {
  .page-blog__container {
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-blog__hero-section {
    padding-bottom: 40px;
  }

  .page-blog__hero-content {
    padding: 20px;
    margin-top: -60px; /* Adjust overlap for smaller screens */
  }

  .page-blog__main-title {
    font-size: 2em; /* Adjust font size for mobile H1 */
    margin-bottom: 10px;
  }

  .page-blog__description {
    font-size: 1em;
    margin-bottom: 20px;
  }

  .page-blog__cta-button {
    width: 100% !important; /* Force full width for buttons */
    max-width: 100% !important;
    padding: 12px 15px !important;
    font-size: 1em !important;
    margin-bottom: 10px; /* Add space between stacked buttons */
  }
  
  /* Buttons group should stack vertically */
  .page-blog__cta-buttons-group {
    flex-direction: column;
    gap: 10px;
  }
  
  .page-blog__cta-buttons-group .page-blog__cta-button {
    margin-bottom: 0; /* Reset individual button margin if in group */
  }

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

  .page-blog__latest-posts {
    padding: 40px 0;
  }

  .page-blog__post-grid {
    grid-template-columns: 1fr; /* Single column for mobile */
    gap: 20px;
  }

  .page-blog__post-image-wrapper {
    height: 180px; /* Adjust image height for mobile cards */
  }

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

  .page-blog__post-excerpt {
    font-size: 0.9em;
  }

  .page-blog__categories {
    padding: 40px 0;
  }

  .page-blog__category-list {
    gap: 10px;
  }

  .page-blog__category-link {
    padding: 8px 15px;
    font-size: 0.9em;
  }

  .page-blog__call-to-action {
    padding: 60px 0;
  }

  /* Image responsiveness for all images */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  /* All image containers must be responsive */
  .page-blog__hero-image-wrapper,
  .page-blog__post-image-wrapper,
  .page-blog__card,
  .page-blog__section,
  .page-blog__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important; /* Prevent overflow */
  }

  /* If video section were present */
  /* .page-blog__video-section {
    padding-top: 10px !important; 
  } */
}

/* Ensure no filter on images */
.page-blog img {
  filter: none !important;
}

/* Color contrast safety */
.page-blog__dark-bg {
  color: #ffffff;
}

.page-blog__light-bg {
  color: #333333;
}