/* Archive Common Styles */

.archive-hero {
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%);
    padding: 60px 20px;
    text-align: center;
}

.archive-hero .hero {
    max-width: 800px;
    margin: 0 auto;
}

.archive-hero .hero h1 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 20px;
    line-height: 1.2;
}

.archive-hero .hero h1 b,
.archive-hero .hero h1 strong {
    color: #00a9ff;
    font-weight: 700;
}

.archive-hero .hero p {
    font-size: 1.1rem;
    color: #4a5568;
    line-height: 1.7;
    margin-bottom: 0;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.archive-hero .follow-us {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
}

.archive-hero .follow-us span {
    font-size: 0.9rem;
    color: #718096;
    margin: 0;
}

.archive-hero .follow-us a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #fff;
    border-radius: 50%;
    color: #1a1a2e;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    text-decoration: none;
}

.archive-hero .follow-us a:hover {
    background: linear-gradient(268deg, #ff5c6e 0%, #00a9ff 100%);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 169, 255, 0.3);
}

/* Hero CTA Buttons */
.archive-hero .btns {
    display: flex;
    justify-content: center;
    margin-top: 32px;
}

.archive-hero .btns .btn-wrap {
    text-align: center;
}

.archive-hero .btns .btn {
    min-width: 280px;
    margin-bottom: 12px;
}

.archive-hero .btns .btn-wrap p {
    font-size: 0.9rem;
    color: #718096;
    font-style: italic;
    margin: 0;
}

@media (min-width: 769px) {
    .archive-hero {
        padding: 80px 20px;
    }
    
    .archive-hero .hero h1 {
        font-size: 3rem;
    }
    
    .archive-hero .hero p {
        font-size: 1.15rem;
    }
}

.archive-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px 50px;
}

.archive-page {
    background-color: #fafafa;
}

/* Categories Section */
.categories-section {
    margin-bottom: 50px;
    padding: 0;
}

.categories-section h2 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 25px;
}

.categories-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.category-block {
    flex: 0 0 auto;
    width: auto;
    min-width: 140px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
    margin-bottom: 0;
    transition: all 0.3s ease;
}

.category-block:hover {
    border-color: #00a9ff;
    box-shadow: 0 4px 12px rgba(0, 169, 255, 0.15);
    transform: translateY(-2px);
}

.category-block a {
    color: #4a5568;
    font-weight: 500;
    text-decoration: none;
    display: block;
}

.category-block:hover a {
    color: #00a9ff;
}

.category-content {
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.category-content span {
    font-size: 0.95rem;
}

.category-content i {
    font-size: 0.85rem;
    color: #00a9ff;
    transition: transform 0.3s ease;
}

.category-block:hover .category-content i {
    transform: translateX(3px);
}

/* Active category */
.category-block.active-category {
    background: linear-gradient(268deg, #ff5c6e 0%, #00a9ff 100%);
    border-color: #fafafa;
}

.category-block.active-category a {
    color: #fff;
}

.category-block.active-category .category-content i {
    color: #fff;
}

/* Article List Section */
.article-list-section {
    padding: 0;
}

.article-list-section h2 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 30px;
}

/* Articles Grid */
.articles-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 640px) {
    .articles-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .articles-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Article Card */
.article-block {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e8ecf1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    transition: box-shadow 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.article-block:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
    border-color: #d0d8e4;
}

.article-block .article-image {
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.article-block .article-image a {
    display: block;
    width: 100%;
    height: 100%;
}

.article-block .article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}

.article-block .article-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.article-block .article-content h3 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 12px;
    flex-grow: 1;
}

@media (min-width: 1024px) {
    .article-block .article-content h3 {
        font-size: 1.1rem;
    }
}

.article-block .article-content h3 a {
    color: #1a1a2e;
    text-decoration: none;
    transition: color 0.2s ease;
}

.article-block .article-content h3 a:hover {
    color: #00a9ff;
}

.article-block .article-content > p {
    font-size: 0.875rem;
    color: #718096;
    margin: 0 0 16px;
    line-height: 1.5;
}

/* Article Category Badge */
.article-category {
    margin-top: auto;
    flex-wrap: wrap;
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
}

.article-category span {
    display: inline-block;
    background-color: #e7f5ff;
    color: #00a9ff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.article-category span:hover {
    background-color: #00a9ff;
    color: #fff;
}

/* No results */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #718096;
    font-size: 1.1rem;
}

/* Filter Sidebar */
.archive-list-section {
    padding: 60px 0;
    background-color: #fafafa;
}

