/**
 * Blog Archive Page Styles
 * ServiceMates Theme
 */

/* ==========================================
   Blog Hero Section
   ========================================== */

.sm-blog-hero {
    position: relative;
    padding: 120px 0 80px;
    min-height: 350px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.sm-blog-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.sm-blog-hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sm-blog-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.92) 0%, rgba(22, 33, 62, 0.85) 100%);
    z-index: 1;
}

.sm-blog-hero .container {
    position: relative;
    z-index: 2;
}

.sm-blog-hero-content {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.sm-hero-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color, #f93) 0%, var(--secondary-color, #FF5326) 100%);
    color: #fff;
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.sm-blog-hero-title {
    font-size: 48px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 16px 0;
    line-height: 1.2;
}

.sm-blog-hero-subtitle {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
    line-height: 1.6;
}

/* ==========================================
   Blog Archive Content
   ========================================== */

.sm-blog-archive {
    padding: 80px 0;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

/* Featured Post */
.sm-featured-post {
    margin-bottom: 60px;
}

.sm-featured-link {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    text-decoration: none;
    color: inherit;
    transition: all 0.4s ease;
}

.sm-featured-link:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.12);
}

.sm-featured-image {
    position: relative;
    min-height: 400px;
    overflow: hidden;
}

.sm-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.sm-featured-link:hover .sm-featured-image img {
    transform: scale(1.05);
}

.sm-featured-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0,0,0,0.3) 0%, transparent 100%);
}

