﻿/**
 * Projects Archive Page Styles â€” Premium Redesign
 * Clean header, sticky filters, responsive grid
 */

/*=================================
  Archive Layout with Sidebar
=================================*/
.archive-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 36px;
    align-items: start;
    margin: 36px auto;
    max-width: var(--container-width, 1200px);
    padding: 0 20px;
}

html[dir="rtl"] .archive-layout {
    direction: rtl;
}

/*=================================
  Archive Header â€” Premium
=================================*/
.pa-header {
    background: linear-gradient(135deg,
        var(--secondary-color, #C9A45C) 0%,
        #0f2744 50%,
        var(--secondary-color, #C9A45C) 100%);
    padding: 100px 0 36px;
    position: relative;
    overflow: hidden;
}

/* Decorative background pattern */
.pa-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 60% at 20% 80%, rgba(232, 185, 122, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse 50% 40% at 80% 20%, rgba(109, 16, 79, 0.10) 0%, transparent 55%);
    pointer-events: none;
}

/* Subtle bottom line */
.pa-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(232, 185, 122, 0.5), transparent);
}

.pa-header .container {
    position: relative;
    z-index: 2;
}

/* Breadcrumb */
.pa-header .project-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    font-size: 13px;
}

.pa-header .project-breadcrumb a {
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.pa-header .project-breadcrumb a:hover {
    color: var(--color-gold-accent);
}

.pa-header .project-breadcrumb .sep {
    color: rgba(255, 255, 255, 0.2);
    font-size: 9px;
}

.pa-header .project-breadcrumb .current {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
}

/* Title Row */
.pa-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.pa-title-text {
    flex: 1;
    min-width: 0;
}

.pa-title {
    font-size: 2.2rem;
    font-weight: 900;
    color: #fff;
    margin: 0 0 8px 0;
    line-height: 1.25;
    letter-spacing: -0.01em;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

/* Accent line under title */
.pa-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--color-gold-accent), transparent);
    border-radius: 2px;
    margin-top: 10px;
}

.pa-subtitle {
    font-size: 14.5px;
    color: rgba(255, 255, 255, 0.65);
    margin: 0;
    line-height: 1.6;
    font-weight: 400;
}

/* Stats Pills â€” Premium */
.pa-stats {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.pa-stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 12px;
    padding: 10px 18px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    white-space: nowrap;
    transition: background 0.2s, border-color 0.2s;
}

.pa-stat-pill:hover {
    background: rgba(255, 255, 255, 0.11);
    border-color: rgba(232, 185, 122, 0.3);
}

.pa-stat-pill i {
    color: var(--color-gold-accent);
    font-size: 12px;
}

.pa-stat-pill strong {
    color: #fff;
    font-weight: 800;
    font-size: 16px;
}

/* Description */
.pa-description {
    max-width: 700px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 13.5px;
    line-height: 1.85;
    margin-top: 4px;
}

.pa-description p {
    margin: 0 0 6px;
}

.pa-description p:last-child {
    margin-bottom: 0;
}

/*=================================
  Sticky Filter Bar â€” Improved
=================================*/
.pa-filter-bar {
    background: #fff;
    border-bottom: 1px solid #eef0f3;
    padding: 10px 0;
    position: sticky;
    top: 65px;
    z-index: 90;
    transition: box-shadow 0.25s ease;
    box-shadow: 0 1px 0 #eef0f3;
}

.pa-filter-bar.is-stuck {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.07);
}

.pa-filter-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Search */
.pa-search-box {
    position: relative;
    flex: 1;
    min-width: 180px;
    max-width: 280px;
}

.pa-search-box i {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #bbb;
    font-size: 12px;
    pointer-events: none;
    transition: color 0.2s;
}

