/* ============================================================
   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); }

/* 168px, not 150px. The longest single word in the roster is
   "Venkataramanamma" at 16 characters, and at 13px Montserrat 800 that needs
   about 140px -- more than a 150px column leaves once the card's 22px of
   padding is taken off. Widening the column is what keeps names on one line;
   the break-word below is the safety net for when they still cannot be. */
.cc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 14px; }
.cc-card { display: flex; flex-direction: column; min-width: 0; 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; min-width: 0; padding: 10px 11px 11px; }
/* Names were being cut off mid-word: a name longer than the column, like
   "Muppavarapu" or "Venugopal", set a min-content width the grid could not
   satisfy, overflowed the card, and .cc-card's overflow:hidden clipped it.

   overflow-wrap: anywhere rather than break-word, because only `anywhere`
   also lets the box shrink below that longest word -- break-word alone still
   reserves the space and the column keeps overflowing. Nothing is clipped
   now; a name that cannot fit wraps instead. */
.cc-name { font-family: Montserrat, sans-serif; font-weight: 800; font-size: 13px; line-height: 1.16; color: var(--ink, #1A1A1A); overflow-wrap: anywhere; }
.cc-sub { margin-top: 3px; font-size: 11px; line-height: 1.3; color: var(--text, #565656); overflow-wrap: anywhere; }

/* ---- history timeline ---- */

.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 ---- */

@media (max-width: 460px) {
.cc-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.cc-tl { grid-template-columns: 40px 1fr; gap: 18px; }
.cc-tl-year::after { left: 42px; }
}

/* ============================================================
   Member portal → Leadership tab — premium contact cards.
   ============================================================ */
.ld-count { display: inline-block; margin-left: 6px; background: var(--yellow, #FFC400); color: #1A1A1A; border-radius: 999px; padding: 0 8px; font-size: 12px; font-weight: 800; vertical-align: middle; }
.ld-note { margin: 8px 0 4px; padding: 12px 14px; background: #fff8e6; border: 1px solid #ffe6a6; border-radius: 12px; font-size: 13px; color: var(--text, #565656); }

.ld-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 14px; margin: 0 0 10px; }

.ld-card {
  position: relative; display: grid; grid-template-columns: 76px 1fr; gap: 14px;
  padding: 15px; background: #fff; border: 1px solid var(--line, #eee); border-radius: 18px;
  box-shadow: 0 6px 20px rgba(20, 20, 20, .05); overflow: hidden;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.ld-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: linear-gradient(180deg, var(--yellow, #FFC400), var(--red-primary, #E31E24)); }
.ld-card:hover { transform: translateY(-3px); box-shadow: 0 20px 38px -12px rgba(20, 20, 20, .22); border-color: #f0e6c6; }

.ld-av { position: relative; width: 76px; height: 76px; border-radius: 16px; overflow: hidden; background: linear-gradient(140deg, #ffe9b0, #ffcf5a); display: flex; align-items: center; justify-content: center; }
.ld-init { font-family: Montserrat, sans-serif; font-weight: 800; font-size: 24px; color: #a9791a; letter-spacing: .02em; }
.ld-av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 18%; }

.ld-body { min-width: 0; display: flex; flex-direction: column; }
.ld-name { font-family: Montserrat, sans-serif; font-weight: 800; font-size: 15.5px; line-height: 1.2; color: var(--ink, #1A1A1A); }
.ld-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin: 6px 0 12px; }
.ld-role-pill { background: #fdf0cf; color: #8a6a12; font-size: 10.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; }
.ld-loc { font-size: 11.5px; color: var(--text, #565656); }

.ld-btns { margin-top: auto; display: flex; gap: 8px; }
.ld-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 10px; font-family: Montserrat, sans-serif; font-size: 12.5px; font-weight: 800; text-decoration: none; transition: filter .2s ease, transform .15s ease; }
.ld-btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
.ld-btn.ld-icon { width: 40px; padding: 0; flex: 0 0 auto; }
.ld-wa { flex: 1; background: #25D366; color: #fff; }
.ld-call { background: #1A1A1A; color: #fff; }
.ld-mail { background: #fff; color: #1A1A1A; border: 1px solid var(--line, #e4ddca); }
.ld-mail:hover { background: var(--yellow, #FFC400); }

@media (max-width: 560px) { .ld-grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .ld-card, .ld-btn { transition: none; } }
