/* ============================================================
   TAKTICO — alternativa-2 · Proyectos ⇄ Clientes
   Mismo componente que en "alternativa" (lógica en proyectos-clientes.js),
   con el estilo claro de esta versión. Usa los tokens de site.css.
   ============================================================ */
.pc { margin-top: 8px; }

.pc-tabs { display: flex; justify-content: center; margin-bottom: 20px; }
.pc-seg {
    display: inline-flex;
    gap: 4px;
    padding: 5px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 6px 18px rgba(20, 48, 74, 0.05);
}
.pc-tab {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 10px 26px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--navy-soft);
    font-family: var(--font-head);
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}
.pc-tab i { font-size: 0.85rem; }
.pc-tab:hover { color: var(--navy); }
.pc-tab[aria-pressed="true"] {
    background: linear-gradient(180deg, var(--orange-light), var(--orange));
    color: #fff;
    box-shadow: 0 6px 18px var(--orange-glow);
}

.pc-filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 6px; }
.pc-filters[hidden] { display: none; }
.pc-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--navy-soft);
    font-family: var(--font-head);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.25s ease, color 0.25s ease, background 0.25s ease;
}
.pc-chip i { font-size: 0.78rem; opacity: 0.8; }
.pc-chip .n { font-size: 0.7rem; opacity: 0.65; }
.pc-chip:hover { border-color: var(--orange); color: var(--navy); }
.pc-chip[aria-pressed="true"] { background: rgba(217, 117, 35, 0.12); border-color: var(--orange); color: #b85f14; }

/* Escenario del abanico */
.pc-stage { display: flex; align-items: center; justify-content: center; gap: 12px; }
.pc-fan {
    --pc-w: 13rem;
    --pc-h: calc(var(--pc-w) * 1.42);
    position: relative;
    flex: 1;
    max-width: 62rem;
    height: calc(var(--pc-h) * 1.42);
}
.pc-card {
    position: absolute;
    left: 50%;
    top: 43%;
    width: var(--pc-w);
    height: var(--pc-h);
    margin-left: calc(var(--pc-w) / -2);
    margin-top: calc(var(--pc-h) / -2);
    display: flex;
    flex-direction: column;
    padding: 0;
    border: 0;
    border-radius: 20px;
    overflow: hidden;
    background: #fff;
    color: var(--navy);
    text-align: left;
    font-family: var(--font-body);
    cursor: pointer;
    opacity: 0;
    backface-visibility: hidden;
    transform-origin: 50% 85%;
    box-shadow: 0 18px 40px rgba(20, 48, 74, 0.16), 0 2px 6px rgba(20, 48, 74, 0.06);
    transition: transform 0.7s cubic-bezier(0.34, 1.35, 0.64, 1), opacity 0.45s ease, box-shadow 0.3s ease;
}
.pc-card.is-in { opacity: 1; }
.pc-card.is-selected { box-shadow: 0 26px 54px rgba(20, 48, 74, 0.24), 0 0 0 2px var(--orange); }
.pc-card:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }

