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

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

.page-blog__section-title {
    font-size: 36px;
    font-weight: 700;
    color: #E53935;
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.2;
}

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

/* Buttons */
.page-blog__btn-primary,
.page-blog__btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow text wrapping */
    box-sizing: border-box;
    max-width: 100%; /* Ensure responsiveness */
}

.page-blog__btn-primary {
    background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%);
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 10px rgba(229, 57, 53, 0.3);
}

.page-blog__btn-primary:hover {
    opacity: 0.9;
    box-shadow: 0 6px 15px rgba(229, 57, 53, 0.4);
    transform: translateY(-2px);
}

.page-blog__btn-secondary {
    background: #ffffff;
    color: #E53935;
    border: 2px solid #E53935;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.page-blog__btn-secondary:hover {
    background: #E53935;
    color: #ffffff;
    box-shadow: 0 4px 8px rgba(229, 57, 53, 0.3);
    transform: translateY(-2px);
}

/* Hero Section */
.page-blog__hero-section {
    position: relative;
    padding-top: 10px; /* Small top padding, body handles header offset */
    margin-bottom: 40px;
    overflow: hidden;
    background-color: #F5F7FA;
    display: flex;
    flex-direction: column;
    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: 900px;
    padding: 0 20px;
    box-sizing: border-box;
    z-index: 1;
}

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

.page-blog__hero-description {
    font-size: 19px;
    color: #555555;
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.page-blog__cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 40px;
    width: 100%;
    max-width: 600px; /* Limit button group width */
    margin-left: auto;
    margin-right: auto;
}

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

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

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

.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-thumbnail-wrapper {
    width: 100%;
    height: 220px; /* Fixed height for thumbnails */
    overflow: hidden;
}

.page-blog__post-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.page-blog__post-card:hover .page-blog__post-thumbnail {
    transform: scale(1.05);
}

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

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

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

.page-blog__post-date {
    font-size: 14px;
    color: #999999;
    font-style: italic;
}

.page-blog__load-more-wrapper {
    text-align: center;
    margin-top: 50px;
}

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

.page-blog__faq-list {
    margin-top: 40px;
}

details.page-blog__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  border: 1px solid #e0e0e0;
  overflow: hidden;
  background: #fff;
}
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: 16px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: #333333; /* Ensure contrast */
}
.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;
}
.page-blog__faq-answer p {
    color: #555555;
    font-size: 16px;
    margin: 0;
}


/* CTA Section */
.page-blog__cta-section {
    padding: 60px 0;
    background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%);
    color: #ffffff;
    text-align: center;
}

.page-blog__cta-content {
    max-width: 900px;
}

.page-blog__cta-title {
    font-size: 38px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
    color: #ffffff;
}

.page-blog__cta-description {
    font-size: 19px;
    margin-bottom: 40px;
    opacity: 0.9;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.page-blog__cta-section .page-blog__cta-buttons {
    margin-bottom: 0; /* Override default margin */
}

.page-blog__cta-section .page-blog__btn-secondary {
    background: #ffffff;
    color: #E53935;
    border-color: #ffffff;
}

.page-blog__cta-section .page-blog__btn-secondary:hover {
    background: transparent;
    color: #ffffff;
    border-color: #ffffff;
}


/* Responsive Styles */
@media (max-width: 1024px) {
    .page-blog__container {
        padding: 20px 30px;
    }

    .page-blog__section-title {
        font-size: 32px;
    }

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

    .page-blog__main-title {
        font-size: clamp(28px, 3.5vw, 42px);
    }

    .page-blog__hero-description,
    .page-blog__cta-description {
        font-size: 18px;
    }

    .page-blog__cta-title {
        font-size: 34px;
    }
}

@media (max-width: 849px) {
    .page-blog__hero-image {
        object-fit: contain !important; /* HERO mobile: object-fit:contain */
        aspect-ratio: unset !important;
        height: auto !important; /* Ensure height adjusts */
    }
}

@media (max-width: 768px) {
    .page-blog__container {
        padding: 0 15px; /* Ensure padding for containers */
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* HERO Section */
    .page-blog__hero-section {
        padding-top: 10px; /* Small top padding */
        margin-bottom: 30px;
    }
    .page-blog__hero-image-wrapper {
        margin-bottom: 20px;
    }
    .page-blog__hero-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        object-fit: contain !important; /* HERO mobile: object-fit:contain */
        aspect-ratio: unset !important;
    }
    .page-blog__hero-content {
        padding: 0 15px;
    }
    .page-blog__main-title {
        font-size: clamp(28px, 8vw, 36px); /* Adjusted clamp for smaller screens */
        margin-bottom: 15px;
    }
    .page-blog__hero-description {
        font-size: 16px;
        margin-bottom: 25px;
    }
    .page-blog__cta-buttons {
        flex-direction: column; /* Buttons stack vertically */
        gap: 15px;
        max-width: 100% !important;
        padding: 0 15px;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }
    .page-blog__cta-buttons .page-blog__btn-primary,
    .page-blog__cta-buttons .page-blog__btn-secondary {
        max-width: 100% !important;
        width: 100% !important;
        padding-left: 15px; /* Add padding to buttons */
        padding-right: 15px;
    }

    /* Latest Posts Section */
    .page-blog__latest-posts-section {
        padding: 30px 0;
    }
    .page-blog__section-title {
        font-size: 28px;
        padding: 0 15px;
    }
    .page-blog__section-description {
        font-size: 16px;
        padding: 0 15px;
        margin-bottom: 30px;
    }
    .page-blog__posts-grid {
        grid-template-columns: 1fr; /* Single column for mobile */
        gap: 20px;
        margin-top: 30px;
        padding: 0 15px;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden; /* Prevent horizontal scroll */
    }
    .page-blog__post-card {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .page-blog__post-thumbnail-wrapper {
        height: 180px; /* Adjust thumbnail height */
    }
    .page-blog__post-thumbnail {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    .page-blog__post-title {
        font-size: 18px;
    }
    .page-blog__post-excerpt {
        font-size: 14px;
    }
    .page-blog__load-more-wrapper {
        margin-top: 30px;
        padding: 0 15px;
    }
}