/* General styles for the Blog page */
.page-blog {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light background */
    background-color: #ffffff; /* Assuming body background is white from shared.css */
}

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

/* Hero Section */
.page-blog__hero-section {
    padding-top: 10px; /* Small top padding, relying on body padding from shared.css */
    padding-bottom: 60px;
    background-color: #f8f8f8; /* Light background for the hero section */
}

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

.page-blog__hero-content {
    flex: 1 1 50%;
    min-width: 300px;
    color: #333333; /* Dark text for light background */
}

.page-blog__main-title {
    font-size: clamp(2.2rem, 4vw, 3.2rem); /* Responsive font size */
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    color: #017439; /* Brand color for H1 */
}

.page-blog__hero-description {
    font-size: 1.1rem;
    margin-bottom: 30px;
    max-width: 600px;
}

.page-blog__hero-image {
    flex: 1 1 40%;
    min-width: 280px;
    text-align: center;
}

.page-blog__hero-side-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* CTA Buttons */
.page-blog__cta-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
    margin-top: 30px;
}

.page-blog__btn-primary,
.page-blog__btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-blog__btn-primary {
    background-color: #017439; /* Main brand color */
    color: #ffffff;
    border: 2px solid #017439;
}

.page-blog__btn-primary:hover {
    background-color: #005a2e;
    border-color: #005a2e;
}

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

.page-blog__btn-secondary:hover {
    background-color: #f0f0f0;
    color: #005a2e;
    border-color: #005a2e;
}

/* Specific custom colors for login/register buttons */
.page-blog__btn-register {
    background-color: #C30808; /* Custom color for register */
    color: #FFFF00; /* Custom font color for register/login */
    border-color: #C30808;
}
.page-blog__btn-register:hover {
    background-color: #a00606;
    border-color: #a00606;
}
.page-blog__btn-login {
    background-color: #C30808; /* Custom color for login */
    color: #FFFF00; /* Custom font color for register/login */
    border-color: #C30808;
}
.page-blog__btn-login:hover {
    background-color: #a00606;
    border-color: #a00606;
}


/* Blog List Section */
.page-blog__blog-list-section {
    padding: 80px 0;
    background-color: #ffffff;
    color: #333333;
}

.page-blog__section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 20px;
    color: #017439;
}

.page-blog__section-description {
    font-size: 1.1rem;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 50px;
    color: #555555;
}

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

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

.page-blog__blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.page-blog__blog-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

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

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

.page-blog__blog-card-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #017439; /* Brand color for card titles */
    line-height: 1.3;
}

.page-blog__blog-card-excerpt {
    font-size: 0.95rem;
    color: #555555;
    margin-bottom: 15px;
    flex-grow: 1;
}

.page-blog__blog-card-date {
    font-size: 0.85rem;
    color: #888888;
    margin-top: auto; /* Push date to the bottom */
}

.page-blog__view-all-button-container {
    text-align: center;
    margin-top: 40px;
}

/* CTA Bottom Section */
.page-blog__cta-bottom-section {
    padding: 80px 0;
    background-color: #017439; /* Main brand color for dark background */
    color: #ffffff; /* White text for dark background */
    text-align: center;
}

.page-blog__cta-bottom-title {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
    color: #ffffff;
}

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

/* Ensure all images are responsive by default */
.page-blog img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .page-blog__hero-container {
        flex-direction: column;
        text-align: center;
        padding: 30px 0;
    }
    .page-blog__hero-content {
        order: 2;
    }
    .page-blog__hero-image {
        order: 1;
        margin-bottom: 30px;
    }
    .page-blog__main-title {
        font-size: clamp(2rem, 5vw, 2.8rem);
    }
    .page-blog__cta-buttons {
        justify-content: center;
    }
    .page-blog__section-title {
        font-size: 2rem;
    }
    .page-blog__cta-bottom-title {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    /* HERO section mobile styles */
    .page-blog__hero-section {
        padding-top: 10px !important; /* Small top padding, relying on body padding from shared.css */
        padding-bottom: 40px !important;
    }
    .page-blog__hero-container {
        padding: 20px 0 !important;
        gap: 20px !important;
    }
    .page-blog__main-title {
        font-size: clamp(1.8rem, 6vw, 2.5rem) !important;
        margin-bottom: 15px !important;
    }
    .page-blog__hero-description {
        font-size: 1rem !important;
        margin-bottom: 25px !important;
    }
    .page-blog__cta-buttons {
        flex-direction: column !important; /* Stack buttons vertically */
        gap: 10px !important;
        margin-top: 20px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: 0 15px !important; /* Add padding to button container */
        overflow: hidden !important;
    }
    .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: 12px 15px !important; /* Adjust padding for mobile buttons */
        font-size: 0.95rem !important;
    }

    /* Blog List section mobile styles */
    .page-blog__blog-list-section {
        padding: 40px 0 !important;
    }
    .page-blog__section-title {
        font-size: 1.8rem !important;
        margin-bottom: 15px !important;
    }
    .page-blog__section-description {
        font-size: 0.95rem !important;
        margin-bottom: 30px !important;
    }
    .page-blog__blog-grid {
        grid-template-columns: 1fr !important; /* Single column for blog cards */
        gap: 20px !important;
    }
    .page-blog__blog-card-image {
        height: 180px !important; /* Adjust image height for mobile cards */
    }
    .page-blog__blog-card-title {
        font-size: 1.2rem !important;
    }
    .page-blog__blog-card-excerpt {
        font-size: 0.9rem !important;
    }
    .page-blog__view-all-button-container {
        margin-top: 30px !important;
        padding: 0 15px !important; /* Add padding to button container */
    }

    /* CTA Bottom section mobile styles */
    .page-blog__cta-bottom-section {
        padding: 50px 0 !important;
    }
    .page-blog__cta-bottom-title {
        font-size: 1.8rem !important;
        margin-bottom: 15px !important;
    }
    .page-blog__cta-bottom-description {
        font-size: 1rem !important;
        margin-bottom: 30px !important;
    }

    /* General image responsiveness for content area */
    .page-blog img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    .page-blog__container,
    .page-blog__blog-grid,
    .page-blog__blog-card-content {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
    /* Special handling for .page-blog__hero-container to ensure it doesn't get double padded */
    .page-blog__hero-container {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
}