/* style/blog.css */

/* Base Styles */
.page-blog {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Dark text for light body background */
    background-color: #f9f9f9; /* Light background for the page content */
}

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

.page-blog__section-title {
    font-size: 32px;
    font-weight: 700;
    color: #26A9E0; /* Brand primary color for titles */
    text-align: center;
    margin-bottom: 40px;
    padding-top: 20px;
}

/* CTA Button Styles */
.page-blog__cta-button {
    display: inline-block;
    background-color: #26A9E0;
    color: #ffffff;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 700;
    transition: background-color 0.3s ease;
    border: 2px solid transparent; /* Primary button */
    max-width: 100%; /* For mobile responsiveness */
    box-sizing: border-box;
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Allow long words to break */
    text-align: center;
}

.page-blog__cta-button:hover {
    background-color: #1e87c0;
}

.page-blog__cta-button--secondary {
    background-color: #ffffff;
    color: #26A9E0;
    border-color: #26A9E0;
}

.page-blog__cta-button--secondary:hover {
    background-color: #e0f2f7;
    color: #26A9E0;
}

/* Hero Section */
.page-blog__hero-section {
    position: relative;
    width: 100%;
    overflow: hidden;
    background-color: #f0f0f0;
    padding-top: 10px; /* Small top padding, body handles --header-offset */
    margin-bottom: 40px;
}

.page-blog__hero-image-wrapper {
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    position: relative;
    overflow: hidden;
}

.page-blog__hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

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

.page-blog__main-title {
    font-size: 48px;
    font-weight: 800;
    color: #26A9E0; /* Brand primary color */
    margin-bottom: 20px;
    line-height: 1.2;
    max-width: 100%;
}

.page-blog__description {
    font-size: 18px;
    color: #555555;
    margin-bottom: 30px;
}

/* Blog Posts Grid */
.page-blog__posts-section {
    padding: 40px 0;
    background-color: #ffffff;
    margin-bottom: 40px;
}

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

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

.page-blog__post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

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

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

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

.page-blog__post-title {
    font-size: 20px;
    font-weight: 700;
    color: #333333;
    margin-bottom: 10px;
    line-height: 1.4;
}

.page-blog__post-excerpt {
    font-size: 15px;
    color: #666666;
    margin-bottom: 15px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Limit to 3 lines */
    -webkit-box-orient: vertical;
}

.page-blog__read-more {
    display: inline-block;
    color: #26A9E0;
    font-weight: 600;
    text-decoration: none;
}

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

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

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

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

details.page-blog__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  border: 1px solid #e0e0e0;
  overflow: hidden;
  background: #fff;
  color: #333333; /* Ensure text color for FAQ item */
}
details.page-blog__faq-item summary.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.3s ease;
  color: #333333; /* Ensure question text color */
}
details.page-blog__faq-item summary.page-blog__faq-question::-webkit-details-marker {
  display: none;
}
details.page-blog__faq-item summary.page-blog__faq-question:hover {
  background: #f5f5f5;
}
.page-blog__faq-qtext {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: #333333; /* Ensure question text color */
}
.page-blog__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: #666;
  flex-shrink: 0;
  margin-left: 15px;
  width: 28px;
  text-align: center;
}
details.page-blog__faq-item .page-blog__faq-answer {
  padding: 0 20px 20px;
  background: #f9f9f9;
  border-radius: 0 0 5px 5px;
  color: #555555; /* Ensure answer text color */
}

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

    .page-blog__container {
        padding: 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

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

    /* Hero Section Mobile */
    .page-blog__hero-section {
        padding-top: 10px !important; /* Small top padding, body handles --header-offset */
        margin-bottom: 30px;
    }

    .page-blog__hero-content {
        margin: 30px auto;
        padding: 0 15px;
    }

    .page-blog__main-title {
        font-size: 32px;
        margin-bottom: 15px;
    }

    .page-blog__description {
        font-size: 16px;
        margin-bottom: 25px;
    }

    /* Blog Posts Grid Mobile */
    .page-blog__posts-section {
        padding: 30px 0;
    }

    .page-blog__posts-grid {
        grid-template-columns: 1fr; /* Single column on mobile */
        gap: 20px;
        margin-bottom: 30px;
    }

    .page-blog__post-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important; /* Adjust height dynamically */
    }

    .page-blog__post-title {
        font-size: 18px;
    }

    .page-blog__post-excerpt {
        font-size: 14px;
    }

    /* CTA Buttons Mobile */
    .page-blog__cta-button,
    .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;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !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;
        padding-left: 15px;
        padding-right: 15px;
    }

    /* FAQ Section Mobile */
    .page-blog__faq-section {
        padding: 30px 0;
    }

    details.page-blog__faq-item summary.page-blog__faq-question { padding: 15px; }
    .page-blog__faq-qtext { font-size: 15px; }
    details.page-blog__faq-item .page-blog__faq-answer {
      padding: 0 15px 15px;
    }

    /* General Images Mobile */
    .page-blog img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block;
    }
    
    .page-blog__post-card,
    .page-blog__faq-item {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
}

/* --- General Image & Container Adaptations (for desktop and mobile) --- */
.page-blog img {
    max-width: 100%;
    height: auto;
    display: block;
}

.page-blog__hero-section,
.page-blog__posts-section,
.page-blog__faq-section,
.page-blog__post-card,
.page-blog__faq-item {
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden; /* Prevent content overflow */
}

/* Ensure color contrast for links */
.page-blog__post-link,
.page-blog__read-more {
    color: #26A9E0; /* Brand primary color for links */
}
.page-blog__post-link:hover,
.page-blog__read-more:hover {
    color: #1e87c0; /* Darker shade on hover */
}
.page-blog__post-title {
    color: #333333; /* Ensure good contrast for titles on white background */
}