/* Archive Blog Page Styling - Clone of supstore.namseadesign.com/kien-thuc/ */
:root {
    --primary-color: #ca9f5c;
    --primary-dark: #b38a4d;
    --primary-light: rgba(202, 159, 92, 0.08);
    --primary-gradient: linear-gradient(135deg, #ca9f5c 0%, #e3c08d 100%);
    --text-color: #2d3436;
    --text-muted: #636e72;
    --bg-page: #fcfdfb;
    --container-width: 1440px;
    --font-heading: 'Be Vietnam Pro', sans-serif;
    --font-body: 'Inter', sans-serif;
    --border-radius: 24px;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.archive-page-wrapper {
    background-color: var(--bg-page);
    min-height: 100vh;
    padding-bottom: 80px;
}

/* Hero Section */
.archive-hero {
    background: #4d3f2b;
    padding: 100px 0;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
    margin-bottom: 60px;
}

.archive-hero::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    animation: float 10s infinite alternate ease-in-out;
}

.archive-hero::after {
    content: '';
    position: absolute;
    bottom: -10%;
    left: -5%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    animation: float 8s infinite alternate-reverse ease-in-out;
}

@keyframes float {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(30px, 20px);
    }
}

.archive-hero__badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 20px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: 2px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.archive-hero__title {
    font-family: var(--font-heading);
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 800;
    margin-bottom: 15px;
    line-height: 1.2;
}

.archive-hero__desc {
    font-size: 16px;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Containers */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Archive Layout */
.archive-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 50px;
}

/* Post Cards */
.archive-post-list {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* Base Card Styling */
.post-card-horizontal {
    display: flex;
    background: #fff;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: 1px solid #f1f2f6;
    position: relative;
}

.post-card-horizontal:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.post-card-horizontal__image {
    width: 320px;
    min-width: 320px;
    position: relative;
    overflow: hidden;
}

.post-card-horizontal__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.post-card-horizontal:hover .post-card-horizontal__image img {
    transform: scale(1.08);
}

.post-card-horizontal__content {
    padding: 35px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.post-card-horizontal__meta {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 15px;
    display: flex;
    gap: 12px;
    align-items: center;
    font-weight: 500;
}

.post-card-horizontal__meta i {
    color: var(--primary-color);
}

.post-card-horizontal__title {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 15px;
}

.post-card-horizontal__title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.3s;
}

.post-card-horizontal__title a:hover {
    color: var(--primary-color);
}

.post-card-horizontal__excerpt {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 25px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card-horizontal__footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid #f8f9fa;
}

.post-card-horizontal__tags {
    display: flex;
    gap: 10px;
}

.post-card-horizontal__tags a {
    font-size: 12px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 700;
    background: var(--primary-light);
    padding: 4px 12px;
    border-radius: 30px;
    transition: all 0.3s;
}

.post-card-horizontal__tags a:hover {
    background: var(--primary-color);
    color: #fff;
}

.post-card-horizontal__readmore {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: gap 0.3s;
}

.post-card-horizontal__readmore:hover {
    color: var(--primary-color);
    gap: 12px;
}

/* Featured Post Styling */
.post-card-featured {
    flex-direction: column;
}

.post-card-featured .post-card-horizontal__image {
    width: 100%;
    height: 480px;
}

.post-card-featured .post-card-horizontal__content {
    padding: 40px;
}

.post-card-featured .post-card-horizontal__title {
    font-size: 32px;
}

/* Sidebar Widgets */
.archive-sidebar {
    display: flex;
    flex-direction: column;
    gap: 35px;
}

.sidebar-widget {
    background: #fff;
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid #f1f2f6;
}

.widget-title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 25px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary-light);
    color: #1a1a1a;
    position: relative;
}

.widget-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--primary-color);
}

.category-list {
    list-style: none;
    padding: 0;
}

.category-list li {
    margin-bottom: 15px;
}

.category-list a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
    transition: all 0.3s;
}

.category-list a span {
    background: #f1f2f6;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 12px;
    color: var(--text-muted);
}

.category-list a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.category-list a:hover span {
    background: var(--primary-color);
    color: #fff;
}

.search-form {
    position: relative;
}

.search-form input {
    width: 100%;
    padding: 14px 20px;
    border: 1px solid #eef0f2;
    border-radius: 12px;
    font-size: 14px;
    background: #fcfdfe;
    transition: all 0.3s;
}

