/**
 * IMPORTANT: For editing rules and coding guidelines, see AI_documents/Rules/Rules_for_the_AI.txt
 * For project overview and details, see AI_documents/Project_Overview_Doc.txt
 *
 * Production Directory: http://ainspire.ai/css/whitepapers_library_page_web.css
 * Development Directory: http://localhost:8000/css/whitepapers_library_page_web.css
 *
 * Whitepapers Library Page - Desktop Styles (1024px and above)
 */

/* ========================================
   Library Main Container
   ======================================== */
.library-main {
    width: 100%;
    min-height: 100vh;
    background: linear-gradient(135deg, #000 0%, #0a0a0a 50%, #000 100%);
    padding-top: 0px;
}

/* ========================================
   Hero Section
   ======================================== */
.library-hero {
    position: relative;
    width: 100%;
    padding: 60px 20px;
    text-align: center;
    background: linear-gradient(135deg, rgb(59 130 246 / 43%) 0%, rgb(30 64 175 / 8%) 30%, rgb(37 99 235 / 5%) 60%, rgb(247 247 247 / 3%) 100%);
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
}
.library-hero::before {
  content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 80%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(37, 99, 235, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.library-hero-canvas {
    filter: opacity(0.1);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.library-hero-content {
    position: relative;
    z-index: 2;
}

.library-hero-content h1 {
    font-size: 3rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 20px;
    font-weight: 700;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #fff 0%, #93c5fd 50%, #60a5fa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    letter-spacing: 1px;
}

.library-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.7);
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ========================================
   Filters Section
   ======================================== */
.library-filters {
    width: 100%;
    padding: 30px 20px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(59, 130, 246, 0.15);
}

.filters-container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Search Bar */
.search-bar-wrapper {
    position: relative;
    max-width: 800px;
    margin: 0 auto 30px;
}

.search-input {
    width: 100%;
    padding: 18px 50px 18px 24px;
    font-size: 1.1rem;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    outline: none;
    transition: all 0.3s ease;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.search-input:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(59, 130, 246, 0.6);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
}

.search-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.3rem;
    pointer-events: none;
}

/* Filter Controls */
.filter-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-group label {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

.filter-dropdown {
    padding: 12px 20px;
    font-size: 1rem;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(59, 130, 246, 0.3);
    border-radius: 8px;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
    min-width: 200px;
}

.filter-dropdown:hover,
.filter-dropdown:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(59, 130, 246, 0.5);
}

.filter-dropdown option {
    background: #0a0a0a;
    color: #ffffff;
}

.clear-filters-btn {
    padding: 12px 28px;
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    background: rgba(59, 130, 246, 0.2);
    border: 2px solid rgba(59, 130, 246, 0.4);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.clear-filters-btn:hover {
    background: rgba(59, 130, 246, 0.3);
    border-color: rgba(59, 130, 246, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

/* Results Counter */
.results-counter {
    text-align: center;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 15px;
}

.results-counter #results-count {
    color: #3b82f6;
    font-weight: 600;
}

/* ========================================
   Whitepapers List Section
   ======================================== */
.library-list {
    width: 100%;
    padding: 60px 20px 100px;
}

.whitepapers-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* ========================================
   Whitepaper Card
   ======================================== */
.whitepaper-card {
    background:rgb(96 84 246 / 6%);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 16px;
    padding: 40px;
    transition: all 0.4s ease;
    backdrop-filter: blur(10px);
}

.whitepaper-card:hover {
    background: rgb(0 0 0 / 0%);
    border-color: rgba(59, 130, 246, 0.5);
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(59, 130, 246, 0.25);
}

/* Card Header */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 15px;
}

.card-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
    flex: 1;
}

.card-title a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.card-title a:hover {
    color: #3b82f6;
}

.card-header-actions {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.card-divider {
    height: 2px;
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.6) 0%, rgba(59, 130, 246, 0) 100%);
    width: 100%;
    margin-bottom: 20px;
}

/* Metadata Row with Category Badge */
.card-metadata-row {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.card-metadata {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
}

.metadata-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.metadata-item .icon {
    font-size: 1rem;
}

.metadata-separator {
    color: rgba(59, 130, 246, 0.4);
}

/* Category Badge (inline with metadata) */
.card-category {
    display: flex;
    align-items: center;
}

.category-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 20px;
    font-size: 0.9rem;
    color: #3b82f6;
    font-weight: 600;
    white-space: nowrap;
}

.category-badge .icon {
    font-size: 1rem;
}

/* Tags Section (inline label with tags) */
.card-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 0;
}

.tags-label {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
    margin-right: 8px;
}

.tag-pill {
    padding: 6px 12px;
    background: rgba(37, 99, 235, 0.2);
    border: 1px solid rgba(37, 99, 235, 0.3);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: #fff;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.tag-pill:hover {
    background: rgba(37, 99, 235, 0.4);
    border-color: rgba(37, 99, 235, 0.6);
}

/* Summary Section (with inline label) */
.card-summary {
    margin-bottom: 25px;
}

.summary-text {
    font-size: 1.05rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.75);
    margin: 0;
}

.summary-label {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    margin-right: 8px;
}

/* Action Button (in header) */
.read-whitepaper-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #ffffff;
    background: rgba(59, 130, 246, 0.25);
    border: 2px solid rgba(59, 130, 246, 0.5);
    border-radius: 6px;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.read-whitepaper-btn:hover {
    background: rgba(59, 130, 246, 0.4);
    border-color: rgba(59, 130, 246, 0.7);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

/* ========================================
   No Results Message
   ======================================== */
.no-results {
    text-align: center;
    padding: 80px 20px;
    color: rgba(255, 255, 255, 0.6);
}

.no-results p {
    font-size: 1.3rem;
    margin-bottom: 30px;
}

/* ========================================
   Hidden Card State (for filtering)
   ======================================== */
.whitepaper-card.hidden {
    display: none;
}

