/* style/blog.css */

/* Base styles for the blog page */
.page-blog {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Default text color for light backgrounds */
}

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

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

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

/* Hero Section */
.page-blog__hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 20px;
  padding-top: 10px; /* Small top padding, body handles header offset */
  background-color: #f8f8f8;
  position: relative;
  overflow: hidden;
}

.page-blog__hero-image-wrapper {
  width: 100%;
  max-width: 1200px;
  margin-bottom: 30px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

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

.page-blog__hero-content {
  text-align: center;
  max-width: 900px;
  z-index: 1;
}

.page-blog__hero-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 800;
  color: #26A9E0;
  margin-bottom: 20px;
  line-height: 1.2;
}

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

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

/* Buttons */
.page-blog__btn-primary,
.page-blog__btn-secondary,
.page-blog__btn-tertiary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  box-sizing: border-box;
  max-width: 100%;
  white-space: normal;
  word-wrap: break-word;
  text-align: center;
}

.page-blog__btn-primary {
  background-color: #26A9E0;
  color: #ffffff;
  border: 2px solid #26A9E0;
}

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

.page-blog__btn-secondary {
  background-color: #ffffff;
  color: #26A9E0;
  border: 2px solid #26A9E0;
}

.page-blog__btn-secondary:hover {
  background-color: #e0f2f7;
}

.page-blog__btn-tertiary {
  background-color: #EA7C07;
  color: #ffffff;
  border: 2px solid #EA7C07;
}

.page-blog__btn-tertiary:hover {
  background-color: #c46606;
  border-color: #c46606;
}

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

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

.page-blog__post-card {
  background-color: #ffffff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

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

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

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

.page-blog__post-title:hover {
  text-decoration: underline;
}

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

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

.page-blog__read-more-btn {
  color: #26A9E0;
  font-weight: bold;
  display: inline-block;
}

.page-blog__read-more-btn:hover {
  text-decoration: underline;
}

.page-blog__view-all-button-wrapper {
  text-align: center;
}

/* Why Choose Us Section */
.page-blog__why-choose-us {
  padding: 80px 0;
  background-color: #26A9E0;
  color: #ffffff;
}

.page-blog__why-choose-us .page-blog__section-title {
  color: #ffffff;
}

.page-blog__why-choose-us .page-blog__section-subtitle {
  color: #f0f0f0;
}

.page-blog__why-choose-us p {
  color: #f0f0f0;
}

.page-blog__why-choose-us a {
  color: #ffffff;
  font-weight: bold;
  text-decoration: underline;
}

.page-blog__content-grid {
  display: flex;
  gap: 40px;
  align-items: center;
  margin-bottom: 60px;
}

.page-blog__content-grid--reverse {
  flex-direction: row-reverse;
}

.page-blog__text-block {
  flex: 1;
}

.page-blog__sub-title {
  font-size: 1.8em;
  font-weight: bold;
  margin-bottom: 15px;
  color: #ffffff;
}

.page-blog__image-block {
  flex: 1;
  text-align: center;
}

.page-blog__content-image {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  display: block;
  margin: 0 auto;
}

.page-blog__cta-text {
  text-align: center;
  font-size: 1.2em;
  margin-top: 40px;
  color: #ffffff;
}

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

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

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

.page-blog__faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
  font-size: 1.1em;
  color: #333333;
  transition: background-color 0.3s ease;
}

.page-blog__faq-item summary::-webkit-details-marker {
  display: none;
}

.page-blog__faq-item summary:hover {
  background-color: #f5f5f5;
}

.page-blog__faq-item[open] summary {
  background-color: #f5f5f5;
  color: #26A9E0;
}

.page-blog__faq-qtext {
  flex-grow: 1;
}

.page-blog__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  margin-left: 15px;
  color: #26A9E0;
}

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

/* Call to Action Section */
.page-blog__cta-section {
  padding: 80px 0;
  background-color: #26A9E0;
  color: #ffffff;
  text-align: center;
}

.page-blog__cta-section .page-blog__section-title {
  color: #ffffff;
}

.page-blog__cta-section .page-blog__section-subtitle {
  color: #f0f0f0;
  margin-bottom: 50px;
}

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

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

  .page-blog__hero-title {
    font-size: clamp(2rem, 4vw, 3rem);
  }

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

  .page-blog__content-grid {
    flex-direction: column;
  }

  .page-blog__content-grid--reverse {
    flex-direction: column;
  }
}

@media (max-width: 768px) {
  .page-blog__section-title {
    font-size: 1.8em;
    margin-bottom: 15px;
  }

  .page-blog__section-subtitle {
    font-size: 1em;
    margin-bottom: 30px;
  }

  .page-blog__hero-section {
    padding: 40px 15px;
    padding-top: 10px !important;
  }

  .page-blog__hero-image-wrapper {
    margin-bottom: 20px;
  }

  .page-blog__hero-title {
    font-size: clamp(1.8rem, 6vw, 2.5rem);
    margin-bottom: 15px;
  }

  .page-blog__hero-description {
    font-size: 1em;
    margin-bottom: 25px;
  }

  .page-blog__hero-cta-buttons,
  .page-blog__cta-buttons {
    flex-direction: column;
    gap: 15px;
    padding: 0 15px;
  }

  .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;
  }

  .page-blog__posts-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-blog__post-image {
    height: 200px; /* Adjust height for better mobile viewing */
  }

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

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

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

  .page-blog__why-choose-us,
  .page-blog__latest-posts,
  .page-blog__faq-section,
  .page-blog__cta-section {
    padding: 40px 0;
  }

  .page-blog__container {
    padding: 0 15px;
  }

  .page-blog__content-grid {
    gap: 30px;
    margin-bottom: 40px;
  }

  .page-blog__sub-title {
    font-size: 1.5em;
  }

  .page-blog__faq-item summary {
    font-size: 1em;
    padding: 15px 20px;
  }

  /* Mobile image responsiveness */
  .page-blog img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-blog__hero-image-wrapper,
  .page-blog__post-card,
  .page-blog__image-block,
  .page-blog__container,
  .page-blog__latest-posts,
  .page-blog__why-choose-us,
  .page-blog__faq-section,
  .page-blog__cta-section,
  .page-blog__cta-buttons {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .page-blog__view-all-button-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Specific overrides for containers that might have flex/grid */
  .page-blog__hero-cta-buttons,
  .page-blog__cta-buttons {
    flex-wrap: wrap !important;
    flex-direction: column;
    gap: 10px;
  }
  .page-blog__hero-cta-buttons a, .page-blog__cta-buttons a {
    width: 100%;
  }
}