/* Header Styles */
.header-image {
    background: url('../img/main/blogs-header.png') center center / cover no-repeat;
    color: white;
    width: 100%;
    height: 320px;
    position: relative;
    margin: 0 auto;
    margin-top: 100px; /* Space between the header and the image */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 0; /* Lower than the header */
}

.header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.header-content {
    position: relative;
    z-index: 1; /* Ensure content is above the overlay */
}

/* Article Card Styles */
.article-card {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 1098px;
    height: auto;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 10px;
    gap: 20px;
    margin: 0 auto;
    margin-bottom: 32px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.article-card a {
    display: flex;
    text-decoration: none;
    color: inherit;
}

.article-meta {
    font-size: 14px;
    font-weight: 500px;
    color: #515658;
    margin-bottom: 10px;
}


.article-content {
    width: 495px;
    height: 258px;
    /* padding: 20px; */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.article-title {
    font-size: 20px;
    color: #444141;
    font-weight: bold;
    margin-bottom: 10px;
}

.article-text {
    font-size: 14px;
    color: #555;
    margin-bottom: 15px;
    flex-grow: 1;
}

.btn-read-more {
    font-weight: bold;
    color: #0C82C6 !important; 
    text-decoration: none;
    align-self: flex-start;
}

.btn-read-more:hover {
    text-decoration: underline;
}

.current-page {
    background-color: #0C82C6;
    color: white;
    border-radius: 5px;
    padding: 0.5rem 1rem;
}

.page-number {
    background-color: #F4F9FD;
    color: black;
    border-radius: 5px;
    padding: 0.5rem 1rem;
}

.page-item {
    margin: 0 2px;
}

.page-link {
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    font-weight: 500;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .article-card {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px;
    }

    .article-content {
        width: auto;
        height: auto;
        padding-left: 0;
        padding-top: 15px;
    }

    .article-title {
        font-size: 20px;
    }

    .article-text {
        font-size: 14px;
    }

    .btn-read-more {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .article-title {
        font-size: 18px;
    }

    .article-text {
        font-size: 12px;
    }

    .page-link {
        padding: 0.4rem 0.8rem;
    }

    .article-card {
        margin-bottom: 20px;
    }
}

/* blog detail CSS */
.detail-header-image {
    background: url('../img/main/blogs-header.png') center center / cover no-repeat;
    color: white;
    width: 100%;
    height: 320px; /* Default height */
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.detail-header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.detail-header-content {
    position: relative;
    z-index: 1;
}

/* Article Detail Styles */
#article-detail {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

/* Main article styles */
.main-article {
    flex: 1; /* Flexible to take available space */
    min-width: 300px; /* Minimum width for responsiveness */
    margin-right: 20px; /* Right margin for spacing */
}

.blog-image {
    width: 100%;
    max-width: 501px;
    height: auto;
    border-radius: 10px;
    object-fit: cover;
    margin-right: 15px;
}

/* Sidebar styles */
.sidebar {
    flex: 0 0 25%;
    background-color: white;
    padding: 20px;
    border-radius: 10px;
}

/* Sidebar image styles */
.sidebar-image-box {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.sidebar-image {
    width: 426px;
    height: 1010px;
    border-radius: 10px;
    object-fit: cover;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .sidebar {
        display: none;
    }

    #article-detail {
        flex-direction: column; /* Stack articles on small screens */
    }

    .main-article {
        margin-right: 0; /* Remove right margin */
        margin-bottom: 20px; /* Space below */
    }
}


@media (max-width: 480px) {
    .detail-header-image {
        height: 150px; /* Adjust height for smallest screens */
    }
}

/* Article Image Styles */
.detail-article-image {
    width: 100%;
    height: auto; /* Allow height to adjust */
    border-radius: 10px;
}

/* Meta and Title Styles */
.detail-article-meta {
    font-size: 14px;
    color: #515658;
    margin-bottom: 10px;
}

.detail-article-title {
    font-size: 20px;
    color: #444141;
    font-weight: bold;
    margin-bottom: 10px;
}

/* Article Content */
.detail-article-content {
    margin-top: 20px; /* Space above content */
    text-align: justify;
}

/* side article css */
.other-articles {
    display: flex;
    flex-wrap: wrap;
    width: 426px;
    max-width: 100%;
    gap: 25px;
}

.other-articles-title {
    color: #056598;
    margin-bottom: 10px;
    font-size: 24px;
    font-weight: 700;
}

.article-preview {
    display: flex;
    align-items: flex-start;
    width: 426px;
    height: 150px;
    gap: 16px;
    padding: 10px;
    background-color: #ffffff;
    border-radius: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Hover effect */
.article-preview:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}


/* Article Image */
.article-image {
    width: 155px;
    height: 112px;
    border-radius: 5px;
    object-fit: cover;
}

/* Article Information */
.article-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.article-info p {
    font-size: 14px;
    color: #555;
    margin-top: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Limits to 2 lines */
    -webkit-box-orient: vertical;
    line-height: 1.2em; /* Adjust line-height as needed */
    max-height: 2.4em; /* Line-height multiplied by line-clamp */
}

.article-info h6 {
    font-size: 16px;
    color: #515658;
    font-weight: 700;
    margin: 0 0 15px 0; /* Adds an 8px gap below the title */
}

.side-article-meta {
    font-size: 12px;
    color: #515658;
    margin: 0; /* Resets margin for consistency */
}

.side-article-meta i {
    color: #0C82C6;
}