.pa-search-box:focus-within i {
    color: var(--primary-color, #0F2742);
}

.pa-search-box input {
    width: 100%;
    padding: 9px 34px 9px 14px;
    border: 1.5px solid #e4e8ee;
    border-radius: 10px;
    font-size: 13px;
    background: #f8f9fc;
    color: #333;
    outline: none;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

.pa-search-box input:focus {
    border-color: var(--primary-color, #0F2742);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(109, 16, 79, 0.06);
}

/* Select Filters */
.pa-filter-select select {
    padding: 9px 14px;
    border: 1.5px solid #e4e8ee;
    border-radius: 10px;
    font-size: 13px;
    background: #f8f9fc;
    color: #444;
    cursor: pointer;
    outline: none;
    min-width: 130px;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='%23888'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 10px center;
    padding-left: 28px;
}

.pa-filter-select select:focus {
    border-color: var(--primary-color, #0F2742);
    box-shadow: 0 0 0 3px rgba(109, 16, 79, 0.06);
}

/* Results Count */
.pa-results-count {
    margin-right: auto;
    font-size: 12.5px;
    color: #999;
    white-space: nowrap;
}

.pa-results-count strong {
    color: var(--secondary-color, #C9A45C);
    font-weight: 700;
}

/*=================================
  Main Content
=================================*/
.pa-main {
    padding: 0;
    min-width: 0;
}

.pa-main .projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
}

.pa-main .pagination-wrapper {
    margin-top: 44px;
    text-align: center;
}

/* Pagination */
.pagination-wrapper .nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.pagination-wrapper .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--secondary-color, #C9A45C);
    background: #f4f5f8;
    border: 1.5px solid transparent;
    text-decoration: none;
    transition: all 0.2s ease;
}

.pagination-wrapper .page-numbers:hover {
    background: var(--primary-color, #0F2742);
    color: #fff;
    border-color: var(--primary-color, #0F2742);
}

.pagination-wrapper .page-numbers.current {
    background: var(--primary-color, #0F2742);
    color: #fff;
    border-color: var(--primary-color, #0F2742);
}

.pagination-wrapper .page-numbers.dots {
    background: transparent;
    border: none;
    cursor: default;
    pointer-events: none;
}

.pagination-wrapper .page-numbers.prev,
.pagination-wrapper .page-numbers.next {
    width: auto;
    padding: 0 14px;
    font-size: 12px;
}

/* No Results */
.pa-no-results {
    text-align: center;
    padding: 80px 20px;
    grid-column: 1 / -1;
}

.pa-no-results-icon {
    font-size: 56px;
    margin-bottom: 16px;
    opacity: 0.7;
}

.pa-no-results h3 {
    font-size: 1.35rem;
    color: var(--secondary-color, #C9A45C);
    margin: 0 0 8px;
    font-weight: 700;
}

.pa-no-results p {
    color: #999;
    font-size: 14px;
    margin: 0 0 22px;
}

.pa-no-results .btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-color, #0F2742);
    color: #fff;
    padding: 11px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.pa-no-results .btn-primary:hover {
    background: #5a0d42;
    transform: translateY(-1px);
}

/*=================================
  Responsive
=================================*/
@media (max-width: 1200px) {
    .archive-layout {
        grid-template-columns: 1fr 280px;
        gap: 28px;
    }
}

@media (max-width: 1024px) {
    .pa-main .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }
}

@media (max-width: 768px) {
    .pa-header {
        padding: 88px 0 28px;
    }

    .pa-title {
        font-size: 1.6rem;
    }

    .pa-title-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
        margin-bottom: 14px;
    }

    .pa-stats {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4px;
        gap: 8px;
    }

    .pa-stat-pill {
        padding: 8px 14px;
        font-size: 12px;
    }

    .pa-filter-bar {
        top: 56px;
    }

    .pa-filter-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .pa-search-box {
        max-width: 100%;
    }

    .pa-filter-select select {
        width: 100%;
    }

    .pa-results-count {
        margin-right: 0;
        text-align: center;
    }

    .pa-main .projects-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .archive-layout {
        display: flex;
        flex-direction: column;
        gap: 20px;
        margin: 20px auto;
        padding: 0 14px;
    }

    #secondary.widget-area {
        width: 100%;
        order: -1;
    }

    .project-filters-widget {
        position: static;
        margin-bottom: 0;
    }
}

@media (max-width: 480px) {
    .pa-title {
        font-size: 1.4rem;
    }

    .pa-subtitle {
        font-size: 13px;
    }

    .pagination-wrapper .page-numbers {
        width: 34px;
        height: 34px;
        font-size: 13px;
    }
}

