/* ============================================================
   GLCG SINGLE STYLES (SÁCH GIÁO LÝ CÔNG GIÁO)
   ============================================================ */
.glcg-layout-wrapper {
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px 15px;
    font-family: 'Source Serif 4', serif !important;
    color: #2c3e50;
    font-size: 17px;
    line-height: 1.7;
}

.glcg-main-container {
    display: flex;
    gap: 30px;
    position: relative;
}

/* Sidebar bên trái */
.glcg-sidebar-track {
    width: 280px;
    flex-shrink: 0;
}
.glcg-sidebar-inner {
    position: sticky;
    top: 90px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}
.glcg-sidebar-title {
    font-family: 'Playfair Display', serif !important;
    font-size: 20px !important;
    font-weight: 700;
    color: #1e293b;
    margin-top: 0;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3b82f6;
    display: flex;
    align-items: center;
    gap: 8px;
}
.glcg-back-archive {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
    padding: 8px 12px;
    background: #eff6ff;
    border-radius: 6px;
    transition: all 0.2s ease;
    width: 100%;
    box-sizing: border-box;
}
.glcg-back-archive:hover {
    background: #dbeafe;
    color: #1d4ed8;
}

/* Main Content */
.glcg-main-content {
    flex: 1;
    min-width: 0;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 35px 40px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}

/* Header Area */
.glcg-header-area {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f1f5f9;
}
.glcg-breadcrumbs {
    font-family: sans-serif;
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 12px;
}
.glcg-breadcrumbs a {
    color: #3b82f6;
    text-decoration: none;
}
.glcg-breadcrumbs a:hover {
    text-decoration: underline;
}
.glcg-post-title {
    font-family: 'Playfair Display', serif !important;
    font-size: 32px !important;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3 !important;
    margin: 10px 0 15px 0;
}
.glcg-post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    font-family: sans-serif;
    font-size: 0.88rem;
}
.glcg-badge-para {
    background: #fef3c7;
    color: #b45309;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #fde68a;
}
.glcg-badge-kind {
    background: #f1f5f9;
    color: #475569;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 500;
    text-transform: capitalize;
}

/* Inline Quick Search Box */
.glcg-header-search-box {
    margin: 20px 0 10px 0;
    position: relative;
}
.glcg-search-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.glcg-search-input-wrap input {
    width: 100%;
    padding: 12px 18px 12px 42px;
    font-family: sans-serif;
    font-size: 0.95rem;
    border: 2px solid #e2e8f0;
    border-radius: 30px;
    background: #f8fafc;
    transition: all 0.2s ease;
}
.glcg-search-input-wrap input:focus {
    outline: none;
    border-color: #3b82f6;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}
.glcg-search-icon {
    position: absolute;
    left: 15px;
    color: #94a3b8;
    pointer-events: none;
}

/* Toolbar Controls */
.glcg-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
    padding: 10px 18px;
    border-radius: 8px;
    margin-bottom: 30px;
    border: 1px solid #e2e8f0;
    font-family: sans-serif;
    font-size: 0.88rem;
}
.glcg-font-control {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #475569;
    font-weight: 500;
}
.glcg-btn-font {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 4px 10px;
    cursor: pointer;
    font-weight: 600;
    color: #334155;
    transition: all 0.15s ease;
}
.glcg-btn-font:hover {
    background: #e2e8f0;
}
.glcg-action-btns {
    display: flex;
    align-items: center;
    gap: 10px;
}
.glcg-btn-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease;
}
.glcg-btn-action:hover {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
}

/* Content Body & Highlighted Paragraph Badges */
.glcg-content-body {
    font-family: 'Source Serif 4', serif !important;
    font-size: 17px !important;
    line-height: 1.7 !important;
    color: #1e293b;
}

/* Biến đổi các số đoạn <span id="so-X">X</span> thành Badge nổi bật */
.glcg-content-body p span[id^="so-"],
.glcg-para-badge-inline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #1e293b;
    color: #f8fafc;
    font-family: sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 16px;
    margin-right: 8px;
    margin-bottom: 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    scroll-margin-top: 100px;
    border-left: 3px solid #f59e0b;
}
.glcg-content-body p span[id^="so-"]:hover,
.glcg-para-badge-inline:hover {
    background: #2563eb;
}

