/**
 * ============================================================================
 * ESTILOS ESPECÍFICOS - MÓDULO PROYECTO SOCIOTECNOLÓGICO (PST)
 * ============================================================================
 * Cátedra: Proyecto Sociotecnológico - PNFI - UPTMA
 * Complementa los estilos globales de assets/css/estilos.css
 */

/* ==========================================================================
   1. BARRA DE PROGRESO DE LECTURA & BOTÓN VOLVER ARRIBA
   ========================================================================== */
#pstProgressBar {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    width: 0;
    background: linear-gradient(90deg, var(--color-naranja), var(--color-verde-teal));
    z-index: 1050;
    transition: width 0.1s linear;
}

#pstBackTop {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 999;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background-color: var(--color-azul-info);
    color: #ffffff;
    border: none;
    box-shadow: 0 8px 20px rgba(11, 53, 89, 0.35);
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

#pstBackTop.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#pstBackTop:hover {
    background-color: var(--color-verde-teal);
    transform: translateY(-3px);
}

/* ==========================================================================
   2. HERO ESPECÍFICO DE PST Y GRÁFICO ORBITAL
   ========================================================================== */
.pst-hero-section {
    background: radial-gradient(circle at 85% 20%, rgba(0, 121, 107, 0.25) 0%, transparent 50%),
                linear-gradient(135deg, var(--color-azul-info) 0%, var(--color-azul-claro) 60%, #082d44 100%);
    color: #ffffff;
    padding: 5rem 0 5.5rem 0;
    position: relative;
    overflow: hidden;
}

.pst-orbit-container {
    position: relative;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pst-orbit {
    position: absolute;
    border: 1px dashed rgba(255, 255, 255, 0.22);
    border-radius: 50%;
    pointer-events: none;
}

.pst-orb1 { width: 370px; height: 370px; animation: orbitPulse 16s linear infinite; }
.pst-orb2 { width: 270px; height: 270px; animation: orbitPulse 12s linear infinite reverse; }
.pst-orb3 { width: 170px; height: 170px; animation: orbitPulse 8s linear infinite; }

@keyframes orbitPulse {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.pst-hero-center {
    display: grid;
    place-items: center;
    text-align: center;
    width: 155px;
    height: 155px;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--color-verde-teal), var(--color-azul-info));
    box-shadow: 0 0 0 12px rgba(0, 121, 107, 0.2), 0 20px 40px rgba(0, 0, 0, 0.35);
    z-index: 2;
}

.pst-hero-center strong {
    font-size: 2.25rem;
    line-height: 1;
    color: #bdf6e4;
    letter-spacing: -0.03em;
}

.pst-hero-center span {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 700;
    color: #ffffff;
    opacity: 0.9;
}

.pst-orbit-badge {
    position: absolute;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    background: rgba(11, 53, 89, 0.88);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    padding: 8px 14px;
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
    z-index: 3;
    transition: transform 0.3s ease;
}

.pst-orbit-badge:hover {
    transform: scale(1.06);
}

.pst-orbit-badge b {
    color: var(--color-naranja);
    margin-right: 6px;
}

.pst-ob-1 { left: 5%; top: 18%; }
.pst-ob-2 { right: 8%; top: 22%; }
.pst-ob-3 { left: 8%; bottom: 18%; }
.pst-ob-4 { right: 6%; bottom: 22%; }

/* ==========================================================================
   3. TARJETAS DE MÉTRICAS & CIFRAS
   ========================================================================== */
.pst-metrics-wrapper {
    margin-top: -2.5rem;
    position: relative;
    z-index: 10;
}

.pst-metric-card {
    background-color: var(--bg-superficie);
    border: 1px solid var(--borde-suave);
    border-radius: 16px;
    padding: 1.4rem 1.5rem;
    box-shadow: var(--sombra-card);
    transition: var(--transicion-suave);
}

.pst-metric-card:hover {
    transform: translateY(-4px);
    border-color: var(--color-verde-teal);
}

.pst-metric-number {
    font-size: 2.3rem;
    font-weight: 800;
    color: var(--color-verde-teal);
    line-height: 1.1;
}

.pst-metric-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--texto-secundario);
}

/* ==========================================================================
   4. TARJETAS GENERALES Y PANELES
   ========================================================================== */
.pst-card {
    background-color: var(--bg-superficie);
    border: 1px solid var(--borde-suave);
    border-radius: 18px;
    padding: 1.75rem;
    box-shadow: var(--sombra-card);
    height: 100%;
    transition: var(--transicion-suave);
    display: flex;
    flex-direction: column;
}

.pst-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(11, 53, 89, 0.12);
}

[data-bs-theme="dark"] .pst-card:hover {
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.6);
}

.pst-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background-color: rgba(0, 121, 107, 0.12);
    color: var(--color-verde-teal);
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.pst-panel-dark {
    background: linear-gradient(135deg, var(--color-azul-info) 0%, #0c3e5a 100%);
    border-radius: 20px;
    color: #ffffff;
    padding: 2.25rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--sombra-card);
}

.pst-panel-dark p {
    color: #d1e2e9;
}

.pst-badge-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--color-verde-teal);
    margin-bottom: 0.5rem;
}

.pst-badge-indicator .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: var(--color-naranja);
    display: inline-block;
}

.pst-note-box {
    padding: 1rem 1.25rem;
    background-color: rgba(0, 121, 107, 0.08);
    border-left: 4px solid var(--color-verde-teal);
    border-radius: 0 12px 12px 0;
    font-size: 0.88rem;
    color: var(--texto-secundario);
}

