/* style/blog.css */
.page-blog {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-main);
    background-color: var(--deep-navy); /* From shared.css, dark background */
}

.page-blog__hero-section {
    padding-top: 10px; /* Rely on body padding for header offset */
    padding-bottom: 40px;
    background-color: var(--deep-navy);
    color: var(--text-main);
}

.page-blog__hero-wrapper {
    max-width: 1170px;
    margin: 0 auto;
    padding: 40px 16px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 30px;
}

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

.page-blog__main-title {
    font-size: clamp(28px, 4vw, 48px); /* Responsive font size */
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-main);
    margin-bottom: 15px;
}

.page-blog__description {
    font-size: 18px;
    color: var(--text-secondary);
}

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

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

.page-blog__articles-section {
    max-width: 1170px;
    margin: 0 auto;
    padding: 40px 16px;
    background-color: var(--deep-navy);
    color: var(--text-main);
}

.page-blog__articles-header,
.page-blog__articles-footer {
    text-align: center;
    margin-bottom: 40px;
    padding: 0 15px;
}

.page-blog__section-title {
    font-size: clamp(24px, 3.5vw, 38px);
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 20px;
}

.page-blog__section-intro,
.page-blog__section-outro {
    font-size: 17px;
    color: var(--text-secondary);
    line-height: 1.8;
    max-width: 900px;
    margin: 0 auto;
}

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

.page-blog__article-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

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

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

.page-blog__article-image-wrapper {
    width: 100%;
    height: 225px; /* Fixed height for image aspect ratio */
    overflow: hidden;
}

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

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

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

.page-blog__article-date {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    display: block;
}

.page-blog__article-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 15px;
    line-height: 1.3;
    flex-grow: 1;
    transition: color 0.3s ease;
}

.page-blog__article-link:hover .page-blog__article-title {
    color: var(--gold);
}

.page-blog__article-excerpt {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.page-blog__pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
}

.page-blog__pagination-link {
    display: block;
    padding: 10px 18px;
    border-radius: 8px;
    background-color: var(--card-bg);
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease, color 0.3s ease;
    border: 1px solid var(--border);
}

.page-blog__pagination-link:hover:not(.page-blog__pagination-link--disabled):not(.page-blog__pagination-link--active) {
    background-color: var(--main-color);
    color: #ffffff;
}

.page-blog__pagination-link--active {
    background: linear-gradient(180deg, #2B73F6 0%, #1144A6 100%);
    color: #ffffff;
    cursor: default;
    border-color: transparent;
}

.page-blog__pagination-link--disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .page-blog__hero-wrapper {
        padding: 30px 16px;
    }

    .page-blog__main-title {
        font-size: clamp(26px, 3.8vw, 40px);
    }

    .page-blog__description {
        font-size: 17px;
    }

    .page-blog__section-title {
        font-size: clamp(22px, 3.2vw, 32px);
    }

    .page-blog__section-intro,
    .page-blog__section-outro {
        font-size: 16px;
    }

    .page-blog__articles-grid {
        gap: 25px;
    }

    .page-blog__article-title {
        font-size: 20px;
    }

    .page-blog__article-excerpt {
        font-size: 15px;
    }
}

@media (max-width: 768px) {
    .page-blog {
        font-size: 16px;
        line-height: 1.6;
    }

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

    .page-blog__hero-wrapper {
        flex-direction: column;
        padding: 20px 15px;
        gap: 20px;
    }

    .page-blog__hero-content,
    .page-blog__hero-image-container {
        flex: 1 1 100%;
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
    }

    .page-blog__main-title {
        font-size: clamp(24px, 7vw, 36px);
        text-align: center;
    }

    .page-blog__description {
        font-size: 16px;
        text-align: center;
    }

    .page-blog__hero-banner-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    .page-blog__articles-section {
        padding: 30px 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-blog__articles-header,
    .page-blog__articles-footer {
        margin-bottom: 30px;
        padding: 0;
    }

    .page-blog__section-title {
        font-size: clamp(20px, 6vw, 30px);
    }

    .page-blog__section-intro,
    .page-blog__section-outro {
        font-size: 15px;
        padding: 0 5px;
    }

    .page-blog__articles-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 40px;
    }

    .page-blog__article-card {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-blog__article-image-wrapper {
        height: 180px;
    }

    .page-blog__article-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

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

    .page-blog__article-title {
        font-size: 18px;
    }

    .page-blog__article-excerpt {
        font-size: 14px;
    }

    .page-blog__pagination {
        flex-wrap: wrap;
        gap: 8px;
        margin-top: 20px;
    }

    .page-blog__pagination-link {
        padding: 8px 14px;
        font-size: 14px;
    }

    /* Ensure any buttons within content are responsive */
    .page-blog__cta-button, /* Example for general buttons if any */
    .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-wrap: wrap !important;
      gap: 10px;
    }

    .page-blog__cta-buttons {
        display: flex;
        flex-direction: column;
    }
}