/* UV Labs Glossary page styles (extracted from dist/glossary/index.html) */

/* Glossary accent palette — teal (brand) */
:root {
    --teal-dark: #10545f;
    --teal-mid: #18778c;
    --teal-light: #4aa5b8;
}

/* Glossary Page Styles */
.glossary-hero {
    position: relative;
    padding: 120px 48px 80px;
    background: var(--bg1);
    overflow: hidden;
}

/* Decorative grid pattern */
.glossary-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(24, 119, 140, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(24, 119, 140, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
}

/* Soft gradient orb */
.glossary-hero::after {
    content: '';
    position: absolute;
    top: -20%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(24, 119, 140, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.glossary-hero-inner {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    text-align: center;
}

.glossary-hero-content {
    max-width: 100%;
}

.glossary-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font: 500 0.6875rem / 1 var(--mono);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--teal-mid);
    background: rgba(24, 119, 140, 0.08);
    border: 1px solid rgba(24, 119, 140, 0.15);
    padding: 10px 16px;
    border-radius: 100px;
    margin-bottom: 24px;
}

.glossary-badge svg {
    width: 14px;
    height: 14px;
    stroke: var(--teal-mid);
}

.glossary-hero h1 {
    font: 300 clamp(2.4rem, 4.5vw, 3.4rem) / 1.08 var(--title);
    color: var(--bgInverse);
    margin: 0 0 28px;
    letter-spacing: -0.025em;
}

.glossary-hero h1 em,
section.glossary-hero h1 em,
div.glossary-hero h1 em {
    display: block;
    font-family: 'Bitter', serif !important;
    font-style: italic !important;
    font-weight: 700 !important;
    font-size: 1.25em;
    letter-spacing: -0.035em;
    background: linear-gradient(to bottom, var(--teal-mid), var(--bgInverse) 75%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

.glossary-hero-lead {
    font: 500 15px / 1.6 var(--body);
    color: #555;
    margin-bottom: 32px;
}

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

.glossary-search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    stroke: #888;
    pointer-events: none;
}

#glossary-search {
    width: 100%;
    padding: 14px 70px 14px 48px;
    font: 500 15px / 1 var(--body);
    color: var(--bgInverse);
    background: var(--bg0);
    border: 1px solid var(--bgBorder);
    border-radius: 12px;
    outline: none;
    transition: all 0.2s ease;
}

#glossary-search:focus {
    border-color: var(--teal-mid);
    box-shadow: 0 0 0 3px rgba(24, 119, 140, 0.1);
}

#glossary-search::placeholder {
    color: #999;
}

.glossary-search-hint {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font: 500 0.6875rem / 1 var(--mono);
    color: #888;
    background: var(--bg1);
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid var(--bgBorder);
}

/* No results message */
.glossary-no-results {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.glossary-no-results h3 {
    font: 500 18px / 1.3 var(--title);
    color: var(--bgInverse);
    margin-bottom: 8px;
}

.glossary-no-results p {
    font: 500 15px / 1.6 var(--body);
}

/* Search highlight */
.glossary-term.search-hidden {
    display: none;
}

.glossary-category.search-hidden {
    display: none;
}

/* Category Filter */
.glossary-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.glossary-category-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font: 500 0.8125rem / 1 var(--body);
    padding: 10px 16px;
    background: var(--bg0);
    border: 1px solid var(--bgBorder);
    border-radius: 8px;
    color: var(--bgInverse);
    text-decoration: none;
    transition: all 0.2s ease;
}

.glossary-category-btn:hover,
.glossary-category-btn.active {
    background: var(--teal-mid);
    border-color: var(--teal-mid);
    color: white;
}

.glossary-category-btn svg {
    width: 14px;
    height: 14px;
}

.glossary-expand-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font: 500 0.8125rem / 1 var(--body);
    color: #666;
    background: var(--bg0);
    border: 1px solid var(--bgBorder);
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.glossary-expand-btn:hover {
    color: var(--bgInverse);
    border-color: var(--bgInverse);
}

.glossary-expand-btn svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    transition: transform 0.2s ease;
}

.glossary-expand-btn.expanded svg {
    transform: rotate(180deg);
}

/* Main Content */
.glossary-content {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 48px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 48px;
    background: var(--bg1);
}

/* Sidebar Navigation */
.glossary-sidebar {
    position: sticky;
    top: 24px;
    align-self: start;
}

