/**
 * Archive Software Styles
 * For archive-software.php
 */

:root {
    --primary: #667eea;
    --secondary: #764ba2;
    --success: #48bb78;
    --danger: #f56565;
    --warning: #ed8936;
    --dark: #2d3748;
    --light: #f7fafc;
    --border: #e2e8f0;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    --radius: 12px;
}

/* Hero Section */
.archive-hero {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 120px 0;
    position: relative;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 24px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
}

.hero-title {
    font-size: 52px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.gradient-text {
    background: linear-gradient(90deg, #fff, #ffd700);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-description {
    font-size: 20px;
    opacity: 0.95;
    line-height: 1.6;
    margin-bottom: 40px;
}

/* Hero Stats */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 50px;
    margin-bottom: 50px;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
    text-transform: uppercase;
}

/* Hero Search */
.hero-search {
    max-width: 600px;
    margin: 0 auto;
}

.search-wrapper {
    position: relative;
    display: flex;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.search-icon {
    position: absolute;
    left: 25px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
}

.search-input {
    flex: 1;
    border: none;
    padding: 20px 25px 20px 55px;
    font-size: 16px;
    color: var(--dark);
    outline: none;
}

.search-button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 20px 40px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.search-button:hover {
    background: var(--secondary);
}

/* Background Shapes */
.hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.bg-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
}

.bg-shape-1 {
    width: 400px;
    height: 400px;
    background: white;
    top: -100px;
    right: -100px;
    animation: float 20s infinite ease-in-out;
}

.bg-shape-2 {
    width: 300px;
    height: 300px;
    background: white;
    bottom: -50px;
    left: -50px;
    animation: float 15s infinite ease-in-out reverse;
}

.bg-shape-3 {
    width: 200px;
    height: 200px;
    background: white;
    top: 50%;
    left: 10%;
    animation: float 25s infinite ease-in-out;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -30px) rotate(120deg); }
    66% { transform: translate(-20px, 20px) rotate(240deg); }
}

/* Categories Section */
.categories-section {
    padding: 80px 0;
    background: var(--light);
}

.section-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.category-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: white;
    border-radius: var(--radius);
    border: 2px solid var(--border);
    text-decoration: none;
    transition: all 0.3s;
}

.category-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.1);
}

.cat-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.cat-content {
    flex: 1;
}

.cat-content h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--dark);
    margin: 0 0 5px;
}

.cat-count {
    font-size: 13px;
    color: #718096;
}

.cat-arrow {
    color: var(--primary);
    font-size: 20px;
    transition: transform 0.3s;
}

.category-card:hover .cat-arrow {
    transform: translateX(5px);
}

/* Filters Bar */
.filters-bar {
    background: white;
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.filters-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.filters-left {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
}

.filters-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* View Toggle */
.view-toggle {
    display: flex;
    background: var(--light);
    border-radius: 8px;
    padding: 4px;
}

.view-btn {
    padding: 8px 10px;
    background: transparent;
    border: none;
    color: #718096;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
}

.view-btn.active {
    background: white;
    color: var(--primary);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Quick Filters */
.quick-filters {
    display: flex;
    gap: 10px;
}

.filter-chip {
    padding: 8px 16px;
    background: var(--light);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--dark);
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.filter-chip:hover {
    border-color: var(--primary);
}

.filter-chip.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.chip-icon {
    font-size: 16px;
}

/* Results Info */
.results-info {
    font-size: 14px;
    color: #718096;
}

/* Sort Select */
.sort-select {
    padding: 10px 35px 10px 15px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--dark);
    cursor: pointer;
    outline: none;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23718096" stroke-width="2"><polyline points="6 9 12 15 18 9"></polyline></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 20px;
}

/* Software Grid */
.software-grid-section {
    padding: 60px 0;
    min-height: 500px;
}

.software-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

/* Software Card */
.software-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.software-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* Card Thumbnail */
.card-thumb {
    position: relative;
    padding-top: 60%;
    overflow: hidden;
    background: var(--light);
}

.card-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.software-card:hover .card-thumb img {
    transform: scale(1.1);
}

.thumb-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    opacity: 0.3;
    background: linear-gradient(135deg, var(--light), #e2e8f0);
}

/* Overlay */
.thumb-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.8));
    display: flex;
    align-items: flex-end;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s;
}

.software-card:hover .thumb-overlay {
    opacity: 1;
}

.overlay-buttons {
    display: flex;
    gap: 10px;
    width: 100%;
}

.overlay-btn {
    flex: 1;
    padding: 10px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--dark);
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.overlay-btn.primary {
    background: var(--primary);
    color: white;
}

.overlay-btn:hover {
    transform: scale(1.05);
}

/* Badges */
.card-badges {
    position: absolute;
    top: 15px;
    left: 15px;
    display: flex;
    gap: 8px;
}