/* Target highlight animation khi nhảy đúp tới đoạn */
.glcg-content-body p:target span[id^="so-"],
.glcg-content-body p span[id^="so-"]:target {
    animation: glcgPulse 2s infinite;
}

@keyframes glcgPulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 10px rgba(245, 158, 11, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

/* Child Section List (Mục lục con) */
.glcg-child-pages-section {
    margin-top: 40px;
    padding: 24px;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    border-left: 5px solid #2563eb;
}
.glcg-child-pages-section h3 {
    font-family: 'Playfair Display', serif !important;
    font-size: 21px !important;
    font-weight: 700;
    color: #1e293b;
    margin-top: 0;
    margin-bottom: 15px;
}
.glcg-child-pages-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.glcg-child-pages-list li {
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px dashed #e2e8f0;
}
.glcg-child-pages-list li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.glcg-child-pages-list a {
    font-family: sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.glcg-child-pages-list a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* Navigation Previous / Next */
.glcg-post-nav {
    margin-top: 40px;
    padding-top: 25px;
    border-top: 2px solid #f1f5f9;
    font-family: sans-serif;
}
.glcg-nav-links {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}
.glcg-nav-prev, .glcg-nav-next {
    flex: 1;
    padding: 15px 20px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
}
.glcg-nav-prev:hover, .glcg-nav-next:hover {
    background: #eff6ff;
    border-color: #bfdbfe;
}
.glcg-nav-label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #64748b;
    display: block;
    margin-bottom: 4px;
}
.glcg-nav-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.4;
    display: block;
}

/* FABs & MODAL COMPONENT */
.glcg-fabs {
    position: fixed;
    right: 25px;
    bottom: 30px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.glcg-fab {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #1e293b;
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 14px rgba(0,0,0,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}
.glcg-fab:hover {
    background: #2563eb;
    transform: translateY(-3px);
}
.glcg-fab-search { background: #2563eb; }
.glcg-fab-toc { background: #059669; }

.glcg-modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(4px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}
.glcg-modal.active {
    display: flex;
}
.glcg-modal-content {
    background: #ffffff;
    width: 100%;
    max-width: 650px;
    border-radius: 12px;
    padding: 30px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}
.glcg-modal-close {
    position: absolute;
    top: 15px; right: 15px;
    background: #f1f5f9;
    border: none;
    width: 32px; height: 32px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    color: #64748b;
    display: flex; align-items: center; justify-content: center;
}
.glcg-modal-close:hover { background: #e2e8f0; color: #0f172a; }
.glcg-modal-title {
    font-family: 'Playfair Display', serif !important;
    font-size: 21px !important;
    font-weight: 700;
    color: #0f172a;
    margin-top: 0;
    margin-bottom: 20px;
}
.glcg-modal-results {
    overflow-y: auto;
    margin-top: 15px;
    max-height: 50vh;
}
.glcg-suggestion-list {
    list-style: none;
    padding: 0; margin: 0;
}
.glcg-suggestion-list li {
    margin-bottom: 8px;
}
.glcg-suggestion-list a {
    display: block;
    padding: 12px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-family: sans-serif;
    font-size: 0.92rem;
    color: #1e293b;
    text-decoration: none;
    transition: all 0.15s ease;
}
.glcg-suggestion-list a:hover {
    background: #eff6ff;
    border-color: #3b82f6;
    color: #1d4ed8;
}
.glcg-s-num {
    font-weight: 700;
    color: #d97706;
    background: #fef3c7;
    padding: 2px 6px;
    border-radius: 4px;
    margin-right: 6px;
}

@media (max-width: 992px) {
    .glcg-main-container { flex-direction: column; }
    .glcg-sidebar-track { width: 100%; }
    .glcg-sidebar-inner { position: static; }
    .glcg-main-content { padding: 25px 20px; }
    .glcg-post-title { font-size: 24px !important; }
}
