/* CECIC Sitemap & Breadcrumb — sitemap.css v1.0 */

/* ═══════════════════════════════════
   BREADCRUMB
   ═══════════════════════════════════ */
.cecic-bc {
    margin: 0 0 18px;
    padding: 10px 16px;
    background: #f0f7f1;
    border-left: 4px solid #1a6e2e;
    border-radius: 0 6px 6px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.cecic-bc-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}

.cecic-bc-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
}

.cecic-bc-link {
    color: #1a6e2e;
    text-decoration: none;
    font-weight: 500;
    transition: color .15s;
}
.cecic-bc-link:hover { color: #0d3d1a; text-decoration: underline; }

.cecic-bc-label {
    color: #444;
    font-weight: 400;
}

.cecic-bc-sep {
    color: #aaa;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.cecic-bc-sep svg { display: block; }

.cecic-bc-current .cecic-bc-label {
    color: #333;
    font-weight: 600;
}


/* ═══════════════════════════════════
   SITE INDEX PAGE
   ═══════════════════════════════════ */

#cecic-index {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    max-width: 860px;
    margin: 0 auto;
    padding: 8px 0 40px;
}

/* Search bar */
.cecic-index-search-wrap {
    position: relative;
    margin-bottom: 36px;
    display: flex;
    align-items: center;
}
.cecic-index-search-icon {
    position: absolute;
    left: 14px;
    width: 18px;
    height: 18px;
    color: #9ca3af;
    pointer-events: none;
    flex-shrink: 0;
}
#cecic-index-search {
    width: 100%;
    font-size: 15px;
    padding: 13px 110px 13px 44px;
    border: 2px solid #d1d5db;
    border-radius: 10px;
    outline: none;
    box-sizing: border-box;
    color: #111;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
    font-family: inherit;
}
#cecic-index-search:focus {
    border-color: #1a6e2e;
    box-shadow: 0 0 0 3px rgba(26,110,46,.12);
}
.cecic-index-count {
    position: absolute;
    right: 14px;
    font-size: 12px;
    color: #9ca3af;
    pointer-events: none;
}

/* Section */
.cecic-index-section {
    margin-bottom: 40px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
}
.cecic-index-section.cecic-hidden { display: none; }

.cecic-index-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.cecic-index-section-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.cecic-index-section-icon svg { width: 18px; height: 18px; }

.cecic-icon-pages { background: #e0f2fe; color: #0369a1; }
.cecic-icon-news  { background: #fef3c7; color: #92400e; }
.cecic-icon-pub   { background: #d1fae5; color: #065f46; }

.cecic-index-section-title {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #111827 !important;
    margin: 0 !important;
    padding: 0 !important;
    flex: 1;
}

.cecic-index-section-count {
    font-size: 12px;
    font-weight: 600;
    background: #e5e7eb;
    color: #6b7280;
    padding: 2px 9px;
    border-radius: 20px;
}

/* Tree (pages) */
.cecic-tree-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.cecic-tree-child {
    padding-left: 0;
    border-top: 1px solid #f3f4f6;
}
.cecic-tree-depth-1 > .cecic-tree-item > .cecic-tree-link { padding-left: 36px; background: #fafafa; }
.cecic-tree-depth-2 > .cecic-tree-item > .cecic-tree-link { padding-left: 56px; background: #f5f5f5; }

.cecic-tree-item { border-bottom: 1px solid #f3f4f6; }
.cecic-tree-item:last-child { border-bottom: none; }

.cecic-tree-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    text-decoration: none;
    color: #1f2937;
    font-size: 14px;
    font-weight: 500;
    transition: background .12s, color .12s;
}
.cecic-tree-link:hover { background: #f0fdf4; color: #1a6e2e; text-decoration: none; }
.cecic-tree-link:hover .cecic-index-arrow { transform: translateX(4px); color: #1a6e2e; }

.cecic-tree-home-icon { color: #9ca3af; flex-shrink: 0; display: flex; }

/* List items (posts + docs) */
.cecic-index-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.cecic-index-item {
    border-bottom: 1px solid #f3f4f6;
}
.cecic-index-item:last-child { border-bottom: none; }
.cecic-index-item.cecic-hidden { display: none !important; }

.cecic-index-link {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 12px 18px;
    text-decoration: none;
    color: #1f2937;
    transition: background .12s;
}
.cecic-index-link:hover { background: #f0fdf4; text-decoration: none; }
.cecic-index-link:hover .cecic-index-arrow { transform: translateX(4px); color: #1a6e2e; }

/* Thumbnail */
.cecic-index-thumb {
    width: 52px;
    height: 52px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
    background: #e5e7eb;
}
.cecic-index-thumb-doc {
    width: 42px;
    height: 56px;
    border-radius: 4px;
    border: 1px solid #e5e7eb;
    object-position: top;
}
.cecic-index-thumb-placeholder {
    flex-shrink: 0;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cecic-ph-blog { width: 52px; height: 52px; background: #fef3c7; }
.cecic-ph-doc  { width: 42px; height: 56px; background: #d1fae5; border-radius: 4px; border: 1px solid #e5e7eb; }

/* Link text block */
.cecic-index-link-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}
.cecic-index-link-title {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cecic-index-link:hover .cecic-index-link-title { color: #1a6e2e; }
.cecic-index-link-meta {
    font-size: 12px;
    color: #9ca3af;
}

/* Download badge */
.cecic-index-doc-badge {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: #065f46;
    background: #d1fae5;
    padding: 3px 10px;
    border-radius: 20px;
}

/* Arrow */
.cecic-index-arrow {
    flex-shrink: 0;
    width: 12px;
    height: 12px;
    color: #d1d5db;
    transition: transform .15s, color .15s;
}

/* Footer */
.cecic-index-footer {
    text-align: center;
    font-size: 12px;
    color: #9ca3af;
    margin-top: 20px;
}
.cecic-index-footer a { color: #1a6e2e; }

/* No results */
.cecic-index-no-results {
    text-align: center;
    padding: 32px 20px;
    font-size: 14px;
    color: #9ca3af;
    display: none;
}
.cecic-index-no-results.visible { display: block; }

/* Highlight matched text */
mark.cecic-hl {
    background: #fef08a;
    color: #111;
    border-radius: 2px;
    padding: 0 1px;
}

/* Mobile */
@media (max-width: 600px) {
    .cecic-index-link { padding: 10px 14px; gap: 10px; }
    .cecic-index-thumb { width: 42px; height: 42px; }
    .cecic-index-thumb-doc { width: 34px; height: 46px; }
    .cecic-index-link-title { font-size: 13px; white-space: normal; }
    .cecic-index-doc-badge { display: none; }
}