.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge.new {
    background: var(--danger);
    color: white;
    animation: pulse 2s infinite;
}

.badge.free {
    background: var(--success);
    color: white;
}

.badge.pro {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Card Content */
.card-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-category {
    margin-bottom: 10px;
}

.card-category a {
    display: inline-block;
    padding: 4px 12px;
    background: var(--light);
    border-radius: 15px;
    font-size: 12px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
}

.card-category a:hover {
    background: var(--primary);
    color: white;
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.4;
}

.card-title a {
    color: var(--dark);
    text-decoration: none;
    transition: color 0.3s;
}

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

.card-excerpt {
    color: #718096;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
    flex: 1;
}

/* Rating */
.card-rating {
    display: flex;
    align-items: center;
    gap: 3px;
    margin-bottom: 15px;
}

.star {
    color: #e2e8f0;
    font-size: 14px;
}

.star.filled {
    color: #fbbf24;
}

.star.half {
    position: relative;
    color: #fbbf24;
}

.star.half::after {
    content: '★';
    position: absolute;
    left: 0;
    width: 50%;
    overflow: hidden;
    color: #e2e8f0;
}

.rating-number {
    font-size: 13px;
    color: #718096;
    margin-left: 5px;
}

/* Meta */
.card-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 13px;
    color: #718096;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Tags */
.card-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.card-tags .tag {
    font-size: 12px;
    color: #a0aec0;
    text-decoration: none;
    transition: color 0.3s;
}

.card-tags .tag:hover {
    color: var(--primary);
}

/* Card Footer */
.card-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border);
    background: var(--light);
}

.card-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s;
}

.card-btn:hover {
    color: var(--secondary);
}

.card-btn .arrow {
    transition: transform 0.3s;
}

.card-btn:hover .arrow {
    transform: translateX(5px);
}

/* List View */
.software-grid.list-view {
    grid-template-columns: 1fr;
}

.software-card[data-view="list"] {
    flex-direction: row;
}

.software-card[data-view="list"] .card-thumb {
    width: 250px;
    padding-top: 0;
    height: 200px;
}

/* Pagination */
.archive-pagination {
    display: flex;
    justify-content: center;
}

.archive-pagination ul {
    display: flex;
    gap: 10px;
    list-style: none;
    padding: 0;
}

.archive-pagination a,
.archive-pagination .current {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 10px 18px;
    background: white;
    border: 2px solid var(--border);
    border-radius: 10px;
    color: var(--dark);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
}

.archive-pagination a:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.archive-pagination .current {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* No Results */
.no-results {
    text-align: center;
    padding: 100px 20px;
}

.no-results-icon {
    font-size: 72px;
    margin-bottom: 20px;
}

.no-results h2 {
    font-size: 28px;
    color: var(--dark);
    margin-bottom: 10px;
}

.no-results p {
    color: #718096;
    font-size: 16px;
    margin-bottom: 30px;
}

.btn-back {
    display: inline-block;
    padding: 12px 30px;
    background: var(--primary);
    color: white;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-back:hover {
    background: var(--secondary);
}

/* Tags Section */
.tags-section {
    background: var(--light);
    padding: 80px 0;
}

.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.tag-item {
    padding: 8px 16px;
    background: white;
    border: 2px solid var(--border);
    border-radius: 25px;
    color: var(--dark);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.tag-item:hover {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.tag-count {
    opacity: 0.7;
    font-size: 0.9em;
}

/* Newsletter Section */
.newsletter-section {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    padding: 80px 0;
}

.newsletter-box {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
}

.newsletter-content {
    color: white;
}

.newsletter-content h2 {
    font-size: 32px;
    margin-bottom: 10px;
}

.newsletter-content p {
    font-size: 16px;
    opacity: 0.95;
}

.newsletter-form {
    display: flex;
    gap: 15px;
    min-width: 400px;
}

.email-input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    color: white;
    font-size: 15px;
    outline: none;
}

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

.submit-btn {
    padding: 15px 35px;
    background: white;
    color: var(--primary);
    border: none;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.submit-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Responsive */
@media (max-width: 1024px) {
    .categories-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .software-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 36px;
    }

    .hero-stats {
        flex-wrap: wrap;
        gap: 30px;
    }

    .filters-wrapper {
        flex-direction: column;
        align-items: stretch;
    }

    .filters-left {
        justify-content: space-between;
    }

    .quick-filters {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .software-grid {
        grid-template-columns: 1fr;
    }

    .newsletter-box {
        flex-direction: column;
        text-align: center;
    }

    .newsletter-form {
        flex-direction: column;
        min-width: 100%;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 28px;
    }

    .hero-description {
        font-size: 16px;
    }

    .search-wrapper {
        flex-direction: column;
        border-radius: 12px;
    }

    .search-button {
        width: 100%;
    }

    .categories-grid {
        grid-template-columns: 1fr;
    }

    .quick-filters {
        display: none;
    }
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}