.archive-list-section .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.archive-list-section > .container > .row {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

@media (min-width: 769px) {
    .archive-list-section > .container > .row {
        flex-direction: row;
        flex-wrap: nowrap;
    }
}

/* Results Wrapper */
.results-wrapper {
    flex: 1;
    position: relative;
    min-height: 300px;
}

@media (min-width: 769px) {
    .results-wrapper {
        flex: 1;
    }
}

/* Filter Box */
.filter {
    width: 100%;
}

@media (min-width: 769px) {
    .filter {
        flex: 0 0 250px;
        max-width: 250px;
        padding-bottom: 122px;
    }
}

.filter-box {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e8ecf1;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

@media (min-width: 769px) {
    .filter-box {
        position: sticky;
        top: 100px;
    }
}

.filter-label {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    color: #1a1a2e;
    margin-bottom: 16px;
    display: block;
}

.filter-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.filter-list li {
    margin-bottom: 8px;
}

.filter-list li:last-child {
    margin-bottom: 0;
}

.filter-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    font-size: 0.9rem;
    color: #4a5568;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.filter-list a:hover {
    background-color: #f0f9ff;
    color: #00a9ff;
}

.filter-list a.active {
    background: linear-gradient(268deg, #ff5c6e 0%, #00a9ff 100%);
    color: #fff;
}

.filter-list a.active .count {
    color: rgba(255, 255, 255, 0.8);
}

.filter-list .count {
    font-size: 0.8rem;
    color: #a0aec0;
    margin-left: 8px;
}

/* Preloader */
.archive-preloader {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(250, 250, 250, 0.8);
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
}

.archive-preloader.loading {
    opacity: 1;
    visibility: visible;
}

.preloader-spinner {
    width: 50px;
    height: 50px;
}

.preloader-spinner svg {
    width: 100%;
    height: 100%;
    animation: preloader-rotate 1.4s linear infinite;
}

.preloader-spinner circle {
    stroke: #00a9ff;
    stroke-linecap: round;
    stroke-dasharray: 80, 200;
    stroke-dashoffset: 0;
    animation: preloader-dash 1.4s ease-in-out infinite;
}

@keyframes preloader-rotate {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes preloader-dash {
    0% {
        stroke-dasharray: 1, 200;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 89, 200;
        stroke-dashoffset: -35px;
    }
    100% {
        stroke-dasharray: 89, 200;
        stroke-dashoffset: -124px;
    }
}

/* Results container transition */
.archive-results {
    transition: opacity 0.2s ease;
}

.archive-results.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Load More Button */
.load-more-container {
    display: flex;
    justify-content: center;
    margin-top: 50px;
}

.load-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 32px;
    background: linear-gradient(268deg, #ff5c6e 0%, #00a9ff 100%);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    min-width: 180px;
}

.load-more-btn:hover {
    box-shadow: 0 8px 20px rgba(0, 169, 255, 0.3);
    transform: translateY(-2px);
}

.load-more-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.load-more-btn .btn-loader {
    display: none;
    width: 20px;
    height: 20px;
}

.load-more-btn.loading .btn-text {
    display: none;
}

.load-more-btn.loading .btn-loader {
    display: block;
}

.load-more-btn .btn-loader svg {
    width: 100%;
    height: 100%;
    animation: preloader-rotate 1.4s linear infinite;
}

.load-more-btn .btn-loader circle {
    stroke: #fff;
    stroke-linecap: round;
    stroke-dasharray: 80, 200;
    stroke-dashoffset: 0;
    animation: preloader-dash 1.4s ease-in-out infinite;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 50px;
    flex-wrap: wrap;
}

.pagination a,
.pagination .page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    color: #4a5568;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    margin: 0;
}

.pagination a:hover,
.pagination .page-numbers:hover {
    border-color: #00a9ff;
    color: #00a9ff;
    background: #f0f9ff;
}

.pagination .current {
    background: linear-gradient(268deg, #ff5c6e 0%, #00a9ff 100%);
    color: #fff;
    border-color: transparent;
}

.pagination .dots {
    border: none;
    background: transparent;
    min-width: auto;
    padding: 0 8px;
}

/* Card Variants */
.article-block .excerpt {
    flex-grow: 1;
    margin-bottom: 16px;
}

.article-block .excerpt h3 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 12px;
}

.article-block .excerpt h3 a {
    color: #1a1a2e;
    text-decoration: none;
    transition: color 0.2s ease;
}

.article-block .excerpt h3 a:hover {
    color: #00a9ff;
}

.article-block .excerpt-content {
    font-size: 0.9rem;
    color: #4a5568;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-block .excerpt-content p {
    margin: 0 0 0.5em;
}

.article-block .excerpt-content p:last-child {
    margin-bottom: 0;
}

.article-block .excerpt-content b,
.article-block .excerpt-content strong {
    background-color: #fff6c9;
    font-weight: 600;
}

/* Read More Link */
.article-block > a.read-more-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 24px 24px;
    color: #00a9ff;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.article-block > a.read-more-link:hover {
    color: #0088cc;
}

.article-block > a.read-more-link::after {
    content: '→';
    transition: transform 0.2s ease;
}

.article-block:hover > a.read-more-link::after {
    transform: translateX(4px);
}
