@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: 1400px;
        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: #6b7280;
    background: #f0fdf4;
    padding: 10px 15px;
    border-radius: 8px;
}

.breadcrumb a {
    color: #2d5016;
    text-decoration: none;
    transition: color 0.2s;
    font-weight: 500;
}

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

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

.glossary-category h2 {
    font-size: 1.8rem;
    color: #2d5016;
    border-bottom: 3px solid #4ade80;
    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 li a {
    display: block;
    padding: 15px 20px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    color: #1f2937;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(45, 80, 22, 0.05);
    position: relative;
}

.term-list li a:hover {
    border-color: #4ade80;
    background: #f0fdf4;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(74, 222, 128, 0.2);
    color: #2d5016;
}

.term-list li a::after {
    content: "→";
    position: absolute;
    right: 15px;
    color: #ccc;
    transition: color 0.2s;
}

.term-list li a:hover::after {
    color: #4ade80;
}

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

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

.term-category {
    display: inline-block;
    background: linear-gradient(135deg, #2d5016 0%, #16a34a 100%);
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 30px;
    box-shadow: 0 2px 5px rgba(45, 80, 22, 0.2);
}

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

.term-body h2 {
    font-size: 1.8rem;
    color: #2d5016;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid #f59e0b;
    font-weight: 700;
}

.term-body h3 {
    font-size: 1.4rem;
    color: #16a34a;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

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

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

/* Highlights in text */
.term-body ul {
    background: #f0fdf4;
    padding: 20px 20px 20px 40px;
    border-radius: 8px;
    margin-bottom: 30px;
    border-left: 4px solid #4ade80;
}

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

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

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

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

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

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

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

.external-links a {
    color: #d97706;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

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

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

.sidebar h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 15px;
    padding-left: 10px;
    border-left: 4px solid #4ade80;
    color: #2d5016;
}

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

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

.glossary-nav a {
    display: block;
    color: #6b7280;
    text-decoration: none;
    padding: 8px 10px;
    border-radius: 6px;
    transition: all 0.2s;
    font-weight: 500;
}

.glossary-nav a:hover {
    background: #f0fdf4;
    color: #2d5016;
    padding-left: 15px;
}

/* =========================================
   Ad Section in Sidebar
   ========================================= */
.ad-section {
    background: #f9fafb;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    text-align: center;
    margin-bottom: 30px;
}

.ad-section p {
    color: #6b7280;
    font-size: 0.85rem;
    margin: 10px 0 0 0;
}

/* =========================================
   Amazon Banner
   ========================================= */
.amazon-banner {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    text-align: center;
    padding: 12px;
    font-weight: bold;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.2);
}

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

    .glossary-category h2 {
        font-size: 1.5rem;
    }

    .term-body {
        font-size: 1rem;
    }

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

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