/* ============================================================
   Chapter profile enrichment — tabbed Coordinators / History / News
   block inside the country drawer. Namespaced .cc-*. Uses site tokens.
   ============================================================ */

/* Widen the drawer so the profile has room to breathe. ID beats the
   theme's .country-drawer class, so order-independent. */
#countryDrawer { width: min(600px, 95vw); }

.cc-block { margin-top: 26px; border-top: 1px solid var(--line, #eee); padding-top: 18px; }

/* ---- tabs ---- */
.cc-tabbar { display: flex; gap: 6px; position: sticky; top: -34px; z-index: 2; background: linear-gradient(180deg, #fff 70%, rgba(255,255,255,0)); padding: 6px 0 10px; }
.cc-tab { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 8px; border: 1px solid var(--line, #eee); border-radius: 10px; background: #fff; font-family: Montserrat, sans-serif; font-size: 12.5px; font-weight: 800; color: var(--text, #565656); cursor: pointer; transition: background .2s ease, color .2s ease, border-color .2s ease; }
.cc-tab:hover { border-color: var(--yellow, #FFC400); }
.cc-tab.is-active { background: var(--ink, #1A1A1A); color: #fff; border-color: var(--ink, #1A1A1A); }
.cc-tab-n { background: var(--yellow, #FFC400); color: #1A1A1A; border-radius: 999px; padding: 0 7px; font-size: 11px; font-variant-numeric: tabular-nums; }
.cc-tab.is-active .cc-tab-n { background: var(--yellow, #FFC400); }

.cc-panel { animation: ccIn .3s ease; }
@keyframes ccIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.cc-empty { color: var(--text, #565656); font-size: 13px; padding: 10px 0; }

/* ---- coordinators ---- */
.cc-region-line { margin: 2px 0 12px; font-size: 12.5px; color: var(--text, #565656); }
.cc-region-line b { color: var(--ink, #1A1A1A); }
.cc-grouphead { display: flex; align-items: center; gap: 10px; margin: 18px 0 11px; font-family: Montserrat, sans-serif; font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--ink, #1A1A1A); }
.cc-grouphead:first-child { margin-top: 4px; }
.cc-grouphead span { background: var(--yellow, #FFC400); color: #1A1A1A; border-radius: 999px; padding: 1px 8px; font-size: 10.5px; }
.cc-grouphead::after { content: ""; flex: 1; height: 1px; background: var(--line, #eee); }

.cc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.cc-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line, #efe7cf); border-radius: 15px; overflow: hidden; box-shadow: 0 5px 16px rgba(20,20,20,.06); transition: transform .25s ease, box-shadow .25s ease; }
.cc-card:hover { transform: translateY(-3px); box-shadow: 0 16px 30px -10px rgba(20,20,20,.2); }
.cc-photo { aspect-ratio: 1 / 1; overflow: hidden; background: linear-gradient(140deg, #fff7db, #ffe0a0); }
.cc-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 18%; display: block; transition: transform .4s ease; }
.cc-card:hover .cc-photo img { transform: scale(1.05); }
.cc-photo.cc-noimg { position: relative; }
.cc-photo.cc-noimg::after { content: "NRI TDP"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: Montserrat, sans-serif; font-weight: 800; font-size: 12px; color: #b9922c; }
.cc-info { display: flex; flex-direction: column; flex: 1; padding: 10px 11px 11px; }
.cc-name { font-family: Montserrat, sans-serif; font-weight: 800; font-size: 13px; line-height: 1.16; color: var(--ink, #1A1A1A); }
.cc-sub { margin-top: 3px; font-size: 11px; line-height: 1.3; color: var(--text, #565656); }
.cc-act { margin-top: auto; padding-top: 10px; display: flex; gap: 7px; }
.cc-act a { display: inline-flex; align-items: center; justify-content: center; padding: 7px; border-radius: 8px; text-decoration: none; transition: filter .2s ease, transform .15s ease; }
.cc-act a:hover { filter: brightness(1.06); transform: translateY(-1px); }
.cc-act .cc-wa { flex: 1; background: #25D366; color: #fff; }
.cc-act .cc-mail { flex: 0 0 auto; width: 38px; background: var(--yellow, #FFC400); color: #1A1A1A; }

/* ---- history timeline ---- */
.cc-timeline { list-style: none; margin: 6px 0 0; padding: 0; position: relative; }
.cc-timeline::before { content: ""; position: absolute; left: 52px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(180deg, var(--yellow, #FFC400), var(--red-primary, #E31E24)); }
.cc-tl { position: relative; display: grid; grid-template-columns: 44px 1fr; gap: 22px; padding: 0 0 20px; }
.cc-tl-year { font-family: Montserrat, sans-serif; font-weight: 900; font-size: 14px; color: var(--red-primary, #E31E24); text-align: right; padding-top: 9px; }
.cc-tl-year::after { content: ""; position: absolute; left: 47px; top: 12px; width: 12px; height: 12px; border-radius: 50%; background: var(--yellow, #FFC400); border: 2px solid #fff; box-shadow: 0 0 0 2px var(--red-primary, #E31E24); }
.cc-tl-card { background: #fff; border: 1px solid var(--line, #eee); border-radius: 13px; overflow: hidden; box-shadow: 0 4px 14px rgba(20,20,20,.05); }
.cc-tl-thumb { height: 120px; overflow: hidden; background: #f4efe1; }
.cc-tl-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cc-tl-thumb.is-contain img { object-fit: contain; }
.cc-tl-text { padding: 10px 12px 12px; }
.cc-tl-title { font-family: Montserrat, sans-serif; font-weight: 800; font-size: 13.5px; color: var(--ink, #1A1A1A); }
.cc-tl-desc { margin: 5px 0 0; font-size: 12px; line-height: 1.5; color: var(--text, #565656); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }

/* ---- news ---- */
.cc-news { display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }
.cc-news-card { display: grid; grid-template-columns: 96px 1fr; gap: 12px; background: #fff; border: 1px solid var(--line, #eee); border-radius: 13px; overflow: hidden; text-decoration: none; box-shadow: 0 4px 14px rgba(20,20,20,.05); transition: transform .2s ease, box-shadow .2s ease; }
.cc-news-card:hover { transform: translateY(-2px); box-shadow: 0 14px 26px -10px rgba(20,20,20,.2); }
.cc-news-img { background: #f4efe1; }
.cc-news-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cc-news-body { padding: 11px 12px 11px 0; min-width: 0; }
.cc-news-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.cc-news-tag { background: var(--red-soft, #fdeaea); color: var(--red-primary, #E31E24); font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 2px 7px; border-radius: 999px; }
.cc-news-date { font-size: 11px; color: var(--muted, #999); }
.cc-news-title { font-family: Montserrat, sans-serif; font-weight: 800; font-size: 13px; line-height: 1.25; color: var(--ink, #1A1A1A); }
.cc-news-blurb { margin: 4px 0 6px; font-size: 11.5px; line-height: 1.45; color: var(--text, #565656); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cc-news-src { font-size: 11px; font-weight: 700; color: var(--red-primary, #E31E24); }

@media (max-width: 460px) {
  .cc-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .cc-tl { grid-template-columns: 40px 1fr; gap: 18px; }
  .cc-timeline::before { left: 47px; }
  .cc-tl-year::after { left: 42px; }
}

@media (prefers-reduced-motion: reduce) {
  .cc-panel, .cc-card, .cc-photo img, .cc-act a, .cc-news-card { transition: none; animation: none; }
}
