/* style/blog.css */

/* --- General Styling --- */
.page-blog {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #333333; /* Default dark text for light body background */
  background-color: var(--background-color, #FFFFFF); /* Inherit from shared or default to white */
}

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

.page-blog__section-title {
  font-size: 2.5em;
  color: #26A9E0; /* Brand color for titles */
  text-align: center;
  margin-bottom: 20px;
  font-weight: 700;
  line-height: 1.2;
}

.page-blog__section-title--white {
  color: #FFFFFF;
}

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

.page-blog__section-description--white {
  color: #f0f0f0;
}

.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  transition: all 0.3s ease;
  text-align: center;
  cursor: pointer;
  box-sizing: border-box; /* Important for responsiveness */
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow long words to break */
}

.page-blog__btn-primary {
  background-color: #26A9E0; /* Primary brand color */
  color: #FFFFFF;
  border: 2px solid #26A9E0;
}

.page-blog__btn-primary:hover {
  background-color: #1a8cc4;
  border-color: #1a8cc4;
}

.page-blog__btn-secondary {
  background-color: #FFFFFF;
  color: #26A9E0; /* Primary brand color */
  border: 2px solid #26A9E0;
}

.page-blog__btn-secondary:hover {
  background-color: #f0f8ff;
  color: #1a8cc4;
  border-color: #1a8cc4;
}

/* --- Hero Section --- */
.page-blog__hero-section {
  display: flex;
  flex-direction: column; /* Image on top, content below */
  align-items: center;
  padding-top: 10px; /* Small top padding, body handles --header-offset */
  padding-bottom: 60px;
  background-color: #FFFFFF; /* Explicitly light background for contrast */
}

.page-blog__hero-image-wrapper {
  width: 100%;
  max-width: 100%; /* Ensure it takes full width */
  overflow: hidden;
  box-sizing: border-box;
}

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

.page-blog__hero-content {
  text-align: center;
  padding: 40px 20px 0;
  max-width: 900px;
}

.page-blog__main-title {
  font-size: clamp(2em, 4vw, 3em); /* Responsive H1, clamped */
  color: #26A9E0;
  margin-bottom: 20px;
  font-weight: 800;
  line-height: 1.2;
}

.page-blog__intro-text {
  font-size: 1.15em;
  margin-bottom: 30px;
  color: #555555;
}

.page-blog__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
  width: 100%; /* Ensure container takes full width */
  max-width: 600px; /* Limit max width for button group */
  margin: 0 auto;
  box-sizing: border-box;
}

/* --- Latest Posts Section --- */
.page-blog__latest-posts {
  padding: 60px 0;
  background-color: #f8f9fa; /* Light background for this section */
}

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

.page-blog__post-card {
  background-color: #FFFFFF;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

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

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

.page-blog__post-image {
  width: 100%;
  height: 220px; /* Fixed height for consistency in cards */
  object-fit: cover;
  display: block;
  min-height: 200px; /* Minimum size */
}

.page-blog__post-content {
  padding: 20px;
  flex-grow: 1; /* Allow content to fill available space */
  display: flex;
  flex-direction: column;
}

.page-blog__post-date {
  font-size: 0.9em;
  color: #777777;
  margin-bottom: 10px;
  display: block;
}

.page-blog__post-title {
  font-size: 1.4em;
  color: #26A9E0;
  margin-bottom: 10px;
  font-weight: 700;
  line-height: 1.3;
}

.page-blog__post-excerpt {
  font-size: 1em;
  color: #555555;
  margin-bottom: 15px;
  flex-grow: 1;
}

.page-blog__read-more {
  font-weight: 600;
  color: #26A9E0;
  align-self: flex-start;
}

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

/* --- Why Choose Us Section --- */
.page-blog__why-choose-us {
  padding: 80px 0;
  background-color: #26A9E0; /* Dark background section */
  color: #FFFFFF; /* White text for contrast */
}

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

.page-blog__feature-item {
  background-color: rgba(255, 255, 255, 0.1); /* Semi-transparent white background */
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-blog__feature-title {
  font-size: 1.6em;
  color: #FFFFFF;
  margin-bottom: 15px;
  font-weight: 700;
}

.page-blog__feature-text {
  font-size: 1em;
  color: #f0f0f0;
}

/* --- FAQ Section --- */
.page-blog__faq-section {
  padding: 60px 0;
  background-color: #FFFFFF; /* Light background */
}

.page-blog__faq-list {
  max-width: 800px;
  margin: 40px auto 0;
}

.page-blog__faq-item {
  background-color: #f8f9fa;
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  border: 1px solid #e0e0e0;
}

.page-blog__faq-item summary {
  display: block; /* For details tag */
  list-style: none; /* Remove default marker */
}

.page-blog__faq-item summary::-webkit-details-marker {
  display: none; /* Remove default marker for webkit browsers */
}

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.2em;
  font-weight: 600;
  color: #26A9E0;
  cursor: pointer;
  background-color: #eaf6ff;
  border-bottom: 1px solid #d0e8ff;
}

.page-blog__faq-item[open] .page-blog__faq-question {
  border-bottom: 1px solid #26A9E0;
}

.page-blog__faq-toggle {
  font-size: 1.5em;
  font-weight: 300;
  color: #26A9E0;
  transition: transform 0.3s ease;
}

.page-blog__faq-item[open] .page-blog__faq-toggle {
  transform: rotate(45deg); /* Rotate '+' to 'x' or '-' */
}

.page-blog__faq-answer {
  padding: 20px 25px;
  font-size: 1em;
  color: #555555;
}

/* --- CTA Banner Section --- */
.page-blog__cta-banner {
  padding: 80px 0;
  background-color: #26A9E0; /* Dark background */
  color: #FFFFFF; /* White text */
}

.page-blog__cta-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap; /* Allow content to wrap */
}

