/* style/blog.css */
.page-blog {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Dark text for light background */
    background-color: #FFFFFF; /* Explicitly set for content area */
    padding-top: var(--header-offset, 120px); /* Fixed header offset for desktop */
}

.page-blog__hero-section {
    position: relative;
    overflow: hidden;
    color: #FFFFFF; /* Light text for hero content */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
    min-height: 500px;
}

.page-blog__hero-image-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.page-blog__hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.6); /* Slightly darken image for text readability */
    display: block;
}

.page-blog__hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
}

.page-blog__hero-title {
    font-size: 3.5em;
    margin-bottom: 20px;
    color: #FFFFFF;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.page-blog__hero-description {
    font-size: 1.2em;
    margin-bottom: 30px;
    color: #f0f0f0;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);
}

.page-blog__hero-button {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
    font-size: 1.1em;
}

.page-blog__hero-button--register {
    background-color: #FFFFFF; /* Register color */
    color: #000000;
    border: 2px solid #FFFFFF;
}

.page-blog__hero-button--register:hover {
    background-color: #f0f0f0;
    color: #000000;
}

.page-blog__section-title {
    font-size: 2.5em;
    text-align: center;
    margin-bottom: 40px;
    color: #000000;
}

.page-blog__latest-articles,
.page-blog__categories,
.page-blog__cta-section,
.page-blog__about-us {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
}

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

.page-blog__article-card {
    background-color: #FFFFFF;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.page-blog__article-card:hover {
    transform: translateY(-5px);
}

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

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

.page-blog__article-title {
    font-size: 1.4em;
    margin-bottom: 10px;
    min-height: 70px; /* Ensure consistent title height */
}

.page-blog__article-title a {
    text-decoration: none;
    color: #000000;
    transition: color 0.3s ease;
}

.page-blog__article-title a:hover {
    color: #FCBC45;
}

.page-blog__article-excerpt {
    font-size: 0.95em;
    color: #555555;
    margin-bottom: 20px;
}

.page-blog__read-more-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #000000;
    color: #FFFFFF;
    text-decoration: none;
    border-radius: 5px;
    font-size: 0.9em;
    transition: background-color 0.3s ease;
}

.page-blog__read-more-button:hover {
    background-color: #333333;
}

.page-blog__categories {
    background-color: #f9f9f9;
    padding: 40px 20px;
    border-radius: 8px;
    text-align: center;
}

.page-blog__category-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.page-blog__category-item a {
    display: block;
    padding: 12px 25px;
    background-color: #e0e0e0;
    color: #000000;
    text-decoration: none;
    border-radius: 25px;
    transition: background-color 0.3s ease, color 0.3s ease;
    font-weight: bold;
}

.page-blog__category-item a:hover {
    background-color: #FCBC45;
    color: #000000;
}

.page-blog__cta-section {
    background-color: #000000;
    color: #FFFFFF;
    padding: 60px 20px;
    text-align: center;
    border-radius: 8px;
}

.page-blog__cta-title {
    font-size: 2.8em;
    margin-bottom: 20px;
    color: #FFFFFF;
}

.page-blog__cta-description {
    font-size: 1.1em;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

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

.page-blog__cta-button {
    display: inline-block;
    padding: 15px 35px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: background-color 0.3s ease, color 0.3s ease;
    border: 2px solid;
}

.page-blog__cta-button--register {
    background-color: #FFFFFF; /* Register color */
    color: #000000;
    border-color: #FFFFFF;
}

.page-blog__cta-button--register:hover {
    background-color: #f0f0f0;
    color: #000000;
}

.page-blog__cta-button--login {
    background-color: #FCBC45; /* Login color */
    color: #000000;
    border-color: #FCBC45;
}

.page-blog__cta-button--login:hover {
    background-color: #e0a83e;
    color: #000000;
}

.page-blog__about-us {
    padding-top: 60px;
}

.page-blog__about-text {
    font-size: 1.05em;
    color: #444444;
    margin-bottom: 25px;
    text-align: justify;
}

/* Responsive design */
@media (max-width: 1024px) {
    .page-blog__hero-title {
        font-size: 3em;
    }
    .page-blog__hero-description {
        font-size: 1.1em;
    }
    .page-blog__section-title {
        font-size: 2em;
    }
    .page-blog__cta-title {
        font-size: 2.2em;
    }
}

@media (max-width: 768px) {
    .page-blog {
        padding-top: var(--header-offset, 80px); /* Adjust for mobile header */
    }
    .page-blog__hero-section {
        padding: 60px 15px;
        min-height: 400px;
    }
    .page-blog__hero-title {
        font-size: 2.5em;
    }
    .page-blog__hero-description {
        font-size: 1em;
    }
    .page-blog__articles-grid {
        grid-template-columns: 1fr;
    }
    .page-blog__article-image {
        height: 200px;
    }
    .page-blog__article-title {
        font-size: 1.2em;
        min-height: auto; /* Allow height to adapt on mobile */
    }
    .page-blog__cta-title {
        font-size: 1.8em;
    }
    .page-blog__cta-buttons {
        flex-direction: column;
        gap: 15px;
    }
    .page-blog__cta-button {
        width: 100%;
        max-width: 300px;
    }
    .page-blog__category-list {
        flex-direction: column;
        align-items: center;
    }
    .page-blog__category-item a {
        width: 100%;
        max-width: 250px;
    }

    /* Mobile content area images must be constrained */
    .page-blog img {
        max-width: 100%;
        height: auto;
    }
    /* Ensure content area images are not too small */
    .page-blog__article-card img,
    .page-blog__hero-image {
        min-width: 200px;
        min-height: 200px;
    }
}

@media (max-width: 480px) {
    .page-blog__hero-title {
        font-size: 2em;
    }
    .page-blog__hero-description {
        font-size: 0.9em;
    }
    .page-blog__section-title {
        font-size: 1.8em;
    }
    .page-blog__cta-title {
        font-size: 1.6em;
    }
    .page-blog__hero-button {
        padding: 12px 25px;
        font-size: 1em;
    }
}