/* style/blog.css */

.page-blog {
    color: #ffffff; /* Light text for dark body background */
    padding-top: var(--header-offset, 120px); /* Space for fixed header on desktop */
}

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

/* Hero Section */
.page-blog__hero-section {
    background-color: var(--color-primary, #0A1931); /* Midnight Blue background */
    padding: 80px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-blog__hero-container {
    position: relative;
    z-index: 1;
}

.page-blog__hero-title {
    font-size: 3.2em;
    font-weight: bold;
    color: #FFD700; /* Gold accent for title */
    margin-bottom: 20px;
    line-height: 1.2;
}

.page-blog__hero-description {
    font-size: 1.2em;
    color: #f0f0f0;
    max-width: 800px;
    margin: 0 auto 40px auto;
    line-height: 1.6;
}

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

.page-blog__button {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    text-decoration: none;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
}

.page-blog__button--primary {
    background-color: #FFD700; /* Gold */
    color: #0A1931; /* Midnight Blue */
    border: 2px solid #FFD700;
}

.page-blog__button--primary:hover {
    background-color: #e6c200;
    transform: translateY(-3px);
}

.page-blog__button--secondary {
    background-color: transparent;
    color: #FFD700; /* Gold */
    border: 2px solid #FFD700;
}

.page-blog__button--secondary:hover {
    background-color: #FFD700;
    color: #0A1931;
    transform: translateY(-3px);
}

/* Section Titles */
.page-blog__section-title {
    font-size: 2.5em;
    font-weight: bold;
    color: #FFD700; /* Gold */
    text-align: center;
    margin: 60px 0 40px 0;
    position: relative;
}

.page-blog__section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background-color: #FFD700;
    margin: 15px auto 0 auto;
    border-radius: 2px;
}

/* Featured Article Section */
.page-blog__featured-article {
    padding: 60px 0;
    background-color: #0A1931; /* Midnight Blue */
}

.page-blog__featured-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    margin-bottom: 40px;
    object-fit: cover;
}

.page-blog__article-content {
    font-size: 1.1em;
    line-height: 1.8;
    color: #e0e0e0;
}

.page-blog__article-content p {
    margin-bottom: 20px;
}

.page-blog__article-subtitle {
    font-size: 1.8em;
    color: #FFD700; /* Gold */
    margin: 40px 0 20px 0;
    font-weight: bold;
}

.page-blog__article-list {
    list-style: disc inside;
    margin-left: 20px;
    margin-bottom: 20px;
}

.page-blog__article-list li {
    margin-bottom: 10px;
}

/* Latest Posts Grid */
.page-blog__latest-posts {
    padding: 60px 0;
    background-color: #0d1e3a; /* Slightly lighter dark blue */
}

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

.page-blog__post-card {
    background-color: #0A1931; /* Midnight Blue */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    min-height: 450px; /* Ensure card height for consistency */
}

.page-blog__post-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
}

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

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

.page-blog__post-title {
    font-size: 1.4em;
    font-weight: bold;
    margin-bottom: 15px;
    line-height: 1.4;
}

.page-blog__post-title a {
    color: #FFD700; /* Gold */
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-blog__post-title a:hover {
    color: #e6c200;
}

.page-blog__post-excerpt {
    font-size: 0.95em;
    color: #c0c0c0;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.page-blog__read-more {
    display: inline-block;
    color: #FFD700; /* Gold */
    text-decoration: none;
    font-weight: bold;
    position: relative;
    padding-bottom: 3px;
    transition: color 0.3s ease;
    margin-top: auto; /* Push to bottom */
}

.page-blog__read-more::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    background-color: #FFD700;
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.3s ease-out;
}

.page-blog__read-more:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* Categories Section */
.page-blog__categories {
    padding: 60px 0;
    background-color: #0A1931; /* Midnight Blue */
}

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

.page-blog__category-item {
    display: inline-block;
    background-color: #1a2b47; /* Slightly lighter blue for tags */
    color: #FFD700; /* Gold */
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.95em;
    transition: background-color 0.3s ease, color 0.3s ease;
    border: 1px solid #FFD700;
}

.page-blog__category-item:hover {
    background-color: #FFD700; /* Gold */
    color: #0A1931; /* Midnight Blue */
}

/* CTA Section */
.page-blog__cta-section {
    background-color: #0d1e3a; /* Slightly lighter dark blue */
    padding: 80px 20px;
    text-align: center;
}

.page-blog__cta-title {
    font-size: 2.8em;
    font-weight: bold;
    color: #FFD700; /* Gold */
    margin-bottom: 20px;
}

.page-blog__cta-description {
    font-size: 1.2em;
    color: #f0f0f0;
    max-width: 800px;
    margin: 0 auto 40px auto;
    line-height: 1.6;
}

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

/* Responsive Design */
@media (max-width: 1024px) {
    .page-blog__hero-title {
        font-size: 2.8em;
    }
    .page-blog__section-title {
        font-size: 2em;
    }
    .page-blog__cta-title {
        font-size: 2.4em;
    }
}

@media (max-width: 768px) {
    .page-blog {
        padding-top: var(--header-offset, 80px); /* Adjust for mobile header height if needed */
    }

    .page-blog__hero-section {
        padding: 60px 15px;
    }

    .page-blog__hero-title {
        font-size: 2.2em;
    }

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

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

    .page-blog__button {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }

    .page-blog__section-title {
        font-size: 1.8em;
        margin: 40px 0 30px 0;
    }

    .page-blog__featured-article,
    .page-blog__latest-posts,
    .page-blog__categories,
    .page-blog__cta-section {
        padding: 40px 0;
    }

    .page-blog__post-grid {
        grid-template-columns: 1fr;
    }

    .page-blog__post-card {
        min-height: auto; /* Allow height to adjust */
    }

    .page-blog__post-image {
        height: 250px; /* Adjust height for mobile */
    }

    .page-blog__article-subtitle {
        font-size: 1.5em;
        margin: 30px 0 15px 0;
    }

    .page-blog__article-content {
        font-size: 1em;
    }

    .page-blog__cta-title {
        font-size: 2em;
    }
    
    /* Ensure all images within .page-blog content area are responsive and don't overflow */
    .page-blog img {
        max-width: 100%;
        height: auto;
    }
}

@media (max-width: 480px) {
    .page-blog__hero-title {
        font-size: 1.8em;
    }
    .page-blog__cta-title {
        font-size: 1.8em;
    }
    .page-blog__button {
        padding: 12px 25px;
        font-size: 1em;
    }
    .page-blog__post-title {
        font-size: 1.2em;
    }
}

/* Global image size check: any img under .page-blog must not be smaller than 200px */
.page-blog img:not(.shared-header__logo):not(.shared-footer__payment-icon):not(.shared-footer__social-icon) {
    min-width: 200px;
    min-height: 200px;
}

/* Override card image height for min-size compliance if needed, but HTML width/height is primary */
.page-blog__post-image {
    width: 100%; /* Ensure it fills card width */
    height: 200px; /* Maintain minimum height for cards */
    object-fit: cover;
}

/* Ensure images do not use filter */
.page-blog img {
    filter: none !important; /* Strictly prohibit any filter effects */
}