﻿:root {
    --primary: #4361ee;
    --primary-light: #e0e7ff;
    --primary-dark: #3a0ca3;
    --secondary: #3f37c9;
    --text: #2b2d42;
    --text-light: #6c757d;
    --text-lighter: #adb5bd;
    --border: #e9ecef;
    --bg: #f8f9fa;
    --white: #ffffff;
    --card-bg: #ffffff;
    --highlight: #f8f5fe;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

.search-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.search-header {
    text-align: center;
    margin-bottom: 2rem;
}

    .search-header h1 {
        font-size: 2.25rem;
        font-weight: 700;
        color: #003a94;
        margin-bottom: 0.5rem;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.75rem;
    }

    .search-header .subtitle {
        color: var(--text-light);
        font-size: 1.125rem;
    }

.search-area {
    margin-bottom: 3rem;
}

.search-input-container {
    display: flex;
    max-width: 800px;
    margin: 0 auto 1rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

    .search-input-container:focus-within {
        border-color: var(--primary);
        box-shadow: 0 0 0 3px var(--primary-light);
    }

.search-input {
    flex: 1;
    padding: 1.25rem 1.5rem;
    border: none;
    font-size: 1.1rem;
    background: var(--white);
}

    .search-input:focus {
        outline: none;
    }

.search-button {
    background: #003a94;
    color: var(--white);
    border: none;
    padding: 0 2rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s ease;
}

    .search-button:hover {
        background: var(--primary-dark);
    }

.quick-filters {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.filter-label {
    color: var(--text-light);
    font-size: 0.875rem;
}

.filter-chip {
    background: var(--primary-light);
    color: var(--primary);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .filter-chip:hover {
        background: var(--primary);
        color: var(--white);
    }

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

    .results-header h2 {
        font-size: 1.5rem;
        font-weight: 600;
    }

.results-meta {
    color: var(--text-light);
    font-size: 0.875rem;
}

.sort-options {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

    .sort-options span {
        color: var(--text-light);
        font-size: 0.875rem;
    }

.sort-select {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--white);
    color: var(--text);
    font-family: inherit;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.result-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
}

    .result-card:hover {
        transform: translateY(-5px);
        box-shadow: var(--shadow-hover);
    }

    .result-card.featured {
        grid-column: span 2;
        background: var(--highlight);
        border-left: 4px solid var(--primary);
        flex-direction: row;
    }

    .result-card.with-image {
        flex-direction: row;
    }

.card-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--primary);
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.card-content {
    flex: 1;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.content-type {
    color: var(--primary);
    font-size: 0.8125rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.result-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

    .result-card h3 a {
        color: var(--text);
        text-decoration: none;
        transition: color 0.2s ease;
    }

        .result-card h3 a:hover {
            color: var(--primary);
        }

.excerpt {
    color: var(--text-light);
    font-size: 0.9375rem;
    margin-bottom: 1.25rem;
    flex: 1;
}

.card-footer {
    display: flex;
    gap: 1.5rem;
    font-size: 0.8125rem;
    color: var(--text-lighter);
    margin-top: auto;
}

.footer-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.card-image {
    width: 200px;
    flex-shrink: 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.page-button {
    background: var(--white);
    border: 1px solid var(--border);
    padding: 0.5rem 0.875rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

    .page-button:hover {
        border-color: var(--primary-light);
        color: var(--primary);
    }

    .page-button.active {
        background: var(--primary);
        border-color: var(--primary);
        color: var(--white);
    }

    .page-button.next {
        padding: 0.5rem 1.25rem;
    }

@media (max-width: 1200px) {
    .result-card.featured {
        grid-column: span 1;
        flex-direction: column;
    }

    .card-image {
        width: 100%;
        height: 160px;
    }
}

@media (max-width: 768px) {
    .search-container {
        padding: 1.5rem;
    }

    .results-grid {
        grid-template-columns: 1fr;
    }

    .result-card.with-image {
        flex-direction: column;
    }

    .search-input-container {
        flex-direction: column;
        border-radius: 12px;
    }

    .search-button {
        width: 100%;
        justify-content: center;
        padding: 1rem;
        border-radius: 0 0 12px 12px;
    }

    .results-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .search-header h1 {
        font-size: 1.75rem;
    }

    .search-header .subtitle {
        font-size: 1rem;
    }

    .quick-filters {
        justify-content: flex-start;
    }

    .pagination {
        flex-wrap: wrap;
    }
}
