/* Glossary Archive Styles */

.glossary-archive-wrapper {
    background: #ffffff;
    min-height: 100vh;
    padding: 60px 20px;
}

.glossary-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Header Section */
.glossary-header {
    text-align: center;
    margin-bottom: 50px;
}

.glossary-title {
    font-size: 3rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 20px;
    line-height: 1.2;
}

.glossary-description {
    font-size: 1.125rem;
    color: #666;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Search Box */
.glossary-search-wrapper {
    position: relative;
    max-width: 600px;
    margin: 0 auto 40px;
}

.glossary-search-input {
    width: 100%;
    padding: 16px 50px 16px 20px;
    font-size: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    outline: none;
    transition: all 0.3s ease;
    background: #f9f9f9;
}

.glossary-search-input:focus {
    border-color: #4a90e2;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.1);
}

.search-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    pointer-events: none;
}

/* Alphabet Navigation */
.glossary-alphabet-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 50px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 12px;
}

.letter-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    text-decoration: none;
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.letter-link:hover {
    background: #4a90e2;
    color: #ffffff;
    border-color: #4a90e2;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(74, 144, 226, 0.2);
}

.letter-link.active {
    background: #4a90e2;
    color: #ffffff;
    border-color: #4a90e2;
}

/* Loading Indicator */
.glossary-loading {
    text-align: center;
    padding: 60px 20px;
}

.loading-spinner {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4a90e2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.glossary-loading p {
    color: #666;
    font-size: 1rem;
}

/* Results Section */
.glossary-results {
    margin-top: 40px;
}

.glossary-letter-section {
    margin-bottom: 60px;
    scroll-margin-top: 120px;
}

.letter-heading {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 3px solid #4a90e2;
    display: inline-block;
}

/* Glossary Items */
.glossary-item {
    margin-bottom: 30px;
    padding: 25px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.glossary-item:hover {
    border-color: #4a90e2;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.glossary-item-inner {
    position: relative;
}

.glossary-item-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.3;
}

.glossary-item-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.2s ease;
}

.glossary-item-title a:hover {
    color: #4a90e2;
}

.glossary-item-excerpt {
    font-size: 1rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

.glossary-item-link {
    display: inline-flex;
    align-items: center;
    font-size: 0.95rem;
    font-weight: 600;
    color: #4a90e2;
    text-decoration: none;
    transition: all 0.2s ease;
}

.glossary-item-link:hover {
    color: #2c6bb8;
    transform: translateX(4px);
}

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

.glossary-no-results p {
    font-size: 1.25rem;
    color: #999;
}

.glossary-error {
    text-align: center;
    padding: 40px 20px;
    color: #d9534f;
}

/* Responsive Design */
@media (max-width: 768px) {
    .glossary-archive-wrapper {
        padding: 40px 15px;
    }
    
    .glossary-title {
        font-size: 2rem;
    }
    
    .glossary-description {
        font-size: 1rem;
    }
    
    .glossary-alphabet-nav {
        gap: 6px;
        padding: 15px;
    }
    
    .letter-link {
        min-width: 35px;
        height: 35px;
        font-size: 0.85rem;
        padding: 0 8px;
    }
    
    .letter-heading {
        font-size: 2rem;
    }
    
    .glossary-item {
        padding: 20px;
    }
    
    .glossary-item-title {
        font-size: 1.25rem;
    }
    
    .glossary-item-excerpt {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .glossary-title {
        font-size: 1.75rem;
    }
    
    .glossary-alphabet-nav {
        gap: 4px;
        padding: 10px;
    }
    
    .letter-link {
        min-width: 30px;
        height: 30px;
        font-size: 0.8rem;
        padding: 0 6px;
    }
}
