/* 
 * Centro de Descargas - Especialistas en Sistemas
 * Estilos Principales
 * Fecha: 2026-03-23
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 50px;
    padding: 30px 0;
}

header h1 {
    font-size: 3em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.2em;
    opacity: 0.9;
}

.software-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-top: 24px;
}

.software-card {
    /* Render más eficiente cuando hay muchas cards en pantalla */
    content-visibility: auto;
    contain-intrinsic-size: 380px;

    background: #fff;
    border: 1px solid rgba(17, 24, 39, 0.08);
    border-radius: 12px;
    padding: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    position: relative;
    overflow: hidden;
    min-width: 0;

    display: flex;
    flex-direction: column;
    gap: 6px;
}

.software-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
}

.software-card:hover {
    transform: translateY(-3px);
    border-color: rgba(17, 24, 39, 0.12);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.software-icon {
    font-size: 4em;
    text-align: center;
    margin-bottom: 20px;
}

.header-logo {
    width: 60px;
    height: 60px;
    vertical-align: middle;
    margin-right: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.software-logo {
    width: 40px;
    height: 40px;
    display: block;
    margin: 0;
    border-radius: 8px;
    background: rgba(102, 126, 234, 0.06);
    box-shadow: none;
    object-fit: contain;
}

.software-logo--svg {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #667eea;
}

.software-logo--svg svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.software-title {
    font-size: 0.98em;
    color: #1f2937;
    margin-bottom: 0;
    text-align: left;
    font-weight: 600;

    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.software-description {
    color: #666;
    font-size: 0.88em;
    line-height: 1.4;
    text-align: left;

    /* Mantiene cards consistentes aunque haya descripciones largas */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.software-features {
    list-style: none;
    margin: 0;
    font-size: 0.82em;
    min-width: 0;
}

.software-features li {
    position: relative;
    padding: 2px 0 2px 1.15em;
    color: #555;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.software-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    color: #667eea;
    font-weight: 600;
    font-size: 0.9em;
}

.software-features li:nth-child(n+3) {
    /* Máximo 2 viñetas por card para altura pareja */
    display: none;
}

.software-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: linear-gradient(180deg, #f7f8fc 0%, #f3f4f8 100%);
    border: 1px solid rgba(102, 126, 234, 0.12);
    border-left: 3px solid #667eea;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 0.78em;
    color: #4b5563;
}

.software-info-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    min-height: 1.25em;
}

.software-info-label {
    flex-shrink: 0;
    color: #667eea;
    font-weight: 600;
    font-size: 0.92em;
    letter-spacing: 0.01em;
}

.software-info-value {
    color: #374151;
    text-align: right;
    font-variant-numeric: tabular-nums;
    line-height: 1.35;
}

.software-info-version[hidden] {
    display: none !important;
}

.download-btn {
    display: block;
    width: 100%;
    padding: 8px 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    text-align: center;
    font-size: 0.88em;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25);

    margin-top: auto; /* Empuja el botón al final de la card */
}

.download-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.35);
    filter: saturate(1.05);
}

.download-btn:active {
    transform: scale(0.98);
}

.download-btn i {
    margin-right: 6px;
}

footer {
    text-align: center;
    color: white;
    margin-top: 60px;
    padding: 30px 0;
    opacity: 0.9;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2em;
    }

    .header-logo {
        width: 50px;
        height: 50px;
    }

    .software-grid {
        grid-template-columns: 1fr;
    }

    .software-card {
        padding: 14px;
    }
}

@media (max-width: 480px) {
    .header-logo {
        width: 40px;
        height: 40px;
    }
}

.badge {
    display: inline-block;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.68em;
    font-weight: 600;
}

a:hover, a:visited, a:link {
    color: #FFFFFF;
    text-decoration: none;
}

/* Preferencias del usuario: reducir animaciones */
@media (prefers-reduced-motion: reduce) {
    .software-card,
    .download-btn {
        transition: none !important;
    }
    .software-card:hover,
    .download-btn:hover {
        transform: none !important;
    }
}
