/* style/blog.css */

/* Base styles for the blog page */
.page-blog {
  color: #ffffff; /* Light text for dark body background */
  background-color: #000000; /* Ensuring main content area matches body if not inherited */
  padding-top: var(--header-offset, 120px); /* Fixed header offset */
  font-family: Arial, sans-serif;
  line-height: 1.6;
}

/* Hero Section */
.page-blog__hero-section {
  position: relative;
  overflow: hidden;
  padding: 0; /* No padding here, content inside takes care of it */
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 500px; /* Minimum height for the hero section */
}

.page-blog__hero-container {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 100%; /* Ensure no horizontal overflow */
}

.page-blog__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  filter: brightness(0.6); /* Slightly darken image for text readability */
}

.page-blog__hero-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  max-width: 800px;
  padding: 20px;
  color: #ffffff;
  z-index: 10;
}

.page-blog__hero-title {
  font-size: 3.5em;
  margin-bottom: 20px;
  font-weight: bold;
  color: #ffffff;
}

.page-blog__hero-description {
  font-size: 1.2em;
  margin-bottom: 30px;
  color: #f0f0f0;
}

.page-blog__hero-actions {
  display: flex;
  justify-content: center;
  gap: 20px;
}

/* General Buttons */
.page-blog__button {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease;
  min-width: 120px; /* Minimum width for buttons */
}

.page-blog__button--primary {
  background-color: #FCBC45; /* Login button color */
  color: #000000;
  border: 2px solid #FCBC45;
}

.page-blog__button--primary:hover {
  background-color: #e0a73c;
  border-color: #e0a73c;
}

.page-blog__button--secondary {
  background-color: transparent;
  color: #ffffff;
  border: 2px solid #ffffff;
}

.page-blog__button--secondary:hover {
  background-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.page-blog__button--text {
  color: #FCBC45;
  text-decoration: none;
  padding: 0;
  border: none;
  background: none;
  font-weight: bold;
}

.page-blog__button--text:hover {
  text-decoration: underline;
  color: #e0a73c;
}

/* Content Area */
.page-blog__content-area {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

.page-blog__section-title {
  font-size: 2.5em;
  color: #FCBC45; /* Accent color for titles */
  text-align: center;
  margin-bottom: 40px;
  font-weight: bold;
}

.page-blog__subsection-title {
  font-size: 1.8em;
  color: #ffffff;
  margin-top: 40px;
  margin-bottom: 20px;
  font-weight: bold;
}

.page-blog__section-text {
  font-size: 1.1em;
  color: #f0f0f0;
  margin-bottom: 20px;
  text-align: justify;
}

/* Blog Posts Section */
.page-blog__posts-section {
  padding: 60px 20px;
}

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

.page-blog__post-card {
  background-color: rgba(255, 255, 255, 0.05); /* Slightly transparent white for cards */
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.page-blog__post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
}

.page-blog__post-image {
  width: 100%;
  height: 225px; /* Fixed height for consistent card images */
  object-fit: cover;
  display: block;
}

.page-blog__post-content {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.page-blog__post-title {
  font-size: 1.5em;
  margin-bottom: 10px;
  font-weight: bold;
}

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

.page-blog__post-title a:hover {
  color: #e0a73c;
}

.page-blog__post-description {
  font-size: 0.95em;
  color: #cccccc;
  margin-bottom: 20px;
  flex-grow: 1;
}

/* Call To Action Section */
.page-blog__cta-section {
  padding: 60px 20px;
  text-align: center;
}

.page-blog__cta-container {
  background-color: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

.page-blog__cta-image {
  max-width: 600px; /* Ensure image isn't too wide */
  width: 100%;
  height: auto;
  border-radius: 8px;
  object-fit: cover;
  min-height: 200px; /* Minimum height for CTA image */
}

.page-blog__cta-content {
  max-width: 800px;
}

.page-blog__cta-title {
  font-size: 2.8em;
  color: #FCBC45;
  margin-bottom: 20px;
  font-weight: bold;
}

.page-blog__cta-description {
  font-size: 1.1em;
  color: #f0f0f0;
  margin-bottom: 30px;
}

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

@media (max-width: 768px) {
  .page-blog__hero-title {
    font-size: 2.5em;
  }
  .page-blog__hero-description {
    font-size: 1em;
  }
  .page-blog__hero-actions {
    flex-direction: column;
    gap: 15px;
  }
  .page-blog__button {
    width: 100%;
    max-width: 250px;
  }
  .page-blog__section-title {
    font-size: 1.8em;
  }
  .page-blog__subsection-title {
    font-size: 1.5em;
  }
  .page-blog__section-text {
    font-size: 1em;
  }
  .page-blog__post-grid {
    grid-template-columns: 1fr;
  }
  .page-blog__post-image {
    height: 200px; /* Adjust height for smaller screens */
  }
  .page-blog__cta-title {
    font-size: 1.8em;
  }
  .page-blog__cta-description {
    font-size: 1em;
  }

  /* Ensure content images do not overflow on mobile */
  .page-blog img {
    max-width: 100%;
    height: auto;
    min-width: 200px; /* Enforce minimum size for content images */
    min-height: 200px; /* Enforce minimum size for content images */
  }
}

@media (max-width: 480px) {
  .page-blog__hero-title {
    font-size: 2em;
  }
  .page-blog__hero-content {
    padding: 15px;
  }
  .page-blog__section-title {
    font-size: 1.5em;
  }
  .page-blog__cta-title {
    font-size: 1.5em;
  }
}