.search-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

/* AJAX Search Results */
.ajax-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    margin-top: 10px;
    z-index: 100;
    display: none;
    overflow: hidden;
    border: 1px solid #f1f2f6;
}

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

.ajax-search-item {
    border-bottom: 1px solid #f8f9fa;
}

.ajax-search-item:last-child {
    border-bottom: none;
}

.ajax-search-item a {
    display: flex;
    gap: 15px;
    padding: 15px;
    text-decoration: none;
    transition: background 0.3s;
}

.ajax-search-item a:hover {
    background: #f8f9fa;
}

.ajax-search-thumb {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
}

.ajax-search-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ajax-search-title {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.4;
    margin-bottom: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ajax-search-meta {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    gap: 10px;
    align-items: center;
}

.ajax-search-cat {
    color: var(--primary-color);
    font-weight: 600;
}

.ajax-search-view-all {
    display: block;
    padding: 12px;
    text-align: center;
    background: var(--primary-light);
    color: var(--primary-color);
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    transition: background 0.3s;
}

.ajax-search-view-all:hover {
    background: var(--primary-color);
    color: #fff;
}

.ajax-search-no-results {
    padding: 20px;
    text-align: center;
    font-size: 14px;
    color: var(--text-muted);
}

.search-loader {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
    display: none;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-cloud a {
    background: #f1f2f6;
    color: var(--text-color);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 13px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
}

.tag-cloud a:hover {
    background: var(--primary-color);
    color: #fff;
    transform: scale(1.05);
}

.newsletter-widget {
    background: var(--primary-gradient);
    color: #fff;
    border: none;
}

.newsletter-widget .widget-title {
    color: #fff;
    border-bottom-color: rgba(255, 255, 255, 0.2);
}

.newsletter-widget .widget-title::after {
    background: #fff;
}

.newsletter-widget p {
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.6;
    opacity: 0.9;
}

.newsletter-form input {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: none;
    margin-bottom: 12px;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.newsletter-form input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.newsletter-form button {
    width: 100%;
    padding: 14px;
    background: #fff;
    color: var(--primary-color);
    border: none;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.newsletter-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Pagination */
.archive-pagination {
    margin-top: 60px;
    display: flex;
    justify-content: center;
    gap: 12px;
}

.archive-pagination .page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
    height: 45px;
    padding: 0 15px;
    background: #fff;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    transition: all 0.3s;
    border: 1px solid #eef0f2;
    box-shadow: var(--shadow-sm);
}

.archive-pagination .page-numbers.current {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.archive-pagination .page-numbers:hover:not(.current) {
    background: var(--primary-light);
    color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-3px);
}

/* Sticky Sidebar */
@media (min-width: 1025px) {
    .archive-sidebar {
        position: sticky;
        top: 30px;
        align-self: start;
    }
}


/* Responsive */
@media (max-width: 1200px) {
    .archive-grid {
        grid-template-columns: 1fr;
        max-width: 800px;
    }

    .post-card-horizontal__image {
        width: 280px;
        min-width: 280px;
    }
}

@media (max-width: 768px) {
    .archive-hero {
        padding: 60px 0;
    }

    .post-card-horizontal {
        flex-direction: column;
    }

    .post-card-horizontal__image {
        width: 100%;
        height: 240px;
    }

    .post-card-horizontal__content {
        padding: 25px;
    }

    .post-card-featured .post-card-horizontal__image {
        height: 300px;
    }

    .post-card-featured .post-card-horizontal__title {
        font-size: 24px;
    }
}

/* Search Results & No Results State */
.no-results-content {
    text-align: center;
    padding: 80px 40px;
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid #f1f2f6;
    margin: 40px 0;
}

.no-results-icon {
    font-size: 64px;
    color: var(--primary-light);
    margin-bottom: 30px;
}

.no-results-content h3 {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 15px;
}

.no-results-content p {
    color: var(--text-muted);
    font-size: 16px;
    margin-bottom: 40px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.no-results-search {
    max-width: 500px;
    margin: 0 auto;
}

.no-results-search .search-form {
    display: flex;
    gap: 10px;
}

.no-results-search .search-field {
    flex: 1;
}

.search-submit-btn {
    padding: 0 30px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.search-submit-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--primary-light);
}

.search-hero {
    background: #2d3436 !important; /* Darker hero for search */
}
