/* AZ Glossary Styles */

.az-glossary-wrapper {
    width: 100%;
    padding: 20px;
}

/* Search Field */
.az-glossary-search-container {
    margin-bottom: 30px;
    text-align: center;
}

.az-glossary-search {
    width: 100%;
    padding: 12px 20px;
    outline: none;
    transition: all 0.3s;
    box-sizing: border-box;
}

.az-glossary-search:focus {
    box-shadow: 0 0 0 2px rgba(0, 147, 209, 0.3);
    outline: none;
}

/* A-Z Navigation */
.az-glossary-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 40px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.az-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.az-letter.has-posts {
    background: #2271b1;
    color: #fff;
}

.az-letter.has-posts:hover {
    background: #135e96;
    transform: scale(1.1);
}

.az-letter.no-posts {
    background: #e5e7eb;
    color: #9ca3af;
    cursor: default;
}

.az-letter.active {
    background: #135e96;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.3);
}

/* Content Section */
.az-glossary-content {
    margin-top: 30px;
}

.az-glossary-section {
    margin-bottom: 50px;
    scroll-margin-top: 120px;
}

.az-glossary-letter-heading {
    font-size: 32px;
    font-weight: 700;
    color: #2271b1;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid #2271b1;
}

/* Posts Grid - 3 Column Layout */
.az-glossary-posts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.az-glossary-column {
    background: #f8f9fa;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.az-glossary-post-item {
    padding: 10px 0;
}

.az-glossary-post-item:last-child {
    padding-bottom: 0;
}

.az-glossary-post-item:first-child {
    padding-top: 0;
}

.az-glossary-post-link {
    display: block;
    text-decoration: none;
    color: #000000;
    font-size: 16px;
    font-weight: 500;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.5;
}

.az-glossary-post-link:hover {
    color: #0093d1;
}

/* No Results */
.az-glossary-no-results {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-top: 30px;
}

.az-glossary-no-results p {
    font-size: 18px;
    color: #6b7280;
    margin: 0;
}

/* Hidden state for filtering */
.az-glossary-section.hidden {
    display: none;
}

/* Hidden post items (for search filtering) */
.az-glossary-post-item.az-hidden {
    display: none !important;
}

/* Tablet Styles */
@media screen and (max-width: 992px) {
    .az-glossary-posts {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .az-glossary-column {
        padding: 15px;
    }

    .az-glossary-letter-heading {
        font-size: 28px;
    }
}

/* Mobile Styles */
@media screen and (max-width: 768px) {
    .az-glossary-wrapper {
        padding: 15px;
    }

    .az-glossary-search {
        font-size: 14px;
        padding: 10px 16px;
    }

    .az-glossary-nav {
        gap: 8px;
        padding: 15px;
    }

    .az-letter {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }

    .az-glossary-posts {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .az-glossary-column {
        border: none;
        padding: 0;
        background: transparent;
    }

    .az-glossary-column:first-child {
        background: #f8f9fa;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        padding: 20px;
    }

    .az-glossary-column:not(:first-child) {
        display: none !important;
    }

    .az-glossary-posts .az-glossary-column:first-child .az-glossary-post-item:not(.az-hidden) {
        display: block !important;
    }

    .az-glossary-letter-heading {
        font-size: 24px;
    }

    .az-glossary-post-item {
        padding: 12px 0;
    }

    .az-glossary-post-link {
        font-size: 15px;
    }

    .az-glossary-section {
        scroll-margin-top: 100px;
    }
}

/* Loading State */
.az-glossary-wrapper.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}
