/* Capa visual progresiva: acompaña a los estilos existentes y respeta movimiento reducido. */
:root {
  --pagano-navy: #0C6BB5;
  --pagano-blue: #1A7DC8;
  --pagano-gold: #D4A72C;
  --pagano-ink: #062338;
  --pagano-focus: #1A7DC8;
  --pagano-space-unit: 4px;
  --pagano-radius-button: 12px;
  --pagano-radius-card: 16px;
  --pagano-motion: 180ms;
  --pagano-touch: 44px;
  --pagano-shadow: 0 10px 24px rgba(12,107,181,.12);
}

:where(a, button, summary, select, input):focus-visible {
  outline: 3px solid var(--pagano-focus);
  outline-offset: 3px;
}

/* Identificador visual: un símbolo geométrico, siempre acompañado por texto. */
.card__identity { display:flex; align-items:center; gap:10px; }
.card-symbol { width:36px; height:36px; flex:0 0 36px; display:grid; place-items:center; border:1px solid currentColor; border-radius:12px; background:color-mix(in srgb, currentColor 10%, transparent); color:var(--pagano-blue); }
.card-symbol svg { width:21px; height:21px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.card[data-symbol="economia"] .card-symbol { color:#8a6200; }
.card[data-symbol="salud"] .card-symbol { color:#087f6a; }
.card[data-symbol="educacion"] .card-symbol { color:#245fa6; }
.card[data-symbol="ambiente"] .card-symbol { color:#3c7f4b; }
.card[data-symbol="justicia"] .card-symbol { color:#6c4a9e; }
.card[data-symbol="seguridad"] .card-symbol { color:#a33c3c; }
.card[data-symbol="desarrollo"] .card-symbol { color:#8a6200; }
.card__themes { display:flex; flex-wrap:wrap; gap:6px; }
.card__themes > * { max-width:100%; }

/* Capa de recorrido: hace visible la ruta elegida sin ocultar el contenido. */
.explore-journey { display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin:14px 0 18px; padding:12px 14px; border:1px solid #b9d5ea; border-radius:16px; background:linear-gradient(90deg,#f7fbff,#fffdf4); color:var(--pagano-ink); }
.explore-journey__label { font-size:.72rem; font-weight:800; letter-spacing:.1em; text-transform:uppercase; color:var(--pagano-blue); }
.explore-journey__steps { display:flex; flex-wrap:wrap; gap:7px; margin:0; padding:0; list-style:none; }
.explore-journey__step { display:inline-flex; align-items:center; gap:6px; min-height:30px; padding:5px 10px; border:1px solid #b9d5ea; border-radius:999px; background:#fff; font-size:.8rem; font-weight:700; }
.explore-journey__step.is-active { border-color:var(--pagano-gold); background:#fff4c9; }
.explore-journey__clear { margin-left:auto; border:0; background:transparent; color:var(--pagano-blue); font-weight:800; cursor:pointer; text-decoration:underline; }
.explore-journey__progress { width:100%; height:5px; overflow:hidden; border-radius:99px; background:#dcebf6; }
.explore-journey__progress i { display:block; height:100%; width:0; border-radius:inherit; background:linear-gradient(90deg,var(--pagano-blue),var(--pagano-gold)); transition:width .3s ease; }
.journey-pulse { animation:journey-pulse .38s ease both; }
@keyframes journey-pulse { from { opacity:.55; transform:translateY(6px); } to { opacity:1; transform:none; } }
@media (max-width:760px) { .explore-journey { align-items:flex-start; } .explore-journey__clear { width:100%; text-align:left; margin-left:0; } }

/* Dark mode para el recorrido */
:root[data-theme="dark"] .explore-journey { border-color:#2a4a65; background:linear-gradient(90deg,#0e2238,#101e30); }
:root[data-theme="dark"] .explore-journey__step { border-color:#2a4a65; background:#0d1f35; }
:root[data-theme="dark"] .explore-journey__step.is-active { border-color:var(--pagano-gold); background:#2a1f04; }
:root[data-theme="dark"] .explore-journey__progress { background:#1a3550; }

/* Ajuste institucional de tarjetas: color temático en el borde superior, respeta --tacc. */
.card.card--pro { border-top:5px solid var(--tacc, var(--pagano-blue)); padding:22px; }
.card.card--pro .card__meta { min-height:28px; }
.card.card--pro h3 { font-size:clamp(1rem,1.2vw,1.16rem); line-height:1.34; letter-spacing:0; text-transform:none; }
.card.card--pro .card__facts { margin-top:auto; }
.card.card--pro .card__actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-top:8px; }
.card.card--pro .card__actions a,
.card.card--pro .card__actions button { min-height:44px; border-radius:12px; font-weight:800; }
.card-symbol { box-shadow:0 2px 0 rgba(7,59,112,.06); }
.card__pdf-status--pending { color:#7a5200; background:#fff4c9; border-color:#d49b18; }
.card__pdf-status--retired { color:#8a3c3c; background:#fff0f0; border-color:#c87979; }
.card__pdf-status--available { color:#087f6a; background:#e7f7f2; border-color:#6fc1ad; }
.card__pdf-status--pending, .card__pdf-status--retired, .card__pdf-status--available { display:inline-flex; align-items:center; min-height:28px; padding:4px 9px; border:1px solid; border-radius:8px; font-size:.75rem; font-weight:800; }
.card__actions a, .card__actions button { min-height:var(--pagano-touch); transition:transform var(--pagano-motion) ease, filter var(--pagano-motion) ease; }
.card__actions a:hover, .card__actions button:hover { filter:brightness(1.04); transform:translateY(-1px); }

/* Hover con elevación para tarjetas de proyectos */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .card.card--pro:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(7, 59, 112, .13);
    border-color: var(--tacc, var(--pagano-blue));
  }
  .card.card--pro:hover::before {
    opacity: 1;
  }
}

@media (max-width:560px) {
  .card.card--pro { padding:18px; }
  .card.card--pro .card__actions { grid-template-columns:1fr; }
}
@media print {
  .explore-journey, .card__actions, nav, button { display:none !important; }
  .card { break-inside:avoid; box-shadow:none !important; }
}

:where(.project-card, .project-detail-card, .project-card-modern) {
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  :where(.project-card, .project-detail-card, .project-card-modern):hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(7, 59, 112, .14);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

@media (max-width: 760px) {
  :where(.project-card, .project-detail-card, .project-card-modern) { min-width: 0; }
  :where(.project-card h2, .project-card h3, .project-detail-card h1, .project-detail-card h2) { overflow-wrap: anywhere; }
}
