/* ==========================================================================
   ISB Glossary Detail Page - Full PX Font Units & Responsive Support
   ========================================================================== */

/* 1. Global Font Force & Base Reset */
.isb-detail-page,
.isb-detail-page * {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    box-sizing: border-box;
}

.isb-detail-page {
    background-color: #F8FAFC !important;
    color: #0F172A;
    margin: 0;
    padding: 0;
}

/* 2. Hero Header Section */
.glossary-hero-section {
    background: #0F172A;
    color: #FFFFFF;
    padding: 44px 0 52px 0;
    border-bottom: 1px solid #1E293B;
}

.isb-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Breadcrumbs Styling */
.isb-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px !important;
    color: #94A3B8;
    margin-bottom: 20px;
}

.isb-breadcrumbs a {
    color: #94A3B8 !important;
    text-decoration: none !important;
    transition: color 0.2s;
}

.isb-breadcrumbs a:hover {
    color: #38BDF8 !important;
}

.isb-breadcrumbs .separator { color: #475569; }
.isb-breadcrumbs .current { color: #F8FAFC; font-weight: 500; }

.hero-term-meta { margin-bottom: 12px; }

.category-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 12px !important;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-engineering {
    background: rgba(37, 99, 235, 0.2);
    color: #60A5FA;
    border: 1px solid rgba(96, 165, 250, 0.3);
}

.hero-term-title {
    font-size: 36px !important;
    font-weight: 700;
    color: #FFFFFF;
    letter-spacing: -0.025em;
    margin: 0;
    line-height: 1.2;
}

/* 3. Main Body Grid Layout & Height Balance Rules */
.glossary-body-section {
    padding: 48px 0 96px 0 !important;
    background-color: #F8FAFC !important;
}

.detail-layout-grid {
    display: grid !important;
    grid-template-columns: 1fr 320px !important;
    gap: 32px !important;
}

/* Cột Trái: Main Article Card (Đảm bảo height luôn >= Sidebar) */
.glossary-main-card {
    background: #FFFFFF !important;
    border: 1px solid #E2E8F0 !important;
    border-radius: 16px !important;
    padding: 36px 40px !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03) !important;
    
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
}

.article-section {
    margin-bottom: 32px;
}

.article-section:last-child {
    margin-bottom: 0;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #0F172A !important;
    margin: 0 0 12px 0 !important;
    letter-spacing: -0.01em;
}

.accent-bar {
    display: inline-block;
    width: 4px;
    height: 16px;
    background: #2563EB;
    border-radius: 4px;
}

.text-lead {
    font-size: 17px !important;
    line-height: 1.75 !important;
    color: #1E293B !important;
    margin: 0 !important;
}

.text-body {
    font-size: 15px !important;
    line-height: 1.7 !important;
    color: #475569 !important;
    margin: 0 !important;
}

/* 4. Cột Phải: Streamlined Sidebar */
.glossary-sidebar {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
    align-self: start !important;
    position: sticky !important;
    top: 32px !important;
}

/* 4a. Streamlined CTA Card */
.sidebar-cta-card {
    background: linear-gradient(180deg, #F0F7FF 0%, #FFFFFF 100%) !important;
    border: 1px solid #DBEAFE !important;
    border-radius: 16px !important;
    padding: 22px 20px !important;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.04) !important;
}

.cta-header-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: #FFFFFF;
    border: 1px solid #BFDBFE;
    border-radius: 8px;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(37, 99, 235, 0.08);
}

.cta-description {
    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 1.55 !important;
    color: #1E293B !important;
    margin: 0 0 16px 0 !important;
}

.isb-btn-primary {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    padding: 10px 16px !important;
    background: #2563EB !important;
    color: #FFFFFF !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    transition: all 0.15s ease !important;
    box-shadow: 0 1px 2px rgba(37, 99, 235, 0.15) !important;
}

.isb-btn-primary:hover {
    background: #1D4ED8 !important;
    color: #FFFFFF !important;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25) !important;
}

.full-width {
    width: 100% !important;
}

/* 4b. Related Terms Card (Tech Cross-Reference Link Style) */
.sidebar-related-card {
    background: #FFFFFF !important;
    border: 1px solid #E2E8F0 !important;
    border-radius: 16px !important;
    padding: 20px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02) !important;
}

.sidebar-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px !important;
    font-weight: 700 !important;
    color: #64748B !important;
    text-transform: uppercase !important;
    letter-spacing: 0.06em !important;
    margin: 0 0 14px 0 !important;
}

.related-terms-wrapper {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
}

/* Term Chip với Cross-Reference Link Icon */
.related-term-chip {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 6px 12px !important;
    background: #F1F5F9 !important;
    border: 1px solid #E2E8F0 !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #334155 !important;
    text-decoration: none !important;
    transition: all 0.15s ease-in-out !important;
}

.term-icon {
    color: #94A3B8 !important;
    flex-shrink: 0;
    transition: color 0.15s ease !important;
}

.term-name {
    color: #334155 !important;
    transition: color 0.15s ease !important;
}

.related-term-chip:hover {
    background: #EFF6FF !important;
    border-color: #BFDBFE !important;
}

.related-term-chip:hover .term-icon,
.related-term-chip:hover .term-name {
    color: #2563EB !important;
}

/* ==========================================================================
   5. RESPONSIVE BREAKPOINTS (Optimized for Mobile & Tablet)
   ========================================================================== */

/* Tablet & Mobile Layout Adjustment (≤ 900px) */
@media (max-width: 900px) {
    .glossary-hero-section {
        padding: 32px 0 40px 0;
    }

    .hero-term-title {
        font-size: 30px !important;
    }

    .glossary-body-section {
        padding: 32px 0 64px 0 !important;
    }

    .detail-layout-grid {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
    }

    .glossary-main-card {
        padding: 28px 24px !important;
        height: auto !important; /* Bỏ stretch trên mobile */
    }

    .glossary-sidebar {
        position: static !important;
    }
}

/* Mobile Screen Small (≤ 600px) */
@media (max-width: 600px) {
    .isb-breadcrumbs {
        font-size: 13px !important;
        margin-bottom: 16px;
    }

    .category-badge {
        font-size: 11px !important;
    }

    .hero-term-title {
        font-size: 24px !important;
    }

    .glossary-main-card {
        padding: 20px 18px !important;
        border-radius: 12px !important;
    }

    .section-title {
        font-size: 16px !important;
    }

    .text-lead {
        font-size: 15px !important;
        line-height: 1.65 !important;
    }

    .text-body {
        font-size: 14px !important;
        line-height: 1.65 !important;
    }

    .sidebar-cta-card,
    .sidebar-related-card {
        padding: 18px 16px !important;
        border-radius: 12px !important;
    }

    .cta-description {
        font-size: 13px !important;
    }

    .isb-btn-primary {
        font-size: 13px !important;
        padding: 10px 14px !important;
    }

    .related-term-chip {
        font-size: 12px !important;
        padding: 5px 10px !important;
    }
}