.pc-thumb { flex: 0 0 50%; overflow: hidden; background: #e9eef3; }
.pc-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pc-cbody { flex: 1; display: flex; flex-direction: column; gap: 7px; padding: 13px 15px 15px; min-height: 0; }
.pc-cmeta { display: flex; flex-wrap: wrap; gap: 5px; }
.pc-ctag {
    font-family: var(--font-head);
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #b85f14;
    background: rgba(217, 117, 35, 0.12);
    border: 1px solid rgba(217, 117, 35, 0.3);
    padding: 3px 8px;
    border-radius: 999px;
}
.pc-ctitle {
    font-family: var(--font-head);
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1.28;
    color: var(--navy);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.pc-cclient { margin-top: auto; display: flex; align-items: center; gap: 8px; font-size: 0.72rem; font-weight: 500; color: var(--navy-soft); }
.pc-mlogo {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    border-radius: 7px;
    border: 1px solid var(--line);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px;
}
.pc-mlogo img, .pc-logo img, .pc-clogo img, .pc-biglogo img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* Tarjeta de cliente */
.pc-logo { flex: 0 0 52%; display: flex; align-items: center; justify-content: center; padding: 18px; background: linear-gradient(180deg, #fbf9f5, #f1ece4); }
.pc-cname { font-family: var(--font-head); font-size: 0.98rem; font-weight: 700; color: var(--navy); line-height: 1.2; }
.pc-csector { font-size: 0.72rem; color: var(--navy-soft); line-height: 1.35; }
.pc-ccount { margin-top: auto; font-size: 0.7rem; font-weight: 600; color: #7d8894; }
.pc-cpending { font-size: 0.7rem; font-style: italic; color: #7d8894; }

.pc-arrow {
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1.5px solid var(--line);
    background: #fff;
    color: var(--navy-soft);
    font-size: 0.9rem;
    cursor: pointer;
    z-index: 30;
    transition: color 0.25s ease, border-color 0.25s ease, opacity 0.25s ease;
}
.pc-arrow:hover:not(:disabled) { color: var(--orange); border-color: var(--orange); }
.pc-arrow:disabled { opacity: 0.3; cursor: default; }

.pc-dots { display: flex; justify-content: center; gap: 9px; margin-top: 4px; }
.pc-dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(20, 48, 74, 0.2);
    cursor: pointer;
    transition: transform 0.3s ease, background 0.3s ease;
}
.pc-dot[aria-current="true"] { background: var(--orange); transform: scale(1.35); }

/* Panel de detalle (el "match" cliente ⇄ proyecto) */
.pc-detail {
    max-width: 62rem;
    margin: 30px auto 0;
    padding: 30px 34px;
    border-radius: 22px;
    background: #fff;
    border: 1px solid rgba(20, 48, 74, 0.08);
    box-shadow: 0 14px 36px rgba(20, 48, 74, 0.07);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
    gap: 26px 44px;
}
.pc-detail.is-anim { animation: pcFade 0.45s ease both; }
@keyframes pcFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.pc-d-eyebrow {
    font-family: var(--font-head);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #b85f14;
    margin-bottom: 10px;
}
.pc-d-title { font-family: var(--font-head); font-size: 1.35rem; font-weight: 600; line-height: 1.25; color: var(--navy); margin-bottom: 14px; }
.pc-d-sector { color: var(--navy-soft); font-size: 0.92rem; }
.pc-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.pc-d-main .pc-tags { margin-bottom: 20px; }
.pc-tag {
    font-family: var(--font-head);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(217, 117, 35, 0.12);
    border: 1px solid rgba(217, 117, 35, 0.28);
    color: #b85f14;
}

.pc-clientlink, .pc-projitem {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 12px 16px;
    text-align: left;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: var(--bg);
    color: var(--navy);
    font-family: var(--font-body);
    cursor: pointer;
    transition: border-color 0.25s ease, transform 0.25s ease;
}
.pc-clientlink:hover, .pc-projitem:hover { border-color: var(--orange); transform: translateX(3px); }
.pc-clientlink > i, .pc-projitem > i { margin-left: auto; color: var(--orange); font-size: 0.8rem; }
.pc-clogo {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    padding: 6px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: center;
}
.pc-cl-text small { display: block; font-size: 0.66rem; letter-spacing: 0.07em; text-transform: uppercase; color: #7d8894; }
.pc-cl-text strong { font-family: var(--font-head); font-size: 0.98rem; font-weight: 600; }
.pc-biglogo {
    width: 150px;
    height: 96px;
    margin-bottom: 14px;
    padding: 10px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Problema / Qué hicimos / Resultado */
.work-fields { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.work-fields .wf-row { display: flex; flex-direction: column; gap: 2px; }
.work-fields .wf-k { font-family: var(--font-head); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #7d8894; }
.work-fields .wf-v { font-size: 0.9rem; color: var(--navy-soft); line-height: 1.45; }
.work-fields .wf-row.is-result .wf-v { color: var(--orange); font-weight: 600; }

.pc-more { margin-top: 4px; }
.pc-pending-note { color: var(--navy-soft); font-size: 0.95rem; line-height: 1.6; margin-bottom: 16px; }
.pc-projlist { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.pc-pthumb { width: 72px; height: 56px; flex-shrink: 0; border-radius: 10px; overflow: hidden; background: #e9eef3; }
.pc-pthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pc-pi-text { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pc-pi-text strong { font-family: var(--font-head); font-size: 0.92rem; font-weight: 600; line-height: 1.3; }
.pc-noscript { text-align: center; color: var(--navy-soft); }
.projects-more { margin-top: 34px; text-align: center; }

@media (max-width: 820px) {
    .pc-detail { grid-template-columns: 1fr; padding: 24px 22px; }
}
@media (max-width: 640px) {
    .pc-fan { --pc-w: 10.5rem; }
    .pc-arrow { width: 38px; height: 38px; }
    .pc-tab { padding: 9px 20px; }
}
@media (max-width: 480px) {
    .pc-fan { --pc-w: 9.5rem; }
    .pc-stage { gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
    .pc-card { transition: none; }
    .pc-detail.is-anim { animation: none; }
}

/* Blueprint "Cómo funciona" dentro del detalle del proyecto */
.pc-blueprint { grid-column: 1 / -1; padding-top: 22px; border-top: 1px dashed rgba(20, 48, 74, 0.18); }
.bp-steps { position: relative; list-style: none; display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 14px; }
.bp-steps::before { content: ""; position: absolute; top: 25px; left: calc(50% / var(--n)); right: calc(50% / var(--n)); border-top: 2px dashed rgba(20, 48, 74, 0.25); }
.bp-steps li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; animation: bpIn 0.5s calc(var(--i) * 0.12s) ease both; }
.bp-ic { width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; font-size: 1.1rem; color: #fff; background: var(--navy); box-shadow: 0 8px 18px rgba(20, 48, 74, 0.18); }
.bp-steps li:last-of-type .bp-ic { background: #2fae8e; }
.bp-t { font-family: var(--font-head); font-size: 0.8rem; font-weight: 600; line-height: 1.25; color: var(--navy); }
.bp-dot { position: absolute; top: 20px; left: calc(50% / var(--n)); width: 12px; height: 12px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 5px rgba(217, 117, 35, 0.22); animation: bpRun 3.2s ease-in-out infinite; }
@keyframes bpIn { from { opacity: 0; transform: translateY(8px); } }
@keyframes bpRun { 0% { left: calc(50% / var(--n)); opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } 100% { left: calc(100% - 50% / var(--n) - 12px); opacity: 0; } }
@media (max-width: 640px) {
    .bp-steps { grid-template-columns: 1fr; gap: 12px; }
    .bp-steps::before { top: 25px; bottom: 25px; left: 25px; right: auto; border-top: 0; border-left: 2px dashed rgba(20, 48, 74, 0.25); }
    .bp-steps li { flex-direction: row; text-align: left; }
    .bp-dot { display: none; }
}
@media (prefers-reduced-motion: reduce) { .bp-steps li, .bp-dot { animation: none; } .bp-dot { display: none; } }
