/**
 * Estilos para la página de Descargas de Software CONTPAQi
 */

/* Hero Section */
.descargas-hero {
    background: linear-gradient(135deg, #003a71 0%, #0056a8 100%);
    color: white;
    padding: 60px 0 40px;
    text-align: center;
}

.descargas-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.descargas-hero h1 i {
    margin-right: 15px;
    opacity: 0.9;
}

.descargas-hero p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

.descargas-hero .update-info {
    margin-top: 20px;
    font-size: 0.9rem;
    opacity: 0.7;
}

.descargas-hero .update-info i {
    margin-right: 8px;
}

/* Productos Grid */
.productos-grid {
    padding: 50px 0;
    background: #f8f9fa;
}

.productos-grid .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.producto-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.producto-card:hover {
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.12);
}

.producto-header {
    background: linear-gradient(135deg, #003a71 0%, #004d8c 100%);
    color: white;
    padding: 20px 25px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.producto-header i {
    font-size: 1.8rem;
    opacity: 0.9;
}

.producto-header h2 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
}

/* Secciones de Descargas y Cartas */
.descargas-section,
.cartas-section {
    padding: 20px 25px;
}

.descargas-section {
    border-bottom: 1px solid #eee;
}

.descargas-section h3,
.cartas-section h3 {
    font-size: 1rem;
    color: #555;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.descargas-section h3 i,
.cartas-section h3 i {
    color: #003a71;
}

/* Lista de Descargas */
.descargas-list,
.cartas-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.descarga-item,
.carta-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.descarga-item:hover,
.carta-item:hover {
    background: #f0f4f8;
}

.descarga-item.latest {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border: 1px solid #a5d6a7;
}

.descarga-item.service-pack {
    background: #fff8e1;
    border: 1px solid #ffe082;
    padding-left: 30px;
}

.descarga-info,
.carta-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.version {
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.filename {
    font-size: 0.85rem;
    color: #666;
    font-family: monospace;
}

.size {
    font-size: 0.8rem;
    color: #888;
}

.tipo {
    font-size: 0.85rem;
    color: #666;
}

.tipo i {
    margin-right: 5px;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-latest {
    background: #4caf50;
    color: white;
}

.badge-sp {
    background: #ff9800;
    color: white;
}

/* Botones */
.descarga-actions,
.carta-actions {
    display: flex;
    gap: 10px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: #003a71;
    color: white;
}

.btn-primary:hover {
    background: #004d8c;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-outline {
    background: transparent;
    color: #003a71;
    border: 1px solid #003a71;
}

.btn-outline:hover {
    background: #003a71;
    color: white;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

.btn-download i,
.btn-external i {
    font-size: 0.85rem;
}

/* Info Section */
.info-section {
    padding: 50px 0;
    background: white;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.info-card {
    text-align: center;
    padding: 30px 25px;
    background: #f8f9fa;
    border-radius: 12px;
}

.info-card i {
    font-size: 2.5rem;
    color: #003a71;
    margin-bottom: 15px;
}

.info-card h3 {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 10px;
}

.info-card p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 15px;
}

/* Error Section */
.error-section {
    padding: 50px 0;
}

.alert {
    padding: 20px 25px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.alert-danger {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

.alert i {
    font-size: 1.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .descargas-hero {
        padding: 40px 20px 30px;
    }

    .descargas-hero h1 {
        font-size: 1.8rem;
    }

    .descargas-hero h1 i {
        display: block;
        margin-bottom: 10px;
        margin-right: 0;
    }

    .producto-header {
        padding: 15px 20px;
    }

    .producto-header h2 {
        font-size: 1.2rem;
    }

    .descargas-section,
    .cartas-section {
        padding: 15px 20px;
    }

    .descarga-item,
    .carta-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .descarga-actions,
    .carta-actions {
        width: 100%;
    }

    .descarga-actions .btn,
    .carta-actions .btn {
        flex: 1;
        justify-content: center;
    }

    .version {
        flex-wrap: wrap;
    }

    .badge {
        margin-top: 5px;
    }

    .descarga-item.service-pack {
        padding-left: 15px;
    }
}

@media (max-width: 480px) {
    .descargas-hero h1 {
        font-size: 1.5rem;
    }

    .producto-header i {
        font-size: 1.4rem;
    }

    .btn {
        padding: 8px 15px;
        font-size: 0.85rem;
    }
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.producto-card {
    animation: fadeIn 0.4s ease forwards;
}

.producto-card:nth-child(2) { animation-delay: 0.1s; }
.producto-card:nth-child(3) { animation-delay: 0.2s; }
.producto-card:nth-child(4) { animation-delay: 0.3s; }
.producto-card:nth-child(5) { animation-delay: 0.4s; }
.producto-card:nth-child(6) { animation-delay: 0.5s; }
.producto-card:nth-child(7) { animation-delay: 0.6s; }
.producto-card:nth-child(8) { animation-delay: 0.7s; }

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .productos-grid {
        background: #1a1a2e;
    }

    .producto-card {
        background: #16213e;
        box-shadow: 0 2px 15px rgba(0, 0, 0, 0.3);
    }

    .descargas-section {
        border-bottom-color: #2a2a4a;
    }

    .descarga-item,
    .carta-item {
        background: #1a1a2e;
    }

    .descarga-item:hover,
    .carta-item:hover {
        background: #252545;
    }

    .descarga-item.latest {
        background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 100%);
        border-color: #4caf50;
    }

    .descarga-item.service-pack {
        background: #3e2723;
        border-color: #8d6e63;
    }

    .version,
    .info-card h3 {
        color: #eee;
    }

    .filename,
    .tipo,
    .info-card p {
        color: #aaa;
    }

    .info-section {
        background: #16213e;
    }

    .info-card {
        background: #1a1a2e;
    }
}
