:root {
    /* Custom Colors */
    --primary-color: #113B7A;
    --secondary-color: #1D5FD1;
    --button-gradient: linear-gradient(180deg, #2B73F6 0%, #1144A6 100%);
    --card-bg: #10233F;
    --text-main: #F3F8FF;
    --text-secondary: #AFC4E8;
    --border-color: #244D84;
    --glow-color: #4FA8FF;
    --gold-color: #F2C14E;
    --divider-color: #1B3357;
    --deep-navy: #08162B; /* Body background */
}

/* Base styles for the blog page */
.page-blog {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-main); /* Default text color for dark body background */
    background-color: var(--deep-navy); /* Ensure consistency if shared.css doesn't apply */
}

/* Sections padding and margin */
.page-blog__section {
    padding: 60px 0;
    position: relative;
    overflow: hidden;
}

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

/* Headings */
.page-blog h1,
.page-blog h2,
.page-blog h3,
.page-blog h4,
.page-blog h5,
.page-blog h6 {
    color: var(--text-main);
    margin-bottom: 20px;
    line-height: 1.2;
}

.page-blog__section-title {
    font-size: 36px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 15px;
}

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

/* Links */
.page-blog a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-blog a:hover {
    color: var(--glow-color);
    text-decoration: underline;
}

/* CTA Buttons */
.page-blog__cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: var(--button-gradient);
    color: #ffffff; /* White text for button */
    text-decoration: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    margin-top: 20px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.page-blog__cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    opacity: 0.9;
}

/* Hero Section */
.page-blog__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    padding-top: 10px; /* Small top padding, body handles header offset */
    background-color: var(--deep-navy); /* Ensure dark background */
}

.page-blog__hero-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.page-blog__hero-image {
    width: 100%;
    margin-bottom: 30px;
}

.page-blog__hero-image img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.page-blog__hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
}

.page-blog__main-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-main);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-blog__title-highlight {
    color: var(--gold-color);
}

.page-blog__intro-text {
    font-size: 20px;
    color: var(--text-secondary);
    max-width: 900px;
    margin: 0 auto 30px auto;
}

/* Latest Posts Section */
.page-blog__latest-posts {
    background-color: var(--deep-navy);
    padding: 80px 0;
}

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

.page-blog__post-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.page-blog__post-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

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

.page-blog__post-image-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.page-blog__post-card:hover .page-blog__post-image-wrapper img {
    transform: scale(1.05);
}

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

.page-blog__post-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 10px;
}

.page-blog__post-title a {
    color: var(--text-main);
    transition: color 0.3s ease;
}

.page-blog__post-title a:hover {
    color: var(--gold-color);
    text-decoration: none;
}

.page-blog__post-meta {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.page-blog__post-summary {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    flex-grow: 1;
}

.page-blog__read-more {
    display: inline-block;
    color: var(--secondary-color);
    font-weight: bold;
    transition: color 0.3s ease;
}

.page-blog__read-more:hover {
    color: var(--glow-color);
    text-decoration: underline;
}

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

/* About Platform Section */
.page-blog__about-platform {
    background-color: #ffffff; /* Light background for contrast */
    color: #333333; /* Dark text for light background */
    padding: 80px 0;
}

.page-blog__about-platform .page-blog__section-title {
    color: #333333;
}

.page-blog__about-platform .page-blog__section-description {
    color: #555555;
}

.page-blog__about-platform p {
    color: #333333;
}

.page-blog__about-content {
    display: flex;
    gap: 40px;
    align-items: center;
}

.page-blog__about-text {
    flex: 1;
    font-size: 18px;
    line-height: 1.8;
}

.page-blog__about-text strong {
    color: var(--primary-color);
}

.page-blog__about-image {
    flex: 0 0 500px; /* Fixed width for image on desktop */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.page-blog__about-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Categories Section */
.page-blog__categories {
    background-color: var(--deep-navy);
    padding: 80px 0;
}

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

.page-blog__category-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 150px;
}

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

.page-blog__category-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-main);
}

.page-blog__category-card:hover .page-blog__category-title {
    color: var(--gold-color);
}

.page-blog__category-count {
    font-size: 15px;
    color: var(--text-secondary);
}

/* FAQ Section */
.page-blog__faq-section {
    background-color: #ffffff; /* Light background for contrast */
    padding: 80px 0;
}

.page-blog__faq-section .page-blog__section-title {
    color: #333333;
}

.page-blog__faq-section .page-blog__section-description {
    color: #555555;
}

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

details.page-blog__faq-item {
    margin-bottom: 15px;
    border-radius: 10px;
    border: 1px solid #e0e0e0; /* Light border for light background */
    overflow: hidden;
    background: #f9f9f9; /* Light card background */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

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;
    color: #333333; /* Dark text for light background */
    font-weight: 600;
    font-size: 18px;
}

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: #eeeeee; /* Lighter hover for light background */
}

