/* style/blog.css */
.page-blog {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #1F2D3D; /* Text Main color for light background */
    background-color: #F4F7FB; /* Custom Background color */
}

/* Hero Section */
.page-blog__hero-section {
    position: relative;
    padding: 80px 20px;
    text-align: center;
    background: linear-gradient(180deg, #6FA3FF 0%, #2F6BFF 100%); /* Blend of primary and auxiliary colors */
    color: #ffffff;
    padding-top: 10px; /* Specific rule for top spacing, assuming body has header offset */
}

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

.page-blog__main-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem); /* Responsive H1 font size */
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    color: #ffffff;
}

.page-blog__hero-description {
    font-size: 1.25rem;
    margin-bottom: 40px;
    color: #f0f0f0;
}

.page-blog__hero-cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* Buttons */
.page-blog__btn-primary,
.page-blog__btn-secondary,
.page-blog__read-more-btn {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow text wrapping */
}

.page-blog__btn-primary {
    background: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%); /* Custom Button color */
    color: #ffffff;
    border: none;
}

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

.page-blog__btn-secondary {
    background: #ffffff; /* Card BG color */
    color: #2F6BFF; /* Main color */
    border: 2px solid #2F6BFF;
}

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

.page-blog__read-more-btn {
    background: #2F6BFF;
    color: #ffffff;
    padding: 10px 20px;
    font-size: 0.9rem;
    border: none;
}

.page-blog__read-more-btn:hover {
    background: #6FA3FF;
}

/* General Section Styling */
.page-blog__latest-articles-section,
.page-blog__content-overview,
.page-blog__cta-section {
    padding: 60px 0;
}

.page-blog__light-bg {
    background-color: #F4F7FB; /* Custom Background color */
    color: #1F2D3D; /* Text Main color */
}

.page-blog__dark-bg {
    background-color: #2F6BFF; /* Main color */
    color: #ffffff;
}

.page-blog__article-wrap {
    max-width: 1150px;
    margin: 0 auto;
    padding: 0 20px;
}

.page-blog__section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 20px;
    color: #1F2D3D; /* Text Main color */
}

.page-blog__dark-bg .page-blog__section-title {
    color: #ffffff;
}

.page-blog__section-description {
    font-size: 1.1rem;
    text-align: center;
    margin-bottom: 40px;
    color: #1F2D3D; /* Text Main color */
}

.page-blog__dark-bg .page-blog__section-description {
    color: #f0f0f0;
}

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

.page-blog__article-card {
    background: #ffffff; /* Card BG color */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #D6E2FF; /* Border color */
    display: flex;
    flex-direction: column;
}

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

.page-blog__article-image {
    width: 100%;
    height: 200px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
}

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

.page-blog__article-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.3;
}

.page-blog__article-title a {
    color: #1F2D3D; /* Text Main color */
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-blog__article-title a:hover {
    color: #2F6BFF; /* Main color */
}

.page-blog__article-meta {
    font-size: 0.9rem;
    color: #666666;
    margin-bottom: 15px;
}

.page-blog__article-summary {
    font-size: 1rem;
    color: #333333;
    margin-bottom: 20px;
    flex-grow: 1;
}

.page-blog__view-all-posts {
    text-align: center;
}

.page-blog__view-all-posts .page-blog__btn-primary {
    padding: 12px 25px;
    font-size: 1rem;
}

/* Content Overview Section */
.page-blog__content-overview .page-blog__text-block {
    font-size: 1.1rem;
    margin-bottom: 25px;
    color: #ffffff; /* Text color for dark background */
}

.page-blog__content-overview .page-blog__sub-title {
    font-size: 2rem;
    font-weight: 600;
    margin-top: 40px;
    margin-bottom: 20px;
    color: #ffffff;
}

.page-blog__content-overview .page-blog__content-image {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    border-radius: 12px;
    margin: 30px 0;
    display: block; /* Ensure it respects max-width */
}

.page-blog__cta-buttons--inline {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

.page-blog__conclusion-text {
    font-size: 1.1rem;
    margin-top: 40px;
    text-align: center;
    color: #ffffff;
}

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

.page-blog__cta-section .page-blog__btn-primary,
.page-blog__cta-section .page-blog__btn-secondary {
    padding: 18px 35px;
    font-size: 1.1rem;
}

/* Generic image styling for content area */
.page-blog img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Mobile Responsive @media (max-width: 768px) */
@media (max-width: 768px) {
    /* Top section title + dual CTA */
    .page-blog__hero-section {
        padding: 60px 15px;
        padding-top: 10px !important; /* Specific rule for top spacing */
    }

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

    .page-blog__hero-description {
        font-size: 1rem;
        margin-bottom: 30px;
    }

    .page-blog__hero-cta-buttons {
        flex-direction: column;
        gap: 15px;
    }

    /* Buttons and button containers */
    .page-blog__btn-primary,
    .page-blog__btn-secondary,
    .page-blog__read-more-btn,
    .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;
    }

    .page-blog__hero-cta-buttons,
    .page-blog__cta-buttons--inline,
    .page-blog__view-all-posts,
    .page-blog__button-group,
    .page-blog__btn-container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        flex-wrap: wrap !important; /* Ensure buttons wrap */
        gap: 10px; /* Spacing between wrapped buttons */
        flex-direction: column; /* For general button groups to stack */
    }

    /* Single column long article container */
    .page-blog__article-wrap {
        padding: 0 15px;
    }

    .page-blog__latest-articles-section,
    .page-blog__content-overview,
    .page-blog__cta-section {
        padding: 40px 0;
    }

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

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

    .page-blog__articles-grid {
        grid-template-columns: 1fr; /* Single column layout */
        gap: 20px;
    }

    .page-blog__article-card {
        padding-bottom: 0; /* Adjust for mobile if needed */
    }

    .page-blog__article-title {
        font-size: 1.2rem;
    }

    .page-blog__article-summary {
        font-size: 0.95rem;
    }

    /* Universal images and figure (content area) */
    .page-blog img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    .page-blog__content-overview .page-blog__text-block,
    .page-blog__conclusion-text {
        font-size: 1rem;
    }

    .page-blog__content-overview .page-blog__sub-title {
        font-size: 1.5rem;
        margin-top: 30px;
        margin-bottom: 15px;
    }

    /* Ensure content containers don't overflow */
    .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;
    }

    /* Registration tutorial and FAQ blocks - general text styling */
    .page-blog h3 { /* General h3 for tutorial/FAQ-like content */
        font-size: 1.3rem;
        line-height: 1.4;
    }
    .page-blog p { /* General p for tutorial/FAQ-like content */
        font-size: 1rem;
        line-height: 1.6;
    }
}