.page-blog {
    font-family: Arial, sans-serif;
    color: #FFF3E6; /* Text Main */
    background-color: var(--body-bg, #0D0E12); /* Default to dark background if var not set */
    line-height: 1.6;
}

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

.page-blog__top-section {
    padding-top: 10px; /* As per fixed header spacing rule */
    padding-bottom: 60px;
    text-align: center;
    background-color: #0D0E12; /* Background */
}

.page-blog__main-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem); /* Using clamp as per rule */
    font-weight: 700;
    color: #FFF3E6; /* Text Main */
    margin-bottom: 20px;
    line-height: 1.2;
}

.page-blog__intro-text {
    font-size: 1.15rem;
    color: #FFF3E6; /* Text Main */
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-blog__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap; /* Ensure wrapping on smaller screens */
}

.page-blog__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow text wrapping */
    max-width: 100%; /* Ensure button fits container */
    box-sizing: border-box; /* Include padding and border in element's total width and height */
}

.page-blog__btn--primary {
    background: linear-gradient(180deg, #FFA53A 0%, #D96800 100%); /* Button gradient */
    color: #ffffff; /* White text for contrast */
    box-shadow: 0 4px 15px rgba(255, 132, 0, 0.4);
}

.page-blog__btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 132, 0, 0.6);
}

.page-blog__btn--secondary {
    background: #17191F; /* Card BG */
    color: #FFA53A; /* Auxiliary color */
    border: 2px solid #A84F0C; /* Border */
}

.page-blog__btn--secondary:hover {
    background: #2a2d34;
    color: #FFF3E6; /* Text Main */
    border-color: #FFA53A;
}

.page-blog__btn--outline {
    background: transparent;
    color: #FFA53A;
    border: 2px solid #A84F0C;
}

.page-blog__btn--outline:hover {
    background: #17191F;
    color: #FFF3E6;
    border-color: #FFA53A;
}

.page-blog__articles-section {
    padding: 60px 0;
    background-color: #0D0E12; /* Background */
}

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

.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-color: #17191F; /* Card BG */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #A84F0C; /* Border */
}

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

.page-blog__article-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

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

.page-blog__article-content {
    padding: 25px;
}

.page-blog__article-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #FFA53A; /* Auxiliary color */
    margin-bottom: 15px;
    line-height: 1.3;
}

