/* ============================================================
   GLOSSARY.CSS — Styles for AI Glossary
   AI Tools Directory
   ============================================================ */

.site-header {
    position: sticky !important;
    top: 0;
    z-index: 1000 !important;
}

.glossary-hero {
    position: relative;
    padding: 100px 0 60px;
    background: #0f172a;
    color: #fff;
    overflow: hidden;
    text-align: center;
}

.glossary-hero__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.glossary-hero__orb {
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: orb-float 20s infinite alternate ease-in-out;
}

.glossary-hero__orb--1 {
    top: -100px;
    left: -100px;
    background: #6366f1;
}

.glossary-hero__orb--2 {
    bottom: -100px;
    right: -100px;
    background: #f59e0b;
    animation-delay: -5s;
}

@keyframes orb-float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(50px, 50px) scale(1.1);
    }
}

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

.glossary-hero__title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
    color: #fff;
}

.glossary-hero__subtitle {
    font-size: 1.25rem;
    color: #94a3b8;
    max-width: 600px;
    margin: 0 auto 40px;
}

/* Alphabet Filter */
.glossary-filter {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
}

.filter-btn {
    min-width: 40px;
    height: 40px;
    padding: 0 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
}

.filter-btn:hover {
    background: #6366f1;
    border-color: #6366f1;
    transform: translateY(-2px);
}

.filter-btn.active {
    background: #6366f1;
    border-color: #6366f1;
}

/* Glossary Layout */
.glossary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    padding: 60px 0;
}

.glossary-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    padding: 30px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.glossary-card:hover {
    transform: translateY(-8px);
    border-color: #6366f1;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.glossary-card__letter {
    font-size: 0.75rem;
    font-weight: 700;
    color: #6366f1;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 12px;
}

.glossary-card__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 15px;
    line-height: 1.2;
}

.glossary-card__desc {
    font-size: 0.95rem;
    color: #64748b;
    line-height: 1.6;
}

.glossary-card__link {
    margin-top: auto;
    padding-top: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #6366f1;
    font-size: 0.9rem;
}

/* Term Page Styles */
.term-header {
    background: #f8fafc;
    padding: 80px 0;
    border-bottom: 1px solid #e2e8f0;
}

.term-breadcrumb {
    margin-bottom: 30px;
    display: flex;
    gap: 10px;
    font-size: 0.9rem;
    color: #64748b;
}

.term-breadcrumb a:hover {
    color: #6366f1;
}

.term-title {
    font-size: 4rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

.term-intro {
    font-size: 1.5rem;
    color: #475569;
    max-width: 800px;
    line-height: 1.5;
}

.term-container {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 60px;
    padding: 80px 0;
}

.term-main {
    max-width: 800px;
}

.term-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

/* Info Boxes */
.term-box {
    background: #f8fafc;
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 40px;
    border: 1px solid #e2e8f0;
}

.term-box--highlight {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    border-color: rgba(99, 102, 241, 0.2);
}

.term-box__title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.term-box__list {
    list-style: none;
    padding: 0;
}

.term-box__list li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 12px;
    font-size: 1rem;
    color: #475569;
}

.term-box__list li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: #6366f1;
    font-weight: 700;
}

/* Sidebar Widgets */
.sidebar-widget {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.sidebar-widget__title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #6366f1;
}

.sidebar-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar-link {
    font-size: 0.95rem;
    color: #64748b;
    text-decoration: none;
    transition: all 0.2s;
    display: flex;
    justify-content: space-between;
}

.sidebar-link:hover {
    color: #6366f1;
    padding-left: 5px;
}

.sidebar-link span {
    color: #cbd5e1;
}

/* Content Typography */
.term-content h2 {
    font-size: 2rem;
    margin: 60px 0 25px;
    color: #0f172a;
    letter-spacing: -0.01em;
}

.term-content p {
    font-size: 1.125rem;
    color: #475569;
    line-height: 1.8;
    margin-bottom: 30px;
}

.term-content ul {
    margin-bottom: 30px;
}

.term-content li {
    font-size: 1.1rem;
    color: #475569;
    margin-bottom: 10px;
}

/* FAQ Section */
.term-faq {
    margin-top: 80px;
    padding-top: 60px;
    border-top: 1px solid #e2e8f0;
}

.term-faq h2 {
    margin-top: 0 !important;
    margin-bottom: 40px !important;
}

.faq-item {
    margin-bottom: 40px;
}

.faq-question {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 15px;
    line-height: 1.4;
}

.faq-answer p {
    font-size: 1.1rem;
    color: #475569;
    line-height: 1.7;
}

.term-cta {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    position: relative;
    overflow: hidden;
    color: #fff;
    padding: 100px 40px;
    border-radius: 40px;
    text-align: center;
    margin-top: 100px;
    box-shadow: 0 20px 40px -10px rgba(79, 70, 229, 0.4);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.term-cta:hover {
    transform: translateY(-8px);
    box-shadow: 0 40px 70px -15px rgba(79, 70, 229, 0.5);
}

.term-cta::before,
.term-cta::after {
    content: "";
    position: absolute;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    filter: blur(100px);
    z-index: 0;
    pointer-events: none;
    animation: cta-orb-pulse 10s infinite alternate ease-in-out;
}

@keyframes cta-orb-pulse {
    0% {
        transform: scale(1) translate(0, 0);
        opacity: 0.5;
    }

    100% {
        transform: scale(1.2) translate(20px, 20px);
        opacity: 0.8;
    }
}

.term-cta::before {
    top: -150px;
    right: -100px;
}

.term-cta::after {
    bottom: -150px;
    left: -100px;
}

.term-cta h3 {
    position: relative;
    z-index: 1;
    font-size: 2.75rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

.term-cta p {
    position: relative;
    z-index: 1;
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto 40px;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.6;
}

.term-cta .btn {
    position: relative;
    z-index: 1;
    background: #fff !important;
    color: #4f46e5 !important;
    font-weight: 700;
    padding: 18px 48px;
    border-radius: 16px;
    font-size: 1.1rem;
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    border: none;
}

.term-cta__badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    z-index: 1;
}

.term-cta .btn span {
    display: inline-block;
    transition: transform 0.3s ease;
}

.term-cta .btn:hover span {
    transform: translateX(5px);
}

@media (max-width: 1100px) {
    .term-container {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 40px 20px;
    }

    .term-sidebar {
        position: static;
        order: 2;
    }

    .term-main {
        order: 1;
    }
}

@media (max-width: 768px) {
    .container {
        padding-left: 20px;
        padding-right: 20px;
    }

    .glossary-hero {
        padding: 60px 0 40px;
    }

    .glossary-hero__title {
        font-size: 2rem;
    }

    .term-title {
        font-size: 2.25rem;
        word-wrap: break-word;
    }

    .term-header {
        padding: 40px 20px;
    }

    .term-intro {
        font-size: 1.1rem;
    }

    .term-content h2 {
        font-size: 1.5rem;
        margin: 40px 0 15px;
    }

    .term-content p {
        font-size: 1rem;
        line-height: 1.6;
    }

    .term-cta {
        padding: 60px 20px;
        margin-top: 60px;
    }

    .term-cta h3 {
        font-size: 1.75rem;
    }

    .term-cta p {
        font-size: 1rem;
    }

    .term-box {
        padding: 20px;
    }
}