/* Glossary Page Styles */

.glossary-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.glossary-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #0073ea;
}

.glossary-title {
    font-size: 2em;
    color: #333;
    margin-bottom: 10px;
}

.glossary-subtitle {
    font-size: 1.1em;
    color: #666;
}

/* Search Box */
.glossary-search-container {
    position: relative;
    max-width: 400px;
    margin: 0 auto 30px;
}

.glossary-search {
    width: 100%;
    padding: 14px 20px 14px 45px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 30px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.glossary-search:focus {
    border-color: #0073ea;
    box-shadow: 0 0 0 3px rgba(0, 115, 234, 0.1);
}

.glossary-search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: #999;
}

/* Alphabet Navigation */
.glossary-alphabet {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 30px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.alphabet-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.2s;
}

.alphabet-link:hover {
    background: #0073ea;
    color: white;
    border-color: #0073ea;
}

/* Glossary Sections */
.glossary-section {
    margin-bottom: 40px;
    scroll-margin-top: 20px;
}

.section-letter {
    font-size: 1.8em;
    color: #0073ea;
    padding-bottom: 10px;
    border-bottom: 2px solid #0073ea;
    margin-bottom: 20px;
}

/* Individual Terms */
.glossary-term {
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #0073ea;
    transition: transform 0.2s, box-shadow 0.2s;
}

.glossary-term:hover {
    transform: translateX(5px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.term-name {
    font-size: 1.2em;
    color: #333;
    margin: 0 0 10px 0;
}

.term-definition {
    color: #555;
    line-height: 1.7;
    margin: 0 0 10px 0;
}

.term-related {
    font-size: 0.9em;
    color: #666;
    margin: 0;
}

.term-related a {
    color: #0073ea;
    text-decoration: none;
}

.term-related a:hover {
    text-decoration: underline;
}

/* Back to Top */
.glossary-back-to-top {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.back-to-top-link {
    display: inline-block;
    padding: 10px 20px;
    background: #0073ea;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.2s;
}

.back-to-top-link:hover {
    background: #005bb5;
}

/* Responsive Design */
@media (max-width: 768px) {
    .glossary-alphabet {
        gap: 5px;
        padding: 10px;
    }

    .alphabet-link {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }

    .glossary-term {
        padding: 15px;
    }

    .term-name {
        font-size: 1.1em;
    }
}

@media (max-width: 480px) {
    .glossary-title {
        font-size: 1.5em;
    }

    .alphabet-link {
        width: 28px;
        height: 28px;
        font-size: 11px;
    }

    .glossary-search {
        padding: 12px 15px 12px 40px;
        font-size: 14px;
    }
}

/* Print Styles */
@media print {
    .glossary-search-container,
    .glossary-alphabet,
    .glossary-back-to-top {
        display: none;
    }

    .glossary-term {
        break-inside: avoid;
        page-break-inside: avoid;
        border-left: 2px solid #333;
        background: white;
    }

    .term-related {
        display: none;
    }
}