.pst-ribbon-box {
    border-left: 4px solid var(--color-naranja);
    background-color: rgba(255, 143, 0, 0.08);
    padding: 1rem 1.25rem;
    border-radius: 0 12px 12px 0;
    font-size: 0.9rem;
    color: var(--texto-principal);
}

/* ==========================================================================
   5. TABS DE TRAYECTOS
   ========================================================================== */
.pst-tab-btn {
    border: 1px solid var(--borde-suave);
    background-color: var(--bg-superficie);
    color: var(--texto-secundario);
    font-weight: 700;
    font-size: 0.92rem;
    padding: 0.75rem 1.4rem;
    border-radius: 12px;
    transition: var(--transicion-suave);
}

.pst-tab-btn:hover {
    border-color: var(--color-verde-teal);
    color: var(--color-verde-teal);
}

.pst-tab-btn.active {
    background-color: var(--color-azul-info);
    border-color: var(--color-azul-info);
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(11, 53, 89, 0.25);
}

.pst-tab-panel {
    background-color: var(--bg-superficie);
    border: 1px solid var(--borde-suave);
    border-radius: 20px;
    padding: 2.25rem;
    box-shadow: var(--sombra-card);
    animation: pstFadeIn 0.35s ease;
}

@keyframes pstFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.pst-chip {
    background-color: rgba(11, 53, 89, 0.07);
    border: 1px solid var(--borde-suave);
    border-radius: 8px;
    padding: 4px 10px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--texto-secundario);
}

/* ==========================================================================
   6. RUTA METODOLÓGICA (9 PASOS)
   ========================================================================== */
.pst-step-card {
    position: relative;
    padding: 1.75rem 1.5rem;
    border-radius: 18px;
    background-color: var(--bg-superficie);
    border: 1px solid var(--borde-suave);
    box-shadow: var(--sombra-card);
    height: 100%;
    transition: var(--transicion-suave);
}

.pst-step-card:hover {
    transform: translateY(-4px);
    border-color: var(--color-verde-teal);
}

.pst-step-number {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--color-verde-teal);
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
    display: inline-block;
}

/* ==========================================================================
   7. PREGUNTAS FRECUENTES (DETAILS / SUMMARY)
   ========================================================================== */
.pst-faq-item {
    background-color: var(--bg-superficie);
    border: 1px solid var(--borde-suave);
    border-radius: 14px;
    margin-bottom: 0.85rem;
    padding: 1.1rem 1.4rem;
    transition: var(--transicion-suave);
}

.pst-faq-item[open] {
    border-color: var(--color-verde-teal);
    box-shadow: var(--sombra-card);
}

.pst-faq-summary {
    cursor: pointer;
    font-weight: 700;
    font-size: 1rem;
    color: var(--texto-principal);
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.pst-faq-summary::-webkit-details-marker {
    display: none;
}

.pst-faq-summary::after {
    content: '+';
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--color-verde-teal);
    transition: transform 0.25s ease;
}

.pst-faq-item[open] .pst-faq-summary::after {
    content: '−';
    transform: rotate(180deg);
}

.pst-faq-content {
    margin-top: 0.85rem;
    color: var(--texto-secundario);
    font-size: 0.94rem;
    line-height: 1.65;
}

/* ==========================================================================
   8. FUENTES DOCUMENTALES (CARDS OSCURAS)
   ========================================================================== */
.pst-sources-wrap {
    background-color: #071c2b;
    color: #ffffff;
}

.pst-source-card {
    background: #0d2c3e;
    border: 1px solid #1c455d;
    border-radius: 18px;
    padding: 1.85rem;
    height: 100%;
    transition: var(--transicion-suave);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.pst-source-card:hover {
    border-color: var(--color-verde-teal);
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

.pst-source-card p {
    color: #c0d7df;
    font-size: 0.92rem;
}

.pst-source-card .source-link {
    color: #8ce4c6;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.2s ease;
}

.pst-source-card .source-link:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* ==========================================================================
   8.1 DROPDOWNS DE NAVEGACIÓN PULIDOS Y MODERNOS
   ========================================================================== */
.navbar-informatica .dropdown-menu {
    background: rgba(11, 53, 89, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    min-width: 275px;
    margin-top: 0.5rem;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
    animation: pstDropdownFade 0.22s cubic-bezier(0.25, 0.8, 0.25, 1);
}

@keyframes pstDropdownFade {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.navbar-informatica .dropdown-item {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.86rem;
    font-weight: 500;
    border-radius: 8px;
    margin: 2px 6px;
    padding: 0.55rem 0.85rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.navbar-informatica .dropdown-item:hover,
.navbar-informatica .dropdown-item:focus {
    background-color: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    transform: translateX(4px);
}

.navbar-informatica .dropdown-toggle::after {
    vertical-align: 0.15em;
    transition: transform 0.2s ease;
}

.navbar-informatica .dropdown.show .dropdown-toggle::after {
    transform: rotate(180deg);
}

/* ==========================================================================
   9. MEDIA QUERIES RESPONSIVE
   ========================================================================== */
@media (max-width: 991.98px) {
    .pst-orbit-container {
        min-height: 320px;
    }
    .pst-orb1 { width: 300px; height: 300px; }
    .pst-orb2 { width: 220px; height: 220px; }
    .pst-orb3 { width: 140px; height: 140px; }
    .pst-hero-center { width: 130px; height: 130px; }
    .pst-hero-center strong { font-size: 1.8rem; }
    .pst-orbit-badge { display: none; }
    .pst-metrics-wrapper { margin-top: 1rem; }
}

@media (max-width: 575.98px) {
    .pst-orbit-container {
        display: none;
    }
    .pst-tab-btn {
        flex: 1 1 45%;
        text-align: center;
        padding: 0.6rem 0.8rem;
    }
}
