/**
 * solutions-deaj.css — estilos del catálogo /pages/solutions.php
 */
.filter-pills {
    display: flex; gap: .5rem; flex-wrap: nowrap; overflow-x: auto;
    padding-bottom: .25rem;
    -webkit-overflow-scrolling: touch;
}
.filter-pills::-webkit-scrollbar { height: 4px; }
.filter-pills::-webkit-scrollbar-thumb { background: rgba(0,0,0,.18); border-radius: 999px; }
.filter-pills .btn {
    border-radius: 999px;
    font-size: .85rem;
    flex-shrink: 0;
    min-height: 36px;
    padding: .35rem .85rem;
}
.filter-pills .btn.active {
    background: var(--deaj-primary, #033e75);
    color: #fff;
    border-color: var(--deaj-primary, #033e75);
}
.star-input {
    font-size: 1.7rem;
    cursor: pointer;
    color: #d1d5db;
    padding: .1rem .25rem;
    min-width: 40px;
    text-align: center;
}
.star-input.active { color: var(--deaj-yellow, #fdb611); }

/* ── Modal de detalle de solución (sd-*) — 6 tabs DEAJ ─────────────────── */

/* ── Tamaño del modal de detalle ────────────────────────────────────────
   modal-xl en Bootstrap es 1140px. Lo subimos a 1280px con altura mínima
   85vh para aprovechar el espacio en desktop. <992px usa fullscreen-md-down
   y queda full-height. */
@media (min-width: 992px) {
    #detailModal .sd-dialog {
        max-width: min(96vw, 1280px);
    }
    #detailModal .sd-modal-content {
        min-height: 85vh;
        max-height: 92vh;
    }
}
@media (min-width: 1400px) {
    #detailModal .sd-dialog { max-width: 1320px; }
}

#detailModal .modal-content { padding: 0; overflow: hidden; }

/* ── Overrides al guard global de marduk-deaj.css ──────────────────────
   El modal-body fuerza colores oscuros para todos los h1-h6 y <p>.
   En el sd-header tenemos fondo OSCURO (gradient DEAJ) y necesitamos
   tipografía clara. Estas reglas reinstauran los colores del header. */
.modal-body .sd-header,
.modal-body .sd-stats-strip {
    color: #fff;
}
.modal-body .sd-header h3,
.modal-body .sd-header h4,
.modal-body .sd-header h5,
.modal-body .sd-header h6,
.modal-body .sd-title { color: #fff !important; }
.modal-body .sd-header p,
.modal-body .sd-tagline { color: rgba(255,255,255,.88) !important; }
.modal-body .sd-eyebrow { color: var(--deaj-yellow, #fdb611) !important; }
.modal-body .sd-header .badge { color: #fff; }
.modal-body .sd-badge-featured { color: #1f2937 !important; }   /* fondo amarillo */
.modal-body .sd-badge-maturity,
.modal-body .sd-badge-org,
.modal-body .sd-badge-owner { color: #fff !important; }
/* Links de texto en el header → amarillo institucional. Excluye los .btn
   (Repositorio btn-light, Ver demo btn-warning) para no romper su
   contraste con texto oscuro sobre fondo claro. */
.modal-body .sd-header a:not(.btn) { color: var(--deaj-yellow, #fdb611); }

/* Botones explícitos en el sd-header con su contraste correcto */
.modal-body .sd-header .btn-light {
    background: #ffffff !important;
    color: #1f2937 !important;
    border-color: rgba(255, 255, 255, .3) !important;
    font-weight: 600;
}
.modal-body .sd-header .btn-light:hover {
    background: #f7faff !important;
    color: var(--deaj-primary, #033e75) !important;
    transform: translateY(-1px);
}
.modal-body .sd-header .btn-warning {
    background: var(--deaj-yellow, #fdb611) !important;
    color: #1f2937 !important;
    border-color: var(--deaj-yellow, #fdb611) !important;
    font-weight: 600;
    box-shadow: 0 4px 12px -4px rgba(253, 182, 17, .4);
}
.modal-body .sd-header .btn-warning:hover {
    background: #ffc52e !important;
    color: #1f2937 !important;
    transform: translateY(-1px);
}
.modal-body .sd-header .btn-outline-light {
    color: #fff !important;
    border-color: rgba(255, 255, 255, .55) !important;
    background: transparent !important;
}
.modal-body .sd-header .btn-outline-light:hover {
    background: rgba(255, 255, 255, .12) !important;
    border-color: var(--deaj-yellow, #fdb611) !important;
    color: var(--deaj-yellow, #fdb611) !important;
}
/* Íconos dentro de los botones del header heredan el color del botón */
.modal-body .sd-header .btn i { color: inherit; }

/* KPIs strip — texto claro sobre fondo oscuro */
.modal-body .sd-kpi strong { color: var(--deaj-yellow, #fdb611) !important; }
.modal-body .sd-kpi span { color: rgba(255,255,255,.78) !important; }

/* btn-close blanco en header oscuro (Bootstrap btn-close-white SVG-filter) */
.modal-body .sd-header .btn-close.btn-close-white {
    filter: brightness(0) invert(1);
    opacity: .85;
}
.modal-body .sd-header .btn-close.btn-close-white:hover {
    opacity: 1;
    transform: rotate(90deg);
}

/* Stat-cards en tab Métricas (también fondo oscuro/gradient) */
.modal-body .sd-stat-card .h2 { color: #fff !important; }
.modal-body .sd-stat-card.sd-stat-yellow .h2 { color: #1f2937 !important; }
.modal-body .sd-stat-card .label,
.modal-body .sd-stat-card .sub { color: rgba(255,255,255,.85) !important; }
.modal-body .sd-stat-card.sd-stat-yellow .label,
.modal-body .sd-stat-card.sd-stat-yellow .sub { color: rgba(31,41,55,.7) !important; }

/* Version badges */
.modal-body .sd-version-badge { color: #fff !important; }

/* Avatar de equipo (texto blanco sobre gradient) */
.modal-body .sd-team-initials { color: #fff !important; }

.sd-header {
    position: relative;
    padding: 1.6rem 1.4rem 1.4rem;
    color: #fff;
    overflow: hidden;
}
.sd-header-bg {
    position: absolute; inset: 0;
    z-index: 0;
}
.sd-header-bg::after {
    content: ""; position: absolute; inset: 0;
    background:
        radial-gradient(circle at 18% 30%, rgba(125, 158, 218, .35) 0%, transparent 38%),
        radial-gradient(circle at 88% 75%, rgba(253, 182, 17, .22) 0%, transparent 42%);
    pointer-events: none;
}
.sd-header-content { position: relative; z-index: 1; }

.sd-cat-icon {
    width: 64px; height: 64px;
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    font-size: 1.75rem;
    flex-shrink: 0;
    box-shadow: 0 6px 16px -4px rgba(0,0,0,.35);
    border: 1px solid rgba(255,255,255,.2);
}
.sd-eyebrow {
    font-family: 'JetBrains Mono', monospace;
    font-size: .68rem;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--deaj-yellow, #fdb611);
    font-weight: 600;
    margin-bottom: .35rem;
}
.sd-title {
    font-weight: 800;
    font-size: 1.4rem;
    color: #fff;
    line-height: 1.2;
    letter-spacing: -.01em;
}
.sd-tagline {
    color: rgba(255,255,255,.85);
    font-size: .92rem;
}

.sd-badge-maturity { background: rgba(57, 164, 76, .25); color: #fff; border: 1px solid rgba(113, 206, 130, .4); }
.sd-badge-featured { background: rgba(253, 182, 17, .9); color: #1f2937; }
.sd-badge-org      { background: rgba(255, 255, 255, .14); color: #fff; }
.sd-badge-owner    { background: rgba(38, 128, 235, .3); color: #fff; }

/* KPIs strip */
.sd-stats-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: #021b3a;
}
.sd-kpi {
    background: linear-gradient(135deg, #033e75, #144f9c);
    color: #fff;
    text-align: center;
    padding: .9rem .6rem;
    position: relative;
    overflow: hidden;
}
.sd-kpi::before {
    content: ""; position: absolute; inset: 0;
    background: radial-gradient(circle at 80% 20%, rgba(255,255,255,.12), transparent 50%);
}
.sd-kpi strong {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--deaj-yellow, #fdb611);
    line-height: 1.1;
    position: relative;
}
.sd-kpi span {
    display: block;
    font-family: 'JetBrains Mono', monospace;
    font-size: .62rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: rgba(255,255,255,.78);
    margin-top: .3rem;
    position: relative;
}

/* Tabs */
.sd-tabs {
    background: #f7faff;
    border-bottom: 1px solid rgba(3,62,117,.1);
    padding: .25rem .5rem 0;
    gap: .25rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    white-space: nowrap;
    margin: 0;
}
.sd-tabs .nav-link {
    border: 0;
    border-radius: 8px 8px 0 0;
    color: #6b7280;
    font-size: .85rem;
    font-weight: 600;
    padding: .65rem 1rem;
    background: transparent;
    border-bottom: 3px solid transparent;
    transition: all .18s;
    white-space: nowrap;
    flex-shrink: 0;
}
.sd-tabs .nav-link:hover { color: var(--deaj-primary, #033e75); background: rgba(3,62,117,.05); }
.sd-tabs .nav-link.active {
    color: var(--deaj-primary, #033e75);
    background: #fff;
    border-bottom-color: var(--deaj-yellow, #fdb611);
    box-shadow: 0 -2px 6px rgba(3,62,117,.06);
}

.sd-body {
    background: #fff;
    padding: 1.5rem 1.4rem;
}

.sd-eyebrow-section {
    font-family: 'JetBrains Mono', monospace;
    font-size: .68rem;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--deaj-secondary-deep, #39a44c);
    font-weight: 600;
    margin-bottom: .4rem;
}

.sd-tag {
    background: rgba(3, 62, 117, .07);
    color: var(--deaj-primary, #033e75);
    border: 1px solid rgba(3, 62, 117, .12);
    padding: .25rem .6rem;
    font-size: .75rem;
    margin-right: .35rem;
    margin-bottom: .35rem;
    border-radius: 999px;
}

/* Bullets de beneficios y requisitos */
.sd-bullet {
    width: 28px; height: 28px;
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.sd-bullet-success { background: rgba(57, 164, 76, .12); color: var(--deaj-secondary-deep, #39a44c); }
.sd-bullet-primary { background: rgba(3, 62, 117, .1); color: var(--deaj-primary, #033e75); }

/* Reviews */
.sd-review {
    background: #fafbfc;
    border: 1px solid rgba(3, 62, 117, .08);
    border-left: 3px solid var(--deaj-yellow, #fdb611);
    border-radius: 8px;
    padding: .85rem 1rem;
    margin-bottom: .65rem;
}

/* Equipo */
.sd-team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: .85rem;
}
.sd-team-card {
    background: linear-gradient(180deg, #fff, #f7faff);
    border: 1px solid rgba(3, 62, 117, .12);
    border-left: 3px solid var(--deaj-primary, #033e75);
    border-radius: 12px;
    padding: 1rem;
    display: flex; gap: .85rem;
    align-items: flex-start;
    transition: transform .18s, box-shadow .18s;
}
.sd-team-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px -8px rgba(3, 62, 117, .25); }
.sd-team-avatar {
    width: 48px; height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--deaj-primary, #033e75), var(--deaj-primary-bright, #2680eb));
    color: #fff;
    overflow: hidden;
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 10px -4px rgba(3, 62, 117, .4);
}
.sd-team-avatar img { width: 100%; height: 100%; object-fit: cover; }
.sd-team-initials { font-weight: 700; font-size: 1.05rem; color: #fff; }
.sd-team-info { min-width: 0; flex: 1; }

/* Timeline de versiones */
.sd-timeline {
    position: relative;
    padding-left: 28px;
}
.sd-timeline::before {
    content: ""; position: absolute;
    left: 16px; top: 8px; bottom: 8px;
    width: 2px;
    background: linear-gradient(180deg, var(--deaj-primary, #033e75) 0%, rgba(3,62,117,.1) 100%);
}
.sd-version {
    position: relative;
    margin-bottom: 1.25rem;
    padding-left: 24px;
}
.sd-version-badge {
    position: absolute;
    left: -28px;
    top: .25rem;
    width: 36px; height: 36px;
    border-radius: 50%;
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: .85rem;
    box-shadow: 0 4px 10px -4px rgba(0,0,0,.3);
    border: 3px solid #fff;
}
.sd-version-card {
    background: #fff;
    border: 1px solid rgba(3, 62, 117, .1);
    border-radius: 10px;
    padding: 1rem 1.1rem;
    box-shadow: 0 2px 8px -4px rgba(3, 62, 117, .1);
}
.sd-version-change {
    padding: .35rem 0;
    font-size: .88rem;
    color: #374151;
}
.sd-version-change i { width: 1.2rem; margin-right: .35rem; }

/* Métricas: stat-cards y barras */
.sd-stat-card {
    border-radius: 12px;
    padding: 1rem .85rem;
    color: #fff;
    text-align: left;
    position: relative;
    overflow: hidden;
    box-shadow: 0 6px 16px -8px rgba(3, 62, 117, .35);
}
.sd-stat-card::before {
    content: ""; position: absolute; inset: 0;
    background: radial-gradient(circle at 80% 20%, rgba(255,255,255,.18), transparent 50%);
}
.sd-stat-card .label {
    font-family: 'JetBrains Mono', monospace;
    font-size: .65rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: rgba(255,255,255,.85);
    font-weight: 600;
}
.sd-stat-card .h2 {
    font-size: 1.55rem;
    font-weight: 800;
    color: #fff;
    margin: .35rem 0;
}
.sd-stat-card .sub { color: rgba(255,255,255,.78); font-size: .75rem; }
.sd-stat-card.sd-stat-primary   { background: linear-gradient(135deg, #033e75, #2680eb); }
.sd-stat-card.sd-stat-secondary { background: linear-gradient(135deg, #1e5c2a, #39a44c); }
.sd-stat-card.sd-stat-yellow    { background: linear-gradient(135deg, #b8830b, #fdb611); color: #1f2937; }
.sd-stat-card.sd-stat-yellow .label,
.sd-stat-card.sd-stat-yellow .h2,
.sd-stat-card.sd-stat-yellow .sub { color: #1f2937; }
.sd-stat-card.sd-stat-yellow .label { color: rgba(31,41,55,.7); }
.sd-stat-card.sd-stat-yellow .sub   { color: rgba(31,41,55,.65); }

/* Barras de adopción */
.sd-bars {
    display: flex;
    align-items: end;
    gap: .65rem;
    height: 160px;
    padding: .5rem 0;
}
.sd-bar {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .25rem;
    height: 100%;
    position: relative;
}
.sd-bar-fill {
    width: 100%;
    max-width: 36px;
    background: linear-gradient(180deg, var(--deaj-primary-bright, #2680eb), var(--deaj-primary, #033e75));
    border-radius: 6px 6px 2px 2px;
    transition: height .6s cubic-bezier(.18,.89,.32,1.28);
    box-shadow: 0 4px 10px -4px rgba(3, 62, 117, .35);
    margin-top: auto;
}
.sd-bar-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: .65rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #6b7280;
    font-weight: 600;
}
.sd-bar-value {
    font-size: .72rem;
    font-weight: 700;
    color: var(--deaj-primary, #033e75);
}

/* Subtabs en Contribuir */
.sd-subtabs .nav-link {
    border-radius: 999px;
    padding: .4rem 1rem;
    font-size: .82rem;
    color: #6b7280;
    background: transparent;
    border: 1px solid #e5e7eb;
    margin-right: .35rem;
}
.sd-subtabs .nav-link.active {
    background: linear-gradient(135deg, var(--deaj-primary, #033e75), var(--deaj-primary-bright, #2680eb));
    color: #fff;
    border-color: transparent;
}
.sd-md {
    background: #fafbfc;
    border: 1px solid rgba(3, 62, 117, .08);
    border-radius: 10px;
    padding: 1rem 1.2rem;
    color: #374151;
    line-height: 1.65;
}
.sd-md code { background: rgba(3, 62, 117, .07); color: var(--deaj-primary, #033e75); padding: 1px 6px; border-radius: 4px; font-size: .85em; }

/* Mobile: KPI strip 2x2 */
@media (max-width: 575.98px) {
    .sd-stats-strip { grid-template-columns: repeat(2, 1fr); }
    .sd-team-grid { grid-template-columns: 1fr; }
    .sd-tabs .nav-link small { display: none; }
}