.page-blog__article-excerpt {
    font-size: 1rem;
    color: #FFF3E6; /* Text Main */
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.page-blog__read-more {
    display: inline-block;
    color: #FF8C1A; /* Main color */
    font-weight: 600;
    text-decoration: underline;
}

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

.page-blog__long-form-content {
    padding: 60px 0;
    background-color: #0D0E12; /* Background */
}

.page-blog__article-wrap {
    max-width: 900px; /* Slightly narrower for long-form readability */
    margin: 0 auto;
    padding: 0 20px;
}

.page-blog__long-form-content p {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: #FFF3E6; /* Text Main */
}

.page-blog__long-form-content a {
    color: #FF8C1A; /* Main color for links */
    text-decoration: underline;
}

.page-blog__long-form-content a:hover {
    color: #FFA53A; /* Auxiliary color on hover */
}

.page-blog__sub-title {
    font-size: 2rem;
    font-weight: 700;
    color: #FFA53A; /* Auxiliary color */
    margin-top: 40px;
    margin-bottom: 25px;
}

.page-blog__sub-sub-title {
    font-size: 1.6rem;
    font-weight: 600;
    color: #FF8C1A; /* Main color */
    margin-top: 30px;
    margin-bottom: 20px;
}

.page-blog__figure {
    margin: 30px 0;
    text-align: center;
    background-color: #17191F; /* Card BG */
    border-radius: 8px;
    overflow: hidden;
    padding: 15px;
    border: 1px solid #A84F0C; /* Border */
}

.page-blog__figure-image {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 6px;
}

.page-blog__figure-caption {
    font-size: 0.95rem;
    color: #FFF3E6; /* Text Main */
    margin-top: 15px;
    line-height: 1.4;
}

.page-blog__list {
    list-style: disc;
    margin-left: 25px;
    margin-bottom: 20px;
    color: #FFF3E6; /* Text Main */
}

.page-blog__list li {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.page-blog__list li strong {
    color: #FFA53A; /* Auxiliary color for strong text in list */
}

.page-blog__cta-section {
    padding: 80px 0;
    text-align: center;
    background-color: #17191F; /* Card BG */
    border-top: 1px solid #A84F0C; /* Border */
}

.page-blog__cta-title {
    font-size: 2.8rem;
    font-weight: 700;
    color: #FFF3E6; /* Text Main */
    margin-bottom: 20px;
}

.page-blog__cta-description {
    font-size: 1.2rem;
    color: #FFF3E6; /* Text Main */
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.page-blog__copyright {
    padding: 20px;
    text-align: center;
    font-size: 0.9rem;
    color: #A84F0C; /* Border color for subtle copyright */
    background-color: #0D0E12; /* Background */
    border-top: 1px solid #A84F0C;
}

/* --- Responsive Styles --- */
@media (max-width: 1024px) {
    .page-blog__main-title {
        font-size: clamp(2rem, 6vw, 3rem);
    }

    .page-blog__section-title {
        font-size: 2rem;
    }

    .page-blog__sub-title {
        font-size: 1.8rem;
    }

    .page-blog__cta-title {
        font-size: 2.2rem;
    }

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

@media (max-width: 768px) {
    /* 1. Top section (title + CTA buttons) */
    .page-blog__top-section {
        padding-top: 10px !important; /* Fixed header spacing rule */
        padding-bottom: 40px;
    }

    .page-blog__main-title {
        font-size: clamp(1.8rem, 8vw, 2.5rem);
        margin-bottom: 15px;
    }

    .page-blog__intro-text {
        font-size: 1rem;
        margin-bottom: 30px;
        padding: 0 15px;
    }

    .page-blog__cta-buttons {
        flex-direction: column; /* Stack buttons vertically */
        gap: 15px;
        padding: 0 15px;
    }

    .page-blog__btn {
        width: 100% !important; /* Ensure button fits container */
        max-width: 100% !important;
        padding: 12px 20px !important;
        font-size: 1rem !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    /* 2. Single-column long-form content (article wrap, sections, info/warning/promo cards) */
    .page-blog__articles-section,
    .page-blog__long-form-content,
    .page-blog__cta-section {
        padding: 40px 0;
    }

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

    .page-blog__articles-grid {
        grid-template-columns: 1fr; /* Single column for articles */
        gap: 20px;
        padding: 0 15px;
    }

    .page-blog__article-card {
        margin: 0 auto;
        max-width: 400px; /* Constrain single card width */
    }

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

    .page-blog__article-title {
        font-size: 1.3rem;
        margin-bottom: 10px;
    }

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

    .page-blog__article-wrap {
        padding: 0 15px; /* Add padding for content */
    }

    .page-blog__long-form-content p,
    .page-blog__list li {
        font-size: 1rem;
    }

    .page-blog__sub-title {
        font-size: 1.6rem;
        margin-top: 30px;
        margin-bottom: 20px;
        padding: 0 15px;
    }

    .page-blog__sub-sub-title {
        font-size: 1.4rem;
        margin-top: 25px;
        margin-bottom: 15px;
        padding: 0 15px;
    }

    /* 3. General images and figures */
    .page-blog img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block;
    }

    .page-blog__figure {
        margin: 20px 0;
        padding: 10px;
    }

    .page-blog__figure-caption {
        font-size: 0.9rem;
        margin-top: 10px;
    }

    /* 4. Buttons and button containers - already covered in top section and general btn styles */
    .page-blog__cta-buttons {
        gap: 10px;
    }

    /* 5. Registration tutorial and FAQ blocks */
    /* Headings and paragraphs within long-form content will adapt via inherited styles and .page-blog__article-wrap padding */
    .page-blog__cta-title {
        font-size: 1.8rem;
        margin-bottom: 15px;
        padding: 0 15px;
    }

    .page-blog__cta-description {
        font-size: 1rem;
        margin-bottom: 30px;
        padding: 0 15px;
    }
    
    /* Ensure all containing elements have max-width: 100% */
    .page-blog__section,
    .page-blog__card,
    .page-blog__container,
    .page-blog__articles-section,
    .page-blog__long-form-content,
    .page-blog__cta-section {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .page-blog__copyright {
        padding: 15px;
    }
}