/* General */
.page-blog {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light background */
    background: var(--auxiliary-color, #FFFFFF); /* Ensure body background is light */
}

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

.page-blog__section-spacing {
    padding: 60px 0;
}

.page-blog__section-title {
    font-size: 36px;
    font-weight: 700;
    color: #017439;
    text-align: center;
    margin-bottom: 40px;
}

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

.page-blog__article-body {
    max-width: 900px;
    margin: 0 auto 40px;
    font-size: 17px;
    line-height: 1.8;
}

.page-blog__article-body p {
    margin-bottom: 20px;
}

.page-blog__text-center {
    text-align: center;
}

.page-blog__description--light {
    color: #f0f0f0;
    max-width: 900px;
    margin: 0 auto 40px;
}

/* Buttons */
.page-blog__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.page-blog__btn-primary,
.page-blog__btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow text wrapping */
    box-sizing: border-box; /* Include padding in width */
}

.page-blog__btn-primary {
    background: #C30808; /* Register/Login color */
    color: #FFFF00; /* Register/Login font color */
    border: 2px solid #C30808;
}

.page-blog__btn-primary:hover {
    background: #a30606;
    border-color: #a30606;
    transform: translateY(-2px);
}

.page-blog__btn-secondary {
    background: #FFFFFF;
    color: #017439;
    border: 2px solid #017439;
}

.page-blog__btn-secondary:hover {
    background: #f0f0f0;
    color: #005a2e;
    transform: translateY(-2px);
}

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

.page-blog__hero-image {
    width: 100%;
    overflow: hidden;
}

.page-blog__hero-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    aspect-ratio: 16/9;
}

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

.page-blog__hero-title {
    font-size: clamp(32px, 5vw, 48px); /* Responsive font size */
    font-weight: 800;
    color: #017439;
    margin-bottom: 20px;
    line-height: 1.2;
}

.page-blog__hero-description {
    font-size: 20px;
    color: #555555;
    margin-bottom: 30px;
    line-height: 1.5;
}

/* Blog Grid */
.page-blog__latest-posts {
    background: #f9f9f9;
}

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

.page-blog__card {
    background: #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__card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.page-blog__card-image {
    width: 100%;
    height: 220px; /* Fixed height for consistency */
    overflow: hidden;
}

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

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

.page-blog__card-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.3;
}

.page-blog__card-title a {
    color: #017439;
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-blog__card-title a:hover {
    color: #005a2e;
}

.page-blog__card-meta {
    font-size: 14px;
    color: #777777;
    margin-bottom: 15px;
}

.page-blog__card-excerpt {
    font-size: 16px;
    color: #555555;
    margin-bottom: 20px;
    flex-grow: 1;
}

.page-blog__card-link {
    display: inline-block;
    color: #C30808;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-blog__card-link:hover {
    color: #a30606;
    text-decoration: underline;
}

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

/* Dark Section */
.page-blog__dark-section {
    background: #017439;
    color: #FFFFFF;
}

.page-blog__dark-section .page-blog__article-body p {
    color: #f0f0f0;
}

/* FAQ Section */
.page-blog__faq-section {
    background: #f0f5f0;
}

details.page-blog__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
details.page-blog__faq-item summary.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.3s ease;
}
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: 18px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: #017439;
}
.page-blog__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  color: #017439;
  flex-shrink: 0;
  margin-left: 20px;
  width: 32px;
  text-align: center;
  line-height: 1;
}
details.page-blog__faq-item .page-blog__faq-answer {
  padding: 0 25px 25px;
  background: #f9f9f9;
  border-radius: 0 0 8px 8px;
  font-size: 16px;
  color: #555555;
  line-height: 1.7;
}
details.page-blog__faq-item .page-blog__faq-answer p {
    margin-bottom: 10px;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .page-blog__section-title {
        font-size: 32px;
        margin-bottom: 30px;
    }
    .page-blog__hero-title {
        font-size: clamp(28px, 4.5vw, 42px);
    }
    .page-blog__hero-description {
        font-size: 18px;
    }
    .page-blog__card-title {
        font-size: 20px;
    }
    .page-blog__card-image {
        height: 200px;
    }
    .page-blog__article-body {
        font-size: 16px;
    }
    .page-blog__faq-qtext {
        font-size: 17px;
    }
    .page-blog__faq-toggle {
        font-size: 26px;
    }
}

@media (max-width: 768px) {
    .page-blog__container {
        padding: 0 15px;
    }
    .page-blog__section-spacing {
        padding: 40px 0;
    }
    .page-blog__section-title {
        font-size: 28px;
        margin-bottom: 25px;
    }
    .page-blog__hero-section {
        padding-top: 10px; /* Ensure small top padding */
    }
    .page-blog__hero-image img {
        object-fit: contain !important; /* Mobile: prevent cropping */
        aspect-ratio: unset !important; /* Mobile: allow natural aspect ratio */
        height: auto !important; /* Ensure height adjusts */
    }
    .page-blog__hero-title {
        font-size: clamp(24px, 7vw, 36px);
    }
    .page-blog__hero-description {
        font-size: 16px;
    }

    /* Buttons */
    .page-blog__cta-buttons {
        flex-direction: column; /* Stack buttons vertically */
        gap: 15px;
        padding: 0 15px; /* Add padding to button container */
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .page-blog__btn-primary,
    .page-blog__btn-secondary {
        max-width: 100% !important;
        width: 100% !important;
        padding: 12px 20px;
        font-size: 16px;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    /* Blog Grid */
    .page-blog__grid {
        grid-template-columns: 1fr; /* Single column on mobile */
        gap: 20px;
    }
    .page-blog__card-image {
        height: 180px;
    }
    .page-blog__card-title {
        font-size: 18px;
    }
    .page-blog__card-excerpt {
        font-size: 15px;
    }

    /* Article Body (Long Text SEO Area) */
    .page-blog__article-body {
        max-width: 100% !important; /* Prevent overflow */
        padding: 0 15px; /* Add padding for readability */
        font-size: 15px;
        box-sizing: border-box !important;
    }
    .page-blog__article-body p {
        text-align: left; /* Ensure text alignment */
    }

    /* General Images and Containers */
    .page-blog img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    .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;
    }
    /* Remove padding for specific sections that have container padding already */
    .page-blog__hero-content,
    .page-blog__article-body {
        padding-left: 0;
        padding-right: 0;
    }

    /* FAQ Section */
    details.page-blog__faq-item summary.page-blog__faq-question {
        padding: 15px 20px;
    }
    .page-blog__faq-qtext {
        font-size: 16px;
    }
    .page-blog__faq-toggle {
        font-size: 24px;
        margin-left: 15px;
        width: 28px;
    }
    details.page-blog__faq-item .page-blog__faq-answer {
        padding: 0 20px 20px;
        font-size: 15px;
    }
}

/* Ensure no filter on images */
.page-blog img {
    filter: none;
}