/* style/blog.css */

/* General page styling */
.page-blog {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Dark text for light body background */
    background: #FFFFFF; /* Default body background */
}

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

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

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

/* Hero Section */
.page-blog__hero-section {
    position: relative;
    background-color: #017439; /* Fallback background */
    padding-top: 10px; /* Small top padding, assuming body padding-top is handled by shared */
}

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

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

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

.page-blog__main-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem); /* Using clamp for H1 font size */
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    color: #FFFF00; /* Custom font color for H1 as per brand colors */
}

.page-blog__subtitle {
    font-size: 1.25rem;
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Primary Button */
.page-blog__btn-primary {
    display: inline-block;
    background-color: #C30808; /* Custom Register/Login color */
    color: #FFFF00; /* Custom Register/Login font color */
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 18px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    border: none;
    cursor: pointer;
    max-width: 100%; /* Button responsive */
    box-sizing: border-box; /* Button responsive */
    white-space: normal; /* Button text wrap */
    word-wrap: break-word; /* Button text wrap */
}

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

/* Secondary Button */
.page-blog__btn-secondary {
    display: inline-block;
    background-color: #FFFFFF;
    color: #017439;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 18px;
    border: 2px solid #017439;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
    cursor: pointer;
    max-width: 100%; /* Button responsive */
    box-sizing: border-box; /* Button responsive */
    white-space: normal; /* Button text wrap */
    word-wrap: break-word; /* Button text wrap */
}

.page-blog__btn-secondary:hover {
    background-color: #017439;
    color: #FFFFFF;
    transform: translateY(-2px);
}

/* Posts Grid */
.page-blog__posts-section {
    padding: 60px 0;
    background-color: #f9f9f9; /* Light background for content area */
}

.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;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    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.15);
}

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

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

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

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

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

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

.page-blog__post-excerpt {
    font-size: 16px;
    color: #555555;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.page-blog__read-more-btn {
    display: inline-block;
    color: #017439;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 2px solid #017439;
    padding-bottom: 2px;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.page-blog__read-more-btn:hover {
    color: #005f2e;
    border-color: #005f2e;
}

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

/* CTA Section */
.page-blog__cta-section {
    background-color: #017439;
    padding: 80px 15px;
    text-align: center;
    color: #FFFFFF;
}

.page-blog__cta-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #FFFF00;
}

.page-blog__cta-description {
    font-size: 1.25rem;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-blog__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    width: 100%; /* Button container responsive */
    max-width: 100%; /* Button container responsive */
    box-sizing: border-box; /* Button container responsive */
    overflow: hidden; /* Button container responsive */
}

/* FAQ Section */
.page-blog__faq-section {
    padding: 60px 0;
    background-color: #f0f2f5; /* Slightly darker light background for FAQ */
}

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 20px;
  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: 17px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: #333333;
}
.page-blog__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: #017439; /* Brand color for 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: #f9f9f9;
  border-radius: 0 0 8px 8px;
  color: #555555;
}
details.page-blog__faq-item .page-blog__faq-answer p {
    margin-bottom: 0;
    font-size: 16px;
}


/* Responsive styles */
@media (max-width: 1024px) {
    .page-blog__main-title {
        font-size: 2.8rem;
    }
    .page-blog__cta-title {
        font-size: 30px;
    }
}

@media (max-width: 768px) {
    /* General mobile padding */
    .page-blog__container {
        padding: 15px;
    }

    /* Images and containers - Global */
    .page-blog img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    .page-blog__hero-image-wrapper,
    .page-blog__post-image-wrapper {
        padding-bottom: 66.66% !important; /* Adjust aspect ratio for mobile if needed, or keep 16:9 */
    }
    .page-blog__section,
    .page-blog__card,
    .page-blog__container,
    .page-blog__hero-section,
    .page-blog__posts-section,
    .page-blog__cta-section,
    .page-blog__faq-section {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Hero Section - Mobile */
    .page-blog__hero-section {
        padding-top: 10px;
    }
    .page-blog__hero-image {
        object-fit: contain !important; /* Banner 849px object-fit:contain */
    }
    .page-blog__hero-content {
        padding: 30px 15px;
    }
    .page-blog__main-title {
        font-size: 2.2rem;
        margin-bottom: 15px;
    }
    .page-blog__subtitle {
        font-size: 1rem;
        margin-bottom: 25px;
    }

    /* Blog Posts Grid - Mobile */
    .page-blog__posts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .page-blog__post-content {
        padding: 20px;
    }
    .page-blog__post-title {
        font-size: 18px;
    }
    .page-blog__post-excerpt {
        font-size: 15px;
    }

    /* CTA Section - Mobile */
    .page-blog__cta-title {
        font-size: 26px;
    }
    .page-blog__cta-description {
        font-size: 1rem;
    }
    .page-blog__cta-buttons {
        flex-direction: column !important;
        gap: 15px;
    }
    .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;
    }

    /* FAQ Section - Mobile */
    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; }

    /* --- REQUIRED DUMMY MEDIA QUERIES FOR OTHER SECTIONS (as per strict instruction) --- */
    /* __access-links (Three-link buttons) - Mobile */
    .page-blog__access-links {
        display: flex;
        flex-direction: column;
        gap: 10px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 10px 15px;
    }

    /* __category-lobby (Five-entry) - Mobile */
    .page-blog__category-lobby__grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 10px 15px;
    }
    .page-blog__category-card-link img {
        aspect-ratio: 1/1 !important;
        width: 100% !important;
        object-fit: contain !important;
        border: none !important;
        box-shadow: none !important;
    }

    /* __blog-slider (simulated by posts-grid here, but if it were a slider) - Mobile */
    .page-blog__blog-slider-track {
        scroll-snap-type: x mandatory;
        overflow-x: scroll;
        display: flex;
        gap: 16px;
        padding: 0 15px;
    }
    .page-blog__blog-slider-track > * {
        flex: 0 0 calc(100% - 30px); /* Single card visible, with padding */
        scroll-snap-align: start;
    }
    .page-blog__blog-slider-prev,
    .page-blog__blog-slider-next {
        font-size: 30px;
        z-index: 10;
    }
}