.page-blog {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-main, #F2FFF6); /* Default text color for dark background */
    background-color: var(--bg, #08160F); /* Page background color */
}

/* Base styles for common elements to ensure contrast on dark background */
.page-blog h1, .page-blog h2, .page-blog h3, .page-blog h4, .page-blog h5, .page-blog h6 {
    color: var(--text-main, #F2FFF6);
    margin-bottom: 1rem;
    font-weight: bold;
    line-height: 1.2;
}

.page-blog p {
    color: var(--text-secondary, #A7D9B8);
    margin-bottom: 1rem;
}

.page-blog a {
    color: var(--primary-color, #11A84E); /* Use primary color for links */
    text-decoration: none;
}

.page-blog a:hover {
    text-decoration: underline;
    color: var(--secondary-color, #22C768);
}

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

/* Hero Section */
.page-blog__hero-section {
    position: relative;
    width: 100%;
    padding-top: 10px; /* Small top padding as body handles header offset */
    padding-bottom: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden; /* Ensure nothing overflows */
}

.page-blog__hero-image-wrapper {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    margin-bottom: 30px; /* Space between image and content */
}

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

.page-blog__hero-content {
    max-width: 900px;
    padding: 0 20px;
    box-sizing: border-box;
}

.page-blog__main-title {
    font-size: clamp(2rem, 4vw, 3.5rem); /* Responsive font size for H1 */
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-main, #F2FFF6);
    margin-bottom: 15px;
}

.page-blog__intro-text {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-secondary, #A7D9B8);
    margin-bottom: 30px;
}

.page-blog__cta-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap; /* Allow wrapping on small screens */
}

/* Buttons */
.page-blog__btn-primary,
.page-blog__btn-secondary {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Break long words */
    box-sizing: border-box;
    max-width: 100%; /* Ensure buttons don't overflow */
}

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

.page-blog__btn-primary:hover {
    background: linear-gradient(180deg, #13994A 0%, #2AD16F 100%);
    color: #ffffff;
    text-decoration: none;
    box-shadow: 0 0 15px rgba(42, 209, 111, 0.5);
}

.page-blog__btn-secondary {
    background: #ffffff; /* Explicitly white background */
    color: var(--primary-color, #11A84E); /* Primary brand color for text */
    border: 2px solid var(--primary-color, #11A84E); /* Border matches text color */
}

.page-blog__btn-secondary:hover {
    background: var(--primary-color, #11A84E); /* Hover with primary color background */
    color: #ffffff; /* White text on hover */
    text-decoration: none;
}

/* Section common styles */
.page-blog__latest-articles,
.page-blog__featured-guides,
.page-blog__faq-section,
.page-blog__cta-final,
.page-blog__video-section {
    padding: 60px 0;
}

.page-blog__dark-section {
    background-color: var(--card-bg, #11271B); /* Darker background for sections */
}

.page-blog__section-title {
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    font-weight: 700;
    color: var(--text-main, #F2FFF6);
    text-align: center;
    margin-bottom: 20px;
}

.page-blog__section-description {
    font-size: clamp(0.9rem, 1.5vw, 1.1rem);
    color: var(--text-secondary, #A7D9B8);
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px auto;
}

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

.page-blog__article-card {
    background-color: var(--card-bg, #11271B);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-blog__article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.page-blog__card-image {
    width: 100%;
    height: 220px; /* Fixed height for consistent card appearance */
    object-fit: cover;
    display: block;
}

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

.page-blog__card-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-main, #F2FFF6);
}

.page-blog__card-title a {
    color: var(--text-main, #F2FFF6);
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-blog__card-title a:hover {
    color: var(--gold-color, #F2C14E); /* Highlight on hover */
    text-decoration: underline;
}

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

.page-blog__card-excerpt {
    font-size: 0.95rem;
    color: var(--text-secondary, #A7D9B8);
    margin-bottom: 20px;
    flex-grow: 1; /* Pushes read more to bottom */
}

.page-blog__read-more {
    color: var(--gold-color, #F2C14E);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

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

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

/* Video Section */
.page-blog__video-section {
    padding-top: 60px; /* Ensure consistent section padding */
    padding-bottom: 60px;
    background-color: var(--bg, #08160F); /* Use general background for video section */
    text-align: center;
}

.page-blog__video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000;
    border-radius: 8px;
    margin-top: 30px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    width: 100%; /* Important for desktop flex container */
    max-width: 900px; /* Max width for video container */
    margin-left: auto;
    margin-right: auto;
}

.page-blog__video-link {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

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

.page-blog__video-caption {
    margin-top: 20px;
    font-style: italic;
    color: var(--text-secondary, #A7D9B8);
    font-size: 0.95rem;
}


/* FAQ Section */
.page-blog__faq-section {
    background-color: var(--bg, #08160F);
}

.page-blog__faq-list {
    margin-top: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.page-blog__faq-item {
    background-color: var(--card-bg, #11271B);
    border: 1px solid var(--border-color, #2E7A4E);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.page-blog__faq-item[open] {
    box-shadow: 0 0 20px rgba(46, 122, 78, 0.3); /* Glow effect when open */
}

.page-blog__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-main, #F2FFF6);
    cursor: pointer;
    list-style: none; /* For details/summary */
    transition: background-color 0.3s ease;
}

.page-blog__faq-item summary::-webkit-details-marker {
    display: none; /* Hide default marker */
}

.page-blog__faq-question:hover {
    background-color: rgba(46, 122, 78, 0.2); /* Subtle hover effect */
}

.page-blog__faq-qtext {
    flex-grow: 1;
}

.page-blog__faq-toggle {
    font-size: 1.5rem;
    font-weight: normal;
    margin-left: 15px;
    color: var(--gold-color, #F2C14E);
}

.page-blog__faq-answer {
    padding: 0 25px 20px 25px;
    font-size: 1rem;
    color: var(--text-secondary, #A7D9B8);
}

.page-blog__faq-answer p {
    margin-bottom: 0; /* Remove default paragraph margin */
}

/* Final CTA Section */
.page-blog__cta-final {
    text-align: center;
    padding: 80px 0;
}

.page-blog__cta-content {
    max-width: 800px;
    margin: 0 auto;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .page-blog {
        font-size: 16px;
        line-height: 1.6;
    }

    .page-blog__hero-section {
        padding-bottom: 40px;
        padding-top: 10px !important; /* Fixed top padding, body handles header offset */
    }

    .page-blog__main-title {
        font-size: 2rem;
        letter-spacing: normal;
    }

    .page-blog__intro-text {
        font-size: 1rem;
    }

    .page-blog__cta-buttons {
        flex-direction: column;
        gap: 10px;
        padding: 0 15px;
    }

    .page-blog__btn-primary,
    .page-blog__btn-secondary {
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px 20px;
        font-size: 1rem;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    .page-blog__latest-articles,
    .page-blog__featured-guides,
.page-blog__faq-section,
    .page-blog__cta-final,
    .page-blog__video-section {
        padding: 40px 0;
    }

    .page-blog__section-title {
        font-size: 2rem;
        margin-bottom: 15px;
        padding: 0 15px;
    }

    .page-blog__section-description {
        font-size: 0.9rem;
        margin-bottom: 30px;
        padding: 0 15px;
    }

    .page-blog__article-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 15px;
    }

    .page-blog__card-image {
        height: 180px; /* Adjust height for mobile */
    }

    .page-blog__card-title {
        font-size: 1.15rem;
    }

    .page-blog__card-excerpt {
        font-size: 0.9rem;
    }

    /* Mobile specific image/video rules */
    .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;
    }
    
    .page-blog__video-section {
        padding-top: 10px !important; /* body already has --header-offset */
    }

    .page-blog video,
    .page-blog__video {
      max-width: 100% !important;
      width: 100% !important;
      height: auto !important;
      display: block !important;
    }
    
    .page-blog__video-section,
    .page-blog__video-container,
    .page-blog__video-wrapper {
      max-width: 100% !important;
      width: 100% !important;
      box-sizing: border-box !important;
      padding-left: 15px;
      padding-right: 15px;
      overflow: hidden !important;
    }
    .page-blog__video-wrapper {
        padding-bottom: 60% !important; /* Slightly more vertical space on mobile if needed */
    }
    .page-blog__faq-list {
        padding: 0 15px;
    }
    .page-blog__faq-question {
        padding: 15px 20px;
        font-size: 1rem;
    }
    .page-blog__faq-answer {
        padding: 0 20px 15px 20px;
        font-size: 0.9rem;
    }
}