/* ===================================
   Glossary Page Styles
   =================================== */

.glossary-hero {
    background: linear-gradient(135deg, #374151 0%, #111827 100%);
    color: white;
    padding: 5rem 0 4rem;
    margin-bottom: 3rem;
    margin-left: calc(-0.5 * var(--bs-gutter-x, 1.5rem));
    margin-right: calc(-0.5 * var(--bs-gutter-x, 1.5rem));
    padding-left: calc(0.5 * var(--bs-gutter-x, 1.5rem));
    padding-right: calc(0.5 * var(--bs-gutter-x, 1.5rem));
    position: relative;
    overflow: hidden;
}

.glossary-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
                radial-gradient(circle at 80% 50%, rgba(168, 85, 247, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.glossary-hero .container {
    position: relative;
    z-index: 1;
}

.glossary-hero .display-4 {
    font-size: 2.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.glossary-hero .lead {
    font-size: 1.15rem;
    opacity: 0.9;
    font-weight: 400;
}

.glossary-term-card {
    background: linear-gradient(to bottom, #ffffff 0%, #fafafa 100%);
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 0;
    margin-bottom: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    cursor: pointer;
    display: block;
    text-decoration: none;
    color: inherit;
    position: relative;
}

.glossary-term-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.glossary-term-card:hover {
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(59, 130, 246, 0.1);
    transform: translateY(-6px);
    border-color: #bfdbfe;
    text-decoration: none;
    background: white;
}

.glossary-term-card:hover::before {
    opacity: 1;
}

.glossary-term-card-inner {
    padding: 2rem;
}

.glossary-term-title {
    color: #1e293b;
    font-size: 1.375rem;
    font-weight: 700;
    margin-bottom: 0.875rem;
    text-decoration: none;
    display: block;
    transition: color 0.2s ease;
    line-height: 1.3;
}

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

.glossary-term-description {
    color: #64748b;
    font-size: 0.9375rem;
    line-height: 1.75;
    margin-bottom: 1.25rem;
}

.glossary-term-link {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    font-size: 0.9375rem;
    transition: all 0.3s ease;
}

.glossary-term-card:hover .glossary-term-link {
    color: #2563eb;
    transform: translateX(6px);
}

.glossary-term-link i {
    transition: transform 0.3s ease;
}

.glossary-term-card:hover .glossary-term-link i {
    transform: translateX(4px);
}

.glossary-categories {
    margin-bottom: 3rem;
}

.category-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    color: #1e40af;
    border-radius: 24px;
    font-size: 0.8125rem;
    font-weight: 700;
    margin-bottom: 1rem;
    border: 1px solid #bfdbfe;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 1px 3px rgba(59, 130, 246, 0.1);
}

.glossary-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.625rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 8px 16px rgba(59, 130, 246, 0.25);
    transition: transform 0.3s ease;
}

.glossary-term-card:hover .glossary-icon {
    transform: scale(1.05) rotate(2deg);
}

.search-box {
    max-width: 650px;
    margin: 2.5rem auto 0;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 1.125rem 1.25rem 1.125rem 3.25rem;
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-radius: 50px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.12);
    color: white;
    backdrop-filter: blur(16px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

.search-box input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

.search-box i {
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.75);
    font-size: 1.25rem;
}

.text-center.mb-5 {
    margin-bottom: 3.5rem !important;
}

.text-center.mb-5 h2 {
    color: #1e293b;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.text-center.mb-5 p {
    color: #64748b;
    font-size: 1.05rem;
}

/* ===================================
   Responsive Design
   =================================== */

@media (max-width: 768px) {
    .glossary-hero .display-4 {
        font-size: 2rem;
    }

    .glossary-term-card-inner {
        padding: 1.5rem;
    }

    .glossary-icon {
        width: 48px;
        height: 48px;
        font-size: 1.375rem;
    }
}
