/* ============================================
   BLOGS PAGE STYLESHEET
   ============================================ */

.blog-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 60px 20px;
    text-align: center;
    margin-bottom: 40px;
}

.blog-header h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.blog-header p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin: 0 auto;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin: 40px 0;
    max-width: 100%;
    overflow: hidden;
}

.blog-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    max-width: 100%;
    height: 100%;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.blog-card-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.blog-card-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f0f0f0;
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.blog-card-link:hover .blog-card-image img {
    transform: scale(1.05);
}

.blog-card-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    transition: transform 0.3s ease;
    display: block;
    border: none;
    padding: 0;
    margin: 0;
}

.blog-card-header {
    padding: 20px 20px 0 20px;
}

.blog-card-content {
    padding: 0 20px 20px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-card-category {
    display: inline-block;
    background: rgba(255, 107, 53, 0.1);
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 10px;
    width: fit-content;
}

.blog-card h3 {
    font-size: 1.1rem;
    margin-bottom: 12px;
    line-height: 1.4;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.blog-card-link:hover h3 {
    color: var(--primary-color);
}

.blog-card p {
    font-size: 0.95rem;
    color: var(--light-text);
    margin-bottom: 15px;
    flex: 1;
    line-height: 1.6;
}

.blog-read-more {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    align-self: flex-start;
    padding: 8px 16px;
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    cursor: pointer;
}

.blog-read-more:hover {
    color: white;
    background-color: var(--primary-color);
}

/* Blog Main Container */
.blog-main {
    padding: 0 20px 60px;
}

/* ============================================
   PAGINATION STYLES
   ============================================ */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 60px 0 40px;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: var(--primary-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination span.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination span:not(.active) {
    color: #666;
    cursor: default;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1024px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }

    .blog-header h1 {
        font-size: 2rem;
    }

    .blog-layout {
        grid-template-columns: 280px 1fr;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .blog-header {
        padding: 40px 20px;
    }

    .blog-header h1 {
        font-size: 1.8rem;
    }

    .blog-header p {
        font-size: 1rem;
    }

    .blog-main {
        padding: 0 20px 40px;
    }

    /* Mobile - Stack layout with main content first */
    .blog-layout {
        display: flex;
        flex-direction: column;
        gap: 30px;
    }

    .blog-sidebar-left {
        order: 2;
    }

    .blog-content-main {
        order: 1;
    }

    .sidebar-section {
        padding: 20px;
    }

    .sidebar-section h3 {
        font-size: 1.1rem;
    }

    .random-blog-item {
        padding: 12px;
    }

    .random-blog-item h4 {
        font-size: 0.9rem;
    }

    .random-blog-item p {
        font-size: 0.8rem;
    }
}
