/**
 * WHS Glossary & Term Styles
 */

/* ============================================
   SINGLE TERM PAGE
   ============================================ */

.whs-term-single {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.term-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
}

.term-header {
    padding: 40px;
    border-bottom: 1px solid #eee;
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
}

.term-breadcrumb {
    margin-bottom: 20px;
}

.term-breadcrumb a {
    color: #666;
    text-decoration: none;
    font-size: 14px;
}

.term-breadcrumb a:hover {
    color: #333;
}

.term-title {
    font-size: 2.5rem;
    margin: 0 0 15px;
    color: #1a1a1a;
}

.term-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.term-category-badge {
    display: inline-block;
    padding: 4px 12px;
    background: #e9ecef;
    border-radius: 20px;
    font-size: 12px;
    color: #495057;
}

/* Term content layout */
.term-content-wrapper {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    padding: 40px;
}

@media (max-width: 900px) {
    .term-content-wrapper {
        grid-template-columns: 1fr;
    }
}

.term-main {
    min-width: 0;
}

.term-section {
    margin-bottom: 35px;
}

.term-section h2 {
    font-size: 1.25rem;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #4A90A4;
}

.definition-text {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #333;
}

.extended-content {
    line-height: 1.7;
    color: #444;
}

.extended-content p {
    margin-bottom: 1em;
}

/* Perspectives section */
.term-perspectives .section-intro {
    color: #666;
    font-style: italic;
    margin-bottom: 20px;
}

.perspectives-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.perspective-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    border-left: 4px solid #4A90A4;
}

.perspective-method {
    font-weight: 600;
    color: #4A90A4;
    margin-bottom: 8px;
}

.perspective-definition {
    line-height: 1.6;
    color: #333;
}

.perspective-source {
    margin-top: 10px;
    font-size: 12px;
    color: #888;
}

/* Context note */
.context-note-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: #fff3cd;
    border-radius: 8px;
    color: #856404;
}

.context-note-box svg {
    flex-shrink: 0;
}

/* Sidebar */
.term-sidebar {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.sidebar-box {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
}

.sidebar-box h3 {
    font-size: 1rem;
    margin: 0 0 15px;
    color: #333;
}

.episode-links,
.related-terms-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.episode-links li,
.related-terms-list li {
    margin-bottom: 10px;
}

.episode-links a,
.related-terms-list a {
    color: #4A90A4;
    text-decoration: none;
}

.episode-links a:hover,
.related-terms-list a:hover {
    text-decoration: underline;
}

.sidebar-cta {
    background: linear-gradient(135deg, #4A90A4 0%, #3a7a8a 100%);
    color: #fff;
}

.sidebar-cta h3 {
    color: #fff;
}

.sidebar-cta p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

.sidebar-cta a {
    color: #fff;
    font-weight: 600;
}

/* ============================================
   GLOSSARY ARCHIVE PAGE
   ============================================ */

.whs-glossary-archive {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.glossary-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding: 40px;
}

.glossary-archive-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid #eee;
}

.glossary-archive-header h1 {
    font-size: 2.5rem;
    margin: 0 0 15px;
    color: #1a1a1a;
}

.glossary-intro {
    max-width: 700px;
    margin: 0 auto;
    color: #666;
    font-size: 1.1rem;
    line-height: 1.6;
}

/* Letter navigation */
.glossary-letter-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 30px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.glossary-letter-nav .nav-label {
    color: #666;
    font-size: 14px;
    margin-right: 10px;
}

.glossary-letter-nav a {
    display: inline-block;
    width: 32px;
    height: 32px;
    line-height: 32px;
    text-align: center;
    background: #fff;
    border-radius: 4px;
    color: #4A90A4;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.glossary-letter-nav a:hover {
    background: #4A90A4;
    color: #fff;
}

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

.glossary-search input {
    width: 100%;
    padding: 12px 45px 12px 20px;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s;
}

.glossary-search input:focus {
    border-color: #4A90A4;
}

.glossary-search svg {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

/* Letter sections */
.letter-section {
    margin-bottom: 40px;
}

.letter-heading {
    font-size: 1.5rem;
    color: #4A90A4;
    padding-bottom: 10px;
    border-bottom: 2px solid #4A90A4;
    margin-bottom: 20px;
}

/* Terms grid */
.terms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.glossary-term-card {
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.2s;
}

.glossary-term-card:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.term-card-link {
    display: block;
    padding: 20px;
    text-decoration: none;
    color: inherit;
}

.term-card-title {
    font-size: 1.1rem;
    margin: 0 0 10px;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.term-card-definition {
    margin: 0;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.term-card-episodes {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #e0e0e0;
    font-size: 12px;
    color: #4A90A4;
}

.term-card-episodes .episodes-label {
    color: #888;
    margin-right: 4px;
}

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

/* Footer */
.glossary-footer {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #eee;
    text-align: center;
    color: #666;
}

.glossary-footer a {
    color: #4A90A4;
}

/* ============================================
   CONTESTATION BADGES (shared)
   ============================================ */

.contestation-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.contestation-badge.terminology {
    background: #e3f2fd;
    color: #1565c0;
}

.contestation-badge.contested {
    background: #fff3e0;
    color: #e65100;
}

.contestation-badge.highly-contested {
    background: #ffebee;
    color: #c62828;
}

.contestation-badge.whs {
    background: #e8f5e9;
    color: #2e7d32;
}