.page-blog__faq-qtext {
    flex: 1;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.5;
    text-align: left;
    color: #333333;
}

.page-blog__faq-toggle {
    font-size: 28px;
    font-weight: bold;
    color: var(--primary-color); /* Primary color for toggle on light background */
    flex-shrink: 0;
    margin-left: 20px;
    width: 30px;
    text-align: center;
}

details.page-blog__faq-item .page-blog__faq-answer {
    padding: 0 25px 25px;
    background: #f0f0f0; /* Slightly darker background for answer */
    border-radius: 0 0 10px 10px;
    color: #555555; /* Secondary dark text */
    font-size: 16px;
    line-height: 1.7;
}

details.page-blog__faq-item[open] .page-blog__faq-question {
    background-color: var(--primary-color);
    color: #ffffff;
}

details.page-blog__faq-item[open] .page-blog__faq-qtext {
    color: #ffffff;
}

details.page-blog__faq-item[open] .page-blog__faq-toggle {
    color: #ffffff;
}

/* CTA Section */
.page-blog__cta-section {
    background-color: var(--deep-navy); /* Consistent dark background */
    padding: 80px 0;
    text-align: center;
}

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

/* Responsive Design */
@media (max-width: 1024px) {
    .page-blog__main-title {
        font-size: 40px;
    }

    .page-blog__intro-text {
        font-size: 18px;
    }

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

    .page-blog__section-description {
        font-size: 16px;
    }

    .page-blog__about-content {
        flex-direction: column;
    }

    .page-blog__about-image {
        flex: none;
        width: 100%;
        max-width: 600px; /* Limit image width on smaller screens */
        margin-top: 40px;
    }

    .page-blog__category-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
}

@media (max-width: 768px) {
    /* Mobile Hero Section */
    .page-blog__hero-section {
        padding-top: 10px !important; /* Body handles shared header offset */
        padding-bottom: 40px;
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-blog__main-title {
        font-size: clamp(28px, 8vw, 36px); /* Clamp for mobile H1 */
        margin-bottom: 15px;
    }

    .page-blog__intro-text {
        font-size: 16px;
        margin-bottom: 25px;
    }

    .page-blog__cta-button {
        padding: 12px 30px;
        font-size: 16px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

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

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

    /* Mobile Latest Posts */
    .page-blog__latest-posts {
        padding: 50px 0;
    }

    .page-blog__post-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .page-blog__post-card {
        margin: 0 15px; /* Add horizontal margin for cards */
    }

    .page-blog__post-title {
        font-size: 20px;
    }

    .page-blog__post-summary {
        font-size: 15px;
    }

    /* Mobile About Platform */
    .page-blog__about-platform {
        padding: 50px 0;
    }

    .page-blog__about-text {
        font-size: 16px;
        padding: 0 15px;
    }
    
    .page-blog__about-image {
        padding: 0 15px;
    }

    /* Mobile Categories */
    .page-blog__categories {
        padding: 50px 0;
    }

    .page-blog__category-grid {
        grid-template-columns: repeat(2, 1fr); /* Two columns on mobile */
        gap: 15px;
        margin: 0 15px;
    }

    .page-blog__category-card {
        padding: 20px 15px;
        min-height: 120px;
    }

    .page-blog__category-title {
        font-size: 18px;
    }

    /* Mobile FAQ */
    .page-blog__faq-section {
        padding: 50px 0;
    }

    .page-blog__faq-list {
        margin: 0 15px;
    }

    details.page-blog__faq-item summary.page-blog__faq-question {
        padding: 15px 20px;
        font-size: 16px;
    }
    
    .page-blog__faq-qtext {
        font-size: 16px;
    }

    .page-blog__faq-toggle {
        font-size: 24px;
        margin-left: 15px;
    }

    details.page-blog__faq-item .page-blog__faq-answer {
        padding: 0 20px 20px;
        font-size: 15px;
    }

    /* General mobile image and container responsiveness */
    .page-blog img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block;
    }
    
    .page-blog__section,
    .page-blog__card,
    .page-blog__container,
    .page-blog__cta-buttons,
    .page-blog__button-group,
    .page-blog__btn-container,
    .page-blog__about-content {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    
    /* Ensure no duplicate padding for containers that are already padded */
    .page-blog__container {
        padding-left: 0;
        padding-right: 0;
    }

    .page-blog__cta-section {
        padding: 50px 15px;
    }
}

/* Ensure content area images don't go below 200px */
.page-blog__latest-posts img,
.page-blog__about-platform img {
    min-width: 200px;
    min-height: 200px;
}
@media (max-width: 768px) {
    /* Override min-width for mobile images to allow shrinking if needed, but ensure max-width:100% */
    .page-blog__latest-posts img,
    .page-blog__about-platform img {
        min-width: unset;
        min-height: unset;
    }
}