/* -----------------------------
   Global safety
------------------------------ */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* -----------------------------
   Body background
------------------------------ */
body {
    background: linear-gradient(0deg, #F5F1DD 0%, #F5F1DD 100%), #FFF;
    margin: 0;
    padding: 0;
}

/* -----------------------------
   Glossary archive container
------------------------------ */
.glossary-archive {
    max-width: 1266px;
    width: 100%;
    margin: 0 auto;
    padding: 60px 20px;
    text-align: center;
}

/* -----------------------------
   Page title
------------------------------ */
.glossary-title {
    color: #0F1616;
    font-family: Marcellus, serif;
    font-size: clamp(48px, 10vw, 150px);
    font-weight: 400;
    line-height: 1;
    opacity: 0.04;
    margin-bottom: 60px;
}

/* -----------------------------
   Search field
------------------------------ */
#glossary-search {
    width: 100%;
    max-width: 680px;
    padding: 24px 27px;
    border-radius: 16px;
    background: #FFF;
    font-size: 16px;
    border: 1px solid #ddd;
    text-align: center;
    margin: 0 auto;
    display: block;
}

/* -----------------------------
   A–Z filter container
------------------------------ */
.glossary-az-filter {
    display: flex;
    width: 100%;
    max-width: 1266px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    border-radius: 20px;
    background: rgba(243, 210, 166, 0.40);
    margin: 20px auto 40px;
    padding: 20px 22px;
}

/* -----------------------------
   A–Z letters
------------------------------ */
.glossary-letter {
    color: #0F1616;
    font-family: "DM Sans", sans-serif;
    font-size: clamp(16px, 3vw, 26px);
    font-weight: 400;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 6px;
    background: transparent;
    border: none;
    transition: all 0.3s ease;
}

.glossary-letter:hover {
    background: rgba(0,0,0,0.05);
}

.glossary-letter.active {
    color: #FFF;
    background: var(--e-global-color-primary);
}

/* -----------------------------
   Glossary grid
------------------------------ */
.glossary-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 27px;
    width: 100%;
    max-width: 1266px;
    margin: 0 auto;
}

/* -----------------------------
   Glossary card
------------------------------ */
.glossary-grid .glossary-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 390px;
    padding: 30px;
    gap: 10px;
    border-radius: 20px;
    background: #FFF;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    text-align: center;
}

/* -----------------------------
   Card title
------------------------------ */
.glossary-card-title a {
    font-size: 20px;
    font-weight: 600;
    color: var(--e-global-color-primary);
    text-decoration: none;
}

/* -----------------------------
   Card excerpt
------------------------------ */
.glossary-card-excerpt {
    margin: 15px 0;
    color: #555;
    font-size: 15px;
}

/* -----------------------------
   Read more button
------------------------------ */
.glossary-card-button {
    display: inline-block;
    padding: 10px 20px;
    background: var(--e-global-color-primary);
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
}

/* -----------------------------
   No items message
------------------------------ */
.no-glossary-items {
    width: 100%;
    text-align: center;
    color: #777;
    font-size: 16px;
}


/* =========================
   Skeleton Loader
========================= */

.glossary-skeleton {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
    width: 100%;
}

.glossary-skeleton-card {
    width: 399px;
    height: 220px;
    border-radius: 20px;
    background: linear-gradient(
        90deg,
        #f0f0f0 25%,
        #e6e6e6 37%,
        #f0f0f0 63%
    );
    background-size: 400% 100%;
    animation: skeleton-loading 1.4s ease infinite;
}

/* Skeleton shimmer animation */
@keyframes skeleton-loading {
    0% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0 50%;
    }
}


/* Responsive */
@media (max-width: 1024px) {
    .glossary-skeleton-card {
        flex: 0 0 calc(50% - 15px);
    }
}

@media (max-width: 600px) {
    .glossary-skeleton-card {
        flex: 0 0 100%;
    }
}


/* -----------------------------
   Tablet adjustments
------------------------------ */
@media (max-width: 1024px) {
    .glossary-archive {
        padding: 50px 16px;
    }

    .glossary-grid {
        gap: 20px;
    }
}

/* -----------------------------
   Mobile adjustments
------------------------------ */
@media (max-width: 767px) {
    .glossary-title {
        margin-bottom: 40px;
    }

    .glossary-az-filter {
        padding: 16px;
    }

    .glossary-letter {
        font-size: 16px;
        padding: 6px 8px;
    }

    .glossary-grid .glossary-card {
        padding: 24px 20px;
    }
}
