/* General Styling */
.page-blog {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--color-text-main, #F2FFF6); /* Default text color for dark background */
    background-color: var(--color-background, #08160F); /* Assume body background from shared */
    padding-top: 10px; /* Small top padding, body handles main offset */
}

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

.page-blog__section {
    padding: 60px 0;
    margin-bottom: 20px;
    background-color: var(--color-background, #08160F);
}

.page-blog__section-title {
    font-size: 38px;
    font-weight: bold;
    color: var(--color-text-main, #F2FFF6);
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.2;
}

.page-blog__section-description {
    font-size: 18px;
    color: var(--color-text-secondary, #A7D9B8);
    text-align: center;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-blog__btn {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: bold;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow text wrapping */
    max-width: 100%;
    box-sizing: border-box;
}

.page-blog__btn-primary {
    background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
    color: #ffffff;
    border: none;
}

.page-blog__btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.page-blog__btn-secondary {
    background: transparent;
    color: var(--color-text-main, #F2FFF6);
    border: 2px solid var(--color-border, #2E7A4E);
}

.page-blog__btn-secondary:hover {
    background: rgba(46, 122, 78, 0.2);
    transform: translateY(-2px);
}

.page-blog__btn-link {
    background: transparent;
    color: var(--color-text-main, #F2FFF6);
    border: 1px solid var(--color-border, #2E7A4E);
    padding: 8px 15px;
    font-size: 14px;
    border-radius: 5px;
}

.page-blog__btn-link:hover {
    background: rgba(46, 122, 78, 0.2);
}

/* Images */
.page-blog img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

/* Hero Section */
.page-blog__hero-section {
    position: relative;
    padding: 0;
    text-align: center;
    background-color: var(--color-background, #08160F);
    overflow: hidden;
}

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

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

.page-blog__hero-content {
    position: relative;
    padding: 40px 15px 60px;
    max-width: 800px;
    margin: 0 auto;
    z-index: 1;
}

.page-blog__main-title {
    font-size: clamp(32px, 4.5vw, 48px); /* Responsive font size for H1 */
    font-weight: 800;
    color: var(--color-text-main, #F2FFF6);
    margin-bottom: 20px;
    line-height: 1.2;
}

.page-blog__intro-description {
    font-size: 18px;
    color: var(--color-text-secondary, #A7D9B8);
    margin-bottom: 30px;
}

.page-blog__hero-cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

/* Introduction Section */
.page-blog__introduction-section .page-blog__content-wrapper {
    display: flex;
    gap: 40px;
    align-items: center;
}

.page-blog__introduction-section .page-blog__text-block,
.page-blog__introduction-section .page-blog__image-block {
    flex: 1;
}

.page-blog__introduction-section .page-blog__text-block p {
    margin-bottom: 15px;
    color: var(--color-text-main, #F2FFF6);
}

/* Featured Categories Section */
.page-blog__featured-categories-section {
    background-color: var(--color-card-bg, #11271B);
    padding: 80px 0;
}

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

.page-blog__category-card {
    background-color: var(--color-card-bg, #11271B);
    border: 1px solid var(--color-border, #2E7A4E);
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.page-blog__category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.page-blog__category-image {
    width: 100%;
    height: 180px; /* Fixed height for consistency */
    object-fit: cover;
    margin-bottom: 20px;
    border-radius: 8px;
}

.page-blog__category-title {
    font-size: 24px;
    font-weight: bold;
    color: var(--color-text-main, #F2FFF6);
    margin-bottom: 10px;
}

.page-blog__category-text {
    font-size: 15px;
    color: var(--color-text-secondary, #A7D9B8);
    margin-bottom: 20px;
    flex-grow: 1; /* Push button to bottom */
}

/* Guides and Tips Section */
.page-blog__guides-tips-section .page-blog__content-wrapper {
    display: flex;
    gap: 40px;
    align-items: center;
}

.page-blog__guides-tips-section .page-blog__content-wrapper--reverse {
    flex-direction: row-reverse;
}

.page-blog__guides-tips-section .page-blog__text-block,
.page-blog__guides-tips-section .page-blog__image-block {
    flex: 1;
}

.page-blog__guides-tips-section .page-blog__text-block p {
    margin-bottom: 15px;
    color: var(--color-text-main, #F2FFF6);
}

/* Latest Articles Section */
.page-blog__latest-articles-section {
    background-color: var(--color-card-bg, #11271B);
    padding: 80px 0;
}

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

.page-blog__article-card {
    background-color: var(--color-card-bg, #11271B);
    border: 1px solid var(--color-border, #2E7A4E);
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.page-blog__article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.page-blog__article-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 0;
}

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

.page-blog__article-title {
    font-size: 20px;
    font-weight: bold;
    color: var(--color-text-main, #F2FFF6);
    margin-bottom: 10px;
    line-height: 1.3;
}

.page-blog__article-meta {
    font-size: 13px;
    color: var(--color-text-secondary, #A7D9B8);
    margin-bottom: 15px;
}

.page-blog__article-excerpt {
    font-size: 15px;
    color: var(--color-text-secondary, #A7D9B8);
    margin-bottom: 20px;
    flex-grow: 1;
}

.page-blog__read-more-link {
    font-weight: bold;
    color: var(--color-glow, #57E38D);
    text-decoration: none;
    align-self: flex-start;
}

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

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

/* Why Read Section */
.page-blog__why-read-section .page-blog__content-wrapper {
    display: flex;
    gap: 40px;
    align-items: center;
}

.page-blog__why-read-section .page-blog__text-block,
.page-blog__why-read-section .page-blog__image-block {
    flex: 1;
}

.page-blog__why-read-section .page-blog__text-block p {
    margin-bottom: 15px;
    color: var(--color-text-main, #F2FFF6);
}

/* FAQ Section */
.page-blog__faq-section {
    padding-bottom: 80px;
}

details.page-blog__faq-item {
  margin-bottom: 15px;
  border-radius: 10px;
  border: 1px solid var(--color-border, #2E7A4E);
  overflow: hidden;
  background: var(--color-card-bg, #11271B);
}
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: rgba(46, 122, 78, 0.1);
}
.page-blog__faq-qtext {
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: var(--color-text-main, #F2FFF6);
}
.page-blog__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: var(--color-glow, #57E38D);
  flex-shrink: 0;
  margin-left: 15px;
  width: 28px;
  text-align: center;
}
details.page-blog__faq-item .page-blog__faq-answer {
  padding: 0 25px 25px;
  background: var(--color-card-bg, #11271B);
  border-radius: 0 0 10px 10px;
}
.page-blog__faq-answer p {
    color: var(--color-text-secondary, #A7D9B8);
    margin-bottom: 10px;
}
.page-blog__faq-answer p:last-child {
    margin-bottom: 0;
}

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

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

    .page-blog__introduction-section .page-blog__content-wrapper,
    .page-blog__guides-tips-section .page-blog__content-wrapper,
    .page-blog__why-read-section .page-blog__content-wrapper {
        flex-direction: column;
        gap: 30px;
    }

    .page-blog__introduction-section .page-blog__image-block,
    .page-blog__guides-tips-section .page-blog__image-block,
    .page-blog__why-read-section .page-blog__image-block {
        width: 100%;
    }
    
    .page-blog__categories-grid,
    .page-blog__articles-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }

    .page-blog__category-image {
        height: 160px;
    }

    .page-blog__article-image {
        height: 180px;
    }
}

@media (max-width: 768px) {
    .page-blog {
        padding-top: 10px; /* Small top padding, body handles main offset */
        font-size: 16px;
        line-height: 1.6;
    }

    .page-blog__container {
        padding: 0 15px; /* Use 15px padding for container */
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .page-blog__section {
        padding: 40px 0;
    }

    .page-blog__section-title {
        font-size: 28px;
        margin-bottom: 15px;
        padding: 0 15px; /* Add padding for title on mobile */
    }

    .page-blog__section-description {
        font-size: 16px;
        margin-bottom: 30px;
        padding: 0 15px; /* Add padding for description on mobile */
    }

    .page-blog__main-title {
        font-size: clamp(28px, 8vw, 36px); /* Smaller H1 for mobile */
        padding: 0 15px; /* Add padding for H1 on mobile */
    }

    .page-blog__intro-description {
        font-size: 16px;
        padding: 0 15px; /* Add padding for description on mobile */
    }

    .page-blog__hero-content {
        padding: 30px 0 40px; /* Adjust hero content padding */
    }

    .page-blog__hero-cta-buttons {
        flex-direction: column;
        gap: 15px;
        padding: 0 15px; /* Add padding for buttons on mobile */
    }

    .page-blog__btn {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        padding: 12px 15px; /* Adjust button padding */
    }

    .page-blog__introduction-section .page-blog__content-wrapper,
    .page-blog__guides-tips-section .page-blog__content-wrapper,
    .page-blog__why-read-section .page-blog__content-wrapper {
        gap: 20px;
    }

    .page-blog__text-block p {
        padding: 0 15px; /* Add padding for text blocks on mobile */
    }

    .page-blog__image-block img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        box-sizing: border-box !important;
        padding: 0 15px; /* Add padding for images on mobile */
    }
    
    .page-blog__categories-grid,
    .page-blog__articles-grid {
        grid-template-columns: 1fr; /* Single column for mobile */
        gap: 20px;
        padding: 0 15px; /* Add padding for grids on mobile */
    }

    .page-blog__category-card {
        padding: 20px;
    }

    .page-blog__category-image {
        height: auto; /* Auto height for mobile category images */
        aspect-ratio: 16/9; /* Maintain aspect ratio */
    }

    .page-blog__article-image {
        height: auto; /* Auto height for mobile article images */
        aspect-ratio: 16/9; /* Maintain aspect ratio */
    }

    .page-blog__faq-section {
        padding-bottom: 40px;
    }

    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__faq-toggle {
        font-size: 20px;
        width: 24px;
    }
    
    /* Ensure no horizontal overflow for any section */
    .page-blog__section,
    .page-blog__hero-section,
    .page-blog__introduction-section,
    .page-blog__featured-categories-section,
    .page-blog__guides-tips-section,
    .page-blog__latest-articles-section,
    .page-blog__why-read-section,
    .page-blog__faq-section {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden; /* Prevent horizontal scroll */
    }
}