.glossary-sidebar-title {
    font: 500 0.6875rem / 1 var(--mono);
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #888;
    margin-bottom: 16px;
    padding-left: 12px;
}

.glossary-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.glossary-sidebar-link {
    display: block;
    font: 500 0.875rem / 1.4 var(--body);
    color: #666;
    padding: 8px 12px;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.15s ease;
    border-left: 2px solid transparent;
}

.glossary-sidebar-link:hover {
    color: var(--bgInverse);
    background: var(--bg0);
}

.glossary-sidebar-link.active {
    color: var(--teal-mid);
    background: rgba(24, 119, 140, 0.08);
    border-left-color: var(--teal-mid);
}

/* Terms Container */
.glossary-terms {
    min-width: 0;
}

/* Category Section */
.glossary-category {
    margin-bottom: 64px;
}

.glossary-category:last-child {
    margin-bottom: 0;
}

.glossary-category-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--bgBorder);
}

.glossary-category-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--teal-dark), var(--teal-mid));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.glossary-category-icon svg {
    width: 24px;
    height: 24px;
    stroke: white;
}

.glossary-category-title {
    font: 300 clamp(22px, 2.4vw, 28px) / 1.2 var(--title);
    color: var(--bgInverse);
}

.glossary-category-count {
    font: 500 0.8125rem / 1 var(--body);
    color: #888;
}

/* Term Card - Accordion Style */
.glossary-term {
    background: var(--bg0);
    border: 1px solid var(--bgBorder);
    border-radius: 10px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
    overflow: hidden;
}

.glossary-term:hover {
    border-color: rgba(24, 119, 140, 0.4);
    background: linear-gradient(135deg, var(--bg0) 0%, rgba(24, 119, 140, 0.02) 100%);
}

.glossary-term.open {
    border-color: var(--teal-mid);
    box-shadow: 0 4px 20px rgba(24, 119, 140, 0.1);
}

.glossary-term:last-child {
    margin-bottom: 0;
}

/* Accordion Toggle Button */
.glossary-term-toggle {
    width: 100%;
    padding: 16px 18px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    cursor: pointer;
    background: none;
    border: none;
    text-align: left;
}

.glossary-term-toggle-content {
    flex: 1;
    min-width: 0;
}

.glossary-term-toggle-icon {
    width: 18px;
    height: 18px;
    stroke: #aaa;
    flex-shrink: 0;
    transition: all 0.25s ease;
    margin-top: 3px;
}

.glossary-term:hover .glossary-term-toggle-icon {
    stroke: var(--teal-mid);
}

.glossary-term.open .glossary-term-toggle-icon {
    transform: rotate(180deg);
    stroke: var(--teal-mid);
}

/* Accordion Content */
.glossary-term-content {
    display: none;
    padding: 0 18px 18px 18px;
}

.glossary-term.open .glossary-term-content {
    display: block;
}

.glossary-term-header {
    margin-bottom: 0;
}

.glossary-term-name {
    font: 500 17px / 1.3 var(--title);
    color: var(--bgInverse);
    margin: 0 0 6px 0;
}

.glossary-term-tldr {
    font: 500 14px / 1.5 var(--body);
    color: #666;
    margin: 0;
}

.glossary-term:hover .glossary-term-name {
    color: var(--teal-mid);
}

.glossary-term.open .glossary-term-name {
    color: var(--teal-mid);
}

.glossary-term.open .glossary-term-tldr {
    color: #555;
}

.glossary-term-body {
    margin-bottom: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--bgBorder);
}

.glossary-term-body p {
    font: 500 15px / 1.6 var(--body);
    color: #555;
    margin-bottom: 14px;
}

.glossary-term-body p:last-child {
    margin-bottom: 0;
}

/* Example Box */
.glossary-example {
    background: var(--bg1);
    border-radius: 12px;
    padding: 20px 24px;
    margin-top: 20px;
}

.glossary-example-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font: 500 0.75rem / 1 var(--mono);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--teal-mid);
    margin-bottom: 10px;
}

.glossary-example-label svg {
    width: 14px;
    height: 14px;
    stroke: var(--teal-mid);
}

.glossary-example p {
    font: 500 15px / 1.6 var(--body);
    color: #666;
    margin: 0;
}

/* Why It Matters Box */
.glossary-why {
    background: linear-gradient(135deg, rgba(24, 119, 140, 0.06) 0%, rgba(24, 119, 140, 0.02) 100%);
    border: 1px solid rgba(24, 119, 140, 0.15);
    border-radius: 12px;
    padding: 20px 24px;
    margin-top: 20px;
}

