/* style/blog.css */

/* General styles for the blog page */
.page-blog {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #ffffff; /* Default text color for dark body background */
    background-color: transparent; /* Body background is handled by shared.css var(--accent-color) */
}

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

/* Hero Section */
.page-blog__hero-section {
    padding-top: 10px; /* Small top padding, body handles header offset */
    padding-bottom: 40px;
    background-color: #017439; /* Brand primary color for hero background */
    color: #ffffff; /* White text for dark background */
}

.page-blog__hero-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 40px;
    padding: 40px 0;
}

.page-blog__hero-content {
    flex: 1 1 45%;
    min-width: 300px;
}

.page-blog__hero-title {
    font-size: clamp(2.2rem, 4vw, 3rem); /* H1 font size clamp */
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
    color: #ffffff;
}

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

.page-blog__hero-image {
    flex: 1 1 45%;
    text-align: center;
}

.page-blog__hero-side-image {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.page-blog__hero-cta {
    display: flex;
    gap: 15px;
}

/* Call to action buttons */
.page-blog__cta-button {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease;
    text-align: center;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-blog__btn-primary {
    background-color: #C30808; /* Register/Login color */
    color: #FFFF00; /* Register/Login font color */
    border: 2px solid #C30808;
}

.page-blog__btn-primary:hover {
    background-color: #a00606;
    transform: translateY(-2px);
}

.page-blog__btn-secondary {
    background-color: #ffffff;
    color: #017439;
    border: 2px solid #017439;
}

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

/* Articles Section */
.page-blog__articles-section {
    padding: 60px 0;
    background-color: #ffffff; /* Light background for article cards */
    color: #333333; /* Dark text for light background */
}

.page-blog__articles-title {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 50px;
    color: #017439;
}

.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-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

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

.page-blog__article-media {
    width: 100%;
    height: 220px; /* Fixed height for consistent card images */
    overflow: hidden;
}

.page-blog__article-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.page-blog__article-card:hover .page-blog__article-media img {
    transform: scale(1.05);
}

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

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

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

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

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

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

.page-blog__read-more {
    display: inline-block;
    color: #C30808; /* Use register/login color for strong CTA */
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
    align-self: flex-start;
}

.page-blog__read-more:hover {
    color: #a00606;
}

/* Final Call to Action Section */
.page-blog__cta-section {
    padding: 80px 0;
    background-color: #017439; /* Brand primary color */
    color: #ffffff;
    text-align: center;
}

.page-blog__cta-title {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 700;
    margin-bottom: 20px;
    color: #ffffff;
}

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

.page-blog__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    width: 100%; /* Ensure container takes full width for responsive */
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    /* General mobile adjustments */
    .page-blog {
        font-size: 16px;
        line-height: 1.6;
    }

    .page-blog__container {
        padding: 0 15px;
    }

    /* HERO Section */
    .page-blog__hero-section {
        padding-top: 10px !important; /* Fixed header top padding */
        padding-bottom: 30px;
    }

    .page-blog__hero-container {
        flex-direction: column;
        text-align: center;
        gap: 30px;
        padding: 30px 0;
    }

    .page-blog__hero-content {
        flex: 1 1 100%;
    }

    .page-blog__hero-title {
        font-size: clamp(1.8rem, 7vw, 2.5rem);
    }

    .page-blog__hero-description {
        font-size: 1rem;
    }

    .page-blog__hero-image {
        flex: 1 1 100%;
    }

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

    /* Buttons responsive */
    .page-blog__cta-button,
    .page-blog__btn-primary,
    .page-blog__btn-secondary,
    .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__cta-buttons,
    .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-direction: column !important; /* Stack buttons vertically */
        gap: 10px;
    }

    /* Articles Section */
    .page-blog__articles-section {
        padding: 40px 0;
    }

    .page-blog__articles-title {
        font-size: clamp(1.5rem, 6vw, 2.2rem);
        margin-bottom: 30px;
    }

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

    .page-blog__article-media {
        height: 180px; /* Adjust height for mobile */
    }

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

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

    /* Final CTA Section */
    .page-blog__cta-section {
        padding: 60px 0;
    }

    .page-blog__cta-title {
        font-size: clamp(1.8rem, 7vw, 2.5rem);
    }

    .page-blog__cta-description {
        font-size: 1rem;
    }

    /* Universal image responsive for content area */
    .page-blog img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block;
    }
    .page-blog__articles-section,
    .page-blog__cta-section {
      max-width: 100% !important;
      width: 100% !important;
      box-sizing: border-box !important;
      padding-left: 15px;
      padding-right: 15px;
      overflow: hidden;
    }
}