.page-blog__cta-text-content {
  flex: 1;
  min-width: 300px;
  text-align: left;
}

.page-blog__cta-title {
  font-size: clamp(2em, 3.5vw, 2.8em);
  color: #FFFFFF;
  margin-bottom: 20px;
  font-weight: 800;
  line-height: 1.2;
}

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

.page-blog__cta-image-wrapper {
  flex: 1;
  min-width: 300px;
  max-width: 500px; /* Limit image width */
  text-align: center;
}

.page-blog__cta-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  object-fit: cover;
  min-height: 200px; /* Minimum size */
}

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

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

  .page-blog__cta-container {
    flex-direction: column-reverse; /* Image on top, text below for smaller screens */
    text-align: center;
  }

  .page-blog__cta-text-content {
    text-align: center;
  }
}

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

  .page-blog__container {
    padding: 0 15px !important; /* Force padding for mobile */
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-blog__hero-section {
    padding-top: 10px !important; /* Small top padding, body handles --header-offset */
    padding-bottom: 40px;
  }
  
  .page-blog__section-title {
    font-size: 2em;
  }

  .page-blog__main-title {
    font-size: clamp(1.8em, 7vw, 2.5em); /* Adjust H1 for smaller screens */
  }

  .page-blog__cta-title {
    font-size: clamp(1.8em, 7vw, 2.2em);
  }

  /* Image responsive rules */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
    min-height: 200px !important; /* Ensure minimum size */
  }
  
  /* All containers with images must adapt */
  .page-blog__hero-image-wrapper,
  .page-blog__post-card,
  .page-blog__cta-image-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important; /* Prevent overflow */
  }

  /* Button responsive rules */
  .page-blog__btn-primary,
  .page-blog__btn-secondary,
  .page-blog a[class*="button"],
  .page-blog a[class*="btn"] {
    max-width: 100% !important;
    width: 100% !important; /* Take full width */
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding-left: 15px; /* Add some internal padding */
    padding-right: 15px;
  }

  .page-blog__cta-buttons {
    flex-direction: column !important; /* Stack buttons vertically */
    gap: 15px !important; /* Space between stacked buttons */
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    padding: 0 15px;
  }

  .page-blog__feature-grid {
    grid-template-columns: 1fr; /* Single column for features */
  }

  .page-blog__feature-item {
    padding: 25px;
  }

  .page-blog__faq-question {
    font-size: 1.1em;
    padding: 15px 20px;
  }

  .page-blog__faq-answer {
    padding: 15px 20px;
  }

  .page-blog__cta-container {
    padding: 0 15px;
  }
}

/* Ensure content area images are not too small */
.page-blog__post-image {
  min-width: 200px;
  min-height: 200px;
}

/* Specific styling for the login button color from requirements */
.page-blog__btn-login {
  background-color: #EA7C07;
  color: #FFFFFF;
  border: 2px solid #EA7C07;
}
.page-blog__btn-login:hover {
  background-color: #c96a06;
  border-color: #c96a06;
}