/* =========================================
   BLOG SPECIFIC STYLES
   ========================================= */

/* --- Full Width Reset --- */
html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
}

/* --- Layout & Sticky Footer Fix --- */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
}

#footer-placeholder {
    margin-top: auto;
    width: 100%;
}

/* --- Page Header (Hero) --- */
.page-header {
    background: linear-gradient(#39393a34, rgba(55, 55, 56, 0.201)), url('https://images.unsplash.com/photo-1522071820081-009f0129c71c?q=80&w=2070&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    margin-bottom: 0;
    padding: 0 20px;
    width: 100%;
    position: relative;
    z-index: 1;
}

.page-header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.page-header p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
    color: #e0e7ff;
}

/* --- Main Layout Grid --- */
.blog-layout {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    padding: 60px 20px;
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 40px;
    align-items: start;
    flex: 1;
}

/* --- Featured Post Card --- */
.featured-post {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    margin-bottom: 50px;
    display: flex;
    border: 1px solid #e5e7eb;
    transition: var(--transition);
}

.featured-post:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    border-color: var(--primary-color);
}

.fp-img {
    flex: 1.2;
    min-height: 350px;
    position: relative;
}

.fp-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fp-content {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.fp-badge {
    background: #e11d48;
    color: #fff;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    width: fit-content;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.fp-title {
    font-size: 2rem;
    color: var(--text-dark);
    margin-bottom: 15px;
    line-height: 1.3;
    font-weight: 700;
}

.fp-title a {
    color: var(--text-dark);
    text-decoration: none;
    transition: 0.3s;
}

.fp-title a:hover {
    color: var(--primary-color);
}

.fp-excerpt {
    color: var(--text-light);
    margin-bottom: 25px;
    line-height: 1.7;
}

/* --- Standard Blog Grid --- */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.blog-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: 0.3s;
    display: flex;
    flex-direction: column;
    border: 1px solid #e5e7eb;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.blog-img {
    height: 220px;
    overflow: hidden;
    position: relative;
}

.blog-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.blog-card:hover .blog-img img {
    transform: scale(1.1);
}

.category-tag {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--primary-color);
    color: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.blog-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.meta-info {
    display: flex;
    gap: 15px;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 12px;
}

.meta-info i {
    color: var(--primary-color);
    margin-right: 5px;
}

.blog-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 15px;
    line-height: 1.4;
}

.blog-title a {
    color: var(--text-dark);
    text-decoration: none;
    transition: 0.3s;
}

.blog-title a:hover {
    color: var(--primary-color);
}

.blog-excerpt {
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 20px;
    flex: 1;
}

.read-more {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: auto;
    text-decoration: none;
    transition: 0.3s;
}

.read-more:hover {
    color: var(--secondary-color);
}

.read-more:hover i {
    transform: translateX(5px);
}

/* --- Promo Banner --- */
.promo-banner {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border-radius: 12px;
    padding: 40px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 50px 0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.2);
}

.promo-banner::after {
    content: '';
    position: absolute;
    right: -50px;
    top: -50px;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.promo-text h3 {
    font-size: 1.8rem;
    margin-bottom: 5px;
    color: var(--white);
}

.promo-btn {
    background: var(--white);
    color: var(--primary-color);
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    z-index: 1;
    transition: 0.3s;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.promo-btn:hover {
    background: var(--light-bg);
    transform: translateY(-2px);
}

/* --- Sidebar Widgets --- */
.sidebar-widget {
    background: var(--white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    margin-bottom: 40px;
    border: 1px solid #e5e7eb;
}

.widget-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
    position: relative;
}

.widget-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--primary-color);
}

/* Sidebar: Search */
.search-form {
    position: relative;
}

.search-form input {
    width: 100%;
    padding: 14px 45px 14px 20px;
    border: 1px solid #e5e7eb;
    border-radius: 50px;
    outline: none;
    background: #f9f9f9;
    transition: 0.3s;
}

.search-form input:focus {
    border-color: var(--primary-color);
    background: var(--white);
}

.search-form button {
    position: absolute;
    right: 5px;
    top: 5px;
    width: 38px;
    height: 38px;
    background: var(--primary-color);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    transition: 0.3s;
}

.search-form button:hover {
    background: var(--secondary-color);
}

/* Sidebar: Categories */
.cat-list li {
    border-bottom: 1px solid #f9f9f9;
}

.cat-list li:last-child {
    border: none;
}

.cat-list a {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    color: var(--text-light);
    font-weight: 500;
    text-decoration: none;
    transition: 0.3s;
}

.cat-list a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.cat-list span {
    background: #f0f0f0;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 0.8rem;
    color: #777;
}

/* Sidebar: Recent Posts */
.recent-post {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: center;
}

.rp-img {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.rp-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rp-content h4 {
    font-size: 0.95rem;
    margin: 0 0 5px;
    line-height: 1.4;
}

.rp-content h4 a {
    color: var(--text-dark);
    text-decoration: none;
    transition: 0.3s;
}

.rp-content h4 a:hover {
    color: var(--primary-color);
}

.rp-date {
    font-size: 0.8rem;
    color: #999;
}

/* --- Pagination --- */
.pagination {
    margin-top: 60px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.page-num {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
    color: var(--text-light);
    font-weight: 600;
}

.page-num.active,
.page-num:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* --- Responsive Design --- */
@media (max-width: 900px) {
    .blog-layout {
        grid-template-columns: 1fr;
    }

    .featured-post {
        flex-direction: column;
    }

    .fp-img {
        min-height: 250px;
    }

    .promo-banner {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .promo-banner::after {
        display: none;
    }

    .page-header h1 {
        font-size: 2.2rem;
    }
}