/* ========================================
   CONSTRUCTION — public hub + project detail
   Uses the site tokens from main.css. Status meaning is always color + dot + text
   label (never color alone, WCAG 1.4.1).
   ======================================== */

/* Status filter chips (shared visual with notices) */
.ct-filter-bar { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.25rem 0 1rem; }
.ct-chip {
    font: inherit; font-size: 0.9rem; font-weight: 500; padding: 0.4rem 0.95rem;
    border: 1px solid var(--border-gray, #e9ecef); background: var(--white, #fff);
    color: var(--mid-gray, #5c636a); border-radius: 999px; cursor: pointer;
}
.ct-chip:hover { border-color: var(--primary-color, #094989); color: var(--primary-color, #094989); }
.ct-chip.active { background: var(--primary-color, #094989); color: #fff; border-color: var(--primary-color, #094989); }

.ct-count { color: var(--mid-gray, #5c636a); font-size: 0.9rem; margin: 0 0 1rem; }
.ct-loading { color: var(--mid-gray, #5c636a); padding: 1.5rem 0; }

/* Status badges (values: upcoming | active | in-progress | completed) */
.ct-badge {
    display: inline-flex; align-items: center; gap: 0.4rem;
    font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
    padding: 0.28rem 0.6rem; border-radius: 5px; white-space: nowrap;
}
.ct-badge .ct-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.ct-badge.ct-upcoming { background: #eaf2fb; color: #2c5f92; }
.ct-badge.ct-active, .ct-badge.ct-in-progress { background: #fdf1dc; color: #8a5200; }
.ct-badge.ct-completed { background: #e7f4e8; color: #1f6a26; }

/* ---- Hub grid ---- */
.ct-hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: 1.1rem;
}
.ct-card {
    display: flex; flex-direction: column; gap: 0.55rem;
    background: var(--white, #fff); border: 1px solid var(--border-gray, #e9ecef);
    border-radius: 12px; box-shadow: var(--shadow-sm, 0 2px 4px rgba(0,0,0,0.05));
    padding: 1.3rem; text-decoration: none; color: var(--dark-gray, #333);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.ct-card:hover, .ct-card:focus-visible {
    border-color: var(--primary-color, #094989);
    box-shadow: 0 6px 18px rgba(9, 73, 137, 0.14);
    transform: translateY(-2px);
}
.ct-card .ct-badge { align-self: flex-start; }
.ct-card-name { margin: 0; font-size: 1.2rem; color: var(--primary-color, #094989); line-height: 1.3; }
.ct-where { font-size: 0.85rem; color: var(--mid-gray, #5c636a); }

.ct-progress { margin-top: 0.15rem; }
.ct-track { height: 8px; background: var(--light-gray, #f5f5f5); border-radius: 99px; overflow: hidden; }
.ct-fill { height: 100%; background: #8a5200; border-radius: 99px; }
.ct-status-upcoming .ct-fill { background: #2c5f92; }
.ct-status-completed .ct-fill { background: #1f6a26; }
.ct-progress-label { display: flex; justify-content: space-between; font-size: 0.78rem; color: var(--mid-gray, #5c636a); margin-top: 0.35rem; font-variant-numeric: tabular-nums; }
.ct-go { margin-top: 0.3rem; font-weight: 600; color: var(--primary-color, #094989); font-size: 0.92rem; }

/* Empty / error state */
.ct-empty { background: var(--light-gray, #f5f5f5); border: 1px solid var(--border-gray, #e9ecef); border-radius: 10px; padding: 1.5rem; color: var(--mid-gray, #5c636a); }
.ct-empty p { margin: 0; }

/* ---- Project detail ---- */
.ct-detail-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 0.75rem; margin: 0 0 0.75rem; }
.ct-detail-meta .ct-meta-bits { color: var(--mid-gray, #5c636a); font-size: 0.9rem; }

.ct-infobox {
    background: #eaf2fb; border: 1px solid var(--border-gray, #e9ecef);
    border-left: 4px solid var(--primary-color, #094989);
    border-radius: 8px; padding: 1rem 1.2rem; margin: 1.25rem 0 0;
}
.ct-infobox h2 { margin: 0 0 0.4rem; font-size: 1.02rem; color: var(--primary-color, #094989); }
.ct-infobox p { margin: 0; }

.ct-phase {
    background: var(--white, #fff); border: 1px solid var(--border-gray, #e9ecef);
    border-radius: 10px; box-shadow: var(--shadow-sm, 0 2px 4px rgba(0,0,0,0.05));
    padding: 1.2rem 1.4rem; margin-bottom: 1.1rem;
}
.ct-phase-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem; }
.ct-phase-head h3 { margin: 0; font-size: 1.12rem; color: var(--primary-color, #094989); }
.ct-phase-facts { display: flex; gap: 1.4rem; flex-wrap: wrap; font-size: 0.86rem; color: var(--mid-gray, #5c636a); margin: 0.6rem 0 0.2rem; }
.ct-phase-facts b { color: var(--dark-gray, #333); font-weight: 600; }
.ct-no-updates { color: var(--mid-gray, #5c636a); font-size: 0.92rem; margin: 0.6rem 0 0; }

.ct-timeline {
    list-style: none; margin: 0.8rem 0 0; padding: 0 0 0 1.2rem;
    border-left: 2px solid var(--border-gray, #e9ecef); display: grid; gap: 0.9rem;
}
.ct-timeline li { position: relative; }
.ct-timeline li::before {
    content: ""; position: absolute; left: -1.63rem; top: 0.35rem;
    width: 10px; height: 10px; border-radius: 50%;
    background: var(--accent-color, #6AADE4); border: 2px solid var(--white, #fff);
}
.ct-u-date { font-size: 0.76rem; font-weight: 700; letter-spacing: 0.03em; color: var(--primary-color, #094989); font-variant-numeric: tabular-nums; }
.ct-timeline p { margin: 0.15rem 0 0; font-size: 0.94rem; }

.ct-show-earlier {
    margin-top: 0.85rem; background: none; border: none; padding: 0.3rem 0;
    color: var(--primary-color, #094989); font: inherit; font-size: 0.88rem; font-weight: 600; cursor: pointer;
}
.ct-show-earlier:hover { text-decoration: underline; }

/* ============================================
   2026-07-10 refresh: card polish, accordion phases,
   project links/contact, overall progress
   ============================================ */

/* Cards inherited the global link underline on inner text — kill it for good. */
.ct-card, .ct-card span, .ct-card div, .ct-card h3 { text-decoration: none; }
.ct-card { border-color: #dfe3e8; }
.ct-track { height: 0.55rem; }
.ct-progress-label { font-weight: 600; margin-top: 0.3rem; }
.ct-go { font-size: 0.9rem; }

/* Overall project progress under the header */
.ct-overall { max-width: 34rem; margin: 0.5rem 0 1rem; }

/* Labeled link buttons (project notices/maps, phase maps) */
.ct-btnrow { display: flex; gap: 0.6rem; flex-wrap: wrap; margin: 0.6rem 0 0.9rem; }
.ct-btn {
    display: inline-flex; align-items: center; gap: 0.4rem;
    border: 1px solid #c6ccd4; border-radius: 6px; padding: 0.45rem 0.8rem;
    font-size: 0.88rem; font-weight: 600; color: #094989; text-decoration: none; background: #fff;
}
.ct-btn:hover { border-color: #094989; background: #f5f7fa; text-decoration: none; }

/* Contact box */
.ct-contact {
    background: #eef4fb; border: 1px solid #cfe0f4; border-radius: 8px;
    padding: 0.7rem 1rem; font-size: 0.9rem; max-width: 24rem; margin: 0 0 1.2rem;
}
.ct-contact strong { color: #063a6d; }
.ct-contact a { color: #094989; }

/* Accordion phases */
.ct-phase-h { margin: 0; font-size: 1.05rem; }
.ct-phase-toggle {
    display: flex; align-items: baseline; gap: 0.55rem; width: 100%;
    background: none; border: none; padding: 0; font: inherit; text-align: left;
    color: #063a6d; font-weight: 700; cursor: pointer;
}
.ct-phase-static { cursor: default; }
.ct-num { color: #5c636a; font-weight: 800; flex: none; }
.ct-phase-name { flex: 1; min-width: 0; }
.ct-phase-right { display: flex; align-items: center; gap: 0.6rem; flex: none; }
.ct-caret { color: #094989; font-weight: 700; }
.ct-phase-toggle:hover .ct-phase-name { text-decoration: underline; }
.ct-phase-toggle:focus-visible { outline: 3px solid #f79a00; outline-offset: 2px; border-radius: 4px; }
.ct-desc { font-size: 0.92rem; margin: 0.35rem 0 0.5rem; }
.ct-phase-updates { margin-top: 0.4rem; }
.ct-phase .ct-btnrow { margin: 0.2rem 0 0.5rem; }

/* ========================================
   Project photos — thumbnail gallery + lightbox
   ======================================== */
.ct-gallery {
    list-style: none; padding: 0; margin: 0.75rem 0 0;
    display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 0.85rem;
}
.ct-thumb {
    display: block; width: 100%; padding: 0; margin: 0; cursor: pointer;
    border: 1px solid var(--border-gray, #e9ecef); border-radius: 10px; overflow: hidden;
    background: var(--white, #fff); transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.ct-thumb img { display: block; width: 100%; height: 130px; object-fit: cover; }
.ct-thumb:hover { box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15); transform: translateY(-3px); }
.ct-thumb:focus-visible { outline: 3px solid #f79a00; outline-offset: 2px; }

/* Lightbox overlay */
body.ct-lb-open { overflow: hidden; }
.ct-lightbox { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; }
.ct-lightbox[hidden] { display: none; }
.ct-lb-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.82); }
.ct-lb-dialog {
    position: relative; z-index: 1; display: flex; align-items: center; justify-content: center;
    flex-wrap: wrap; gap: 0.5rem; max-width: min(94vw, 1100px); max-height: 92vh; padding: 0 3.5rem;
}
.ct-lb-figure { margin: 0; text-align: center; max-width: 100%; }
.ct-lb-img { max-width: 100%; max-height: 78vh; object-fit: contain; border-radius: 4px; background: #000; }
.ct-lb-caption { color: #fff; margin-top: 0.6rem; font-size: 0.95rem; line-height: 1.4; max-width: 60ch; margin-inline: auto; }
.ct-lb-caption[hidden] { display: none; }
.ct-lb-counter { position: absolute; top: -2rem; left: 0; color: rgba(255, 255, 255, 0.85); font-size: 0.9rem; }
.ct-lb-close {
    position: absolute; top: -2.4rem; right: 0; width: 2.4rem; height: 2.4rem;
    background: transparent; border: none; color: #fff; font-size: 2rem; line-height: 1; cursor: pointer; border-radius: 6px;
}
.ct-lb-nav {
    position: absolute; top: 50%; transform: translateY(-50%); width: 3rem; height: 3rem;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, 0.15); border: 1px solid rgba(255, 255, 255, 0.35);
    color: #fff; font-size: 1.8rem; line-height: 1; border-radius: 50%; cursor: pointer;
}
.ct-lb-nav[hidden] { display: none; }
.ct-lb-prev { left: 0; }
.ct-lb-next { right: 0; }
.ct-lb-nav:hover { background: rgba(255, 255, 255, 0.3); }
.ct-lb-close:focus-visible, .ct-lb-nav:focus-visible { outline: 3px solid #f79a00; outline-offset: 2px; }
@media (max-width: 560px) {
    .ct-lb-dialog { padding: 0 2.75rem; }
    .ct-lb-nav { width: 2.5rem; height: 2.5rem; font-size: 1.5rem; }
}
@media (prefers-reduced-motion: reduce) {
    .ct-thumb { transition: none; }
    .ct-thumb:hover { transform: none; }
}
