@charset "UTF-8";

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

/* Ensure 2-column layout matches main site but allows specific overrides */
@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%;
    }
}

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

    .sidebar {
        order: 1;
        /* Sidebar above content on mobile */
        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: #2563eb;
    text-decoration: none;
    transition: color 0.2s;
}

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

/* =========================================
   Glossary Header
   ========================================= */
.glossary-header {
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e5e7eb;
}

.glossary-header h1 {
    font-size: 2rem;
    color: #1f2937;
    margin-bottom: 10px;
}

.glossary-header p {
    color: #6b7280;
    font-size: 1.1rem;
}

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

.glossary-category h2 {
    font-size: 1.6rem;
    color: #1f2937;
    border-bottom: 3px solid #2563eb;
    padding-bottom: 10px;
    margin-bottom: 20px;
    font-weight: 700;
}

.glossary-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

.glossary-item {
    padding: 15px 20px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
}

.glossary-item:hover {
    border-color: #2563eb;
    background: #eff6ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.15);
}

.glossary-item h3 {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
}

.glossary-item h3 a {
    color: #1f2937;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.glossary-item h3 a:hover {
    color: #2563eb;
}

.glossary-item p {
    margin: 0;
    font-size: 0.9rem;
    color: #6b7280;
    line-height: 1.5;
}

/* =========================================
   Glossary Term Page (Article)
   ========================================= */
.glossary-term {
    background: #fff;
    padding: 0;
}

.term-title {
    font-size: 2rem;
    color: #1f2937;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e5e7eb;
    font-weight: 800;
    line-height: 1.3;
}

.term-category {
    display: inline-block;
    background: #2563eb;
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 30px;
    box-shadow: 0 2px 5px rgba(37, 99, 235, 0.2);
}

.term-body {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #374151;
}

.term-body p {
    margin-bottom: 1.5em;
}

.term-body h2 {
    font-size: 1.4rem;
    color: #1f2937;
    margin-top: 2em;
    margin-bottom: 1em;
    padding-bottom: 0.5em;
    border-bottom: 2px solid #e5e7eb;
}

.term-body h3 {
    font-size: 1.2rem;
    color: #374151;
    margin-top: 1.5em;
    margin-bottom: 0.8em;
}

.term-body strong {
    background: linear-gradient(transparent 60%, #bfdbfe 60%);
    padding: 0 2px;
}

.term-body ul {
    background: #f9fafb;
    padding: 20px 20px 20px 40px;
    border-radius: 8px;
    margin-bottom: 30px;
}

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

/* =========================================
   Term Hero Image
   ========================================= */
.term-hero-image {
    width: 100%;
    max-width: 800px;
    height: auto;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* =========================================
   Keywords Section
   ========================================= */
.term-keywords {
    margin-top: 40px;
    padding: 20px;
    background: #f9fafb;
    border-radius: 8px;
}

.term-keywords h3 {
    font-size: 1.1rem;
    margin: 0 0 15px 0;
    color: #1f2937;
}

.keywords-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.keyword-tag {
    display: inline-block;
    background: #e5e7eb;
    color: #374151;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.85rem;
}

/* =========================================
   External Links Section
   ========================================= */
.external-links {
    margin-top: 50px;
    padding: 25px;
    background: #eff6ff;
    border: 2px solid #dbeafe;
    border-radius: 8px;
}

.external-links h3 {
    font-size: 1.2rem;
    margin: 0 0 15px 0;
    color: #1e40af;
    display: flex;
    align-items: center;
}

.external-links h3::before {
    content: "🔗";
    margin-right: 10px;
    font-size: 1rem;
}

.external-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
    background: transparent;
}

.external-links li {
    margin-bottom: 10px;
    border-bottom: 1px dashed #bfdbfe;
    padding-bottom: 5px;
}

.external-links li:last-child {
    border-bottom: none;
}

.external-links a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}

.external-links a:hover {
    text-decoration: underline;
    color: #1d4ed8;
}

/* =========================================
   Sidebar Specifics
   ========================================= */
.sidebar-section {
    margin-bottom: 30px;
}

.sidebar-section h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 15px;
    padding-left: 10px;
    border-left: 4px solid #2563eb;
    color: #1f2937;
}

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

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

.glossary-nav a {
    display: block;
    color: #4b5563;
    text-decoration: none;
    padding: 8px 10px;
    border-radius: 4px;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.glossary-nav a:hover {
    background: #eff6ff;
    color: #2563eb;
    padding-left: 15px;
}

/* =========================================
   Ad Banners
   ========================================= */
.ad-banner {
    text-align: center;
}

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

.amazon-banner-sidebar {
    background: #ff9900;
    color: white;
    text-align: center;
    padding: 10px;
    font-weight: bold;
    border-radius: 4px;
    font-size: 0.9rem;
}

.amazon-banner {
    margin: 20px 0;
}

.amazon-banner div {
    background: #ff9900;
    color: white;
    text-align: center;
    padding: 10px;
    font-weight: bold;
    border-radius: 4px;
}
