/* === STYLES FOR BLOG PAGE === */

/* --- Page Banner --- */
.banner-blog { 
    background-image: url('../img/wallpaper/BlogPage.png'); 
}

.page-banner {
    position: relative;
    height: 45vh;
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.page-banner::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.3));
    z-index: 1;
}

.page-banner-content {
    position: relative;
    z-index: 2;
    animation: fadeInUp 1s ease;
}

.page-banner-content h1 {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(2.5rem, 6vw, 3.5rem);
    font-weight: 700;
    margin: 0;
    text-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.page-banner-content p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 15px auto 0;
    opacity: 0.9;
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

/* --- Main Content Layout --- */
.page-main-content {
    padding: 80px 20px;
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 60px;
}

.content-area { width: 100%; }

/* --- Blog Card --- */
.blog-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 50px;
}

.blog-card {
    background-color: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 18px 35px rgba(0,0,0,0.1);
}

.card-image-wrapper {
    overflow: hidden;
    height: 300px;
}

.card-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-card:hover .card-image-wrapper img {
    transform: scale(1.05);
}

.card-content {
    padding: 30px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-content .tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.card-content .tag {
    background-color: #eef5ff;
    color: #378ee1;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}
.card-content .tag:hover {
    background-color: #378ee1;
    color: #fff;
}

.card-content h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0 0 10px;
}

.card-content .meta {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 20px;
}

.card-content .summary {
    line-height: 1.7;
    flex-grow: 1;
    margin-bottom: 25px;
}

.read-more-btn {
    display: inline-block;
    font-family: 'Poppins', sans-serif;
    text-decoration: none;
    color: #378ee1;
    font-weight: 600;
    letter-spacing: 0.5px;
    align-self: flex-start;
    transition: color 0.3s;
}

.read-more-btn:hover { color: #2a6cb4; }

/* --- Sidebar & Widgets --- */
.sidebar { position: sticky; top: 120px; height: fit-content; }

.widget {
    background-color: #fff;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 35px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.06);
    border-top: 4px solid #378ee1;
}

.widget-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 25px 0;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.search-bar form { display: flex; }
.search-bar input {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-right: none;
    border-radius: 8px 0 0 8px;
    font-size: 1rem;
}
.search-bar input:focus { outline: none; border-color: #378ee1; }
.search-bar button {
    padding: 0 20px;
    border: none;
    background: #378ee1;
    color: #fff;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
}

.recommendations-list ul { list-style: none; padding: 0; margin: 0; }
.recommendations-list li a {
    display: flex;
    align-items: center;
    padding: 15px 5px;
    border-bottom: 1px solid #f2f2f2;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
}
.recommendations-list li:last-child a { border-bottom: none; }
.recommendations-list li a:hover { background-color: #f8f9fa; padding-left: 15px; }

.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tags-cloud .tag {
    display: inline-block;
    text-decoration: none;
    background: #f1f3f5;
    border: 1px solid #e0e0e0;
    color: #555;
    padding: 8px 18px;
    border-radius: 30px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.tags-cloud .tag:hover {
    background: #378ee1;
    color: #fff;
    border-color: #378ee1;
}

/* --- Pagination --- */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 60px;
    padding: 20px 0;
}

.pagination a {
    text-decoration: none;
    color: #555;
    background-color: #fff;
    padding: 12px 18px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.pagination a:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
    color: #378ee1;
    border-color: #378ee1;
}

.pagination a.active, 
.pagination a.active:hover {
    background: linear-gradient(45deg, #378ee1, #5a67d8);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 6px 12px rgba(90, 103, 216, 0.4);
    transform: translateY(-2px);
    cursor: default;
}

.pagination a.disabled,
.pagination a.disabled:hover {
    color: #aaa;
    pointer-events: none;
    background-color: #f8f9fa;
    border-color: #eee;
    box-shadow: none;
    transform: none;
}


/* --- Responsive --- */
@media (max-width: 992px) {
    .page-main-content { grid-template-columns: 1fr; }
    .sidebar { position: static; margin-top: 60px; }
}

@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
