/* ============================================
   PREMIUM ARCHIVE STYLES - SHARED
   Modern Magazine-Style Layout
   ============================================ */

/* ============================================
   HERO SECTIONS (Shared)
   ============================================ */
.archive-hero,
.service-archive-hero,
.blog-hero-magazine,
.service-hero-premium {
    position: relative;
    padding: calc(var(--header-height) + 2rem) 0 3rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow: hidden;
}

/* Animated Mesh Background */
.archive-hero::before,
.service-hero-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    animation: meshMove 20s ease-in-out infinite;
}

@keyframes meshMove {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(20px, 20px) scale(1.05);
    }
}

.archive-hero-content,
.service-hero-content {
    position: relative;
    z-index: 2;
}

/* Breadcrumbs */
.archive-hero .breadcrumbs,
.service-archive-hero .breadcrumbs {
    margin-bottom: 1.5rem;
}

.archive-hero .breadcrumbs a,
.service-archive-hero .breadcrumbs a {
    color: rgba(255, 255, 255, 0.9);
}

/* Archive Title */
.archive-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 900;
    color: white;
    margin: 0 0 1rem;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.archive-prefix {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
}

/* Archive Description */
.archive-description {
    font-size: 1.25rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.9);
    max-width: 700px;
    margin: 0 0 2rem;
}

/* Archive Meta */
.archive-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.archive-count {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    color: white;
    font-weight: 600;
    font-size: 0.9375rem;
}

.archive-count svg {
    flex-shrink: 0;
}

/* ============================================
   CONTENT SECTIONS
   ============================================ */
.archive-content,
.service-archive-content {
    padding: 4rem 0;
    background: #f8fafc;
}

/* ============================================
   GRID SYSTEMS
   ============================================ */
.services-grid,
.archive-posts-grid {
    display: grid;
    gap: 2rem;
}

/* Services Grid - 3 Columns */
.services-grid {
    grid-template-columns: repeat(3, 1fr);
}

/* Blog Posts Grid - 4 Columns */
.archive-posts-grid {
    grid-template-columns: repeat(4, 1fr);
}

/* ============================================
   CARD BASE STYLES
   ============================================ */
.service-card,
.archive-post-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.service-card:hover,
.archive-post-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.12);
    border-color: #3b82f6;
}

/* Thumbnails */
.service-thumbnail,
.post-thumbnail {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/10;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
}

.service-thumbnail img,
.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover .service-thumbnail img,
.archive-post-card:hover .post-thumbnail img {
    transform: scale(1.1);
}

/* Thumbnail Overlay */
.thumbnail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.9), rgba(220, 38, 38, 0.9));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s;
    color: white;
}

.service-card:hover .thumbnail-overlay,
.archive-post-card:hover .thumbnail-overlay {
    opacity: 1;
}

/* Category Badge */
.post-category-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.375rem 0.875rem;
    background: rgba(239, 68, 68, 0.95);
    backdrop-filter: blur(8px);
    color: white;
    font-size: 0.6875rem;
    font-weight: 800;
    text-transform: uppercase;
    border-radius: 6px;
    letter-spacing: 0.5px;
    text-decoration: none;
    z-index: 2;
    transition: all 0.3s;
}

.post-category-badge:hover {
    background: #ef4444;
    transform: translateY(-2px);
}

/* Card Content */
.service-content,
.post-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Card Titles */
.service-title,
.post-title {
    margin: 0 0 1rem;
}

.service-title a,
.post-title a {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    text-decoration: none;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s;
}

.service-title a:hover,
.post-title a:hover {
    color: #ef4444;
}

/* Excerpts */
.service-excerpt,
.post-excerpt {
    font-size: 0.9375rem;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Card Footer */
.service-footer,
.post-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #f1f5f9;
    margin-top: auto;
}

/* Service Link / Read More */
.service-link,
.read-more-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #ef4444;
    font-weight: 700;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.3s;
}

.service-link:hover,
.read-more-link:hover {
    gap: 0.75rem;
    color: #dc2626;
}

.service-link svg,
.read-more-link svg {
    transition: transform 0.3s;
}

.service-link:hover svg,
.read-more-link:hover svg {
    transform: translateX(4px);
}

/* Post Meta */
.post-meta-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8125rem;
    color: #94a3b8;
}

.post-meta-info svg {
    width: 14px;
    height: 14px;
}

.post-date,
.post-author {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 4rem;
}

.pagination .page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 1rem;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #64748b;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
}

.pagination .page-numbers:hover {
    background: #f8fafc;
    border-color: #3b82f6;
    color: #3b82f6;
}

.pagination .page-numbers.current {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border-color: #ef4444;
    color: white;
}

.pagination .page-numbers.dots {
    border: none;
    background: transparent;
}

/* ============================================
   NO POSTS FOUND
   ============================================ */
.no-posts-found {
    text-align: center;
    padding: 4rem 2rem;
}

.no-posts-found svg {
    width: 80px;
    height: 80px;
    color: #cbd5e1;
    margin-bottom: 1.5rem;
}

.no-posts-found h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 0.75rem;
}

.no-posts-found p {
    font-size: 1rem;
    color: #64748b;
    margin: 0 0 2rem;
}

.no-posts-found .btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s;
}

.no-posts-found .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.3);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1200px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .archive-posts-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1024px) {
    .archive-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {

    .archive-hero,
    .service-archive-hero,
    .service-hero-premium {
        padding: calc(var(--header-height-mobile) + 2rem) 0 2rem;
    }

    .archive-title {
        font-size: 2rem;
    }

    .archive-description {
        font-size: 1rem;
    }

    .services-grid,
    .archive-posts-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .archive-content,
    .service-archive-content {
        padding: 3rem 0;
    }
}

@media (max-width: 640px) {

    .service-card,
    .archive-post-card {
        border-radius: 12px;
    }

    .service-content,
    .post-content {
        padding: 1.25rem;
    }

    .pagination {
        gap: 0.25rem;
    }

    .pagination .page-numbers {
        min-width: 40px;
        height: 40px;
        padding: 0 0.75rem;
        font-size: 0.875rem;
    }
}