@charset "UTF-8";

/* =========================================
   Glossary Page Layout & Base Styles
   ========================================= */

/* 2-column layout for desktop */
@media screen and (min-width: 769px) {
    .page-container {
        display: flex;
        justify-content: space-between;
        max-width: 1200px;
        margin: 0 auto;
        padding: 40px 20px;
        gap: 40px;
    }

    .main-content {
        width: 70%;
    }

    .sidebar {
        width: 28%;
    }
}

/* Mobile: Sidebar above content */
@media screen and (max-width: 768px) {
    .page-container {
        display: flex;
        flex-direction: column;
        padding: 20px;
    }

    .sidebar {
        order: 1;
        margin-bottom: 40px;
    }

    .main-content {
        order: 2;
    }
}

/* =========================================
   Breadcrumb
   ========================================= */
.breadcrumb {
    margin-bottom: 30px;
    font-size: 0.9em;
    color: #666;
    background: #f8f9fa;
    padding: 10px 15px;
    border-radius: 4px;
}

.breadcrumb a {
    color: #0066cc;
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    text-decoration: underline;
    color: #004499;
}

/* =========================================
   Glossary Index Page (Category & List)
   ========================================= */
.glossary-category {
    margin-bottom: 50px;
    background: #fff;
    border-radius: 8px;
}

.glossary-category h2 {
    font-size: 1.8rem;
    color: #333;
    border-bottom: 3px solid #2c3e50;
    padding-bottom: 10px;
    margin-bottom: 20px;
    font-weight: 700;
}

.term-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

.term-list li {
    margin: 0;
}

.term-list a {
    display: block;
    padding: 15px 20px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    color: #2c3e50;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.term-list a:hover {
    background: #2c3e50;
    color: #fff;
    border-color: #2c3e50;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(44, 62, 80, 0.2);
}

/* =========================================
   Individual Term Page
   ========================================= */
.term-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
}

.term-header h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 10px;
    line-height: 1.3;
}

.term-category-label {
    display: inline-block;
    padding: 6px 14px;
    background: #2c3e50;
    color: #fff;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 15px;
}

/* Hero Image Section */
.term-hero-image {
    width: 100%;
    margin: 30px 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.term-hero-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Term Content */
.term-content {
    line-height: 1.8;
    color: #333;
    font-size: 1.05rem;
}

.term-content h2 {
    font-size: 1.8rem;
    color: #2c3e50;
    margin-top: 40px;
    margin-bottom: 20px;
    padding-left: 12px;
    border-left: 4px solid #2c3e50;
}

.term-content h3 {
    font-size: 1.4rem;
    color: #34495e;
    margin-top: 30px;
    margin-bottom: 15px;
}

.term-content p {
    margin-bottom: 20px;
}

.term-content ul,
.term-content ol {
    margin-bottom: 20px;
    padding-left: 25px;
}

.term-content li {
    margin-bottom: 10px;
}

/* External Links Section */
.term-links {
    margin-top: 40px;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.term-links h3 {
    font-size: 1.3rem;
    color: #2c3e50;
    margin-bottom: 15px;
}

.term-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.term-links li {
    margin-bottom: 12px;
    padding-left: 20px;
    position: relative;
}

.term-links li:before {
    content: "🔗";
    position: absolute;
    left: 0;
}

.term-links a {
    color: #0066cc;
    text-decoration: none;
    transition: color 0.2s;
}

.term-links a:hover {
    text-decoration: underline;
    color: #004499;
}

/* =========================================
   Sidebar Styles
   ========================================= */
.sidebar-section {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
    border: 1px solid #dee2e6;
}

.sidebar-section h3 {
    font-size: 1.2rem;
    color: #2c3e50;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #2c3e50;
}

.glossary-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.glossary-nav li {
    margin-bottom: 10px;
}

.glossary-nav a {
    display: block;
    padding: 10px 12px;
    color: #2c3e50;
    text-decoration: none;
    background: #f8f9fa;
    border-radius: 4px;
    transition: all 0.2s;
    font-weight: 500;
}

.glossary-nav a:hover {
    background: #2c3e50;
    color: #fff;
    transform: translateX(5px);
}

/* Ad Banners in Sidebar */
.ad-banner {
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    text-align: center;
}

.ad-banner img {
    max-width: 100%;
    height: auto;
}

/* =========================================
   Content Ad Styles (inline ads)
   ========================================= */
.content-ad {
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border: 1px dashed #adb5bd;
    border-radius: 6px;
    text-align: center;
}

.content-ad img {
    max-width: 100%;
    height: auto;
}

/* =========================================
   Responsive Adjustments
   ========================================= */
@media screen and (max-width: 768px) {
    .term-header h1 {
        font-size: 2rem;
    }

    .term-content h2 {
        font-size: 1.5rem;
    }

    .term-content h3 {
        font-size: 1.2rem;
    }

    .term-list {
        grid-template-columns: 1fr;
    }
}
