@font-face {
    font-family: 'Alexandria';
    src: url('../fonts/alexandria_font.woff2') format('woff2');
    font-weight: 100 300 400 600 700 800 900;
    /* Support variable font weights */
    font-style: normal;
    font-display: swap;
}

/* General Styles */
:root {
    --primary-color: #000000;
    --accent-color: #F49D34;
    --text-color: #666;
    --bg-color: #fff;
    --border-color: #e0e0e0;
    --font-family: 'Alexandria', sans-serif;
}

body {
    font-family: var(--font-family);
    color: var(--primary-color);
    background-color: var(--bg-color);
    margin: 0;
    padding: 0;
}

/* Fix for position sticky - override wrapper overflow */
body.page-template-template-glossary .wrapper {
    overflow-x: visible !important;
}

body.page-template-template-glossary .navbar.bootsnav.navbar-fixed {
    top: 0;
}

body.page-template-template-glossary .navbar.bootsnav.navbar-fixed ul li a {
    color: #000 !important;
}

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    height: 100%;
}

/* Hero Section */
.glossary-hero {
    margin-top: 60px;
    padding: 60px 0 60px;
    text-align: left;
}

.glossary-title {
    color: #000;
    font-family: var(--font-family);
    font-size: 40px;
    font-weight: 600;
}

.glossary-subtitle {
    color: var(--primary-color);
    font-family: var(--font-family);
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 24px;
}

/* Filter Bar */
.glossary-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    align-items: center;
    position: sticky;
    top: 50px;
    z-index: 100;
    background: linear-gradient(to bottom, #fff 70%, transparent);
    padding: 50px 0 60px 0;
    /* box-shadow: 0px 10px 15px 0 rgba(31, 31, 31, 0.07); */
}

.filter-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    font-family: var(--font-family);
    font-size: 16px;
    font-style: normal;
    font-weight: 600;
    line-height: 24px;
    cursor: pointer;
    padding: 5px 10px;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    color: #fff;
    background-color: var(--accent-color);
    border-radius: 4px;
}

/* Glossary Grid */
.glossary-section {
    margin-bottom: 60px;
}

.glossary-letter {
    font-family: var(--font-family);
    font-size: 80px;
    font-style: normal;
    font-weight: 800;
    line-height: normal;
    color: var(--accent-color);
    margin-bottom: 30px;
    padding-bottom: 10px;
}

.terms-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    row-gap: 32px;
    border-bottom: 1px solid #ccc;
    padding-bottom: 42px;
}

.term-item {
    padding: 20px;
    border-radius: 4px;
}

.term-item:hover {
    background-color: #fff6ec;
}

.term-title {
    font-size: 18px;
    font-style: normal;
    font-weight: 500;
    line-height: normal;
    font-family: var(--font-family);
    color: #000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 0 16px 0;
}

.term-title::after {
    content: '↗';
    font-size: 19px;
    font-weight: 800;
    opacity: 0;
    transform: translate(-5px, 5px);
    transition: all 0.3s ease;
}

.term-item:hover .term-title::after {
    opacity: 1;
    transform: translate(0, 0);
}

.term-definition {
    font-size: 16px;
    font-style: normal;
    font-weight: 300;
    line-height: 24px;
    font-family: var(--font-family);
    color: #3D3D3D;
    margin: 0;
}

/* Load More Button */
.glossary-actions {
    text-align: center;
    margin: 60px 0;
}

.btn-load-more {
    background-color: #000;
    color: #fff;
    border: none;
    padding: 15px 40px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    border-radius: 4px;
}

.btn-load-more:hover {
    background-color: #333;
}

.btn-load-more:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* No Data Message */
.no-data-message {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    padding: 60px 20px;
}

.no-data-content {
    text-align: center;
    max-width: 500px;
}

.no-data-content h3 {
    font-family: var(--font-family);
    font-size: 28px;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0 0 16px 0;
}

.no-data-content p {
    font-family: var(--font-family);
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
    color: var(--text-color);
    margin: 0;
}

.no-data-content strong {
    color: var(--accent-color);
    font-weight: 600;
}

/* Responsive */
@media (max-width: 992px) {
    .terms-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .terms-grid {
        grid-template-columns: 1fr;
    }

    .glossary-title {
        font-size: 36px;
    }

    .glossary-hero {
        padding-bottom: 0;
    }

    .glossary-letter {
        font-size: 60px;
    }

    .glossary-filter {
        gap: 10px;
        white-space: nowrap;
        flex-wrap: wrap;
        padding-bottom: 10px;
    }

    .term-item {
        padding: 0px;
    }
}