.glossary-why-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font: 500 0.75rem / 1 var(--mono);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--teal-mid);
    margin-bottom: 10px;
}

.glossary-why-label svg {
    width: 14px;
    height: 14px;
    stroke: var(--teal-mid);
}

.glossary-why p {
    font: 500 15px / 1.6 var(--body);
    color: #555;
    margin: 0;
}

/* Related Terms */
.glossary-related {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--bgBorder);
}

.glossary-related-label {
    font: 500 0.75rem / 1 var(--mono);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
    margin-right: 8px;
    align-self: center;
}

.glossary-related-tag {
    font: 500 0.8125rem / 1 var(--body);
    color: #666;
    background: var(--bg1);
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.15s ease;
}

.glossary-related-tag:hover {
    color: var(--teal-mid);
    background: rgba(24, 119, 140, 0.1);
}

/* CTA Section - About page style */
.glossary-cta {
    padding: 60px 48px 100px;
    background: var(--bg0);
}

.glossary-cta-box {
    max-width: 1100px;
    margin: 0 auto;
    padding: 80px 60px;
    background: linear-gradient(135deg, var(--teal-dark) 0%, #6a4a8a 50%, var(--bgInverse) 100%);
    border-radius: 28px;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.glossary-cta-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}

.glossary-cta-box::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(158, 124, 196, 0.15) 0%, transparent 60%);
    pointer-events: none;
}

.glossary-cta-inner {
    position: relative;
    z-index: 1;
}

.glossary-cta-label {
    font: 500 0.6875rem / 1 var(--mono);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--teal-light);
    margin-bottom: 20px;
}

.glossary-cta h2 {
    font: 300 clamp(30px, 3.4vw, 40px) / 1.15 var(--title);
    color: #fff;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.glossary-cta p {
    font: 500 16px / 1.6 var(--body);
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 32px;
}

.glossary-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font: 500 15px / 1 var(--body);
    padding: 18px 36px;
    background: white;
    color: var(--teal-dark);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glossary-cta-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
}

.glossary-cta-btn svg {
    width: 18px;
    height: 18px;
    stroke: var(--teal-dark);
}

.glossary-cta-visual {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cta-decorative {
    width: 200px;
    height: 200px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.cta-decorative::before {
    content: '';
    position: absolute;
    width: 150px;
    height: 150px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
}

.cta-decorative::after {
    content: '';
    position: absolute;
    width: 100px;
    height: 100px;
    background: rgba(158, 124, 196, 0.2);
    border-radius: 50%;
}

/* Responsive */
@media (max-width: 1024px) {
    .glossary-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .glossary-sidebar {
        position: static;
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        padding: 16px;
        background: var(--bg0);
        border-radius: 12px;
    }
    .glossary-sidebar-title {
        width: 100%;
        margin-bottom: 8px;
    }
    .glossary-sidebar-nav {
        flex-direction: row;
        flex-wrap: wrap;
    }
    .glossary-sidebar-link {
        border-left: none;
        border-bottom: 2px solid transparent;
    }
    .glossary-sidebar-link.active {
        border-left-color: transparent;
        border-bottom-color: var(--teal-mid);
    }
    .glossary-cta-box {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .glossary-cta-visual {
        display: none;
    }
}

@media (max-width: 768px) {
    .glossary-hero {
        padding: 100px 24px 60px;
    }
    .glossary-content {
        padding: 40px 24px;
    }
    .glossary-term {
        padding: 24px;
    }
    .glossary-category-header {
        gap: 12px;
    }
    .glossary-category-icon {
        width: 40px;
        height: 40px;
    }
    .glossary-cta {
        padding: 40px 24px 60px;
    }
    .glossary-cta-box {
        padding: 40px 24px;
        border-radius: 20px;
    }
    .glossary-cta h2 {
        font-size: 1.75rem;
    }
}

/* Injected accordion heading: span (not h3) for a11y inside <button> */
.uv-term-heading {
    display: block;
}

/* "Read more" cross-link from a term to its matching blog post */
.glossary-read-more {
    font: 500 0.8125rem / 1 var(--body);
    color: var(--teal-mid);
    text-decoration: none;
    padding: 6px 0;
    transition: color 0.15s ease;
}

.glossary-read-more:hover {
    color: var(--teal-dark);
}
