/* style/blog.css */

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

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

/* Hero Section */
.page-blog__hero-section {
    background-color: #ffffff;
    padding-top: 10px; /* Small top padding, body handles --header-offset */
    padding-bottom: 40px;
    display: flex;
    flex-direction: column; /* Image then text */
    align-items: center;
    text-align: center;
}

.page-blog__hero-image-wrapper {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    margin-bottom: 30px;
}

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

.page-blog__hero-content {
    max-width: 800px;
    padding: 0 20px;
}

.page-blog__main-title {
    font-weight: 700;
    color: #26A9E0; /* Brand color for main title */
    margin-bottom: 20px;
    line-height: 1.2;
    font-size: clamp(2.2em, 4.5vw, 2.8em); /* Responsive font size */
}

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

.page-blog__cta-button {
    display: inline-block;
    background-color: #26A9E0;
    color: #ffffff;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
    max-width: 100%; /* Button responsiveness */
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

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

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

.page-blog__cta-button--secondary:hover {
    background-color: #f0f0f0;
    color: #1a8cc5;
    border-color: #1a8cc5;
}

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

.page-blog__section-title {
    font-size: 2.2em;
    font-weight: 700;
    color: #26A9E0;
    text-align: center;
    margin-bottom: 40px;
}

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

.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: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    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 6px 20px rgba(0, 0, 0, 0.12);
}

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

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

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

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

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

.page-blog__post-date {
    font-size: 0.85em;
    color: #999999;
    margin-top: auto; /* Push date and read more to bottom */
    margin-bottom: 10px;
}

.page-blog__read-more {
    font-weight: bold;
    color: #26A9E0;
    text-decoration: none;
    align-self: flex-start;
    transition: color 0.3s ease;
}

.page-blog__read-more:hover {
    color: #1a8cc5;
}

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

/* FAQ Section */
.page-blog__faq-section {
    padding: 60px 0;
    background-color: #26A9E0; /* Brand color for dark section */
    color: #ffffff; /* White text for dark background */
}

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

details.page-blog__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.3); /* Lighter border for dark background */
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1); /* Slightly transparent white background */
}
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: #ffffff; /* White text for question */
}
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: rgba(255, 255, 255, 0.2);
}
.page-blog__faq-qtext {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
}
.page-blog__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: #ffffff; /* White toggle icon */
  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: rgba(255, 255, 255, 0.05); /* Even lighter transparent background */
  border-radius: 0 0 5px 5px;
  color: #f0f0f0; /* Slightly off-white for answer text */
}

/* Responsive styles for 1024px */
@media (max-width: 1024px) {
    .page-blog__main-title {
        font-size: clamp(2em, 4vw, 2.4em);
    }
    .page-blog__section-title {
        font-size: 2em;
    }
    .page-blog__posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .page-blog__post-title {
        font-size: 1.3em;
    }
    .page-blog__post-image {
        height: 180px;
    }
}

/* Responsive styles for 768px (Mobile) */
@media (max-width: 768px) {
    /* Hero Section */
    .page-blog__hero-section {
        padding-top: 10px !important; /* Ensure small top padding */
        padding-bottom: 30px;
    }
    .page-blog__hero-content {
        padding: 0 15px;
    }
    .page-blog__main-title {
        font-size: clamp(1.8em, 7vw, 2.2em);
        margin-bottom: 15px;
    }
    .page-blog__description {
        font-size: 1em;
        margin-bottom: 25px;
    }
    .page-blog__cta-button {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        padding: 12px 20px;
        font-size: 0.95em;
    }
    .page-blog__cta-buttons { /* If multiple buttons, apply container styles */
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        display: flex;
        flex-direction: column !important; /* Stack buttons vertically */
        gap: 10px;
    }

    /* Posts Section */
    .page-blog__posts-section {
        padding: 40px 0;
    }
    .page-blog__section-title {
        font-size: 1.8em;
        margin-bottom: 30px;
    }
    .page-blog__posts-grid {
        grid-template-columns: 1fr; /* Single column for mobile */
        gap: 20px;
    }
    .page-blog__post-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        object-fit: cover;
    }
    .page-blog__post-card {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .page-blog__post-content {
        padding: 15px;
    }
    .page-blog__post-title {
        font-size: 1.2em;
    }
    .page-blog__post-excerpt {
        font-size: 0.9em;
    }

    /* FAQ Section */
    .page-blog__faq-section {
        padding: 40px 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;
    }
    .page-blog__container {
        padding: 0 15px; /* General container padding for mobile */
    }
    /* Universal image responsive styles */
    .page-blog img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block;
    }
    .page-blog__section,
    .page-blog__card,
    .page-blog__container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
}