.sm-featured-content {
    padding: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.sm-featured-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.sm-featured-badge {
    background: linear-gradient(135deg, var(--primary-color, #f93) 0%, var(--secondary-color, #FF5326) 100%);
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sm-featured-date {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #64748b;
}

.sm-featured-date svg {
    width: 16px;
    height: 16px;
}

.sm-featured-title {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 16px 0;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.sm-featured-link:hover .sm-featured-title {
    color: var(--primary-color, #f93);
}

.sm-featured-excerpt {
    font-size: 16px;
    color: #64748b;
    line-height: 1.7;
    margin: 0 0 24px 0;
}

.sm-featured-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 600;
    color: var(--primary-color, #f93);
}

.sm-featured-cta svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.sm-featured-link:hover .sm-featured-cta svg {
    transform: translateX(5px);
}

/* Posts Section */
.sm-posts-section {
    margin-top: 40px;
}

.sm-posts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
}

.sm-posts-title {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0;
}

.sm-posts-count {
    font-size: 14px;
    color: #64748b;
    margin: 0;
    background: #f1f5f9;
    padding: 8px 16px;
    border-radius: 20px;
}

/* Posts Grid */
.sm-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* Post Card */
.sm-post-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInUp 0.6s ease-out forwards;
    animation-delay: calc(var(--card-index, 0) * 0.08s);
    opacity: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sm-post-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.sm-post-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.sm-post-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.sm-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.sm-post-card:hover .sm-post-image img {
    transform: scale(1.08);
}

.sm-post-image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sm-post-card:hover .sm-post-image-overlay {
    opacity: 1;
}

/* Placeholder for no image */
.sm-post-placeholder {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sm-post-placeholder-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.sm-post-placeholder-icon svg {
    width: 28px;
    height: 28px;
    color: #94a3b8;
}

.sm-post-card:hover .sm-post-placeholder-icon {
    transform: scale(1.1);
}

.sm-post-card.no-image {
    border: 1px solid #e2e8f0;
}

.sm-post-card.no-image .sm-post-image {
    height: 140px;
}

/* Post Content */
.sm-post-content {
    padding: 24px;
}

.sm-post-meta {
    margin-bottom: 12px;
}

.sm-post-date {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}

.sm-post-date svg {
    width: 14px;
    height: 14px;
}

.sm-post-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0 0 12px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.sm-post-card:hover .sm-post-title {
    color: var(--primary-color, #f93);
}

.sm-post-excerpt {
    font-size: 14px;
    color: #64748b;
    line-height: 1.6;
    margin: 0 0 16px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sm-post-read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color, #f93);
}

.sm-post-read-more svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.sm-post-card:hover .sm-post-read-more svg {
    transform: translateX(4px);
}

/* ==========================================
   Pagination
   ========================================== */

.sm-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 60px;
    flex-wrap: wrap;
}

.sm-pagination a,
.sm-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 16px;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.sm-pagination a {
    background: #fff;
    color: #1a1a2e;
    border: 1px solid #e2e8f0;
}

.sm-pagination a:hover {
    background: var(--primary-color, #f93);
    color: #fff;
    border-color: var(--primary-color, #f93);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 83, 38, 0.25);
}

.sm-pagination span.current {
    background: linear-gradient(135deg, var(--primary-color, #f93) 0%, var(--secondary-color, #FF5326) 100%);
    color: #fff;
    border: none;
}

.sm-pagination .prev,
.sm-pagination .next {
    gap: 8px;
}

.sm-pagination .prev svg,
.sm-pagination .next svg {
    width: 16px;
    height: 16px;
}

.sm-pagination span.dots {
    background: transparent;
    border: none;
    color: #64748b;
}

/* ==========================================
   No Posts State
   ========================================== */

.sm-no-posts {
    text-align: center;
    padding: 80px 20px;
}

.sm-no-posts-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
}

.sm-no-posts-icon svg {
    width: 45px;
    height: 45px;
    color: #94a3b8;
}

.sm-no-posts h2 {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 12px 0;
}

.sm-no-posts p {
    font-size: 16px;
    color: #64748b;
    margin: 0 0 30px 0;
}

.sm-back-home {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--primary-color, #f93) 0%, var(--secondary-color, #FF5326) 100%);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.sm-back-home svg {
    width: 18px;
    height: 18px;
}

.sm-back-home:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(255, 83, 38, 0.35);
    color: #fff;
}

/* ==========================================
   Blog CTA Section
   ========================================== */

.sm-blog-cta {
    padding: 80px 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.sm-blog-cta-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.sm-blog-cta-content h2 {
    font-size: 36px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 16px 0;
}

.sm-blog-cta-content p {
    font-size: 17px;
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 30px 0;
}

.sm-blog-cta-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.sm-cta-phone {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--primary-color, #f93) 0%, var(--secondary-color, #FF5326) 100%);
    color: #fff;
    font-size: 17px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.sm-cta-phone svg {
    width: 20px;
    height: 20px;
}

.sm-cta-phone:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(255, 83, 38, 0.4);
    color: #fff;
}

.sm-cta-contact {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    background: transparent;
    color: #fff;
    font-size: 17px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 50px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.sm-cta-contact svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.sm-cta-contact:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
}

.sm-cta-contact:hover svg {
    transform: translateX(4px);
}

/* ==========================================
   Responsive Styles
   ========================================== */

@media (max-width: 991px) {
    .sm-blog-hero {
        padding: 100px 0 60px;
        min-height: 300px;
    }
    
    .sm-blog-hero-title {
        font-size: 38px;
    }
    
    .sm-featured-link {
        grid-template-columns: 1fr;
    }
    
    .sm-featured-image {
        min-height: 300px;
    }
    
    .sm-featured-content {
        padding: 35px;
    }
    
    .sm-featured-title {
        font-size: 26px;
    }
    
    .sm-posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
    
    .sm-posts-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

@media (max-width: 767px) {
    .sm-blog-hero {
        padding: 80px 0 50px;
        min-height: 280px;
    }
    
    .sm-blog-hero-title {
        font-size: 30px;
    }
    
    .sm-blog-hero-subtitle {
        font-size: 16px;
    }
    
    .sm-blog-archive {
        padding: 50px 0;
    }
    
    .sm-featured-image {
        min-height: 220px;
    }
    
    .sm-featured-content {
        padding: 25px;
    }
    
    .sm-featured-title {
        font-size: 22px;
    }
    
    .sm-featured-excerpt {
        font-size: 15px;
    }
    
    .sm-posts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .sm-posts-title {
        font-size: 24px;
    }
    
    .sm-post-image {
        height: 180px;
    }
    
    .sm-post-title {
        font-size: 17px;
    }
    
    .sm-pagination {
        gap: 6px;
        margin-top: 40px;
    }
    
    .sm-pagination a,
    .sm-pagination span {
        min-width: 40px;
        height: 40px;
        padding: 0 12px;
        font-size: 14px;
    }
    
    .sm-blog-cta {
        padding: 60px 0;
    }
    
    .sm-blog-cta-content h2 {
        font-size: 28px;
    }
    
    .sm-blog-cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .sm-cta-phone,
    .sm-cta-contact {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
}

