/* ===== FINOLOGI GLOSSARY STYLES ===== */
/* Clean, Elegant & Interactive Glossary Design */

/* Hero Section */
.glossary-hero {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 50%, #f0f9ff 100%);
    padding: 5rem 0 4rem;
    position: relative;
    overflow: hidden;
}

.glossary-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(16, 185, 129, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.03) 0%, transparent 50%);
}

.glossary-hero .hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #0f172a 0%, #374151 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.glossary-hero .hero-subtitle {
    font-size: 1.25rem;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 2rem;
    font-weight: 400;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Search Container */
.glossary-search {
    max-width: 500px;
    margin: 0 auto 2rem;
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.search-container:focus-within {
    border-color: #10b981;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.15);
    transform: translateY(-1px);
}

.search-icon {
    position: absolute;
    left: 1.25rem;
    color: #94a3b8;
    transition: color 0.3s ease;
}

.search-container:focus-within .search-icon {
    color: #10b981;
}

.search-input {
    flex: 1;
    padding: 1.25rem 1.25rem 1.25rem 3.5rem;
    border: none;
    background: transparent;
    font-size: 1rem;
    color: #1e293b;
    outline: none;
    border-radius: 16px;
}

.search-input::placeholder {
    color: #94a3b8;
}

.search-clear {
    position: absolute;
    right: 1rem;
    background: #f1f5f9;
    border: none;
    color: #64748b;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.search-clear:hover {
    background: #10b981;
    color: white;
}

.search-clear.show {
    display: flex;
}

/* Category Filters */
.category-filters {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.filter-btn {
    padding: 0.75rem 1.25rem;
    border: 2px solid #e2e8f0;
    background: white;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-btn:hover {
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.filter-btn.active {
    background: linear-gradient(135deg, #10b981, #3b82f6);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    transform: translateY(-1px);
}

/* Alphabet Navigation */
.alphabet-nav {
    background: white;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 3rem;
    position: sticky;
    top: 80px;
    z-index: 90;
    backdrop-filter: blur(10px);
}

.alphabet-scroll {
    display: flex;
    gap: 0.25rem;
    overflow-x: auto;
    padding: 1rem 0;
    scrollbar-width: none;
}

.alphabet-scroll::-webkit-scrollbar {
    display: none;
}

.alphabet-link {
    padding: 0.5rem 0.75rem;
    border-radius: 10px;
    text-decoration: none;
    color: #64748b;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    min-width: 42px;
    text-align: center;
    white-space: nowrap;
}

.alphabet-link:hover {
    background: #e2e8f0;
    color: #475569;
}

.alphabet-link.active {
    background: linear-gradient(135deg, #10b981, #3b82f6);
    color: white;
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

/* Letter Sections */
.letter-section {
    margin-bottom: 4rem;
    opacity: 1;
    transform: translateY(0);
    transition: all 0.5s ease;
}

.letter-section.hidden {
    opacity: 0;
    transform: translateY(10px);
    display: none;
}

.letter-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 2rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid;
    border-image: linear-gradient(135deg, #10b981, #3b82f6) 1;
    position: relative;
}

.letter-title::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, #10b981, #3b82f6);
    border-radius: 3px;
}

/* Terms Grid */
.terms-grid {
    display: grid;
    gap: 1.5rem;
}

/* Term Cards */
.term-card {
    background: white;
    border: 1px solid #f1f5f9;
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.term-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(135deg, #10b981, #3b82f6);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.term-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    border-color: #e2e8f0;
}

.term-card:hover::before {
    transform: scaleX(1);
}

.term-card.hidden {
    opacity: 0;
    transform: translateY(10px);
    display: none;
}

.term-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.25rem;
    gap: 1rem;
}

.term-name {
    font-size: 1.375rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.term-category {
    padding: 0.375rem 0.875rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.term-card:hover .term-category {
    transform: scale(1.05);
}

/* Category Color System */
.term-category.finance {
    background: linear-gradient(135deg, #dbeafe, #3b82f6);
    color: white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.term-category.business {
    background: linear-gradient(135deg, #dcfce7, #16a34a);
    color: white;
    box-shadow: 0 2px 8px rgba(22, 163, 74, 0.3);
}

.term-category.tax {
    background: linear-gradient(135deg, #fef3c7, #d97706);
    color: white;
    box-shadow: 0 2px 8px rgba(217, 119, 6, 0.3);
}

.term-category.investment {
    background: linear-gradient(135deg, #e0e7ff, #6366f1);
    color: white;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.term-category.accounting {
    background: linear-gradient(135deg, #fce7f3, #db2777);
    color: white;
    box-shadow: 0 2px 8px rgba(219, 39, 119, 0.3);
}

/* Term Content */
.term-content {
    color: #475569;
}

.term-definition {
    font-size: 1.0625rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    color: #475569;
}

.term-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.term-formula,
.term-examples,
.term-types,
.term-related {
    font-size: 0.9375rem;
}

.term-formula strong,
.term-examples strong,
.term-types strong,
.term-related strong {
    color: #0f172a;
    font-weight: 600;
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.term-formula code {
    background: #f8fafc;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.875rem;
    color: #0f172a;
    border: 1px solid #e2e8f0;
    display: inline-block;
}

/* Related Terms */
.related-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.related-tag {
    padding: 0.375rem 0.75rem;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #475569;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-block;
}

.related-tag:hover {
    background: linear-gradient(135deg, #10b981, #3b82f6);
    color: white;
    border-color: transparent;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* No Results State */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
    color: #64748b;
}

.no-results svg {
    color: #cbd5e1;
    margin-bottom: 1.5rem;
}

.no-results h3 {
    color: #475569;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.no-results p {
    margin-bottom: 2rem;
    font-size: 1.0625rem;
}

/* Loading Animation */
.term-card.loading {
    position: relative;
    overflow: hidden;
}

.term-card.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* CTA Section */
.glossary-cta {
    background: linear-gradient(135deg, #0f172a, #1e293b);
    color: white;
    position: relative;
    overflow: hidden;
}

.glossary-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 30% 20%, rgba(16, 185, 129, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(59, 130, 246, 0.1) 0%, transparent 50%);
}

.glossary-cta .cta-title {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.glossary-cta .cta-description {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.125rem;
    margin-bottom: 2.5rem;
}

/* Statistics */
.glossary-stats {
    background: #f8fafc;
    padding: 3rem 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    border: 1px solid #f1f5f9;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #10b981, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #64748b;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .glossary-hero {
        padding: 3rem 0 2rem;
    }
    
    .glossary-hero .hero-title {
        font-size: 2.5rem;
    }
    
    .term-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .terms-grid {
        gap: 1rem;
    }
    
    .term-card {
        padding: 1.5rem;
    }
    
    .alphabet-scroll {
        justify-content: flex-start;
    }
    
    .category-filters {
        justify-content: flex-start;
    }
}

@media (min-width: 768px) {
    .terms-grid {
        grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    }
}

@media (min-width: 1024px) {
    .terms-grid {
        grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus States for Accessibility */
.search-input:focus,
.filter-btn:focus,
.alphabet-link:focus,
.related-tag:focus {
    outline: 2px solid #10b981;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .glossary-hero,
    .alphabet-nav,
    .category-filters,
    .glossary-cta {
        display: none;
    }
    
    .term-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #e2e8f0;
    }
}

/* ===== GLOSSARY UX ENHANCEMENTS ===== */

/* Quick Stats Bar */
/* ===== GLOSSARY UX ENHANCEMENTS ===== */

/* Quick Stats Bar */
.glossary-stats-bar {
    background: white;
    border-bottom: 1px solid #f1f5f9;
    padding: 1rem 0;
    position: sticky;
    top: 80px;
    z-index: 85;
    backdrop-filter: blur(10px);
}

.stats-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.875rem;
    color: #64748b;
}

.results-count {
    font-weight: 600;
    color: #0f172a;
}

.view-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.view-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #e2e8f0;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.8125rem;
    color: #64748b;
    transition: all 0.3s ease;
}

.view-btn.active {
    background: #10b981;
    color: white;
    border-color: #10b981;
}

.view-btn:hover:not(.active) {
    border-color: #cbd5e1;
    color: #475569;
}

/* Compact View Mode */
.terms-grid.compact {
    gap: 1rem;
}

.terms-grid.compact .term-card {
    padding: 1.25rem;
    border-radius: 12px;
}

.terms-grid.compact .term-header {
    margin-bottom: 0.75rem;
}

.terms-grid.compact .term-name {
    font-size: 1.125rem;
}

.terms-grid.compact .term-definition {
    font-size: 0.9375rem;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.terms-grid.compact .term-details {
    display: none;
}

.terms-grid.compact .term-card:hover .term-details {
    display: block;
    animation: fadeInUp 0.3s ease;
}

/* Load More Button */
.load-more-container {
    text-align: center;
    margin: 3rem 0;
}

.load-more-btn {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #10b981, #3b82f6);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.load-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.load-more-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Quick Jump Buttons */
.quick-jump {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.jump-btn {
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #64748b;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.jump-btn:hover {
    background: #10b981;
    color: white;
    border-color: #10b981;
    transform: translateY(-1px);
}

/* Pagination */
.glossary-pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 3rem 0;
}

.page-btn {
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    background: white;
    border-radius: 8px;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 44px;
    text-align: center;
}

.page-btn.active {
    background: linear-gradient(135deg, #10b981, #3b82f6);
    color: white;
    border-color: transparent;
}

.page-btn:hover:not(.active) {
    border-color: #10b981;
    color: #10b981;
}

.page-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: linear-gradient(135deg, #10b981, #3b82f6);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
    transition: all 0.3s ease;
    z-index: 1000;
}

.back-to-top:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(16, 185, 129, 0.5);
}

.back-to-top.show {
    display: flex;
}

/* Loading States */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f4f6;
    border-top: 2px solid #10b981;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 0.5rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Progress Indicator */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: #e2e8f0;
    z-index: 1001;
}

.scroll-progress-bar {
    height: 100%;
    background: linear-gradient(135deg, #10b981, #3b82f6);
    width: 0%;
    transition: width 0.3s ease;
}

/* Enhanced Alphabet Nav for Mobile */
@media (max-width: 768px) {
    .alphabet-nav {
        top: 70px;
    }
    
    .alphabet-scroll {
        padding: 0.75rem 0;
    }
    
    .alphabet-link {
        min-width: 36px;
        padding: 0.375rem 0.5rem;
        font-size: 0.8rem;
    }
    
    .glossary-stats-bar {
        top: 70px;
    }
    
    .stats-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* Print Optimizations */
@media print {
    .glossary-stats-bar,
    .back-to-top,
    .load-more-container,
    .glossary-pagination {
        display: none;
    }
    
    .letter-section {
        break-inside: avoid;
    }
}