.taxonomy-dictionary .alphabet-index {
    scroll-margin-top: 80px;
    display: flex;
    flex-wrap: wrap;
    max-width: 800px;
    margin-bottom: 50px;
}
.taxonomy-dictionary .alphabet-index a {
    margin: 5px;
    padding: 10px 15px;
    text-decoration: none;
    background-color: #f1f1f1;
    color: #333;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}
.taxonomy-dictionary .alphabet-index a:hover {
    background-color: #ddd;
}
.taxonomy-dictionary .alphabet-block {
    display: flex;
    flex-direction: column;
}
.taxonomy-dictionary .alphabet-section {
    scroll-margin-top: 80px;
    display: grid;
    grid-template-columns: 0.5fr repeat(2, 1fr);
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #ddd;
}
.taxonomy-dictionary .alphabet-letter {
    grid-column: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
}
.taxonomy-dictionary .alphabet-letter h3 {
    margin: 0;
    font-weight: bold;
    font-size: 1.5em;
}
.taxonomy-dictionary .back-to-top {
    margin-top: 10px;
    font-size: 0.9em;
}
.taxonomy-dictionary ul {
    grid-column: 2 / 6;
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}
.taxonomy-dictionary li {
    margin: 0;
    padding: 15px 5px;
}
.taxonomy-dictionary li a {
    text-decoration: none;
    color: #333;
    display: inline-block;
}
.taxonomy-dictionary li a:hover {
    color: #000;
}
.taxonomy-dictionary .term-taxonomy {
    font-size: 0.8em;
    color: #666;
}
/* Responsive adjustments */
@media (max-width: 992px) {
    .taxonomy-dictionary .alphabet-section {
        grid-template-columns: 0.5fr repeat(3, 1fr);
        scroll-margin-top: 100px; /* Adjust if header height changes on tablet */
    }
    .taxonomy-dictionary ul {
        grid-column: 2 / 5;
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 768px) {
    .taxonomy-dictionary .alphabet-section {
        grid-template-columns: 0.5fr repeat(2, 1fr);
        scroll-margin-top: 100px; /* Adjust if header height changes on mobile */
    }
    .taxonomy-dictionary ul {
        grid-column: 2 / 4;
        grid-template-columns: repeat(2, 1fr);
    }
}
